Unable to update FUS or flash the wireless stack STM32WB55
H,
I just had some custom boards with STM32WB55CG and I would like to flash the BLE stack into the microcontroller. For some reason the STM32CubeProgrammer does not allow me to flash the FUS or BLE stack files, it always comes back with warning/errors like FUS_STATE_IMG_NOT_FOUND and Operation exceeds memory limits. I am not sure what is the solution now. Any idea would be really helpful, thanks.
The software I use is STM32CubeProgrammer, with ST-Link SWD mode, tried both CLI and GUI
When I read the FUS version the version data is actually loaded @0x20010010. Version 1.1.1.0
According to https://github.com/STMicroelectronics/STM32CubeWB Realse note
Note: when FUS is not running but FUS operator used, you can read FUS version @0x20010010
But I am not sure what does it mean.
Some Options bytes value:
SFSA: 0xf4 (Addr: 0x080f4000)
SBRSA: 0x0 (Addr: 20030000)
SNBRSA: 0x10 (Addr: 2003c000)
SBRV: 0x3d00
Logs:
/* Read FUS version */
10:31:31 : ST-LINK SN : 49FF6F066775545529571767
10:31:31 : ST-LINK FW : V2J38S7
10:31:31 : Board : --
10:31:31 : Voltage : 2.84V
10:31:31 : SWD freq : 4000 KHz
10:31:31 : Connect mode: Normal
10:31:31 : Reset mode : Software reset
10:31:31 : Device ID : 0x495
10:31:31 : Revision ID : Rev Y
10:31:31 : Debug in Low Power mode enabled.
10:31:31 : UPLOADING OPTION BYTES DATA ...
10:31:31 : Bank : 0x00
10:31:31 : Address : 0x58004020
10:31:31 : Size : 96 Bytes
10:31:31 : Bank : 0x01
10:31:31 : Address : 0x58004080
10:31:31 : Size : 8 Bytes
10:31:31 : UPLOADING ...
10:31:31 : Size : 1024 Bytes
10:31:31 : Address : 0x8000000
10:31:31 : Read progress:
10:31:31 : Data read successfully
10:31:31 : Time elapsed during the read operation is: 00:00:00.007
10:31:43 : Warning: Option Byte: nSWboot0, value: 0x0, was not modified.
10:31:43 : Warning: Option Byte: nboot0, value: 0x1, was not modified.
10:31:43 : Warning: Option Byte: nboot1, value: 0x1, was not modified.
10:31:43 : Warning: Option Bytes are unchanged, Data won't be downloaded
10:31:43 : Succeeded to set nSWboot0=0 nboot1=1 nboot0=1
10:31:43 : Memory Programming ...
10:31:43 : Opening and parsing file: 0x495_FUS_Operator.bin
10:31:43 : File : 0x495_FUS_Operator.bin
10:31:43 : Size : 8 KBytes
10:31:43 : Address : 0x08000000
10:31:43 : Erasing memory corresponding to segment 0:
10:31:43 : Erasing internal memory sectors [0 1]
10:31:43 : Download in Progress:
10:31:43 : File download complete
10:31:43 : Time elapsed during download operation: 00:00:00.292
10:31:43 : Application is running, Please Hold on...
10:31:43 : Reconnecting...
10:31:43 : Reconnected !
10:31:44 : FUS_STATE_IDLE
10:31:44 : Read FUS state command execution finished
10:31:44 : UPLOADING ...
10:31:44 : Size : 4 Bytes
10:31:44 : Address : 0x20010010
10:31:44 : Read progress:
10:31:44 : Data read successfully
10:31:44 : Time elapsed during the read operation is: 00:00:00.001
/* Update FUS version */
10:31:56 : Warning: Option Byte: nSWboot0, value: 0x0, was not modified.
10:31:56 : Warning: Option Byte: nboot0, value: 0x1, was not modified.
10:31:56 : Warning: Option Byte: nboot1, value: 0x1, was not modified.
10:31:56 : Warning: Option Bytes are unchanged, Data won't be downloaded
10:31:56 : Succeeded to set nSWboot0=0 nboot1=1 nboot0=1
10:31:56 : Memory Programming ...
10:31:56 : Opening and parsing file: 0x495_FUS_Operator.bin
10:31:56 : File : 0x495_FUS_Operator.bin
10:31:56 : Size : 8 KBytes
10:31:56 : Address : 0x08000000
10:31:56 : Erasing memory corresponding to segment 0:
10:31:56 : Erasing internal memory sectors [0 1]
10:31:56 : Download in Progress:
10:31:56 : File download complete
10:31:56 : Time elapsed during download operation: 00:00:00.293
10:31:56 : Application is running, Please Hold on...
10:31:56 : Reconnecting...
10:31:56 : Reconnected !
10:32:00 : Reconnecting...
10:32:00 : Reconnected !
10:32:02 : StartFus activated successfully
10:32:02 : FUS_STATE_IDLE
10:32:02 : Start FUS execution finished
10:32:06 : Old Firmware delete ...
10:32:06 : Warning: Option Byte: nSWboot0, value: 0x0, was not modified.
10:32:06 : Warning: Option Byte: nboot0, value: 0x1, was not modified.
10:32:06 : Warning: Option Byte: nboot1, value: 0x1, was not modified.
10:32:06 : Warning: Option Bytes are unchanged, Data won't be downloaded
10:32:06 : Succeeded to set nSWboot0=0 nboot1=1 nboot0=1
10:32:06 : Memory Programming ...
10:32:06 : Opening and parsing file: 0x495_FUS_Operator.bin
10:32:06 : File : 0x495_FUS_Operator.bin
10:32:06 : Size : 8 KBytes
10:32:06 : Address : 0x08000000
10:32:06 : Erasing memory corresponding to segment 0:
10:32:06 : Erasing internal memory sectors [0 1]
10:32:06 : Download in Progress:
10:32:06 : File download complete
10:32:06 : Time elapsed during download operation: 00:00:00.296
10:32:06 : Application is running, Please Hold on...
10:32:13 : Reconnecting...
10:32:13 : Reconnected !
10:32:13 : Warning: FUS_STATE_IMG_NOT_FOUND, Flash already empty !
10:32:14 : Firmware delete Success
10:32:14 : Download Stack/FUS image at address 0x80ec000 ...
10:32:14 : Memory Programming ...
10:32:14 : Opening and parsing file: stm32wb5x_FUS_fw.bin
10:32:14 : File : stm32wb5x_FUS_fw.bin
10:32:14 : Size : 122134 Bytes
10:32:14 : Address : 0x080EC000
10:32:14 : Erasing memory corresponding to segment 0:
10:32:14 : Operation exceeds memory limits
10:32:14 : failed to erase memory
10:32:14 : Error: Failed to download image!
/* Flash the BLE stack */
10:32:30 : UPLOADING ...
10:32:30 : Size : 4 Bytes
10:32:30 : Address : 0x1FFF8070
10:32:30 : Read progress:
10:32:30 : Data read successfully
10:32:30 : Time elapsed during the read operation is: 00:00:00.001
10:32:39 : Download Stack/FUS image at address 0x80ca000 ...
10:32:39 : Memory Programming ...
10:32:39 : Opening and parsing file: stm32wb5x_BLE_Stack_full_fw.bin
10:32:39 : File : stm32wb5x_BLE_Stack_full_fw.bin
10:32:39 : Size : 122507 Bytes
10:32:39 : Address : 0x080CA000
10:32:39 : Erasing memory corresponding to segment 0:
10:32:39 : Erasing internal memory sectors [202 231]
10:32:40 : Download in Progress:
10:32:42 : File download complete
10:32:42 : Time elapsed during download operation: 00:00:02.864
10:32:42 : Firmware Upgrade process started ...
10:32:42 : Application is running, Please Hold on...
10:32:54 : Reconnecting...
10:32:54 : Reconnected !
10:32:54 : Error: FUS_STATE_IMG_NOT_FOUND
