Other Parts Discussed in Thread: CC430F5147
Following code cause high current consumption (100uA) in LPM3 with CC430F5137. Same code with CC430F5147 has a more normal consumption of 4.3uA. It is the combination of RF1 in WOR and TA0. Disabling either and CC430F5137 drops down to 4.3uA. Also removing //TA0CCTL0 |= CCIE; (*1) drops current down to 4.3uA.
What am I missing?
void main( void ) { WDTCTL = WDTPW | WDTHOLD | WDTCNTCL; P1OUT = 0x00; P1DIR = 0xff; P1IES = 0x00; P2OUT = 0x80; P2DIR = 0xdf; P2IES = 0x00; P3OUT = 0x00; P3DIR = 0xff; P5OUT = 0x00; P5DIR = 0x03; PJOUT = 0x00; PJDIR = 0xff; PMMCTL0_H = 0xA5; SVSMHCTL = 0; SVSMLCTL = 0; //SVSLFP; PMMCTL0_H = 0x00; // TA0 TA0CTL = TASSEL__ACLK | TACLR | ID__4; TA0EX0 = TAIDEX_1; TA0CTL |= MC__CONTINUOUS; PMMCTL0_H = 0xA5; PMMCTL0_L = 0; PMMHPMRE_L; // PMMHPMRE_L=52uA, 0=200uA PMMCTL0_H = 0x00; // RF1, Init WOR strobe_command(RF_SRES); strobe_command(RF_SNOP); strobe_command(RF_SCAL); strobe_command(RF_SIDLE); strobe_command(RF_SRX); strobe_command(RF_SWOR); // TA0, Start stop TA0CCR0 = TA0R+200; TA0CCTL0 |= CCIE; // *1 cc430f5137: With 85uA, Without 4,4uA / cc430f5147: With or Withoout 4,3uA __bis_SR_register(GIE); __bis_SR_register(LPM3_bits); P3DS = 0x80; // LED Strong drive P3OUT = 0x80; // LED On while(1); } static void __attribute__((__interrupt__(TIMER0_A0_VECTOR))) _io_timerA0_ISR0 (void) //CC0 { TA0CCTL0 &= ~(CCIE|CCIFG); }