//****************************************************************************** // MSP430G2xx1 Demo - WDT+ periodic reset // // Description; Various reset intervals are configured in watchdog mode // To illustrate the speed of the reset time the LED flashes in accordance // of the selected interval // // ACLK = 32khz, MCLK = SMCLK = default DCO // // MSP430G2xx1 // // /|\| XIN|// | | | // |RST XOUT|// | | // | P1.0| >LED // // R B Elliott / H Grewal // Texas Instruments Inc // April 2010 // Built with IAR Embedded Workbench Version: 3.42A //****************************************************************************** #include void main(void) { WDTCTL = //WDTCTL //WDTCTL //WDTCTL WDT_MRST_32; = WDT_MRST_8; = WDT_MRST_0_5; = WDT_MRST_0_064; //WDTCTL = WDT_ARST_1000; //WDTCTL = WDT_ARST_250; //WDTCTL = WDT_ARST_16; //WDTCTL = WDT_ARST_1_9; P1DIR |= 0x01; P1OUT ^=0x01; } _BIS_SR(LPM0_bits + GIE); // WDT is clocked by fSMCLK (1MHz) // ~32ms interval (default) // ~8ms // ~0.5ms // ~0.064ms // WDT is clocked by fACLK (32KHz) // 1000ms // 250ms // 16ms // 1.9ms // Enter LPM3 w/interrupt