STM32WB BLE: CubeMX, Services and Low-Power Operation
BLE setup on STM32WB55: Dual-core architecture, Wireless Stack version, CubeMX, GATT and Low Power service; With single-core STM32WB0 resolution.
Contents

In the STM32WB55 and related dual-core models, program execution and the wireless part are split between the application core and the network core; The STM32WB0 is single-core and is not included in this description. This architecture decouples radio timing from the core application, but the Wireless Stack, FUS, and Cube package versions should be compatible.
STM32WB architecture
The user program usually runs on the Cortex-M4, and the network core handles the radio tasks. Communication between two parts passes through interprocessor mechanisms. Therefore, stack failure or firmware incompatibility can prevent advertising even with healthy application code.
Configure CubeMX
Select the correct board and firmware package, enable BLE and required services, set Clock and RF according to the reference board and develop the generated code in the USER CODE areas. Read the package's Release Notes file for the Stack version and limitations.
Service and Notify
In the configuration tool, define UUID, Value, Property and Permission size. When sensor changes, update Value in Attribute Database and send Notification if enabled. Validate the Write event from the client and never assume the length of the input.
Connection Management and Low Power
Convert Connect, Disconnect, and Pairing events to the application's State Machine. Make sure Scheduler and Wireless Stack allow sleep before entering Stop Mode. Measure the consumption on the final board, because the debug LED and Debugger can change the result.
STM32WB starter project
Create an environment service with temperature characteristic. The program timer reads the sensor every second and only updates the value if it changes by more than 0.1 degrees. After confirming Notify, reduce additional Tick and Log and measure Stop Mode consumption.
Scope of this path: Do not confuse STM32WB dual core with WB0
The description of the Cortex-M4 application core, network core and FUS in this article is for a common dual-core family such as the STM32WB55. The STM32WB0 takes a different path than the Cortex-M0+ core; The FUS steps and Wireless Stack files of the WB55 board should not be copied to it.
For WB55, start from an official example of the same board in STM32CubeWB. Record the board name, CubeWB package version, FUS version and the exact name of the installed wireless image next to build. Read the installation address and Stack update steps from the Release Notes of the same version; This text does not specify the general memory address for all models.
If Advertising is not visible, first check the unmodified example of the manufacturer; Then separate the power and clock, CPU2 image compatibility and early events. Low consumption should also be measured by disabling the debugger and taking into account development board consumption.
Question and answer article
Ask your technical question
Questions and answers are published after moderation. Authors can see their own pending drafts.
No confirmed questions have been registered for this article yet.