cancel
Showing results for 
Search instead for 
Did you mean: 

power consumption in stop modes,standby and shutdown mode

sabari1
Associate III

i am trying to measure the power consumption of the MCU in my custom board with different sleep modes, while measuring the stop2 mode i am getting consumption of 110 uA in the datasheet its showing of 2 uA ,even for shutdown and standby mode also its consuming that current.in sleep and active mode am getting proper value as mention in the data sheet.

to get into stop2 mode am using,

while (1)

{

/* USER CODE END WHILE */

/* USER CODE BEGIN 3 */

HAL_Delay(1000);

HAL_SuspendTick();

HAL_PWREx_EnterSTOP2Mode(PWR_SLEEPENTRY_WFI);

HAL_ResumeTick();

}

/* USER CODE END 3 *

apart from this step do i need to do anything extra for enabling the stop2 mode.

(am using lpm01a ST power measurement module.)

1 ACCEPTED SOLUTION

Accepted Solutions
Remy ISSALYS
ST Employee

Hello,

You can look into STM32CubeWB package, there is several examples around low power mode:

  • For NUCLEO-WB15CC:
    • See PWR examples that show how to enter in the different low power mode.
    • See BLE_HeartRate example that allow to enter in standby mode when BLE is active
  • For NUCLEO-WB55:
    • See PWR examples that show how to enter in the different low power mode.
    • See BLE_HeartRate example that allow to enter in stop2 mode when BLE is active

Another example is available on STM32 Hotspot Github, this example show how to enter in standby mode on STM32WB55.

You can also refer to AN5289, see part 4.6 Low power manager.

Best Regards

View solution in original post

4 REPLIES 4
Kamil Duljas
Senior III

Example from F746:

Change to analog mode all GPIO:

/* Configure all GPIO as analog to reduce current consumption on non used IOs */
  /* Enable GPIOs clock */
   __HAL_RCC_GPIOA_CLK_ENABLE();
   __HAL_RCC_GPIOB_CLK_ENABLE();
   __HAL_RCC_GPIOC_CLK_ENABLE();
   __HAL_RCC_GPIOD_CLK_ENABLE();
   __HAL_RCC_GPIOE_CLK_ENABLE();
   __HAL_RCC_GPIOF_CLK_ENABLE();
   __HAL_RCC_GPIOG_CLK_ENABLE();
   __HAL_RCC_GPIOH_CLK_ENABLE();
   __HAL_RCC_GPIOI_CLK_ENABLE();
   __HAL_RCC_GPIOJ_CLK_ENABLE();
   __HAL_RCC_GPIOK_CLK_ENABLE();
 
 
  GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
  GPIO_InitStruct.Speed = GPIO_SPEED_HIGH;
  GPIO_InitStruct.Pull = GPIO_NOPULL;
  GPIO_InitStruct.Pin = GPIO_PIN_All;
  HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
  HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
  HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
  HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);
  HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
  HAL_GPIO_Init(GPIOH, &GPIO_InitStruct);
  HAL_GPIO_Init(GPIOI, &GPIO_InitStruct);
  HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
  HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
  HAL_GPIO_Init(GPIOJ, &GPIO_InitStruct);
  HAL_GPIO_Init(GPIOK, &GPIO_InitStruct);
 
  /* Disable GPIOs clock */
   __HAL_RCC_GPIOA_CLK_DISABLE();
   __HAL_RCC_GPIOB_CLK_DISABLE();
   __HAL_RCC_GPIOC_CLK_DISABLE();
   __HAL_RCC_GPIOD_CLK_DISABLE();
   __HAL_RCC_GPIOE_CLK_DISABLE();
   __HAL_RCC_GPIOF_CLK_DISABLE();
   __HAL_RCC_GPIOG_CLK_DISABLE();
   __HAL_RCC_GPIOH_CLK_DISABLE();
   __HAL_RCC_GPIOI_CLK_DISABLE();
   __HAL_RCC_GPIOJ_CLK_DISABLE();
   __HAL_RCC_GPIOK_CLK_DISABLE();

them add this:

HAL_PWREx_EnableFlashPowerDown(PWR_FLASHPD_LPSLEEP);

Dudo
KDJEM.1
ST Employee

Hello @sabari​  and welcome to the Community 🙂 ;

Could you please provide more details on the issue such as which STM32WB devices product you are using?

To minimize the power consumption in low power mode, please make sure that, if all free pins are set as analog.

For that, I advise you to take a look at How to minimize the power consumption in low power mode: An example using NUCLEO-F401RE board article.

Also, please check the parameters mentioned in the datasheet.

When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Remy ISSALYS
ST Employee

Hello,

You can look into STM32CubeWB package, there is several examples around low power mode:

  • For NUCLEO-WB15CC:
    • See PWR examples that show how to enter in the different low power mode.
    • See BLE_HeartRate example that allow to enter in standby mode when BLE is active
  • For NUCLEO-WB55:
    • See PWR examples that show how to enter in the different low power mode.
    • See BLE_HeartRate example that allow to enter in stop2 mode when BLE is active

Another example is available on STM32 Hotspot Github, this example show how to enter in standby mode on STM32WB55.

You can also refer to AN5289, see part 4.6 Low power manager.

Best Regards

thanks for your replay anyways I already make the unused GPIO as analog input using the cubeMX configuration , i got the solution from the example codes provided by ST, I forgot to shutdown the core 1 since it is consuming the extra current after i use the API

LL_C2_PWR_SetPowerMode(LL_PWR_MODE_SHUTDOWN);

I am getting the proper current as i mentioned in the datasheet (2 uA).