How to achieve low power Bluetooth advertising with STM32WB
I'm having issues getting the low power sleep to work with Bluetooth enabled on the STM32WB
Is there any guide or app note on steps needed to achieve lowest power level BLE advertising?
Basically no matter what I do - if I enable bluetooth advertising (code extracted from the iBeacon cubemx example) and enter stop2 mode, the stm32 takes about 5.5mA
If I comment out the call to aci_gap_set_discoverable(...) and then enter STOP2 mode, the board goes to ~50uA (most of that is the other hardware we have on this board)
So far, I have:
- confirmed the main core is indeed going to sleep between bluetooth events (measuring the sleep time = advertising interval, also it's easy to see with the debugger)
- tried "forcing" sleep with LL_C2_PWR_SetPowerMode(LL_PWR_MODE_STOP2) (my understanding is that I should not need to do this)
- changing various #defines relating to power, dbg and sleep in the ble header files
I think I might be missing something obvious... Is there any way of seeing why the second core isn't going to sleep? My best guess is that it's a configuration thing but I'm at a loss with what else to try.
Perhaps I need to be using standby mode to force the m0 off between advertising events?
Any help would be greatly appreciated!
Thanks