cancel
Showing results for 
Search instead for 
Did you mean: 

Can't upgrade RF stack...and can't upgrade...FUS...

PJEAN.1
Associate II

Hello all,

I'm currently stuck with the RF stack upgrade process a stm32wb55 nucleo board....i have follow the release notes in the "STM32WB_Copro_Wireless_Binaries" directory but i'm now out of idee to figure out what's going on...

Currently i'm not able to read the FUS version as the following commands :

STM32_Programmer_CLI -c port=swd -r32 0x20030030 1

return :

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

first i run :

STM32_Programmer_CLI -c port=SWD -fwdelete

with success

then the when i try to upgrade FUS :

STM32_Programmer_CLI -c port=swd mode=UR -ob nSWboot0=0 nboot1=1 nboot0=1 -fwupgrade /home/pierre/Documents/en.stm32cubewb_v1-5-0/STM32Cube_FW_WB_V1.5.0/Projects/STM32WB_Copro_Wireless_Binaries/STM32WB5x/stm32wb5x_FUS_fw_1_0_2.bin 0x080EC000 firstinstall=0
      -------------------------------------------------------------------
                        STM32CubeProgrammer v2.4.0                  
      -------------------------------------------------------------------
 
ST-LINK SN  : 0674FF363035485043181223
ST-LINK FW  : V2J36M0
Voltage     : 3,24V
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
 
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:01.340
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:01.650
 
Firmware Upgrade process started ...
 
Application is running
Reconnecting...
Reconnected !
Error: FUS_STATE_IMG_NOT_AUTHENTIC
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

So ok maybe FUS is already 1.0.2 i don't know since i'm not able to read it...

But if i try to upgrade rf stack...

STM32_Programmer_CLI -c port=swd mode=UR -ob nSWboot0=0 nboot1=1 nboot0=1 -fwupgrade /home/pierre/Documents/en.stm32cubewb_v1-5-0/STM32Cube_FW_WB_V1.5.0/Projects/STM32WB_Copro_Wireless_Binaries/STM32WB5x/stm32wb5x_Thread_FTD_fw.bin 0x0809F000 firstinstall=1

it fail...

      -------------------------------------------------------------------
                        STM32CubeProgrammer v2.4.0                  
      -------------------------------------------------------------------
 
ST-LINK SN  : 0674FF363035485043181223
ST-LINK FW  : V2J36M0
Voltage     : 3,24V
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 0x809f000 ...
 
 
Memory Programming ...
Opening and parsing file: stm32wb5x_Thread_FTD_fw.bin
  File          : stm32wb5x_Thread_FTD_fw.bin
  Size          : 347320 Bytes
  Address       : 0x0809F000 
 
 
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [159 243]
Download in Progress:
[==================================================] 100% 
 
File download complete
Time elapsed during download operation: 00:00:08.999
 
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:01.334
Application is running
Reconnecting...
Reconnected !
Error: FUS_STATE_IMG_NOT_AUTHENTIC
Error: fwupgrade Command Failure!
 
Download firmware image at address 0x809f000 ...
 
 
Memory Programming ...
Opening and parsing file: stm32wb5x_Thread_FTD_fw.bin
  File          : stm32wb5x_Thread_FTD_fw.bin
  Size          : 347320 Bytes
  Address       : 0x0809F000 
 
 
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [159 243]
Download in Progress:
[==================================================] 100% 
 
File download complete
Time elapsed during download operation: 00:00:08.679
 
Firmware Upgrade process started ...
 
Application is running
Reconnecting...
Reconnected !
Error: FUS_STATE_IMG_NOT_AUTHENTIC
Error: fwupgrade Command Failure!
 
Download firmware image at address 0x809f000 ...
 
 
Memory Programming ...
Opening and parsing file: stm32wb5x_Thread_FTD_fw.bin
  File          : stm32wb5x_Thread_FTD_fw.bin
  Size          : 347320 Bytes
  Address       : 0x0809F000 
 
 
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [159 243]
Download in Progress:
[===========================                       ]  55% 
 
Error: failed to download Segment[0]
Error: failed to download the File
Error: Failed to download image!

Any advices ?

Regards

Pierre

9 REPLIES 9
Remi QUINTIN
ST Employee

It is not possible to read the FUS version via the SWD port. So the value 0 is not unexpected. It is not an error.

Use the USB port to read it.

Otherwise looking at the first log , the error messages are not critical.

Regarding the second log, I am more puzzled. Could you download the secure option bytes (SFSA, SBRV, ...)?

One last point use the USB port instead of the SWD port , just in case.

