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.

MSPM0L1306: MCU not entering shutdown mode/ how to test using wakestat?

Part Number: MSPM0L1306

Hello,

I have a customer trying to implement a wakeup from shutdown mode example using their own driver library implementation.

This is their power policy shutdown function:

/*!
            * @brief Call this to configure the MCU into shutdown mode
            * @param None
            * @return None
            */
            void SetPowerPolicyShutdown( void )
            {

                SYSCTL->SOCLOCK.PMODECFG = SYSCTL_PMODECFG_DSLEEP_SHUTDOWN;
                SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;

            }

This is the code that sets up the shutdown condition:

button.SetWake( IO_Definitions::BUTTON_WAKE_CONFIG );


DL_SYSCTL_setPowerPolicySHUTDOWN();
delayCycles(1000000);
//sleepMode.SetPowerPolicyShutdown( );

while ( 1 )
{

    // waiting on the interrupt
    __WFI();

}

So I have tried just copying in the driverlib implementation of the shutdown power policy. Both right now appear to just cause the MCU to sit in the WFI loop.

I have verified that my IO configurations for the wake pin PA18 match that of our shutdown example.

There are no other peripherals enabled on this device right now outside of systick. I did try to disable systick but this didn't impact anything either. 

I have noticed that slightly different versions of the code would cause the MCU to actually go into a non-connectable state where I couldn't download code to the device and would only come out after reset. So this seems to mean that sometimes I can get to a shutdown state, but it's very inconsistent and I have never been able to wake up the device out of shutdown.

Any tips on what could be preventing the device from both waking up from shutdown and what could be preventing me from fully reaching shutdown?

Customer is using IAR compiler 9.40.

Munan

  • Hi Munan,

    Have you tried the shutdown mode example code in the SDK first? And have you also tried disconnect and reconnect the board after programming and try debug the board without IDE?

    Best regards,

    Cash Hao

  • Hi Cash,

    Yes we have tried the SDK example, this works as expected both connected to the debugger as well as on its own.

    After doing some more experimenting I think actually the way we were debugging the software was creating an issue with the operation of the application since I was adding a breakpoint into the check for BOR from wakeup logic. 

    So I changed this to turn on one of the LEDs on the Launchpad to indicate wakeup and this seems to indicate that the code is working as expected.

    Munan