Skip to main content
Visitor II
April 17, 2025
Solved

Too high current draw in shutdown mode

  • April 17, 2025
  • 2 replies
  • 448 views

I'm just getting started with my STM32WB15CC nucleo board, and my first goal was to put in shutdown mode to check the current draw, which I expected to be around 1 uA. I'm measuring the current on the JP3 header with a joulescope which should represent the actual current used by the MCU itself.

I'm using the PWR_LPSLEEP example in the CubeMX IDE, and exchanged the "entersleepmode" call to the "enter shutdown mode", see below:

 

/* Enter Sleep Mode, wake up is done once User push-button (SW1) is pressed */

//HAL_PWR_EnterSLEEPMode(PWR_LOWPOWERREGULATOR_ON, PWR_SLEEPENTRY_WFI);

HAL_PWREx_EnterSHUTDOWNMode();

 

After the shutdown call, the joulescope shows a current draw of 42 uA, which seems very high for shutdown mode.

Am I missing something? Any pointers?

The reason I want to start with this basic test is because the project I'm working on is for a battery driven sensor, so a low current is crucial.

    This topic has been closed for replies.
    Best answer by minded

    By examining and copying the code used in the STM32LowPower Arduino library from the STM32duino core, I found the issue. What was missing was to enter shutdown mode on the radio core of the STM32WB15CC:

     
    LL_C2_PWR_SetPowerMode(LL_PWR_MODE_SHUTDOWN);
    
    /**
    * @brief Set Low-Power mode for CPU2
    * @rmtoll C2CR1 LPMS LL_C2_PWR_SetPowerMode
    * @PAram LowPowerMode This parameter can be one of the following values:
    * @arg @ref LL_PWR_MODE_STOP0
    * @arg @ref LL_PWR_MODE_STOP1
    * @arg @ref LL_PWR_MODE_STOP2 (*)
    * @arg @ref LL_PWR_MODE_STANDBY
    * @arg @ref LL_PWR_MODE_SHUTDOWN
    *
    * (*) Not available on devices STM32WB15xx, STM32WB10xx, STM32WB1Mxx
    * @retval None
    */
    __STATIC_INLINE void LL_C2_PWR_SetPowerMode(uint32_t LowPowerMode)
    {
     MODIFY_REG(PWR->C2CR1, PWR_C2CR1_LPMS, LowPowerMode);
    }

    Code formatting applied - please see How to insert source code for future reference.

    2 replies

    Super User
    April 17, 2025

    Make sure you've disconnected all connections to the ST-Link - leakage there could easily account for 40uA...

    Check the schematics very carefully for any other possible leakage paths.

    You may need to power cycle - not just reset - after using the debugger/programmer ...

    mindedAuthor
    Visitor II
    April 17, 2025

    I'm using USB-C only, can I still disconnect ST-Link in that case, or is not needed then?

    I also tried to put the device in shutdown from an application built with Arduino-IDE and the "low power" library. And this seems to work - I get about 1 uA current draw in shutdown.

    mindedAuthorAnswer
    Visitor II
    April 17, 2025

    By examining and copying the code used in the STM32LowPower Arduino library from the STM32duino core, I found the issue. What was missing was to enter shutdown mode on the radio core of the STM32WB15CC:

     
    LL_C2_PWR_SetPowerMode(LL_PWR_MODE_SHUTDOWN);
    
    /**
    * @brief Set Low-Power mode for CPU2
    * @rmtoll C2CR1 LPMS LL_C2_PWR_SetPowerMode
    * @PAram LowPowerMode This parameter can be one of the following values:
    * @arg @ref LL_PWR_MODE_STOP0
    * @arg @ref LL_PWR_MODE_STOP1
    * @arg @ref LL_PWR_MODE_STOP2 (*)
    * @arg @ref LL_PWR_MODE_STANDBY
    * @arg @ref LL_PWR_MODE_SHUTDOWN
    *
    * (*) Not available on devices STM32WB15xx, STM32WB10xx, STM32WB1Mxx
    * @retval None
    */
    __STATIC_INLINE void LL_C2_PWR_SetPowerMode(uint32_t LowPowerMode)
    {
     MODIFY_REG(PWR->C2CR1, PWR_C2CR1_LPMS, LowPowerMode);
    }

    Code formatting applied - please see How to insert source code for future reference.