PJEAN.1
Associate II

Hello Remi, thanks for your answer

Just for clarify the situation, i bought three nucleoWB55 pack.

0693W000000UvWJQA0.jpg

On the three board i have tried to connect via USB with the boot0 and usb_mcu jumper

0693W000000UvW9QAK.jpg None of the three nucléo board are detected in the peripheral manager...so i can't use the usb to upgrade FUS or RF stack...

But i also tried the usb dongle and the three dongle are detected !

i don't if this is normal, but i saw that some people seems to have the same problems is there a way to flash bootloader a on the nucleo ?

(https://community.st.com/s/question/0D50X0000BXmO6ASQV/pnucleowb55-does-not-working-on-dfu-mode)

As you requested i read the option bytes on the nucléo with STM32Programmer and via the ST-link interface.

0693W000000UvWdQAK.png0693W000000UvWYQA0.png

So what do you think about this ? is there something wrong in the options bytes ?

Remi QUINTIN
ST Employee

No I dont see anything wrong with the secure option bytes.

Could you also provide a dump of the user option bytes? I expect the option byte nSWBOOT0 to be set to 1.

Are you using the Cube programmer tool via the graphical interface or via the command in line interface.

When using the command in line mode:

CLI.exe -c port=usb1 -fwupgrade %RF_STACK_BIN% %RT_STACK_ADDRESS% firstinstall=1

Last point to check is the use of a USB driver that would properly manage the DFU mode.

PJEAN.1
Associate II

Hello Remi,

The nSWBOOT0 byte was not set , so i set it and after that i was able to connect the board over usb DFU mode.

then i read the FUS version :

 STM32_Programmer_CLI.exe -c port=usb1 -r32 0x20030030 1
      -------------------------------------------------------------------
                       STM32CubeProgrammer v2.4.0
      -------------------------------------------------------------------
 
 
 
USB speed   : Full Speed (12MBit/s)
Manuf. ID   : STMicroelectronics
Product ID  : DFU in FS Mode
SN          : 20793183554D
FW version  : 0x011a
Device ID   : 0x0495
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 : 00050300
 
 

version is 0.5.3 so i tried to perform an upgrade to 1.0.2 as said in the release notes

 STM32_Programmer_CLI.exe -c port=usb1 -fwupgrade stm32wb5x_FUS_fw_1_0_2.bin 0x080EC000 firstinstall=1
      -------------------------------------------------------------------
                       STM32CubeProgrammer v2.4.0
      -------------------------------------------------------------------
 
 
 
USB speed   : Full Speed (12MBit/s)
Manuf. ID   : STMicroelectronics
Product ID  : DFU in FS Mode
SN          : 20793183554D
FW version  : 0x011a
Device ID   : 0x0495
Device name : STM32WB55xx
Flash size  : 1 MBytes
Device type : MCU
Device CPU  : Cortex-M0+/M4
 
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]
erasing sector 0236 @: 0x080ec000 done
erasing sector 0237 @: 0x080ed000 done
erasing sector 0238 @: 0x080ee000 done
erasing sector 0239 @: 0x080ef000 done
erasing sector 0240 @: 0x080f0000 done
erasing sector 0241 @: 0x080f1000 done
Download in Progress:
▒▒  4%▒▒  8%▒▒ 12%▒▒ 16%▒▒ 20%▒▒ 25%▒▒ 29%▒▒ 33%▒▒ 37%▒▒ 41%▒▒ 45%▒▒▒ 50%▒▒ 54%▒▒ 58%▒▒ 62%▒▒ 66%▒▒ 70%▒▒ 75%▒▒ 79%▒▒ 83%▒▒ 87%▒▒ 91%▒▒ 95%▒▒▒ 100%
 
File download complete
Time elapsed during download operation: 00:00:00.560
 
FUS state is FUS_IDLE
 
FUS status is FUS_NO_ERROR
 
Firmware Upgrade process started ...
 
Updating firmware ...
Waiting for firmware upgrade end
 
FUS state is WIRELESS_STACK_UPGRADE_ONGOING
 
FUS status is FUS_NO_ERROR
 
FUS state is WIRELESS_STACK_UPGRADE_ONGOING
 
FUS status is FUS_IMAGE_NOT_AUTHENTIC
Error: Firmware not authentic!
 
 

But it still fail...

