Hi All,
Please help me to find out what is the problems with power consumption based on the SW and HW below. Thank you very much!
SW:
WDTCTL = WDTPW + WDTHOLD;
P1SEL = 0;
P1DIR =0xFB;
P1REN = 0x7B;
P1OUT = 0x7B;
P2SEL = 0;
P2DIR = 0xFF;
P2REN = 0xFF;
P2OUT = 0xFF;
P3SEL = 0;
P3DIR = 0xBF;
P3REN = 0xBF;
P3OUT = 0xBF;
// Initialize system clock ACLK=4.096KHz (source from REFOCLK), SMCLK=MCLK=13MHz (Source from XT2)
UCSCTL6 &= ~XT2OFF
UCSCTL3 |= SELREF_2;
UCSCTL4 = SELA__REFOCLK + SELS__DCOCLKDIV + SELM__DCOCLKDIV;
{
UCSCTL7 &= ~(XT2OFFG + XT1LFOFFG + DCOFFG);
SFRIFG1 &= ~OFIFG;
}while (SFRIFG1&OFIFG);
UCSCTL4 = SELA_2 + SELS_5 + SELM_5;
UCSCTL5 = DIVA_3 + DIVS_1 + DIVM_1;
__low_power_mode_4(); // or __low_power_mode_4();
__no_operation();
HW:
The power consumption is 1.030mA. It is way more than 2uA as data sheet specified.
Another problem is that:
If the timer (RTC_A or Timer_A) interrupt which clock source comes from ACLK or SMCLK is enabled, then set system LPM4 mode, the timer ISR is still triggered ! In the LPM4 mode, SMCLK/MCLK/ACLK should be all stopped, why the timer is still working?
Best regards