This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430FR2310: LPM3 current

Part Number: MSP430FR2310
Other Parts Discussed in Thread: ENERGYTRACE

The complete IC model is msp430fr2310irgyr.We have an LED product using this model. In order to test the power consumption of lpm3, we deleted some circuit components, and finally left these components in the figure below. MCU needs periodic sleep wake-up. During 6S of sleep, test and confirm that all P1 and P2 pins output 0V, the total current is about 16.5ua, and the voltage (-v and +v) is 3V. I learned from the manual that the current should be about 1.1ua. I use the demo program provided by Ti to test. Which side of my program is not set correctly? Please give some suggestions.

#include <msp430.h>

void Init_GPIO(void);
unsigned char ucMode = 8;
int main(void)
{
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer

// Configure GPIO
Init_GPIO();

// Disable the GPIO power-on default high-impedance mode
// to activate previously configured port settings
PM5CTL0 &= ~LOCKLPM5;

__bis_SR_register(SCG0); // disable FLL
CSCTL3 |= SELREF__REFOCLK; // Set REFO as FLL reference source
CSCTL0 = 0; // clear DCO and MOD registers
CSCTL1 &= ~(DCORSEL_7); // Clear DCO frequency select bits first
CSCTL1 |= DCORSEL_5; // Set DCO = 16MHz
CSCTL2 = FLLD_0 + 487; // DCOCLKDIV = 16MHz
__delay_cycles(3);
__bic_SR_register(SCG0); // enable FLL
while(CSCTL7 & (FLLUNLOCK0 | FLLUNLOCK1)); // FLL locked
CSCTL4 = SELMS__DCOCLKDIV | SELA__REFOCLK; // set default REFO(~32768Hz) as ACLK source, ACLK = 32768Hz
// default DCOCLKDIV as MCLK and SMCLK source

// Configure RTC
RTCMOD = 60-1; // Interrupt and reset happen every 10*1000*(1/10KHz) = ~1S
RTCCTL |= RTCSS__VLOCLK | RTCSR |RTCPS__1000;
RTCCTL |= RTCIE;

while(1)
{
CSCTL5 |= DIVM_1; // MCLK = 0.5* DCOCLKDIV = 8MHz - only for case of temperature changes significantly for LPM3 entry and LPM3 exit
__bis_SR_register(LPM3_bits | GIE); // Enter LPM3, Stop all clocks
__no_operation(); // For debug
}
}

// RTC interrupt service routine
#if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
#pragma vector=RTC_VECTOR
__interrupt void RTC_ISR(void)
#elif defined(__GNUC__)
void __attribute__ ((interrupt(RTC_VECTOR))) RTC_ISR (void)
#else
#error Compiler not supported!
#endif
{
// Configure the CS
__bic_SR_register(SCG0); // enable FLL
while(CSCTL7 & (FLLUNLOCK0 | FLLUNLOCK1)); // FLL locked

CSCTL5 &= DIVM_1; // MCLK = DCOCLKDIV = 16MHz - only for case of temperature changes significantly for LPM3 entry and LPM3 exit

switch(__even_in_range(RTCIV,RTCIV_RTCIF))
{
case RTCIV_NONE : break; // No interrupt
case RTCIV_RTCIF: __bic_SR_register_on_exit(LPM3_bits); // RTC Overflow
// Exit LPM3 on reti
break;
default: break;
}
}

void Init_GPIO()
{
P1DIR = 0xFF; P2DIR = 0xFF;
P1REN = 0xFF; P2REN = 0xFF;
P1OUT = 0x00; P2OUT = 0x00;
}

  • The REFO consumes about 15uA [Ref datasheet  (SLASE58E) Table 5-7]. The number you cited in Table 6-1 applies to using the LFXT (32kHz crystal) rather than the REFO.

  • Is there any way to reduce the sleep current by using the internal clock source of MCU (without external 32.768KHz)? Our target sleep current is 3ua, and we want to wake up every 5 seconds.

  • Using LPM4 rather than LPM3 would turn off ACLK (which is requesting the REFO). Since you're (already) using VLOCLK for the RTC, you would still get your wakeup, at much lower power [Ref datasheet (SLASE58E) Sec 5.7].

  • Hello,

    A slight correction to what Bruce mentioned above as in LPM4 you won't have RTC available. What you would want is LPM3.5, which is the lowest power state that you can have RTC. Tradeoff being wakeup time and the need to go through a  full Reset to wakeup. So your code has to handle that. 

    To stick with LPM3 and achieve the lowest power, you would need to add an external low frequency crystal. 

  • I hesitate to disagree with Jace, but, um, RTC+VLO+LPM4 works for me. EnergyTrace reports 0.6uA, which seems to match with the table in datasheet Sec 5.7.

    [Full disclosure: I used an FR2311, not an FR2310, but they share a datasheet.]

  • Hey Bruce,

    What you are doing will work, but you are not really going into LPM4. You are actually going into LPM3, as the clock request system is keeping VLO and thus RTC alive. The issue with this is other clock requests can come in as well or be pending, so you think you are getting the lower current, but you are not. 

  • Hi Jace,

    I'm aware of the phenomenon you describe, but the table in section 5.7 has an entry for "iLPM4,RTC,VLO" which suggests that the author(s) thought this combination was "real" LPM4. A sub-1uA measurement tells us that ACLK (REFO) isn't running. As mentioned, my EnergyTrace measurement concurs with the table in section 5.7, i.e. this has been demonstrated.

    This does seem to disagree with datasheet Table 6-1. which suggests a contradiction in the datasheet. Perhaps Table 6-1 is incorrect? Or perhaps this is a "distinction without a difference"?

    Ordinarily I would just let this go ("agree to disagree" over contradictory information), but I don't want to discourage yu su from using a demonstrably correct solution provided in the datasheet. Unless I'm missing something?

  • Hey Bruce,

    What you say is current and fair. My only real distinction here is that LPM4 disables ALCK, which can drive the RTC. As Table 6-1 indicates, RTC and VLO are off, with the exception is requested by low frequency peripherals. That is the distinction so Iw ould amend my first statement toa gree that explicitly requesting VLO + RTC is a valid use case for getting lower power. Some users get trapped into thinking certain LPMs are absolute though, so my first statement is more fo general sense. 

    Bottom line, Yu Su has some different options to lower power for their application. It can get confusing with so many options sometimes though :) 

**Attention** This is a public forum