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.

MSP430FR2422: disabling the SVS (reducing current while in LPM3.5)

Part Number: MSP430FR2422

Hello TI support,

I use the CCS 10.2.0 for programming my MSP430FR2422.

At the moment a run your demo code "msp430fr2422_lpm3_5_01.c" for reaching the LPM3.5 low power mode successfully.
With one modification, because I do not have a external crystal XT1 connected.
Thus the clock source of the RTC is VLO.

While in LPM3.5, I measured a current draw of 0.3 uA at 2,5V.
That is a great result.

But the dataheet says additionally:

"The high-side supervisor (SVSH) oversees DV CC . It is active in all power modes by default. In LPM3,
LPM4, LPM3.5, and LPM4.5, it can be disabled by setting SVSHE = 0."

I am now thinking about whether the current draw can still be reduced in LPM3.5 by disabling the SVS?

My quick try to place the following code in my main() routine is not working (or leads to a reset):

// disabling the SVS (Supply Voltage Supervisor) by setting SVSHE = 0

// Open PMM registers for write access
PMMCTL0_H = PMMPW_H;

PMMCTL0 &= ~SVSHE;
// Lock PMM registers for write access
PMMCTL0_H = 0x00;

Please can you confirm: It is possible to disable the SVS to reduce the current in LPM3.5? If yes, how can I do this? What is the right piece / place of code?

Thank you so much!

Best regards
Stefan

 

  • Hi Stefan,

    I will respond within 24hrs.

  • Hi Stefan,

    Yes, you should be able to do this.  So you are saying the reset occurs just after disabling the SVS?  Are you using the correct PW (0xA500)?

     Can you reduce the size of your code to smallest possible, but still demonstrates this issue, and attach to your response.

  • Hi Dennis,

    yes I checked the password twice. As you can see I used the official #define in the msp430fr2422.h file. Here #define PMMPW_H    (0x00a5), where only the higher 16bit will be written into the PMMCTL0 register... 

    Now, I send you my complete source code hoping that you might find a bug. :-)

    Thank you so much (for the review)!!!

    ---------------------------------------

    #include <msp430.h>

    void initGpio(void);
    
    int main(void)
    {
        WDTCTL = WDTPW | WDTHOLD | WDTSSEL__VLOCLK;               // Stop WDT, watch clock source = VLO
    
        initGpio();                             // Configure GPIO
    
        // First determine whether we are coming out of an LPMx.5 or a regular RESET.
        if (SYSRSTIV == SYSRSTIV_LPM5WU)        // When woken up from LPM3.5, reinit
        {
            // If MCU wakes up from LPM3.5, re-init and then return to LPM3.5 again.
    
            // Restore P1OUT value from backup RAM memory, keep P1OUT after LPMx.5 reset
            P1OUT = *(unsigned int *)BKMEM_BASE;
    
            __enable_interrupt();               // The RTC interrupt should trigger now...
        }
        else
        {
            // Device powered up from a cold start.
            // It configures the device and puts the device into LPM3.5
    
            // disabling the SVS (Supply Voltage Supervisor) by setting SVSHE = 0
    
            // Open PMM registers for write access
            PMMCTL0_H = PMMPW_H;
    
    // clear SVSHE bit PMMCTL0 &= ~SVSHE; // Lock PMM registers for write access PMMCTL0_H = 0x00; // Configure backup memory *(unsigned int *)BKMEM_BASE = 0; // Configure RTC (clock source = VLO) // Interrupt and reset happen every 1024/10000 * 150 = 15,6 sec. RTCMOD = 150-1; RTCCTL = RTCSS__VLOCLK | RTCSR |RTCPS__1024; RTCCTL |= RTCIE; // Store P1OUT value in backup memory register before enter LPM3.5 *(unsigned int *)BKMEM_BASE = P1OUT; } // do something for 5 sek (~216uA @1MHz) __delay_cycles(5000000); // Enter LPM3.5 mode with interrupts enabled. Note that this operation does // not return. The LPM3.5 will exit through a RESET event, resulting in a // re-start of the code. PMMCTL0_H = PMMPW_H; // Open PMM Registers for write PMMCTL0_L |= PMMREGOFF; // and set PMMREGOFF __bis_SR_register(LPM3_bits | GIE); __no_operation(); // for debug only (never reached) return 0; } void initGpio(void) { P1DIR = 0xFF; P2DIR = 0xFF; P3DIR = 0xFF; P4DIR = 0xFF; P5DIR = 0xFF; P6DIR = 0xFF; P1REN = 0xFF; P2REN = 0xFF; P3REN = 0xFF; P4REN = 0xFF; P5REN = 0xFF; P6REN = 0xFF; P1OUT = 0x00; P2OUT = 0x00; P3OUT = 0x00; P4OUT = 0x00; P5OUT = 0x00; P6OUT = 0x00; // Disable the GPIO power-on default high-impedance mode // to activate previously configured port settings PM5CTL0 &= ~LOCKLPM5; } #pragma vector = RTC_VECTOR __interrupt void RTC_ISR(void) { switch(__even_in_range(RTCIV, RTCIV_RTCIF)) { case RTCIV_NONE : break; // No interrupt pending case RTCIV_RTCIF: // RTC Overflow // Toggle LED on P1.0 P1OUT ^= BIT0; // Store P1OUT value in backup memory register *(unsigned int *)BKMEM_BASE = P1OUT; break; default: break; } }
  • Hi Stefan,

    Try this instruction

            asm(" BIC.B #0x40, &PMMCTL0_L");

    instead of

    PMMCTL0_L |= PMMREGOFF;

**Attention** This is a public forum