主程序进来,采用定时器0之后100ms让 LED翻转一次,随后进入LPM4模式,但发现此时定时器还在工作是怎么回事?
#pragma vector=TIMER0_A0_VECTOR
__interrupt void Timer_A (void)
{
static unsigned short fashion;
#ifdef WDT_EN
WDTCTL = WDT_MRST_32;
#endif
if (++fashion > 99)// 100ms检查一次
{
fashion = 0;
P1OUT ^= 0x02; // if P1.0 set, set P1.1
keying=1;
__bis_SR_register(LPM4_bits);
}
} |