====NUCLEO-WB15CC====
{{:boards:wb15cc.jpg?100}} {{boards:btapp.jpg?100}}
This board contains a dual core processor with a Bluetooth radio.
The primary processor is for the user application and
the secondary processor runs a BLE firmware blob to control the radio.
It's not possible to utilise the radio directly since there are no
docs for that.
WARNING: There is a security option byte called ESE on this board, if you
disable it the board will refuse to operate (untested), and BLE firmware
will not install.
===Pinout===
LED
PB5 LD1 BLUE
PB0 LD2 GREEN
PB1 LD3 RED
BUTTON
PA0 B1
PE4 B2
PA6 B3
RESET B4
USART1 (ST-LINK)
PA10 TX_STLINK AF7
PA9 RX_STLINK AF7
X1 NX2016SA 32 MHz
OSC_IN
OSC_OUT
X2 NX2012SA 32.768 kHz
PC14 OSC32_IN
PC16 OSC32_OUT
===Firmware upgrade services===
FUS is used to install the software stack on the co-pro.
Open the STM32CubeProgrammer desktop application and
navigate to the Firmware Upgrade Services page.
Click `Start FUS' to run the services on the target board and afterward `Read FUS infos'.
The factory default `infos' are as follows.
^Info^Value^
|FUS State | FUS_IDLE|
|FUS Status | FUS_NO_ERROR|
|FUS Version | v1.2.20|
|Stack Version| ------|
|FUS Operator | v3.1.0|
NB This process appears to erase the user firmware on the device to operate.
===Firmware upgrade blobs====
==V1.18.0 / 30-Oct-2023==
^Wireless Coprocessor Binary^stm32wb1x(320K)^Version^
|stm32wb1x_BLE_HCILayer_extended_fw.bin |0x0802D000|V1.18.0|
|stm32wb1x_BLE_HCILayer_fw.bin |0x08032000|V1.18.0|
|stm32wb1x_BLE_HCI_AdvScan_fw.bin |0x0803D000|V1.18.0|
|stm32wb1x_BLE_LLD_fw.bin |0x0803F800|V1.18.0|
|stm32wb1x_BLE_Stack_full_extended_fw.bin|0x08018800|V1.18.0|
|stm32wb1x_BLE_Stack_full_fw.bin |0x08021000|V1.18.0|
|stm32wb1x_BLE_Stack_light_fw.bin |0x08029000|V1.18.0|
|stm32wb1x_Safeboot_fw.bin|0x08044000|V2.0.0|
==V1.20.0 / 03-June-2024==
^Wireless Coprocessor Binary^stm32wb1x(320K)^Version^
|stm32wb1x_BLE_HCILayer_extended_fw.bin |0x0802D000|V1.20.0|
|stm32wb1x_BLE_HCILayer_fw.bin |0x08032000|V1.20.0|
|stm32wb1x_BLE_HCI_AdvScan_fw.bin |0x0803D000|V1.20.0|
|stm32wb1x_BLE_LLD_fw.bin |0x0803F800|V1.18.0|
|stm32wb1x_BLE_Stack_full_extended_fw.bin|0x08018800|V1.20.0|
|stm32wb1x_BLE_Stack_full_fw.bin |0x08022000|V1.20.0|
|stm32wb1x_BLE_Stack_light_fw.bin |0x08029000|V1.20.0|
|stm32wb1x_Safeboot_fw.bin|0x08044000|V2.0.0|
The Safeboot blob is used to reset the option bytes.
The Android app demos work with stm32wb1x_BLE_Stack_full_fw.bin and STM32CubeMX allows selection between full and light for building new projects.
===Upgrade procedure===
The following procedure was followed from the docs and it appears to work
correctly once a demo hex file is also loaded.
Fetch blobs
git clone https://github.com/STMicroelectronics/STM32CubeWB
This upgrades firmware to stm32wb1x_BLE_Stack_full_fw.bin
Browse to
STM32CubeWB/Projects/STM32WB_Copro_Wireless_Binaries/STM32WB1x
Select
stm32wb1x_BLE_Stack_full_fw.bin
It should tell you the STACKV version and code and
pre-enter the firmware start address.
Start addresses from the tables for stm32wb1x_BLE_Stack_full_fw.bin
^Version^Address^
|V1.18.0|0x08021000|
|V1.20.0|0x08022000|
Now press firmware upgrade and after start the wireless firmware.
After the upgrade, restart FUS and re-read infos
^Info^Value^
|FUS State | FUS_IDLE|
|FUS Status | FUS_NO_ERROR|
|FUS Version | v1.2.2.0|
|Stack Version| v1.20.0.2|
|FUS Operator | v3.1.0|
===Demo firmware===
To program the device with a user application you can use the command line utility and not only the desktop app.
A few demos exist for the the Android app named "ST BLE Sensor"
==P2P server demo==
==Program==
A pre-built hex file can be programmed, else the application can be built using this [[https://wiki.st.com/stm32mcu/wiki/Connectivity:STM32WB_BLE_STM32CubeMX|guide]] for STM32CubeMX.
Browse to
Projects\NUCLEO-WB15CC\Applications\BLE\BLE_p2pServer\Binary
Execute
STM32_Programmer_CLI.exe" -c port=SWD reset=HWrst -q -w BLE_p2pServer_reference.hex -v -hardRst
==Console==
Connecting a console via ST-LINK show the following dialog when booting, connecting and turning the blue led on and off.
$ picocom --imap lfcrlf --quiet -b 115200 /dev/ttyS12
Wireless Firmware version 1.18.0
Wireless Firmware build 3
FUS version 1.2.2
>>== SHCI_SUB_EVT_CODE_READY
>>== WIRELESS_FW_RUNNING
>>== DBGMCU_GetRevisionID= 2001
>>== DBGMCU_GetDeviceID= 494
Success: SHCI_C2_BLE_Init command
==>> Start Ble_Hci_Gap_Gatt_Init function
Success: hci_reset command
Success: aci_hal_write_config_data command - CONFIG_DATA_PUBADDR_OFFSET
Public Bluetooth Address: 00:80:e1:22:f9:7c
Success: aci_hal_write_config_data command - CONFIG_DATA_IR_OFFSET
Success: aci_hal_write_config_data command - CONFIG_DATA_ER_OFFSET
Success: aci_hal_set_tx_power_level command
Success: aci_gatt_init command
Success: aci_gap_init command
Success: hci_le_set_default_phy command
Success: aci_gap_set_io_capability command
Success: aci_gap_set_authentication_requirement command
Success: aci_gap_configure_whitelist command
==>> End Ble_Hci_Gap_Gatt_Init function
Success: aci_hal_set_radio_activity_mask command
LED BLUE OFF
==>> aci_gap_set_discoverable - Success
==>> Success: Start Fast Advertising
>>== HCI_LE_CONNECTION_COMPLETE_SUBEVT_CODE - Connection handle: 0x801
- Connection established with Central: @:45:38:ac:a7:19:ac
- Connection Interval: 50.00 ms
- Connection latency: 0
- Supervision Timeout: 5000 ms
>>== HCI_LE_CONNECTION_UPDATE_COMPLETE_SUBEVT_CODE
- Connection Interval: 7.50 ms
- Connection latency: 0
- Supervision Timeout: 5000 ms
>>== HCI_LE_CONNECTION_UPDATE_COMPLETE_SUBEVT_CODE
- Connection Interval: 50.00 ms
- Connection latency: 0
- Supervision Timeout: 5000 ms
-- P2P APPLICATION SERVER : NOTIFICATION ENABLED
-- P2P APPLICATION SERVER : INFORM CLIENT BUTTON 1 PUSHED
-- GATT : LED CONFIGURATION RECEIVED
-- P2P APPLICATION SERVER 1 : LED1 ON
-- GATT : LED CONFIGURATION RECEIVED
-- P2P APPLICATION SERVER 1 : LED1 OFF
==GATTtool==
$ gatttool -b 00:80:E1:22:F9:7C -I
[00:80:E1:22:F9:7C][LE]> connect
Attempting to connect to 00:80:E1:22:F9:7C
Connection successful
[00:80:E1:22:F9:7C][LE]> primary
attr handle: 0x0001, end grp handle: 0x0004 uuid: 00001801-0000-1000-8000-00805f9b34fb
attr handle: 0x0005, end grp handle: 0x000b uuid: 00001800-0000-1000-8000-00805f9b34fb
attr handle: 0x000c, end grp handle: 0x0011 uuid: 0000fe40-cc7a-482a-984a-7f2ed5b3e58f
[00:80:E1:22:F9:7C][LE]> characteristics 0x0001 0x0004
handle: 0x0002, char properties: 0x20, char value handle: 0x0003, uuid: 00002a05-0000-1000-8000-00805f9b34fb
[00:80:E1:22:F9:7C][LE]> characteristics 0x0005 0x000b
handle: 0x0006, char properties: 0x0a, char value handle: 0x0007, uuid: 00002a00-0000-1000-8000-00805f9b34fb
handle: 0x0008, char properties: 0x02, char value handle: 0x0009, uuid: 00002a01-0000-1000-8000-00805f9b34fb
handle: 0x000a, char properties: 0x02, char value handle: 0x000b, uuid: 00002a04-0000-1000-8000-00805f9b34fb
[00:80:E1:22:F9:7C][LE]> characteristics 0x000c 0x0011
handle: 0x000d, char properties: 0x06, char value handle: 0x000e, uuid: 0000fe41-8e22-4541-9d4c-21edae82ed19
handle: 0x000f, char properties: 0x10, char value handle: 0x0010, uuid: 0000fe42-8e22-4541-9d4c-21edae82ed19
[00:80:E1:22:F9:7C][LE]>
The UUID "0000fe40-cc7a-482a-984a-7f2ed5b3e58f" is used to communicate with the p2pServer STM32_WPAN application firmware.
The handles that are known to operate p2pServer are 0x0E and 0x11
Handle 0x0011 turns button notification on and off and 0x0E is the blue LED.
For example, to turn on the LED:
char-write-cmd 0x0E 0x01
The console log was
-- GATT : LED CONFIGURATION RECEIVED
-- P2P APPLICATION SERVER : LED1 ON
NB char-write-cmd above works in interactive mode but not otherwise. char-write-req fails either way since this is setup in the firmware as write without a response.
==Python==
See [[tools:bluetooth#python|this]] example code to operate the p2pServer demo.
===Resources===
[[https://www.st.com/en/evaluation-tools/nucleo-wb15cc.html|Product page]]
[[https://www.st.com/resource/en/data_brief/nucleo-wb15cc.pdf|User manual]]
[[https://www.st.com/resource/en/schematic_pack/mb1641-wb15cc-c01_schematic.pdf|Schematic]]
[[https://www.st.com/en/microcontrollers-microprocessors/stm32wb15cc.html|MCU product page]]
[[https://www.st.com/resource/en/datasheet/stm32wb15cc.pdf|MCU data-sheet]]
[[https://www.st.com/resource/en/reference_manual/rm0473-multiprotocol-wireless-32bit-mcu-armbased-cortexm4-with-fpu-bluetooth-low-energy-radio-solution-stmicroelectronics.pdf|MCU reference manual]]
[[https://wiki.stmicroelectronics.cn/stm32mcu/wiki/Connectivity:STM32WB_FUS|Firmware upgrade guide]]
[[https://github.com/STMicroelectronics/STM32CubeWB/tree/master/Projects/STM32WB_Copro_Wireless_Binaries/STM32WB1x|Firmware upgrade blobs]]
[[https://www.st.com/resource/en/programming_manual/dm00716581-stm32wb-ble-stack-programming-guidelines-stmicroelectronics.pdf|BLE programming guide]]
[[https://www.st.com/resource/en/application_note/dm00771441-stm32h745755-and-stm32h747757-lines-interprocessor-communications-stmicroelectronics.pdf|Dual Core IPCC]]
[[https://wiki.st.com/stm32mcu/wiki/Connectivity:STM32WB_BLE_STM32CubeMX|BLE demo application]]