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.

CCS/MSP430F5528: LPM3 Benchmark Code

Part Number: MSP430F5528
Other Parts Discussed in Thread: MSP430WARE

Tool/software: Code Composer Studio

Hello,

I'm tweaking the current of a MSP430f5528 device.

It would be cool to have a benchmark code - simply switching all off, and go to LPM3. Watchdog Timer should be operational as  periodic Timerinterrupt source. 

Is the following code sufficient to run such a benchmark - or are there any other things I should take into account for minimizing the current according to the datasheet for achieving the specified 1.9 uA at 1.9V?

At the moment I'm far far away from this current unfortunatelly.

Thank You very much for Your assistance!

With best regards

Mathias

void main(){
WDTCTL = WDTPW | WDTHOLD; /* UCSCTL6|=XT2OFF; UCSCTL6|=XT1OFF; UCSCTL6|=SMCLKOFF; // This settings didn't turn out to have any effect to the low power performance in this benchmark. */ PADIR=0xffff; PAOUT=0x0000; // Ports 1 and 2 PBDIR=0xffff; PBOUT=0x0000; // Ports 3 and 4 PCDIR=0xffff; PCOUT=0x0000; // Ports 5 and 6 PJDIR=0xffff; PJOUT=0x0000; // Jtag Port _low_power_mode_3(); }

  • Hi Mathias,
    for all of our devices, you can find a lot of example codes on our product page. Just go to the MSP430f5528 page and click on the software tab. In this zip file, you will find as well the following code to enter LPM3:

    int main(void)
    {
      WDTCTL = WDTPW + WDTHOLD;                 // Stop watchdog timer
      UCSCTL4 = SELA_1;                         // ACLK = VLO
      
      // Port Configuration
      P1OUT = 0x00;P2OUT = 0x00;P3OUT = 0x00;P4OUT = 0x00;P5OUT = 0x00;P6OUT = 0x00;
      P7OUT = 0x00;P8OUT = 0x00; PJOUT = 0x00;
      P1DIR = 0xFF;P2DIR = 0xFF;P3DIR = 0xFF;P4DIR = 0xFF;P5DIR = 0xFF;P6DIR = 0xFF;
      P7DIR = 0xFF;P8DIR = 0xFF; PJDIR = 0xFF;
    
      // Disable VUSB LDO and SLDO
      USBKEYPID   =     0x9628;           // set USB KEYandPID to 0x9628 
                                          // access to USB config registers enabled  
      USBPWRCTL &= ~(SLDOEN+VUSBEN);      // Disable the VUSB LDO and the SLDO
      USBKEYPID   =    0x9600;            // access to USB config registers disabled 
      
      __bis_SR_register(LPM3_bits);       // Enter LPM3 
      __no_operation();
    }

    As you may have realized, the USB module is not turned off in your code. Furthermore, you can switch of the SVS in case that you don't need it. The code to turn SVS of is:

    // Disable SVS
      PMMCTL0_H = PMMPW_H;                // PMM Password
      SVSMHCTL &= ~(SVMHE+SVSHE);         // Disable High side SVS 
      SVSMLCTL &= ~(SVMLE+SVSLE);         // Disable Low side SVS

    Best regards,
    Tobias

  • Hi Mathias,
    You can go to our product page or Resource Explorer in CCS or at dev.ti.com. In Resource Explorer, open Software and drill down to your part in MSP430Ware, under Devices. There are a couple of LPM3 examples there.

    I'm not sure if it will work but try this link while logged in: dev.ti.com/.../
  • Looks like Tobias beat me to it!
  • Thank You very much! I'll use this features, hopefully see real low power!

    Good thing about it - I read through the UCS datasheet - very interesting.

    Just tried to disable the auto request mechanism by writing 0x0000 to UCSCTL8. Result only 2uA better... ok I'll study the properties of the USB Module separate.

    One question to Your example/in general: I don't see a definition of the JTAG-Port PortJ. Isn't it neccessary to be explicitely defined? Maybe because it is well defined by default.

    Anyway - thanks a thousand time for the great and constructive answer - now I've got a point to go into depth!

    With best regards
    Mathias
  • GREAT! 1.59uA - without disabling the SVS. Thank You!!!!!

**Attention** This is a public forum