cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB55 Low power mode implementation. I am using STM32WB55UG custom board, I am following PWR_STOP1 and PWR_STOP2_RTC examples to put my device in to STOP1 or STOP2 low power modes

AM.12
Associate III

After following these examples I am unable to put the device in STOP1/2 low power modes.

Can someone please help with implementing low-power modes

9 REPLIES 9
Sarra.S
ST Employee

Hello @Community member​ 

Could you precise what is exactly the issue? or errors u get?

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.

AM.12
Associate III

Hi @Sarra.S​

Thank You, 

I followed examples to implement low power modes, if I try to put the device into STOP2 and STOP1 modes the power consumption should be around 2µA as per the datasheet in STOP2.

But it still consuming 10mA in both cases.

I believe it's not entering into low-power mode.

I followed some post also but no improvements

Sarra.S
ST Employee

Hello again @Community member​ 

I think you missing something in the configuration

Could you share your .ioc file and your main.c so I can check the problem

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.

AM.12
Associate III

Hi,

I have attached both files, I started with a blank project

AM.12
Associate III

Hi @Sarra.S​ ,

Is there anything I am missing in the configuration?

AM.12
Associate III

Hi @Sarra.S​ ,

Now I am able to put the device to sleep mode perfectly.

But when the button pressed device wakes up but Sequencer not working, even after calling SystemClock_Config();  HAL_ResumeTick(); Sequencer not working.

if I remove the sleep code Sequencer works fine.

please can you help me with this problem?

Thank You,

Sarra.S
ST Employee

Hello @Community member​ 

Here is a list of resources relating to use of the sequencer with the STM32WB55:

STM BLE Tutorial

Building wireless applications with STM32WB Series microcontrollers

STM32WB Bluetooth® Low Energy (BLE) wireless interface

STM32WB – BLE SW Application Architecture

Hope that helps!

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.

AM.12
Associate III

Hi again @Sarra.S​ ,

Yes, I have followed the same steps from the post, I tried giving priority to my tasks from 15. still, I am facing the same issue. I am not understanding the root cause.

//===================My sleep code =======================

while (1)

 {

  /* USER CODE END WHILE */

  MX_APPE_Process();

  /* USER CODE BEGIN 3 */

  if(Go_TO_SLEEP)

  {

   Go_TO_SLEEP = false;

   HAL_GPIO_WritePin(MY_LED_GPIO_Port, MY_LED_Pin,1);

   HAL_Delay(5000);

   HAL_GPIO_WritePin(MY_LED_GPIO_Port, MY_LED_Pin,0);

    GPIO_InitStructure.Pin = GPIO_PIN_All;

    GPIO_InitStructure.Mode = GPIO_MODE_ANALOG;

    GPIO_InitStructure.Pull = GPIO_NOPULL;

//    HAL_GPIO_Init(GPIOA, &GPIO_InitStructure);

//      HAL_GPIO_Init(GPIOB, &GPIO_InitStructure);

    HAL_GPIO_Init(GPIOC, &GPIO_InitStructure);

    HAL_GPIO_Init(GPIOD, &GPIO_InitStructure);

    HAL_GPIO_Init(GPIOE, &GPIO_InitStructure);

    HAL_GPIO_Init(GPIOH, &GPIO_InitStructure);

//    __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_GPIOH_CLK_DISABLE();

     DBGMCU->CR = 0;

    HAL_SuspendTick();

    LL_C2_PWR_SetPowerMode(LL_PWR_MODE_STOP2);

    HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);

  }

 }

========================================================

//===========Button ISR======================================

 void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)

 {

SystemClock_Config();

  HAL_ResumeTick();

  Current_Button = GPIO_Pin;

  ISR_func();

UTIL_SEQ_SetTask(1 << CFG_TASK_ISR_CALLBACK, 15);

 }

==========================================================

ABN
Associate III

Hello @AM.12 

We are using a custom board which has stm32wb55 as the MCU. Even I followed the example project and replicated the same on to my project. But the current consumption is around 300uA and unable to get around 3uA as per the datasheet. Were you able to solve the issue on your side?  If yes, can you help me as well??

Thanks