|
| 1 | +# STM32WB family |
| 2 | + |
| 3 | +[st.com STM32WB family page](https://www.st.com/en/microcontrollers-microprocessors/stm32wb-series.html) |
| 4 | + |
| 5 | +This ST MCU family is dual-core : based on an Arm Cortex-M4 core and an Arm Cortex-M0+ core. |
| 6 | + |
| 7 | +- M4 core is dedicated to application (mbed-os) |
| 8 | +- M0 core is dedicated to BLE FW (only binary, source files not provided) |
| 9 | + |
| 10 | +# Supported boards |
| 11 | + |
| 12 | +## NUCLEO_WB55RG |
| 13 | + |
| 14 | +[st.com STM32WB55RG MCU page](https://www.st.com/en/microcontrollers-microprocessors/stm32wb55rg.html) |
| 15 | + |
| 16 | +[st.com NUCLEO page](https://www.st.com/en/evaluation-tools/p-nucleo-wb55.html) |
| 17 | + |
| 18 | +- Total FLASH is 1MB, but note that it is shared by M4 and M0 cores. |
| 19 | + - mbed-os application size is then limited to 768 KB |
| 20 | + |
| 21 | +- RAM: 256 KB |
| 22 | + - SRAM1: 192 KB |
| 23 | + - SRAM2a: 32 KB |
| 24 | + - SRAM2b: 32 KB |
| 25 | + |
| 26 | + |
| 27 | +# BLE |
| 28 | + |
| 29 | +## MBED-OS support |
| 30 | + |
| 31 | +BLE feature is based on Cordio stack and API (above HCI) implementation. |
| 32 | + |
| 33 | +Note that the BLE controller firmware running on the cortex-M0 is the same as in STcubeFW solution |
| 34 | + |
| 35 | +- within mbed, the controller will run only the below-HCI part |
| 36 | +- within STcubeFW (and STM32WPAN middleware), it can run also up to GATT / GAP layers ... |
| 37 | + |
| 38 | +## mbed-trace support |
| 39 | + |
| 40 | +trace group: BLE_WB |
| 41 | + |
| 42 | +example: |
| 43 | +```` |
| 44 | +[INFO][BLE_WB]: WIRELESS COPROCESSOR FW VERSION ID = 1.4.0 |
| 45 | +[INFO][BLE_WB]: WIRELESS COPROCESSOR FW STACK TYPE = 1 |
| 46 | +[DBG ][BLE_WB]: mbox_write type:1, len:3 |
| 47 | +[INFO][BLE_WB]: TX>> BLE CMD |
| 48 | +[DBG ][BLE_WB]: Type 0x1 |
| 49 | +[DBG ][BLE_WB]: Cmd 0xc03 |
| 50 | +[DBG ][BLE_WB]: Len 0D] |
| 51 | +```` |
| 52 | + |
| 53 | +## BLE FW update |
| 54 | + |
| 55 | +Latest information : |
| 56 | +https://github.com/STMicroelectronics/STM32CubeWB/blob/master/how_to_program_wireless_stacks.txt |
| 57 | + |
| 58 | +Latest BLE FW : |
| 59 | +https://github.com/STMicroelectronics/STM32CubeWB/blob/master/Projects/STM32WB_Copro_Wireless_Binaries/stm32wb5x_BLE_Stack_fw.bin |
| 60 | + |
| 61 | +## BLE FW flashing procedure |
| 62 | + |
| 63 | +Release Note and complete flashing procedure: |
| 64 | +https://htmlpreview.github.io/?https://github.com/STMicroelectronics/STM32CubeWB/blob/master/Projects/STM32WB_Copro_Wireless_Binaries/Release_Notes.html |
| 65 | + |
| 66 | + |
| 67 | +- STEP 1: Use STM32CubeProgrammer |
| 68 | + |
| 69 | +https://www.st.com/en/development-tools/stm32cubeprog.html |
| 70 | + |
| 71 | +```` |
| 72 | +FLASHPATH="C:\Program Files (x86)\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin" |
| 73 | +export PATH=$FLASHPATH:$PATH |
| 74 | +```` |
| 75 | + |
| 76 | +- STEP 2: Access to Bootloader USB Interface (system flash) |
| 77 | + |
| 78 | + * Boot0 pin set to VDD : Jumper between CN7.5(VDD) and CN7.7(Boot0) |
| 79 | + * Jumper JP1 on USB_MCU |
| 80 | + * Power ON via USB_USER |
| 81 | + |
| 82 | + |
| 83 | + |
| 84 | +- STEP 3 : Delete current wireless stack : |
| 85 | + |
| 86 | +``` |
| 87 | +$ ./STM32_Programmer_CLI.exe -c port=usb1 -fwdelete |
| 88 | + ------------------------------------------------------------------- |
| 89 | + STM32CubeProgrammer v2.3.0 |
| 90 | + ------------------------------------------------------------------- |
| 91 | +
|
| 92 | +
|
| 93 | +
|
| 94 | +USB speed : Full Speed (12MBit/s) |
| 95 | +Manuf. ID : STMicroelectronics |
| 96 | +Product ID : DFU in FS Mode |
| 97 | +SN : 207F38933036 |
| 98 | +FW version : 0x011a |
| 99 | +Device ID : 0x0495 |
| 100 | +Device name : STM32WBxx |
| 101 | +Flash size : 1 MBytes |
| 102 | +Device type : MCU |
| 103 | +Device CPU : Cortex-M0+/M4 |
| 104 | +
|
| 105 | +
|
| 106 | +FUS state is FUS_ERROR |
| 107 | +
|
| 108 | +FUS status is FUS_NOT_RUNNING |
| 109 | +
|
| 110 | +FUS state is FUS_IDLE |
| 111 | +
|
| 112 | +FUS status is FUS_NO_ERROR |
| 113 | +Deleting firmware ... |
| 114 | +Firmware delete finished |
| 115 | +fwdelete command execution finished |
| 116 | +``` |
| 117 | + |
| 118 | +- STEP 4 : Read and upgrade FUS Version |
| 119 | + |
| 120 | +``` |
| 121 | +$ ./STM32_Programmer_CLI.exe -c port=usb1 -r32 0x20030030 1 |
| 122 | + ------------------------------------------------------------------- |
| 123 | + STM32CubeProgrammer v2.3.0 |
| 124 | + ------------------------------------------------------------------- |
| 125 | +
|
| 126 | +
|
| 127 | +
|
| 128 | +USB speed : Full Speed (12MBit/s) |
| 129 | +Manuf. ID : STMicroelectronics |
| 130 | +Product ID : DFU in FS Mode |
| 131 | +SN : 207F38933036 |
| 132 | +FW version : 0x011a |
| 133 | +Device ID : 0x0495 |
| 134 | +Device name : STM32WBxx |
| 135 | +Flash size : 1 MBytes |
| 136 | +Device type : MCU |
| 137 | +Device CPU : Cortex-M0+/M4 |
| 138 | +
|
| 139 | +
|
| 140 | +Reading 32-bit memory content |
| 141 | + Size : 4 Bytes |
| 142 | + Address: : 0x20030030 |
| 143 | +
|
| 144 | +0x20030030 : 00050300 |
| 145 | +``` |
| 146 | + |
| 147 | +- STEP 5 : Download new FUS : |
| 148 | + |
| 149 | +``` |
| 150 | +$ ./STM32_Programmer_CLI.exe -c port=usb1 -fwupgrade stm32wb5x_FUS_fw.bin 0x080EC000 firstinstall=0 |
| 151 | + ------------------------------------------------------------------- |
| 152 | + STM32CubeProgrammer v2.3.0 |
| 153 | + ------------------------------------------------------------------- |
| 154 | +
|
| 155 | +
|
| 156 | +
|
| 157 | +USB speed : Full Speed (12MBit/s) |
| 158 | +Manuf. ID : STMicroelectronics |
| 159 | +Product ID : DFU in FS Mode |
| 160 | +SN : 207F38933036 |
| 161 | +FW version : 0x011a |
| 162 | +Device ID : 0x0495 |
| 163 | +Device name : STM32WBxx |
| 164 | +Flash size : 1 MBytes |
| 165 | +Device type : MCU |
| 166 | +Device CPU : Cortex-M0+/M4 |
| 167 | +
|
| 168 | +
|
| 169 | +FUS state is FUS_IDLE |
| 170 | +
|
| 171 | +FUS status is FUS_NO_ERROR |
| 172 | +
|
| 173 | +Old Firmware delete ... |
| 174 | +
|
| 175 | +Deleting firmware ... |
| 176 | +Firmware delete finished |
| 177 | +
|
| 178 | +FUS state is FUS_SERVICE_ONGOING |
| 179 | +
|
| 180 | +FUS status is FUS_IMAGE_NOT_FOUND |
| 181 | +
|
| 182 | +FUS state is FUS_IDLE |
| 183 | +
|
| 184 | +FUS status is FUS_NO_ERROR |
| 185 | +Download firmware image at address 0x80ec000 ... |
| 186 | +
|
| 187 | +Memory Programming ... |
| 188 | +Opening and parsing file: stm32wb5x_FUS_fw.bin |
| 189 | + File : stm32wb5x_FUS_fw.bin |
| 190 | + Size : 24492 Bytes |
| 191 | + Address : 0x080EC000 |
| 192 | +
|
| 193 | +
|
| 194 | +Erasing memory corresponding to segment 0: |
| 195 | +Erasing internal memory sectors [236 241] |
| 196 | +erasing sector 0236 @: 0x080ec000 done |
| 197 | +erasing sector 0237 @: 0x080ed000 done |
| 198 | +erasing sector 0238 @: 0x080ee000 done |
| 199 | +erasing sector 0239 @: 0x080ef000 done |
| 200 | +erasing sector 0240 @: 0x080f0000 done |
| 201 | +erasing sector 0241 @: 0x080f1000 done |
| 202 | +Download in Progress: |
| 203 | +
|
| 204 | +File download complete |
| 205 | +Time elapsed during download operation: 00:00:00.512 |
| 206 | +
|
| 207 | +FUS state is FUS_IDLE |
| 208 | +
|
| 209 | +FUS status is FUS_NO_ERROR |
| 210 | +
|
| 211 | +Firmware Upgrade process started ... |
| 212 | +
|
| 213 | +Updating firmware ... |
| 214 | +Waiting for firmware upgrade end |
| 215 | +
|
| 216 | +FUS state is FUS_UPGRADE_ONGOING |
| 217 | +
|
| 218 | +FUS status is FUS_NO_ERROR |
| 219 | +
|
| 220 | +FUS state is FUS_UPGRADE_ONGOING |
| 221 | +
|
| 222 | +FUS status is FUS_IMAGE_NOT_AUTHENTIC |
| 223 | +Error: Firmware not authentic! |
| 224 | +``` |
| 225 | + |
| 226 | +- STEP 4 (to check) : Read and upgrade FUS Version |
| 227 | + |
| 228 | +``` |
| 229 | +$ ./STM32_Programmer_CLI.exe -c port=usb1 -r32 0x20030030 1 |
| 230 | + ------------------------------------------------------------------- |
| 231 | + STM32CubeProgrammer v2.3.0 |
| 232 | + ------------------------------------------------------------------- |
| 233 | +
|
| 234 | +
|
| 235 | +
|
| 236 | +USB speed : Full Speed (12MBit/s) |
| 237 | +Manuf. ID : STMicroelectronics |
| 238 | +Product ID : DFU in FS Mode |
| 239 | +SN : 207F38933036 |
| 240 | +FW version : 0x011a |
| 241 | +Device ID : 0x0495 |
| 242 | +Device name : STM32WBxx |
| 243 | +Flash size : 1 MBytes |
| 244 | +Device type : MCU |
| 245 | +Device CPU : Cortex-M0+/M4 |
| 246 | +
|
| 247 | +
|
| 248 | +Reading 32-bit memory content |
| 249 | + Size : 4 Bytes |
| 250 | + Address: : 0x20030030 |
| 251 | +
|
| 252 | +0x20030030 : 01000200 |
| 253 | +``` |
| 254 | + |
| 255 | +- STEP 6 : Download new wireless stack : |
| 256 | + |
| 257 | + |
| 258 | +``` |
| 259 | +$ ./STM32_Programmer_CLI.exe -c port=usb1 -fwupgrade stm32wb5x_BLE_Stack_fw.bin 0x080CB000 firstinstall=1 |
| 260 | + ------------------------------------------------------------------- |
| 261 | + STM32CubeProgrammer v2.3.0 |
| 262 | + ------------------------------------------------------------------- |
| 263 | +
|
| 264 | +
|
| 265 | +
|
| 266 | +USB speed : Full Speed (12MBit/s) |
| 267 | +Manuf. ID : STMicroelectronics |
| 268 | +Product ID : DFU in FS Mode |
| 269 | +SN : 207F38933036 |
| 270 | +FW version : 0x011a |
| 271 | +Device ID : 0x0495 |
| 272 | +Device name : STM32WBxx |
| 273 | +Flash size : 1 MBytes |
| 274 | +Device type : MCU |
| 275 | +Device CPU : Cortex-M0+/M4 |
| 276 | +
|
| 277 | +Download firmware image at address 0x80cb000 ... |
| 278 | +
|
| 279 | +
|
| 280 | +Memory Programming ... |
| 281 | +Opening and parsing file: stm32wb5x_BLE_Stack_fw.bin |
| 282 | + File : stm32wb5x_BLE_Stack_fw.bin |
| 283 | + Size : 165772 Bytes |
| 284 | + Address : 0x080CB000 |
| 285 | +
|
| 286 | +
|
| 287 | +Erasing memory corresponding to segment 0: |
| 288 | +Erasing internal memory sectors [203 243] |
| 289 | +Download in Progress: |
| 290 | +
|
| 291 | +File download complete |
| 292 | +Time elapsed during download operation: 00:00:03.537 |
| 293 | +
|
| 294 | +FUS state is FUS_IDLE |
| 295 | +
|
| 296 | +FUS status is FUS_NO_ERROR |
| 297 | +
|
| 298 | +Firmware Upgrade process started ... |
| 299 | +
|
| 300 | +Updating firmware ... |
| 301 | +Waiting for firmware upgrade end |
| 302 | +
|
| 303 | +FUS state is WIRELESS_STACK_UPGRADE_ONGOING |
| 304 | +
|
| 305 | +FUS status is FUS_NO_ERROR |
| 306 | +
|
| 307 | +FUS state is FUS_ERROR |
| 308 | +
|
| 309 | +FUS status is FUS_NOT_RUNNING |
| 310 | +Firmware Upgrade Success |
| 311 | +``` |
| 312 | + |
| 313 | +- STEP 7 : Revert STEP 2 procedure to put back device in normal mode. |
| 314 | + |
0 commit comments