So the same problem with DFU and Stlink...is my board bricked ? :(

Regards,

Pierre.

Remi QUINTIN
ST Employee

This message is quite misleading as it does not mean the FUS was not upgraded properly.

The best thing to do is to check the FUS version at 0x20030030 = 0x01000200.

Then you can upgrade the Latest FUS version from the CubeWB FW package v1.5.0.

PJEAN.1
Associate II
 STM32_Programmer_CLI.exe -c port=usb1 -r32 0x20030030 1
      -------------------------------------------------------------------
                       STM32CubeProgrammer v2.4.0
      -------------------------------------------------------------------
 
 
 
USB speed   : Full Speed (12MBit/s)
Manuf. ID   : STMicroelectronics
Product ID  : DFU in FS Mode
SN          : 20793183554D
FW version  : 0x011a
Device ID   : 0x0495
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 : 00050300
 
 

Unfortunely still in v0.5.3...

Remi QUINTIN
ST Employee

Do you have the same effect with one of the other Nucleo boards you bought?

I dont see what could be wrong as long as you manage to connect in USB FDU mode with the proper user option bytes set.

I would advise you to erase the user part of the flash memory using the sequence below:

Set RDP option byte to 0xBB and then back to 0xAA.

CLI.exe -c port=usb1 -ob RDP=0xBB

CLI.exe -c port=usb1 -ob RDP=0xAA 

Then try to upgrade the FUS once again.

PJEAN.1
Associate II

it worked !!!

Read protection was already disabled...but after enable it and disable it as you suggest, i was finnally able to upgrade the FUS then i successfully upgrade the RF stack

Thanks for your support Remi

PS : the two other nucleo were working out of the box, i upgrade them through stlink because i was not aware about the nSWBOOT0 byte who need to be at 1 to enable the USB_DFU via boot0 pin.

Regards,

Pierre.

 STM32_Programmer_CLI.exe -c port=usb1 -fwupgrade stm32wb5x_Thread_FTD_fw.bin 0x0809F000 firstinstall=1
      -------------------------------------------------------------------
                       STM32CubeProgrammer v2.4.0
      -------------------------------------------------------------------
 
 
 
USB speed   : Full Speed (12MBit/s)
Manuf. ID   : STMicroelectronics
Product ID  : DFU in FS Mode
SN          : 20793183554D
FW version  : 0x011a
Device ID   : 0x0495
Device name : STM32WB55xx
Flash size  : 1 MBytes
Device type : MCU
Device CPU  : Cortex-M0+/M4
 
Download firmware image at address 0x809f000 ...
 
 
Memory Programming ...
Opening and parsing file: stm32wb5x_Thread_FTD_fw.bin
  File          : stm32wb5x_Thread_FTD_fw.bin
  Size          : 347320 Bytes
  Address       : 0x0809F000
 
 
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [159 243]
erasing sector 0159 @: 0x0809f000 done
erasing sector 0160 @: 0x080a0000 done
erasing sector 0161 @: 0x080a1000 done
erasing sector 0162 @: 0x080a2000 done
erasing sector 0163 @: 0x080a3000 done
erasing sector 0164 @: 0x080a4000 done
erasing sector 0165 @: 0x080a5000 done
erasing sector 0166 @: 0x080a6000 done
erasing sector 0167 @: 0x080a7000 done
erasing sector 0168 @: 0x080a8000 done
erasing sector 0169 @: 0x080a9000 done
erasing sector 0170 @: 0x080aa000 done
erasing sector 0171 @: 0x080ab000 done
erasing sector 0172 @: 0x080ac000 done
erasing sector 0173 @: 0x080ad000 done
erasing sector 0174 @: 0x080ae000 done
erasing sector 0175 @: 0x080af000 done
erasing sector 0176 @: 0x080b0000 done
erasing sector 0177 @: 0x080b1000 done
erasing sector 0178 @: 0x080b2000 done
erasing sector 0179 @: 0x080b3000 done
erasing sector 0180 @: 0x080b4000 done
erasing sector 0181 @: 0x080b5000 done
erasing sector 0182 @: 0x080b6000 done
erasing sector 0183 @: 0x080b7000 done
erasing sector 0184 @: 0x080b8000 done
erasing sector 0185 @: 0x080b9000 done
erasing sector 0186 @: 0x080ba000 done
erasing sector 0187 @: 0x080bb000 done
erasing sector 0188 @: 0x080bc000 done
erasing sector 0189 @: 0x080bd000 done
erasing sector 0190 @: 0x080be000 done
erasing sector 0191 @: 0x080bf000 done
erasing sector 0192 @: 0x080c0000 done
erasing sector 0193 @: 0x080c1000 done
erasing sector 0194 @: 0x080c2000 done
erasing sector 0195 @: 0x080c3000 done
erasing sector 0196 @: 0x080c4000 done
erasing sector 0197 @: 0x080c5000 done
erasing sector 0198 @: 0x080c6000 done
erasing sector 0199 @: 0x080c7000 done
erasing sector 0200 @: 0x080c8000 done
erasing sector 0201 @: 0x080c9000 done
erasing sector 0202 @: 0x080ca000 done
erasing sector 0203 @: 0x080cb000 done
erasing sector 0204 @: 0x080cc000 done
erasing sector 0205 @: 0x080cd000 done
erasing sector 0206 @: 0x080ce000 done
erasing sector 0207 @: 0x080cf000 done
erasing sector 0208 @: 0x080d0000 done
erasing sector 0209 @: 0x080d1000 done
erasing sector 0210 @: 0x080d2000 done
erasing sector 0211 @: 0x080d3000 done
erasing sector 0212 @: 0x080d4000 done
erasing sector 0213 @: 0x080d5000 done
erasing sector 0214 @: 0x080d6000 done
erasing sector 0215 @: 0x080d7000 done
erasing sector 0216 @: 0x080d8000 done
erasing sector 0217 @: 0x080d9000 done
erasing sector 0218 @: 0x080da000 done
erasing sector 0219 @: 0x080db000 done
erasing sector 0220 @: 0x080dc000 done
erasing sector 0221 @: 0x080dd000 done
erasing sector 0222 @: 0x080de000 done
erasing sector 0223 @: 0x080df000 done
erasing sector 0224 @: 0x080e0000 done
erasing sector 0225 @: 0x080e1000 done
erasing sector 0226 @: 0x080e2000 done
erasing sector 0227 @: 0x080e3000 done
erasing sector 0228 @: 0x080e4000 done
erasing sector 0229 @: 0x080e5000 done
erasing sector 0230 @: 0x080e6000 done
erasing sector 0231 @: 0x080e7000 done
erasing sector 0232 @: 0x080e8000 done
erasing sector 0233 @: 0x080e9000 done
erasing sector 0234 @: 0x080ea000 done
erasing sector 0235 @: 0x080eb000 done
erasing sector 0236 @: 0x080ec000 done
erasing sector 0237 @: 0x080ed000 done
erasing sector 0238 @: 0x080ee000 done
erasing sector 0239 @: 0x080ef000 done
erasing sector 0240 @: 0x080f0000 done
erasing sector 0241 @: 0x080f1000 done
erasing sector 0242 @: 0x080f2000 done
erasing sector 0243 @: 0x080f3000 done
Download in Progress:
▒  2%▒  4%▒  6%▒  8%▒ 10%▒ 12%▒ 14%▒ 16%▒ 18%▒ 20%▒ 22%▒ 24%▒ 26%▒ 28%▒ 30%▒ 32%▒ 34%▒ 36%▒ 38%▒ 40%▒ 42%▒ 44%▒ 46%▒ 48%▒ 50%▒ 52%▒ 54%▒ 56%▒ 58%▒ 60%▒ 62%▒ 64%▒ 66%▒ 68%▒ 70%▒ 72%▒ 74%▒ 76%▒ 78%▒ 80%▒ 82%▒ 84%▒ 86%▒ 88%▒ 90%▒ 92%▒ 94%▒ 96%▒ 98%▒ 100%
 
File download complete
Time elapsed during download operation: 00:00:07.527
 
FUS state is FUS_IDLE
 
FUS status is FUS_NO_ERROR
 
Firmware Upgrade process started ...
 
Updating firmware ...
Waiting for firmware upgrade end
 
FUS state is WIRELESS_STACK_UPGRADE_ONGOING
 
FUS status is FUS_NO_ERROR
 
FUS state is WIRELESS_STACK_UPGRADE_ONGOING
 
FUS status is FUS_NO_ERROR
 
FUS state is WIRELESS_STACK_UPGRADE_ONGOING
 
FUS status is FUS_NO_ERROR
 
FUS state is WIRELESS_STACK_UPGRADE_ONGOING
 
FUS status is FUS_NO_ERROR
 
FUS state is WIRELESS_STACK_UPGRADE_ONGOING
 
FUS status is FUS_NO_ERROR
 
FUS state is WIRELESS_STACK_UPGRADE_ONGOING
 
FUS status is FUS_NO_ERROR
 
FUS state is FUS_ERROR
 
FUS status is FUS_NOT_RUNNING
Firmware Upgrade Success

Remi QUINTIN
ST Employee

Good! Ensuring a clean user space is a good starting point for any upgrade.

Enjoy!