mbed-os/targets/TARGET_STM/TARGET_STM32WB
Anna Bridge 5ef56cc6f4
Merge pull request #14557 from affrinpinhero-2356/feature_i2cTiming_Calculation
STM32: driver/Added I2C timing calculation algorithm
2021-05-24 13:09:19 +01:00
..
STM32Cube_FW STM32WB : TARGET_STM32WB_V1.11.1 2021-05-05 17:22:43 +02:00
TARGET_STM32WB5MxG STM32WB : TARGET_STM32WB_V1.11.1 2021-05-05 17:22:43 +02:00
TARGET_STM32WB10xC STM32WB : TARGET_STM32WB_V1.11.1 2021-05-05 17:22:43 +02:00
TARGET_STM32WB15xC STM32WB : TARGET_STM32WB_V1.11.1 2021-05-05 17:22:43 +02:00
TARGET_STM32WB30xE STM32WB : TARGET_STM32WB_V1.11.1 2021-05-05 17:22:43 +02:00
TARGET_STM32WB35xC STM32WB : TARGET_STM32WB_V1.11.1 2021-05-05 17:22:43 +02:00
TARGET_STM32WB35xE STM32WB : TARGET_STM32WB_V1.11.1 2021-05-05 17:22:43 +02:00
TARGET_STM32WB50xG STM32WB : TARGET_STM32WB_V1.11.1 2021-05-05 17:22:43 +02:00
TARGET_STM32WB55xC STM32WB : TARGET_STM32WB_V1.11.1 2021-05-05 17:22:43 +02:00
TARGET_STM32WB55xE STM32WB : TARGET_STM32WB_V1.11.1 2021-05-05 17:22:43 +02:00
TARGET_STM32WB55xG STM32WB : TARGET_STM32WB_V1.11.1 2021-05-05 17:22:43 +02:00
TARGET_STM32WB55xY STM32WB : TARGET_STM32WB_V1.11.1 2021-05-05 17:22:43 +02:00
CMakeLists.txt Merge pull request #14557 from affrinpinhero-2356/feature_i2cTiming_Calculation 2021-05-24 13:09:19 +01:00
PeripheralNames.h STM32 : new DISCO_WB5MMG target 2021-04-28 16:46:52 +02:00
README.md STM32WB : update Readme 2021-05-05 17:22:54 +02:00
analogin_device.c STM32WB cleanup 2020-01-20 17:24:28 +01:00
cmsis.h STM32: common cmsis.h and device.h 2019-05-27 16:27:41 +02:00
flash_api.c STM32WB: FLASH compilation issue with baremetal 2020-09-18 11:47:15 +02:00
flash_data.h STM32WB cleanup 2020-01-20 17:24:28 +01:00
gpio_irq_device.c STM32WB cleanup 2020-01-20 17:24:28 +01:00
gpio_irq_device.h STM32WB cleanup 2020-01-20 17:24:28 +01:00
i2c_device.c driver/i2c: Added I2C timing calculation function. 2021-05-19 18:35:47 +05:30
i2c_device.h driver/i2c: Added I2C timing calculation function. 2021-05-19 18:35:47 +05:30
objects.h STM32WB: enable QSPI for custom boards 2021-03-08 16:51:53 +01:00
pin_device.h STM32WB cleanup 2020-01-20 17:24:28 +01:00
pwmout_device.c STM32WB cleanup 2020-01-20 17:24:28 +01:00
pwmout_device.h STM32WB cleanup 2020-01-20 17:24:28 +01:00
serial_device.c Merge pull request #12341 from fkjagodzinski/fix-stm-hal_fpga 2020-02-10 13:21:31 +00:00
spi_api.c STM32WB cleanup 2020-01-20 17:24:28 +01:00
spi_device.h Add SPI bitwidths to ST targets where supported 2021-01-11 07:53:07 -06:00
stm32wb_ble_update.jpg STM32WB : Add ReadMe file 2020-02-20 09:20:44 +01:00
us_ticker_data.h STM32WB cleanup 2020-01-20 17:24:28 +01:00
wb_sleep.c STM32WB RNG: enable use from both M4 and M0+ core 2020-07-02 10:17:08 +02:00

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 note that it is shared by M4 and M0 cores.

    • mbed-os application size is then limited to 768 KB
  • 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 note that it is shared by M4 and M0 cores.

    • mbed-os application size is then limited to 768 KB
  • 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

mbed-trace support

trace group: BLE_WB

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]

BLE FW update

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

Latest BLE FW : https://github.com/STMicroelectronics/STM32CubeWB/blob/master/Projects/STM32WB_Copro_Wireless_Binaries/STM32WB5x/stm32wb5x_BLE_Stack_full_fw.bin

BLE FW flashing procedure

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

  • STEP 1: Use STM32CubeProgrammer

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

FLASHPATH="C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin"
export PATH=$FLASHPATH:$PATH
  • STEP 2: Access to Bootloader USB Interface (system flash)

    • Boot0 pin set to VDD : Jumper between CN7.5(VDD) and CN7.7(Boot0)
    • Jumper JP1 on USB_MCU
    • Power ON via USB_USER

Image description

  • STEP 3 : Delete current wireless stack :
$ STM32_Programmer_CLI.exe -c port=usb1 -fwdelete
...
FUS state is FUS_IDLE

FUS status is FUS_NO_ERROR
Deleting firmware ...
Firmware delete finished
fwdelete command execution finished
  • STEP 4 : Read FUS Version
$ STM32_Programmer_CLI.exe -c port=usb1 -r32 0x20030030 1
...

Reading 32-bit memory content
  Size          : 4 Bytes
  Address:      : 0x20030030

0x20030030 : 00050300
  • STEP 5A if last result is 00050300 : Download new FUS :
$ ./STM32_Programmer_CLI.exe -c port=usb1 -fwupgrade stm32wb5x_FUS_fw_for_fus_0_5_3.bin 0x080EC000 firstinstall=0
  • STEP 5B if last result is 01000100 or 01000200 : Download new FUS :
$ STM32_Programmer_CLI.exe -c port=usb1 -fwupgrade stm32wb5x_FUS_fw.bin 0x080EC000 firstinstall=0
...
Firmware Upgrade Success
  • STEP 4 (to check) : Read FUS Version
$ STM32_Programmer_CLI.exe -c port=usb1 -r32 0x20030030 1

Reading 32-bit memory content
  Size          : 4 Bytes
  Address:      : 0x20030030

0x20030030 : 01020000
  • STEP 6 : Download new wireless stack :
$ STM32_Programmer_CLI.exe -c port=usb1 -fwupgrade stm32wb5x_BLE_Stack_full_fw.bin 0x080CA000 firstinstall=1

...
Download firmware image at address 0x80cb000 ...
...
File download complete
...
Firmware Upgrade Success
  • STEP 7 : Revert STEP 2 procedure to put back device in normal mode.