2020-04-10 05:19 PM
I attempted to update the network stack through SWD on a few STM32WB55 nucleo boards, dongles, and custom PCBs. The results were similar in all cases. When attempting to query the processor to see if the FUS is out-of-date (it should be since these were old boards), the return was:
C:\Program Files (x86)\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin>STM32_Programmer_CLI.exe -c port=swd mode=UR -r32 0x20030030 1
-------------------------------------------------------------------
STM32CubeProgrammer v2.4.0
-------------------------------------------------------------------
ST-LINK SN : 55FF6D067880565343501667
ST-LINK FW : V2J36S7
Voltage : 3.22V
SWD freq : 4000 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x495
Device name : STM32WB55xx
Flash size : 1 MBytes
Device type : MCU
Device CPU : Cortex-M0+/M4
Reading 32-bit memory content
Size : 4 Bytes
Address: : 0x20030030
0x20030030 : 00000000
For one nucleo board, I attempted to update the FUS anyways and was thrown the following:
C:\Program Files (x86)\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin>STM32_Programmer_CLI.exe -c port=swd mode=UR -ob nSWboot0=0 nboot1=1 nboot0=1 -fwupgrade C:\Users\patrick\STM32Cube\Repository\STM32Cube_FW_WB_V1.5.0\Projects\STM32WB_Copro_Wireless_Binaries\STM32WB5x\stm32wb5x_FUS_fw_1_0_2.bin 0x080EC000 firstinstall=1
-------------------------------------------------------------------
STM32CubeProgrammer v2.4.0
-------------------------------------------------------------------
ST-LINK SN : 54FF70067880565344321167
ST-LINK FW : V2J36S7
Voltage : 3.21V
SWD freq : 4000 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x495
Device name : STM32WB55xx
Flash size : 1 MBytes
Device type : MCU
Device CPU : Cortex-M0+/M4
UPLOADING OPTION BYTES DATA ...
Bank : 0x00
Address : 0x58004020
Size : 104 Bytes
██████████████████████████████████████████████████ 100%
PROGRAMMING OPTION BYTES AREA ...
Warning: Option Byte: nboot0, value: 0x1, was not modified.
Warning: Option Byte: nboot1, value: 0x1, was not modified.
Warning: Option Byte: nswboot0, value: 0x0, was not modified.
Warning: Option Bytes are unchanged, Data won't be downloaded
Download firmware image at address 0x80ec000 ...
Memory Programming ...
Opening and parsing file: stm32wb5x_FUS_fw_1_0_2.bin
File : stm32wb5x_FUS_fw_1_0_2.bin
Size : 24492 Bytes
Address : 0x080EC000
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [236 241]
Download in Progress:
██████████████████████████████████████████████████ 100%
File download complete
Time elapsed during download operation: 00:00:00.839
...
...
this repeats a few times
...
...
Firmware Upgrade process started ...
Application is running
Reconnecting...
Reconnected !
Error: -- Reserved --
Error: fwupgrade Command Failure!
Download firmware image at address 0x80ec000 ...
Memory Programming ...
Opening and parsing file: stm32wb5x_FUS_fw_1_0_2.bin
File : stm32wb5x_FUS_fw_1_0_2.bin
Size : 24492 Bytes
Address : 0x080EC000
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [236 241]
Download in Progress:
██████████████████████████████████████████████████ 100%
Error: failed to download Segment[0]
Error: failed to download the File
Error: Failed to download image!
Edit:
Found the latest v1.6 fw version so I downloaded that and used SWD through the STM32CubeProgrammer GUI. I was able to delete the firmware successfully but kept getting an "Error: -- Reserved --" when trying to upgrade the FUS.
00:12:05 : Reconnecting...
00:12:05 : Reconnected !
00:12:05 : Error: -- Reserved --
00:12:05 : Old Firmware delete ...
00:12:05 : Warning: Option Byte: nSWboot0, value: 0x0, was not modified.
00:12:05 : Warning: Option Byte: nboot0, value: 0x1, was not modified.
00:12:05 : Warning: Option Byte: nboot1, value: 0x1, was not modified.
00:12:05 : Warning: Option Bytes are unchanged, Data won't be downloaded
00:12:05 : Succeeded to set nSWboot0=0 nboot1=1 nboot0=1
00:12:05 : Memory Programming ...
00:12:05 : Opening and parsing file: 0x495_FUS_Operator.bin
00:12:05 : File : 0x495_FUS_Operator.bin
00:12:05 : Size : 11584 Bytes
00:12:05 : Address : 0x08000000
00:12:05 : Erasing memory corresponding to segment 0:
00:12:05 : Erasing internal memory sectors [0 2]
00:12:05 : failed to erase memory
00:12:05 : failed to erase memory
00:12:05 : Failed to download FUS operator!
00:12:05 : Retry -- 0
00:12:05 : Old Firmware delete ...
00:12:05 : Warning: Option Byte: nSWboot0, value: 0x0, was not modified.
00:12:05 : Warning: Option Byte: nboot0, value: 0x1, was not modified.
00:12:05 : Warning: Option Byte: nboot1, value: 0x1, was not modified.
00:12:05 : Warning: Option Bytes are unchanged, Data won't be downloaded
00:12:05 : Succeeded to set nSWboot0=0 nboot1=1 nboot0=1
00:12:05 : Memory Programming ...
00:12:05 : Opening and parsing file: 0x495_FUS_Operator.bin
00:12:05 : File : 0x495_FUS_Operator.bin
00:12:05 : Size : 11584 Bytes
00:12:05 : Address : 0x08000000
00:12:05 : Erasing memory corresponding to segment 0:
00:12:06 : Erasing internal memory sectors [0 2]
00:12:06 : Download in Progress:
00:12:06 : File download complete
00:12:06 : Time elapsed during download operation: 00:00:00.521
00:12:06 : Application is running
00:12:14 : Reconnecting...
00:12:14 : Reconnected !
00:12:15 : Firmware delete Success
00:12:15 : Download Stack/FUS image at address 0x80ec000 ...
00:12:15 : Memory Programming ...
00:12:15 : Opening and parsing file: stm32wb5x_FUS_fw_1_0_2.bin
00:12:15 : File : stm32wb5x_FUS_fw_1_0_2.bin
00:12:15 : Size : 24492 Bytes
00:12:15 : Address : 0x080EC000
00:12:15 : Erasing memory corresponding to segment 0:
00:12:15 : Erasing internal memory sectors [236 241]
00:12:15 : Download in Progress:
00:12:16 : File download complete
00:12:16 : Time elapsed during download operation: 00:00:00.809
00:12:16 : Firmware Upgrade process started ...
00:12:16 : Application is running
00:12:26 : Reconnecting...
00:12:26 : Reconnected !
00:12:26 : Error: -- Reserved --
00:12:26 : Old Firmware delete ...
00:12:26 : Warning: Option Byte: nSWboot0, value: 0x0, was not modified.
00:12:26 : Warning: Option Byte: nboot0, value: 0x1, was not modified.
00:12:26 : Warning: Option Byte: nboot1, value: 0x1, was not modified.
00:12:26 : Warning: Option Bytes are unchanged, Data won't be downloaded
00:12:26 : Succeeded to set nSWboot0=0 nboot1=1 nboot0=1
00:12:26 : Memory Programming ...
00:12:26 : Opening and parsing file: 0x495_FUS_Operator.bin
00:12:26 : File : 0x495_FUS_Operator.bin
00:12:26 : Size : 11584 Bytes
00:12:26 : Address : 0x08000000
00:12:26 : Erasing memory corresponding to segment 0:
00:12:26 : Erasing internal memory sectors [0 2]
00:12:26 : failed to erase memory
00:12:26 : failed to erase memory
00:12:26 : Failed to download FUS operator!
00:12:26 : Retry -- 1
00:12:26 : Old Firmware delete ...
00:12:26 : Warning: Option Byte: nSWboot0, value: 0x0, was not modified.
00:12:26 : Warning: Option Byte: nboot0, value: 0x1, was not modified.
00:12:26 : Warning: Option Byte: nboot1, value: 0x1, was not modified.
00:12:26 : Warning: Option Bytes are unchanged, Data won't be downloaded
00:12:26 : Succeeded to set nSWboot0=0 nboot1=1 nboot0=1
00:12:26 : Memory Programming ...
00:12:26 : Opening and parsing file: 0x495_FUS_Operator.bin
00:12:26 : File : 0x495_FUS_Operator.bin
00:12:26 : Size : 11584 Bytes
00:12:26 : Address : 0x08000000
00:12:26 : Erasing memory corresponding to segment 0:
00:12:26 : Erasing internal memory sectors [0 2]
00:12:26 : Download in Progress:
00:12:27 : File download complete
00:12:27 : Time elapsed during download operation: 00:00:00.503
00:12:27 : Application is running
00:12:35 : Reconnecting...
00:12:35 : Reconnected !
00:12:36 : Firmware delete Success
00:12:36 : Download Stack/FUS image at address 0x80ec000 ...
00:12:36 : Memory Programming ...
00:12:36 : Opening and parsing file: stm32wb5x_FUS_fw_1_0_2.bin
00:12:36 : File : stm32wb5x_FUS_fw_1_0_2.bin
00:12:36 : Size : 24492 Bytes
00:12:36 : Address : 0x080EC000
00:12:36 : Erasing memory corresponding to segment 0:
00:12:36 : Erasing internal memory sectors [236 241]
00:12:36 : Download in Progress:
00:12:37 : File download complete
00:12:37 : Time elapsed during download operation: 00:00:00.807
00:12:37 : Firmware Upgrade process started ...
00:12:37 : Application is running
00:12:47 : Reconnecting...
00:12:47 : Reconnected !
00:12:47 : Error: -- Reserved --
00:12:47 : Old Firmware delete ...
00:12:47 : Warning: Option Byte: nSWboot0, value: 0x0, was not modified.
00:12:47 : Warning: Option Byte: nboot0, value: 0x1, was not modified.
00:12:47 : Warning: Option Byte: nboot1, value: 0x1, was not modified.
00:12:47 : Warning: Option Bytes are unchanged, Data won't be downloaded
00:12:47 : Succeeded to set nSWboot0=0 nboot1=1 nboot0=1
00:12:47 : Memory Programming ...
00:12:47 : Opening and parsing file: 0x495_FUS_Operator.bin
00:12:47 : File : 0x495_FUS_Operator.bin
00:12:47 : Size : 11584 Bytes
00:12:47 : Address : 0x08000000
00:12:47 : Erasing memory corresponding to segment 0:
00:12:47 : Erasing internal memory sectors [0 2]
00:12:47 : failed to erase memory
00:12:47 : failed to erase memory
00:12:47 : Failed to download FUS operator!
00:12:47 : Retry -- 2
2020-04-14 01:57 AM
First, reading the FUS version via the SWD port is not supported. This is why the returned value is always 0. This is not an error.
This command is only supported via the USB or UART port as it uses a different path (and SW). For Nucleo board and dongles, you should use these ports.
Then regarding the upgrade failure, there are many things to check.
You can’t upgrade FUS V 1.1.0 directly from FUS V0.5.3. You first have to upgrade it to FUS V1.0.2.
A trick that may be helpful is to start from a clean user area.
For this, please apply the following sequence. Set the RDP option byte to 0xBB and then back to 0xAA. This triggers an erase of the user area. It usually helps avoiding issues occurring when trying to download the FUS_operator.
The “Reserved�? error message is strange here. I will ask the security team about its meaning in this case.
It is also helpful to dump the option bytes to check the correct setting.
2020-04-14 08:01 AM
Hi Remi,
I figured out that it wasn't supported once I downloaded 1.6.0 which, as of 4/10, is only available to be downloaded from the website and not in the package manager for CubeMX or CubeIDE. The confusion was that this step was included in the 1.5.0 instructions:
STEP 4 : Read and upgrade FUS Version
STM32_Programmer_CLI.exe -c port=usb1 -r32 0x20030030 1
0x20030030 : 00050300 : FUSv0.5.3 => Must be updated using STEP 5.
0x20030030 : 01000100 or 01000200 : FUSv1.0.x => Must be updated using STEP 6.
0x20030030 : 0x10100000 : FUSv1.1.0 => Up to date, you can download the new wireless stack using STEP 7.
In regards to the whole "Reserved" error, I tried sequentially upgrading to any of the FUS versions since 0.5.3 and kept getting the "Reserved" error message for each attempt. I'll go ahead and try setting the RDP option byte and reply back to this post in the next couple of days.
2020-05-20 02:52 PM
Hi Remi,
I had a chance to go back to this and modified the RDP option byte to 0xBB and then to 0xAA. However, the "reserved" error still persists.
C:\Program Files (x86)\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin>STM32_Programmer_CLI.exe -c port=swd mode=UR -fwupgrade C:\Users\patrick\STM32Cube\Repository\STM32Cube_FW_WB_V1.7.0\Projects\STM32WB_Copro_Wireless_Binaries\STM32WB5x\stm32wb5x_FUS_fw_1_0_2.bin 0x080EC000 firstinstall=0
-------------------------------------------------------------------
STM32CubeProgrammer v2.4.0
-------------------------------------------------------------------
ST-LINK SN : 54FF70067880565344321167
ST-LINK FW : V2J36S7
Voltage : 3.21V
SWD freq : 4000 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x495
Device name : STM32WB55xx
Flash size : 1 MBytes
Device type : MCU
Device CPU : Cortex-M0+/M4
Old wireless stack delete ...
Warning: Option Byte: nSWboot0, value: 0x0, was not modified.
Warning: Option Byte: nboot0, value: 0x1, was not modified.
Warning: Option Byte: nboot1, value: 0x1, was not modified.
Warning: Option Bytes are unchanged, Data won't be downloaded
Succeeded to set nSWboot0=0 nboot1=1 nboot0=1
Memory Programming ...
Opening and parsing file: 0x495_FUS_Operator.bin
File : 0x495_FUS_Operator.bin
Size : 11584 Bytes
Address : 0x08000000
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 2]
Download in Progress:
██████████████████████████████████████████████████ 100%
File download complete
Time elapsed during download operation: 00:00:00.585
Application is running
Reconnecting...
Reconnected !
Firmware delete Success
Download firmware image at address 0x80ec000 ...
Memory Programming ...
Opening and parsing file: stm32wb5x_FUS_fw_1_0_2.bin
File : stm32wb5x_FUS_fw_1_0_2.bin
Size : 24492 Bytes
Address : 0x080EC000
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [236 241]
Download in Progress:
██████████████████████████████████████████████████ 100%
File download complete
Time elapsed during download operation: 00:00:00.860
Firmware Upgrade process started ...
Application is running
Reconnecting...
Reconnected !
Error: -- Reserved --
Error: fwupgrade Command Failure!
Old wireless stack delete ...
Warning: Option Byte: nSWboot0, value: 0x0, was not modified.
Warning: Option Byte: nboot0, value: 0x1, was not modified.
Warning: Option Byte: nboot1, value: 0x1, was not modified.
Warning: Option Bytes are unchanged, Data won't be downloaded
Succeeded to set nSWboot0=0 nboot1=1 nboot0=1
Memory Programming ...
Opening and parsing file: 0x495_FUS_Operator.bin
File : 0x495_FUS_Operator.bin
Size : 11584 Bytes
Address : 0x08000000
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 2]
failed to erase memory
failed to erase memory
Failed to download FUS operator!
Old Firmware delete failed
2020-05-24 01:18 AM
The "reserved" message can happen when the FUS version currently being programmed is already the one in place.
So it could result from the retry.
Now you should try to upgrade the FUS to V1.1.0.
2020-05-24 09:21 AM
I figured that may be the case since I loaded my application onto several of my nodes a few days ago and it appears to be working as expected. Thanks!