cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB09 Deepsleep mode with BLE

Yevhen
Associate II

Hi,

I want to create device, based on STM32WB09, with BLE and battery power. I get sample from CUBE and turn on CFG_FULL_LOW_POWER and CFG_LPM_SUPPORTED. It works, between BLE events MCU work in Deepsleep mode, but i need scheduller:

1) Deepsleep
2) wakeup by Button or every 60 second by RTC
3) turn on BLE, send data to phone
4) go to deep sleep after 15 second of work

Could you help me, how can i implement this scheduller with BLE and Sequencer?

 

In Sequencer low power mode implements in UTIL_SEQ_Idle, can i change this function?

 

thanks

2 REPLIES 2
Sebastien DENOUAL
ST Employee

Hi @Yevhen ,

All BLE examples part of STM32Cube_FW_WB0_V1.3.0 already support low power mode while doing BLE.

All those BLE code example integrate  a "low power management" - You can select desired low power mode using CubeMx or in file app_conf.h

CFG_LPM_SUPPORTED => set to 1 to activate low power

 

See more details in below slide : 

SebastienDENOUAL_1-1758022109069.png

This settings should allow you to reach lowest low pwer mode whith RF active ( the STM32WB09 will enter low power mode between 2 BLE events - of course RAM and Low speed clock  are maintained  during this period - everything else is switched off)

You can have a test using  \STM32Cube_FW_WB0_V1.3.0\Projects\NUCLEO-WB09KE\Applications\BLE\BLE_HeartRate or   BLE_Power_Consumption code example.

 

Regarding wakeup from IO or wakeUp from RTC : 

...\STM32Cube_FW_WB0_V1.3.0\Projects\NUCLEO-WB09KE\Examples\PWR\PWR_DEEPSTOP_RTC

and PWR_DEEPSTOP

 

Hope it helps,

Sebastien.

 

 

 

Dear @Sebastien DENOUAL

yes, i have used example BLE_p2pServer with activated CFG_LPM_SUPPORTED ,

and it works fine, but i need to change timeouts and logic for Deepsleep mode.

 

Can i change this logic (add wakeup by button and by RTC, and sleep 30-60 seconds) in file "stm32_lpm_if.c" in function "PWR_EnterStopMode()"? or where i can set my custom settings for sleep mode?