2020-06-03 08:31 PM
Hello! I am trying to download the FUS V1.1.0.0 to a STM32WB5xE controller through SWD in CubeProgrammer so as to update the firmware. But I receive Error: --Reserved-- . I ignored it and downloaded the firmware successfuly but my BLE stack doesn't work :( . I have soldered the controller in my board and connected some peripherals to him and everything is working ех�?еpt BLE. What can I do? Here is the log of CubeProgrammer:
06:13:42 : STM32CubeProgrammer API v2.4.0
06:14:37 : ST-LINK SN : 2A3009013212354D434B4E00
06:14:37 : ST-LINK FW : V2J36S7
06:14:37 : Voltage : 3.19V
06:14:37 : SWD freq : 4000 KHz
06:14:37 : Connect mode: Under Reset
06:14:37 : Reset mode : Software reset
06:14:37 : Device ID : 0x495
06:14:38 : UPLOADING OPTION BYTES DATA ...
06:14:38 : Bank : 0x00
06:14:38 : Address : 0x58004020
06:14:38 : Size : 104 Bytes
06:14:38 : UPLOADING ...
06:14:38 : Size : 1024 Bytes
06:14:38 : Address : 0x8000000
06:14:38 : Read progress:
06:14:38 : Data read successfully
06:14:38 : Time elapsed during the read operation is: 00:00:00.007
06:15:16 : Old Firmware delete ...
06:15:16 : Warning: Option Byte: nSWboot0, value: 0x0, was not modified.
06:15:16 : Warning: Option Byte: nboot0, value: 0x1, was not modified.
06:15:16 : Warning: Option Byte: nboot1, value: 0x1, was not modified.
06:15:16 : Warning: Option Bytes are unchanged, Data won't be downloaded
06:15:16 : Succeeded to set nSWboot0=0 nboot1=1 nboot0=1
06:15:16 : Memory Programming ...
06:15:16 : Opening and parsing file: 0x495_FUS_Operator.bin
06:15:16 : File : 0x495_FUS_Operator.bin
06:15:16 : Size : 11584 Bytes
06:15:16 : Address : 0x08000000
06:15:16 : Erasing memory corresponding to segment 0:
06:15:16 : Erasing internal memory sectors [0 2]
06:15:16 : Download in Progress:
06:15:17 : File download complete
06:15:17 : Time elapsed during download operation: 00:00:00.686
06:15:17 : Application is running
06:15:25 : Reconnecting...
06:15:25 : Reconnected !
06:15:26 : Firmware delete Success
06:15:26 : Download Stack/FUS image at address 0x807a000 ...
06:15:26 : Memory Programming ...
06:15:26 : Opening and parsing file: stm32wb5x_FUS_fw.bin
06:15:26 : File : stm32wb5x_FUS_fw.bin
06:15:26 : Size : 24492 Bytes
06:15:26 : Address : 0x0807A000
06:15:26 : Erasing memory corresponding to segment 0:
06:15:26 : Erasing internal memory sectors [122 127]
06:15:26 : Download in Progress:
06:15:27 : File download complete
06:15:27 : Time elapsed during download operation: 00:00:01.052
06:15:27 : Firmware Upgrade process started ...
06:15:27 : Application is running
06:15:37 : Reconnecting...
06:15:37 : Reconnected !
06:15:37 : Error: -- Reserved --
06:15:37 : Old Firmware delete ...
06:15:37 : Warning: Option Byte: nSWboot0, value: 0x0, was not modified.
06:15:37 : Warning: Option Byte: nboot0, value: 0x1, was not modified.
06:15:37 : Warning: Option Byte: nboot1, value: 0x1, was not modified.
06:15:37 : Warning: Option Bytes are unchanged, Data won't be downloaded
06:15:37 : Succeeded to set nSWboot0=0 nboot1=1 nboot0=1
06:15:37 : Memory Programming ...
06:15:37 : Opening and parsing file: 0x495_FUS_Operator.bin
06:15:37 : File : 0x495_FUS_Operator.bin
06:15:37 : Size : 11584 Bytes
06:15:37 : Address : 0x08000000
06:15:37 : Erasing memory corresponding to segment 0:
06:15:38 : Erasing internal memory sectors [0 2]
06:15:38 : failed to erase memory
06:15:38 : failed to erase memory
06:15:38 : Failed to download FUS operator!
06:15:38 : Retry -- 0
06:15:38 : Old Firmware delete ...
06:15:38 : Warning: Option Byte: nSWboot0, value: 0x0, was not modified.
06:15:38 : Warning: Option Byte: nboot0, value: 0x1, was not modified.
06:15:38 : Warning: Option Byte: nboot1, value: 0x1, was not modified.
06:15:38 : Warning: Option Bytes are unchanged, Data won't be downloaded
06:15:38 : Succeeded to set nSWboot0=0 nboot1=1 nboot0=1
06:15:38 : Memory Programming ...
06:15:38 : Opening and parsing file: 0x495_FUS_Operator.bin
06:15:38 : File : 0x495_FUS_Operator.bin
06:15:38 : Size : 11584 Bytes
06:15:38 : Address : 0x08000000
06:15:38 : Erasing memory corresponding to segment 0:
06:15:38 : Erasing internal memory sectors [0 2]
06:15:38 : Download in Progress:
06:15:38 : File download complete
06:15:38 : Time elapsed during download operation: 00:00:00.694
06:15:38 : Application is running
06:15:46 : Reconnecting...
06:15:47 : Reconnected !
06:15:48 : Firmware delete Success
06:15:48 : Download Stack/FUS image at address 0x807a000 ...
06:15:48 : Memory Programming ...
06:15:48 : Opening and parsing file: stm32wb5x_FUS_fw.bin
06:15:48 : File : stm32wb5x_FUS_fw.bin
06:15:48 : Size : 24492 Bytes
06:15:48 : Address : 0x0807A000
06:15:48 : Erasing memory corresponding to segment 0:
06:15:48 : Erasing internal memory sectors [122 127]
06:15:48 : Download in Progress:
06:15:49 : File download complete
06:15:49 : Time elapsed during download operation: 00:00:00.923
06:15:49 : Firmware Upgrade process started ...
06:15:49 : Application is running
06:15:59 : Reconnecting...
06:15:59 : Reconnected !
06:15:59 : Error: -- Reserved --
06:15:59 : Old Firmware delete ...
06:15:59 : Warning: Option Byte: nSWboot0, value: 0x0, was not modified.
06:15:59 : Warning: Option Byte: nboot0, value: 0x1, was not modified.
06:15:59 : Warning: Option Byte: nboot1, value: 0x1, was not modified.
06:15:59 : Warning: Option Bytes are unchanged, Data won't be downloaded
06:15:59 : Succeeded to set nSWboot0=0 nboot1=1 nboot0=1
06:15:59 : Memory Programming ...
06:15:59 : Opening and parsing file: 0x495_FUS_Operator.bin
06:15:59 : File : 0x495_FUS_Operator.bin
06:15:59 : Size : 11584 Bytes
06:15:59 : Address : 0x08000000
06:15:59 : Erasing memory corresponding to segment 0:
06:15:59 : Erasing internal memory sectors [0 2]
06:15:59 : failed to erase memory
06:15:59 : failed to erase memory
06:15:59 : Failed to download FUS operator!
06:15:59 : Retry -- 1
06:15:59 : Old Firmware delete ...
06:15:59 : Warning: Option Byte: nSWboot0, value: 0x0, was not modified.
06:15:59 : Warning: Option Byte: nboot0, value: 0x1, was not modified.
06:15:59 : Warning: Option Byte: nboot1, value: 0x1, was not modified.
06:15:59 : Warning: Option Bytes are unchanged, Data won't be downloaded
06:15:59 : Succeeded to set nSWboot0=0 nboot1=1 nboot0=1
06:15:59 : Memory Programming ...
06:15:59 : Opening and parsing file: 0x495_FUS_Operator.bin
06:15:59 : File : 0x495_FUS_Operator.bin
06:15:59 : Size : 11584 Bytes
06:15:59 : Address : 0x08000000
06:15:59 : Erasing memory corresponding to segment 0:
06:15:59 : Erasing internal memory sectors [0 2]
06:15:59 : Download in Progress:
06:16:00 : File download complete
06:16:00 : Time elapsed during download operation: 00:00:00.590
06:16:00 : Application is running
06:16:08 : Reconnecting...
06:16:08 : Reconnected !
06:16:09 : Firmware delete Success
06:16:09 : Download Stack/FUS image at address 0x807a000 ...
06:16:09 : Memory Programming ...
06:16:09 : Opening and parsing file: stm32wb5x_FUS_fw.bin
06:16:09 : File : stm32wb5x_FUS_fw.bin
06:16:09 : Size : 24492 Bytes
06:16:09 : Address : 0x0807A000
06:16:09 : Erasing memory corresponding to segment 0:
06:16:09 : Erasing internal memory sectors [122 127]
06:16:09 : Download in Progress:
06:16:10 : File download complete
06:16:10 : Time elapsed during download operation: 00:00:00.964
06:16:10 : Firmware Upgrade process started ...
06:16:10 : Application is running
06:16:20 : Reconnecting...
06:16:20 : Reconnected !
06:16:20 : Error: -- Reserved --
06:16:20 : Old Firmware delete ...
06:16:20 : Warning: Option Byte: nSWboot0, value: 0x0, was not modified.
06:16:20 : Warning: Option Byte: nboot0, value: 0x1, was not modified.
06:16:20 : Warning: Option Byte: nboot1, value: 0x1, was not modified.
06:16:20 : Warning: Option Bytes are unchanged, Data won't be downloaded
06:16:20 : Succeeded to set nSWboot0=0 nboot1=1 nboot0=1
06:16:20 : Memory Programming ...
06:16:20 : Opening and parsing file: 0x495_FUS_Operator.bin
06:16:20 : File : 0x495_FUS_Operator.bin
06:16:20 : Size : 11584 Bytes
06:16:20 : Address : 0x08000000
06:16:20 : Erasing memory corresponding to segment 0:
06:16:20 : Erasing internal memory sectors [0 2]
06:16:20 : failed to erase memory
06:16:20 : failed to erase memory
06:16:20 : Failed to download FUS operator!
06:16:20 : Retry -- 2
2020-06-11 10:24 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.
Dou you have only SWD port ot is there a USB port in addition?
The goal is to ensure FUS is correctly upgraded to V1.1.0.
Could you try to programm the FWstack?
Can you show the sequence of command you are using?
2020-06-12 03:14 AM
I have only swd port. I checked my FUS version using command line and it shows 0x20030030 = 00000000. I could download the stack but board doesn't advertise, what makes me think that something wrong or in the FUS or in the stack. Below what I got with all my commands:
...\STM32CubeProgrammer\bin>STM32_Programmer_CLI.exe -c port=swd -fwupgrade ...\en.stm32cubewb_v1-4-0\STM32Cube_FW_WB_V1.4.0\Projects\STM32WB_Copro_Wireless_Binaries\stm32wb5x_FUS_fw.bin 0x0807A000 firstinstall=0
-------------------------------------------------------------------
STM32CubeProgrammer v2.4.0
-------------------------------------------------------------------
ST-LINK SN : 2A3009013212354D434B4E00
ST-LINK FW : V2J36S7
Voltage : 3.18V
SWD freq : 4000 KHz
Connect mode: Normal
Reset mode : Software reset
Device ID : 0x495
Device name : STM32WB55xx
Flash size : 512 KBytes
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.700
Application is running
Reconnecting...
Reconnected !
Firmware delete Success
Download firmware image at address 0x807a000 ...
Memory Programming ...
Opening and parsing file: stm32wb5x_FUS_fw.bin
File : stm32wb5x_FUS_fw.bin
Size : 24492 Bytes
Address : 0x0807A000
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [122 127]
Download in Progress:
██████████████████████████████████████████████████ 100%
File download complete
Time elapsed during download operation: 00:00:00.959
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-06-12 03:21 AM
And when I download the flash
...\bin>STM32_Programmer_CLI.exe -c port=swd -fwupgrade ...\stm32wb5x_BLE_Stack_fw.bin 0x08057000 firstinstall=1
-------------------------------------------------------------------
STM32CubeProgrammer v2.4.0
-------------------------------------------------------------------
ST-LINK SN : 2A3009013212354D434B4E00
ST-LINK FW : V2J36S7
Voltage : 3.18V
SWD freq : 4000 KHz
Connect mode: Normal
Reset mode : Software reset
Device ID : 0x495
Device name : STM32WB55xx
Flash size : 512 KBytes
Device type : MCU
Device CPU : Cortex-M0+/M4
Download firmware image at address 0x8057000 ...
Memory Programming ...
Opening and parsing file: stm32wb5x_BLE_Stack_full_fw.bin
File : stm32wb5x_BLE_Stack_full_fw.bin
Size : 164816 Bytes
Address : 0x08057000
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [87 127]
Download in Progress:
██████████████████████████████████████████████████ 100%
File download complete
Time elapsed during download operation: 00:00:04.106
Firmware Upgrade process started ...
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
Succeed 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:
File download complete
Time elapsed during download operation: 00:00:00.700
Application is running
Reconnecting...
Reconnected !
Firmware Upgrade Success
2020-06-12 09:18 AM
A few remarks first: The FUS version cannot be read via the SWD port at address 0x20030030 as the FUS_Operator FW do not manage that information the same way the bootloader does.
The FUS is not involved in the activation of the BLE stack, it just handles the programming.
I am not sure the FUs was not correctly installed. Some error messages could come from the retry.
Could you try to update the RF stack now?
2020-06-12 01:46 PM
stm32wb5x_rfmonitor_... ? this firmware?
will it not overwrite the BLE stack firmware?
2020-06-12 02:07 PM
If you need BLE connection, the RF stack binary should be stm32wb5x_BLE_Stack_full_fw.bin to be loaded at address 0x08057000.
You can first check the SFSA option byte. It should be 0xF4.
Then you perform a fwdelete and then you can program the RF stack.
2020-06-12 02:21 PM
SFSA is equal to 0x57 and I can not change it
2020-06-15 02:34 AM
You must not change SFSA option byte, as it is a secure option byte that can only by modified by the FUS running on CM0+ core. If you try to force it, it could lead to a blocked board. SFSA = 0x57 means the BLE FW is correctly installed. So you can then load your application at address 0x08000000. Your board should work correctly.
2020-06-16 05:51 AM
is it normal that when I try to load my app to address 0x08000000 using cubeprogrammer it returns the message "address out of range"? I can only load in 0x0 address. But in my IDE I can flash my board normally. And more: I think that my app doesn't work very well. He doesn't achieve Adv_Request(APP_BLE_FAST_ADV);