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/MSP432P401R: MCLK is 48MHZ, Unable to really enter deep sleep

Part Number: MSP432P401R

Tool/software: Code Composer Studio

I'm developing a wearable product, so I have a requirement for power consumption. I have to use DEEP sleep.

I used the tools embedded in CCS: energy trace,Measure the power of my product.

By measuring, I found that the power consumption of my product in activation mode and LPM3 mode is the same, which reaches twenty ma current.

So I don't think my product has really entered the LPM3 mode. Do you have any clues to prompt me?

The code I wrote about the sleep  and the clock is as follows:

int main(void)
{
    
    /* Stop Watchdog  */
    MAP_WDT_A_holdTimer();

    MAP_Interrupt_disableMaster();

    //minimize_power_all_gpio
    MAP_GPIO_setAsOutputPin(GPIO_PORT_P1, PIN_ALL16);
    MAP_GPIO_setAsOutputPin(GPIO_PORT_P2, PIN_ALL16);
    MAP_GPIO_setAsOutputPin(GPIO_PORT_P3, PIN_ALL16);
    MAP_GPIO_setAsOutputPin(GPIO_PORT_P4, PIN_ALL16);
    MAP_GPIO_setAsOutputPin(GPIO_PORT_P5, PIN_ALL16);
    MAP_GPIO_setAsOutputPin(GPIO_PORT_P6, PIN_ALL16);
    MAP_GPIO_setAsOutputPin(GPIO_PORT_P7, PIN_ALL16);
    MAP_GPIO_setAsOutputPin(GPIO_PORT_P8, PIN_ALL16);
    MAP_GPIO_setAsOutputPin(GPIO_PORT_P9, PIN_ALL16);
    MAP_GPIO_setAsOutputPin(GPIO_PORT_P10, PIN_ALL16);
    MAP_GPIO_setAsOutputPin(GPIO_PORT_PJ, PIN_ALL16);

    MAP_GPIO_setOutputLowOnPin(GPIO_PORT_P1, PIN_ALL16);
    MAP_GPIO_setOutputLowOnPin(GPIO_PORT_P2, PIN_ALL16);
    MAP_GPIO_setOutputLowOnPin(GPIO_PORT_P3, PIN_ALL16);
    MAP_GPIO_setOutputLowOnPin(GPIO_PORT_P4, PIN_ALL16);
    MAP_GPIO_setOutputLowOnPin(GPIO_PORT_P5, PIN_ALL16);
    MAP_GPIO_setOutputLowOnPin(GPIO_PORT_P6, PIN_ALL16);
    MAP_GPIO_setOutputLowOnPin(GPIO_PORT_P7, PIN_ALL16);
    MAP_GPIO_setOutputLowOnPin(GPIO_PORT_P8, PIN_ALL16);
    MAP_GPIO_setOutputLowOnPin(GPIO_PORT_P9, PIN_ALL16);
    MAP_GPIO_setOutputLowOnPin(GPIO_PORT_P10, PIN_ALL16);
    MAP_GPIO_setOutputLowOnPin(GPIO_PORT_PJ, PIN_ALL16);

    // init clk
    MAP_PCM_setPowerMode (PCM_LDO_MODE);
    MAP_PCM_setPowerState(PCM_AM_LDO_VCORE1);

    MAP_PCM_setCoreVoltageLevel(PCM_VCORE1);
    MAP_FlashCtl_setWaitState(FLASH_BANK0, 1);
    MAP_FlashCtl_setWaitState(FLASH_BANK1, 1);

    // Enabling FPU for DCO Frequency calculation
    MAP_FPU_enableModule();

    // Setting the DCO Frequency to a standard 48MHz
    // Initializes Clock System
    MAP_CS_setDCOCenteredFrequency(CS_DCO_FREQUENCY_48);

    for(indConfgClk = 0; indConfgClk < 1000; indConfgClk ++);

    MAP_CS_initClockSignal(CS_MCLK,   CS_DCOCLK_SELECT,  CS_CLOCK_DIVIDER_1);  // MCLK =  48M
    MAP_CS_initClockSignal(CS_SMCLK,  CS_DCOCLK_SELECT,  CS_CLOCK_DIVIDER_1);  // SMCLK = 48M

    // all ram bank being use
    MAP_SysCtl_enableSRAMBankRetention(SYSCTL_SRAM_BANK1);
    MAP_SysCtl_enableSRAMBankRetention(SYSCTL_SRAM_BANK2);
    MAP_SysCtl_enableSRAMBankRetention(SYSCTL_SRAM_BANK3);
    MAP_SysCtl_enableSRAMBankRetention(SYSCTL_SRAM_BANK4);
    MAP_SysCtl_enableSRAMBankRetention(SYSCTL_SRAM_BANK5);
    MAP_SysCtl_enableSRAMBankRetention(SYSCTL_SRAM_BANK6);
    MAP_SysCtl_enableSRAMBankRetention(SYSCTL_SRAM_BANK7);

    // enable watchdog
    WDT_A_CLOCKITERATIONS_2G);

    
    init_dma();

    init_uart();

    init_spi();

    /* Disabling high side voltage monitor/supervisor */
    MAP_PSS_disableHighSide();

    
    /* Enabling "rude" mode which forces device to go to sleep regardless of
    * outstanding clock requests */
    MAP_PCM_enableRudeMode();

    MAP_Interrupt_disableSleepOnIsrExit();
    MAP_Interrupt_enableMaster();

    while(1) 
    {
        
            if(MAP_PCM_gotoLPM3())
            {

            }
            else
            {
                #ifdef __DEBUG__
                    printf("\r\nGoto Lpm3 Fail");
                    fflush(stdout);
                #endif
            }
       
    }
}

    
 

    

  • Hello Alex,

    Did you check the pcm_go_to_lpm3 example in the SDK and use the same to replicate the behavior? If you can modify the example code and provide the same code to us, we can help you debug the issue better.
  • "Unable to really enter deep sleep"

    if you are unable to really enter deep sleep, are you at least able to sort of enter deep sleep?
  • Thank you for your reply,I changed to another circuit board for testing. Without gotoLPM3, the current is 7mA larger than that in gotoLPM3.
    So I think the msp432 in a state of sleep.But the circuit can also test the current of 4 mA. I think maybe there are other electronic components on my circuit board, which are consuming electricity.I'm still looking for ways to reduce MSP432 power consumption.
  • Thank you for your reply . I changed to another circuit board for testing. Without gotoLPM3, the current is 7mA larger than that in gotoLPM3.
    So I think the msp432 in a state of sleep. But I still have a question?In the pcm_go_to_lpm3 example in the SDK,low MCLK is used. And no other peripherals are used. But in my project,I use the highest MCLK frequency of 48MHz, and I still use many peripherals, such as DMA, UART, SPI.In such a case, after calling the gotoLPM3 function, do these peripherals automatically shut down to reduce power consumption? If the peripheral does not shut down automatically during sleep, does it need to be closed manually before entering sleep?
  • Hello Alex

    When using the Rude mode, it will shut down the clocks to the peripherals. However that is not recommended if your application controls the peripherals. There must always be graceful shutdown. Now if it is possible to separate the supply for the MSP432P401R from rest of the circuit then I would advise measuring the currents separately.

    I have an example in the SDK

    C:\ti\simplelink_msp432p4_sdk_2_10_00_14\examples\nortos\MSP_EXP432P401R\demos\cmsis_dsplib_vibration_msp432p401r

    which does the same thing, i.e. put the device in LPM3 state from Active state with 49MHz (ignore the comment that it is LPM3.5). I ran the code and checked with CCS Energy Trace and the current does drop down to uA level. Attached is a snapshot for the Energy Trace.

**Attention** This is a public forum