Skip to main content
JGUIT.1
Associate II
July 2, 2020
Question

How to enter SLEEP/STOP mode on STM32WB device ?

  • July 2, 2020
  • 16 replies
  • 12712 views

Hello,

I wonder how the STM32WB device should be entered in SLEEP or STOP mode. Any specific actions to reduce the total consumption to the minimum, particularly thinking to the radio? When is it good to enter SLEEP or STOP mode ?

If anyone can point a working example, it will be great :)

Context : I have Thread (and in near future BLE+Thread) running on my device. I would like to put the total consumption to the minimum because the board is supplied with a small battery. Then periodically the device is wake-up, processing, sending data to the Thread network and finally goes to STOP mode again.

Thanks,

Joel

This topic has been closed for replies.

16 replies

Scott Löhr
Senior III
August 13, 2020

@JGUIT.1​ don't you think that this question should be marked as "Answered"?

RPowe.1
Associate II
August 11, 2022

I am going through the same pain. I have created an empty project for Nucleo ST32WB55. I have removed JP2 to monitor the current.

The current is around 1mA at start and drops to 0.84mA when I drop MSI to 1MHz.

I set all GPIO to analog input and turn off all peripheral clocks. Power doesn't drop which is not surprising as the code has just started so it's around 0.84mA.

I then do the following:

HAL_SuspendTick();

DBGMCU->CR = 0; // Disable debug and trace in low-power modes

LL_PWR_SetPowerMode(LL_PWR_MODE_STOP2);

LL_C2_PWR_SetPowerMode(LL_PWR_MODE_SHUTDOWN);

HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI);

I lose debug which is what I expect.

The power drops to 0.666mA! 

From this I conclude that it's not entering stop mode.

What am I doing wrong?

I've tried turning on HSI before going to sleep and that makes no difference.

Thanks, Rich