2024-11-25 10:07 AM
I want to write a function for the STM32WB55 where BLE advertising is always active, and the processor performs the necessary tasks, then sleeps and wakes up using RTC Wakeup.
I want to do it with STOP2 mode, but my processor consumes 3mA and does not enter sleep mode. Instead of doing this through CubeMX, I want to manually put it to sleep whenever I choose, but I haven't been successful.
Could you show me an example or a resource I can refer to for this?
2024-11-25 11:53 PM
Hello,
You can look BLE_HeartRate example available in STM32CubeWB package. By default, this application is configured to perform STOP2 low power mode while BLE is running. Then, you can use the HW timer server module to wake up the system, this module is based on RTC, see HW_TS_Create, HW_TS_Start, HW_TS_Stop APIs.
Best Regards,