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.

Low power mode msp432

Hy guys,

i want to use the different low power modes for my msp432 datalogger but I don't know how I could configure them in the CCS.

I want to use the LPMxx which deals with a power consumption in µA when the controller sleeps.

Greetings,

Chris

  • Hi Christoph!

    Download the code examples and look at the following two programs:

    • msp432p401_pcm_10                             Enter LPM3.5 mode
    • msp432p401_pcm_11                             Enter LPM4.5 mode

    But note that the code examples are not CMSIS compliant yet (at least I think so). But they show the basic principle.

    Dennis

  • Hello Dennis,

    thank you for your information.
    I adapted my source code (main.c) and the startup data(startup_ccs.c) but I couldn't find the system.c.
    Do you know where I could find this file?
    Furthermore I got several error messages because of the PCM and the WDT in the compile process, because the expressions are unknown.
    Thanks
  • Hi Christoph!

    Christoph Marko said:
    I couldn't find the system.c

    Is it asked for?

    Christoph Marko said:
    several error messages because of the PCM and the WDT in the compile process

    Dennis Eichmann said:
    But note that the code examples are not CMSIS compliant yet

    See:

    Dennis

  • So to solve the problem with the unknown expressions the CCS has to be updated?
    Is for the old version a project available to use the different low power modes?
  • Christoph Marko said:
    So to solve the problem with the unknown expressions the CCS has to be updated?

    No, it is the other way - the updated CCS will not allow the older example programs. If you read the CMSIS info page you will see that the differences are not that big. It is mostly other names for the definitions and some other ways of working with the registers of the MSP. But there is also a conversion tool available. This might not change everything perfectly, but you can give it a try. Also have a look in the CMSIS compliant header files for the MSP432 - there you will see the "new" type of register names which often are the old ones with some extra text. For register accessing, the previously linked in page shows how to do it now.

    Christoph Marko said:
    Is for the old version a project available to use the different low power modes?

    The code examples are the older version.

    Dennis

  • Ah ok, but when I opened the projects a few months ago there were only 2 files (main.c and the startup ccs) and now there are 3 files.
  •     /* Enable all SRAM bank retentions prior to going to LPM3 (Deep-sleep) */
        SYSCTL->SRAM_BANKRET |= SYSCTL_SRAM_BANKRET_BNK7_RET;  
        __enable_interrupt();
        NVIC->ISER[1] = 1 << ((PORT6_IRQn) & 31);
        
    
        /* Setting the sleep deep bit */
        SCB->SCR |= (SCB_SCR_SLEEPDEEP_Msk);
    
        PCM->CTL0 = PCM_CTL0_KEY_VAL | PCM_CTL0_LPMR__LPM35; 

    When I use this in my code I got these errors:

    • #137 struct "<unnamed>" has no field "CTL0"
    • #137 struct "<unnamed>" has no field "SRAM_BANKRET"
    • #20 identifier "PCM_CTL0_KEY_VAL" is undefined
    • #20 identifier "PCM_CTL0_LPMR__LPM35" is undefined
  • I forgot to mention that I use a timer interrupt instead of the shown pin interrupt
  • Hi Dennis,

    I tried this yesterday with the power mode 0, but I couldn't see a difference to the normal mode.

    My msp432 was supplied by a solar cell and I measured the current between the solar cell and the micro controller.

    When the programm goes to the sleep mode the current was as high as in the working mode. 

    Did I meausure wrong or have I problem with the program?

  • Christoph Marko said:
    Did I meausure wrong or have I problem with the program?

    Hard so say without knowing your hardware and your code. You should add some more information. Is it a custom board or are you working with the LaunchPad? What is your setup?

    Dennis

  • Hi dennis,
    my workplace is as mentioned below:
    solar cell - diode - supercap (1F/5.5V) - MSP432 launchpad

    At night I tested the circuit with a power supply unit and a direct connection to the msp432 launchpad.
    power supply unit - MSP432 launchpad
    I set the current to max. 400mA and measured the current after the power supply unit and when the controller went to sleep modus the current consumption didn't change. (The measured current was 390mA)

    In the code I used only the LPM0 with the __sleep() and _no_operation() function.
  • If your circuit draws 390mA, how much do you expect the MSP432 to draw? Although it is a quite powerful processor, it's power consumption is (depending on your setting) still quite low. So what would be the value you want to see? By the way: What part of your circuit draws that much current? Only the LaunchPad will not.

    Dennis
  • When I set the current limit lower the msp432 drew much lower current, but it works also with a lower current.
    But for my application I have also a microsd Breakout board which is every 10s active.
    Therefore the current rises every 10s for 1s and then the current has to sink or am I wrong?
  • 390mA is way too much if there isn't anything powerful connected.
  • hi dennis,

    thats really strange. I tried to connect only my launchpad to the full loaded supercap (1F/5.5V) and the voltage decreased rapidly.

    Could this depend on the power save mode ?

  • Could you show or draw your hardware setup and the jumper settings?
  • Hello Dennis,

    I connected the anode of the supercap with the 5V input and the kathode of the supercap with GND. The jumpers (3.3V, 5V,RTS,CTS,RXD and TXD) between the XDS110-ET and the MSP432P401R board are set. Could it be that the XDS needed the high amount of the current??

  • hi dennis,
    I did an update of the CCS and I worked with the code from the TI Ressource Explorer - now everythings works.
    But when I measured the current, I got for the "Enter LPM3.5 mode" example a current of 1.33mA.
    I removed all jumpers and measured the current on the isolation block. I measured the current between the 2 pins of the 3V3 connection.
    I think the current is too high for this power mode or am I wrong?
  • Hi dennis,
    I measured the power consumption of the software toggle programm is it possible that the board needs 150mA for this application?
    I measured over the 3V3 isolation block and removed all other jumper.

**Attention** This is a public forum