mbed-os / targets / TARGET_STM / TARGET_STM32WB /
@jeromecoutant jeromecoutant authored on 4 Jun 2021
..
STM32Cube_FW STM32WB15xC MCU support 2 years ago
TARGET_STM32WB10xC STM32WB : TARGET_STM32WB_V1.11.1 3 years ago
TARGET_STM32WB15xC STM32WB15xC MCU support 2 years ago
TARGET_STM32WB30xE STM32WB : TARGET_STM32WB_V1.11.1 3 years ago
TARGET_STM32WB35xC STM32WB : TARGET_STM32WB_V1.11.1 3 years ago
TARGET_STM32WB35xE STM32WB : TARGET_STM32WB_V1.11.1 3 years ago
TARGET_STM32WB50xG STM32WB : TARGET_STM32WB_V1.11.1 3 years ago
TARGET_STM32WB55xC STM32WB : TARGET_STM32WB_V1.11.1 3 years ago
TARGET_STM32WB55xE STM32WB : TARGET_STM32WB_V1.11.1 3 years ago
TARGET_STM32WB55xG STM32WB: improve FLASH size 3 years ago
TARGET_STM32WB55xY STM32WB : TARGET_STM32WB_V1.11.1 3 years ago
TARGET_STM32WB5MxG Merge pull request #14692 from jeromecoutant/PR_WB_HCI 2 years ago
CMakeLists.txt Merge pull request #14557 from affrinpinhero-2356/feature_i2cTiming_Calculation 3 years ago
PeripheralNames.h STM32WB15xC MCU support 2 years ago
README.md STM32WB: improve FLASH size 3 years ago
analogin_device.c STM32WB15xC MCU support 2 years ago
cmsis.h STM32: common cmsis.h and device.h 5 years ago
flash_api.c STM32WB: improve FLASH size 3 years ago
gpio_irq_device.c STM32WB cleanup 4 years ago
gpio_irq_device.h STM32WB cleanup 4 years ago
i2c_device.c driver/i2c: Added I2C timing calculation function. 3 years ago
i2c_device.h STM32: correct __cplusplus brackets in ci2c_device.h 3 years ago
objects.h STM32WB: enable QSPI for custom boards 3 years ago
pin_device.h STM32WB cleanup 4 years ago
pwmout_device.c STM32WB cleanup 4 years ago
pwmout_device.h STM32WB cleanup 4 years ago
serial_device.c Merge pull request #12341 from fkjagodzinski/fix-stm-hal_fpga 4 years ago
spi_api.c STM32WB15xC MCU support 2 years ago
spi_device.h Add SPI bitwidths to ST targets where supported 3 years ago
us_ticker_data.h STM32WB15xC MCU support 2 years ago
wb_sleep.c STM32WB RNG: enable use from both M4 and M0+ core 3 years ago
README.md

STM32WB family

st.com STM32WB family page

This ST MCU family is dual-core : based on an Arm Cortex-M4 core and an Arm Cortex-M0+ core.

  • M4 core is dedicated to application (mbed-os)
  • M0 core is dedicated to BLE FW (only binary, source files not provided)

Supported boards

NUCLEO_WB55RG (NUCLEO-WB55RG)

st.com STM32WB55RG MCU page

st.com NUCLEO board page

st.com Pack board page

mbed.com platform page

  • Total FLASH is 1MB

But FLASH is shared by M4 and M0 cores, see BLE FW

  • RAM: 256 KB
    • SRAM1: 192 KB
    • SRAM2a: 32 KB
    • SRAM2b: 32 KB

SRAM1 is dedicated for M4 core, and then for mbed-os applications.

SRAM2 is dedicated for M0 core and inter CPU communication, and then can not be addressed.

DISCO_WB5MMG (STM32WB5MM-DK)

st.com STM32WB5MMG module page

st.com DISCO board page

mbed.com platform page

  • Total FLASH is 1MB

But FLASH is shared by M4 and M0 cores, see BLE FW

  • RAM: 256 KB
    • SRAM1: 192 KB
    • SRAM2a: 32 KB
    • SRAM2b: 32 KB

SRAM1 is dedicated for M4 core, and then for mbed-os applications.

SRAM2 is dedicated for M0 core and inter CPU communication, and then can not be addressed.

NB: MBED CLI1 tool can be used thanks to this command:

mbedls -m 0884:DISCO_WB5MMG

BLE

MBED-OS support

BLE feature is based on Cordio stack and API (above HCI) implementation.

Note that the BLE controller firmware running on the cortex-M0 is the same as in STcubeFW solution

  • within mbed, the controller will run only the below-HCI part
  • within STcubeFW (and STM32WPAN middleware), it can run also up to GATT / GAP layers ...

Official ST Application Note : AN5289: Building wireless applications with STM32WB Series microcontrollers

BLE FW

All available BLE FW for M0 core are provided in ths ST STM32CubeWB repo:

https://github.com/STMicroelectronics/STM32CubeWB/tree/master/Projects/STM32WB_Copro_Wireless_Binaries/STM32WB5x

Default BLE FW in ST boards is stm32wb5x_BLE_Stack_full_fw.bin

  • As explained in Release_Notes.html, this FW is flashed at @ 0x080CA000
  • Default "mbed_rom_size" in targets.json is then "0xCA000" (808K)

To optimize FLASH size, stm32wb5x_BLE_HCILayer_fw.bin is supported for MBED-OS use case

  • As explained in Release_Notes.html, this FW is flashed at @ 0x080E0000
  • Then "mbed_rom_size" can be updated to "0xE0000" (896K)

Example in your local mbed_app.json:

    "target_overrides": {
        "NUCLEO_WB55RG": {
            "target.mbed_rom_size": "0xE0000"
        }

BLE FW update

Official ST Application Note : AN5185: ST firmware upgrade services for STM32WB Series

BLE FW flashing procedure

STM32CubeProgrammer needs to be used:

https://www.st.com/en/development-tools/stm32cubeprog.html

Please check the Release Note and complete flashing procedure: https://htmlpreview.github.io/?https://github.com/STMicroelectronics/STM32CubeWB/blob/master/Projects/STM32WB_Copro_Wireless_Binaries/STM32WB5x/Release_Notes.html

  • connect the board with ST-LINK
  • In the left column, go to "Firmware Upgrade Services"
  • "Start FUS"
  • "Read FUS infos" => version v1.2.0 is expected
  • Firmware Upgrade / "Browse" : select the chosen FW (see above)
  • Firmware Upgrade / Start address : depends on the chosen FW (see above)
  • Firmware Upgrade / "Firmware Upgrade"
  • In the left column, go to "Option bytes"
  • User Configuration => "Read"
  • User Configuration / enable nSWBOOT0 => "Apply"

mbed-trace support

trace group: BLWB

example:

[INFO][BLWB]: WIRELESS COPROCESSOR FW VERSION ID = 1.11.1
[INFO][BLWB]: WIRELESS COPROCESSOR FW STACK TYPE = 1
[DBG ][BLWB]: mbox_write type:1, len:3
[INFO][BLWB]: TX>> BLE CMD
[DBG ][BLWB]:   Type 0x1
[DBG ][BLWB]:    Cmd 0xc03
[DBG ][BLWB]:    Len 0D]