cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB55 FUS update failed

Bass
Associate II

Hi! I try to run SBSFU example on nucleo board with STM32WB55 but no luck. My bad, I didn't write user key before run an example.

Now I try to do it but something wrong and I can't get state of FUS. Also FUS version reads as 0 and fwupgrade command failed.

There are a few logs:

./STM32_Programmer_CLI -c port=swd -ob displ
      -------------------------------------------------------------------
                        STM32CubeProgrammer v2.3.0                  
      -------------------------------------------------------------------
 
ST-LINK SN  : 066CFF545057717867054218
ST-LINK FW  : V2J34M25
Voltage     : 3,23V
SWD freq    : 4000 KHz
Connect mode: Normal
Reset mode  : Software reset
Device ID   : 0x495
Device name : STM32WBxx
Flash size  : 1 MBytes
Device type : MCU
Device CPU  : Cortex-M0+/M4
 
 
UPLOADING OPTION BYTES DATA ...
 
  Bank          : 0x00
  Address       : 0x58004020
  Size          : 104 Bytes
 
[==================================================] 100% 
 
 
OPTION BYTES BANK: 0
 
   Read Out Protection:
 
     RDP          : 0xAA (Level 0, no protection) 
 
   BOR Level:
 
     BOR_LEV      : 0x0 (BOR Level 0 reset level threshold is around 1.7 V) 
 
   User Configuration:
 
     nBOOT0       : 0x1 (nBOOT0=1 Boot from main Flash) 
     nBOOT1       : 0x1 (Boot from code area if BOOT0=0 otherwise system Flash) 
     nSWBOOT0     : 0x0 (BOOT0 taken from the option bit nBOOT0) 
     SRAM2RST     : 0x1 (SRAM2 is not erased when a system reset occurs) 
     SRAM2PE      : 0x1 (SRAM2 parity check disable) 
     nRST_STOP    : 0x1 (No reset generated when entering the Stop mode) 
     nRST_STDBY   : 0x1 (No reset generated when entering the Standby mode) 
     nRSTSHDW     : 0x1 (No reset generated when entering the Shutdown mode) 
     WWDGSW       : 0x1 (Software window watchdog) 
     IWGDSTDBY    : 0x1 (Independent watchdog counter running in Standby mode) 
     IWDGSTOP     : 0x1 (Independent watchdog counter running in Stop mode) 
     IWDGSW       : 0x1 (Software independent watchdog) 
     IPCCDBA      : 0x0  (0x0) 
 
   Security Configuration Option bytes:
 
     ESE          : 0x1 (Security enabled) 
     SFSA         : 0xD0  (0xD0) 
     FSD          : 0x0 (System and Flash secure) 
     DDS          : 0x1 (CPU2 debug access disabled) 
     C2OPT        : 0x1 (SBRV will address Flash) 
     NBRSD        : 0x0 (SRAM2b is secure) 
     SNBRSA       : 0x10  (0x10) 
     BRSD         : 0x1 (SRAM2a is non-secure) 
     SBRSA        : 0x0  (0x0) 
     SBRV         : 0x3D800  (0x3D800) 
 
   PCROP Protection:
 
     PCROP1A_STRT : 0x1FF  (0x8000FF8) 
     PCROP1A_END  : 0x0  (0x8000008) 
     PCROP_RDP    : 0x0 (PCROP zone is kept when RDP is decreased) 
     PCROP1B_STRT : 0x1FF  (0x8000FF8) 
     PCROP1B_END  : 0x0  (0x8000008) 
 
   Write Protection:
 
     WRP1A_STRT   : 0xFF  (0x807F800) 
     WRP1A_END    : 0x0  (0x8000000) 
     WRP1B_STRT   : 0xFF  (0x807F800) 
     WRP1B_END    : 0x0  (0x8000000)
./STM32_Programmer_CLI -c port=swd -r32 0x20030030 1
 
Reading 32-bit memory content
  Size          : 4 Bytes
  Address:      : 0x20030030
 
0x20030030 : 00000000
./STM32_Programmer_CLI -c port=USB1
      -------------------------------------------------------------------
                        STM32CubeProgrammer v2.3.0                  
      -------------------------------------------------------------------
 
 
 
USB speed   : Full Speed (12MBit/s)
Manuf. ID   : STMicroelectronics
Product ID  : DFU in FS Mode
SN          : 206E308F3036
FW version  : 0x011a
Device ID   : unknown
Warning: Device is under Read Out Protection
./STM32_Programmer_CLI -c port=swd -fwdelete
      -------------------------------------------------------------------
                        STM32CubeProgrammer v2.3.0                  
      -------------------------------------------------------------------
 
ST-LINK SN  : 066CFF545057717867054218
ST-LINK FW  : V2J34M25
Voltage     : 3,23V
SWD freq    : 4000 KHz
Connect mode: Normal
Reset mode  : Software reset
Device ID   : 0x495
Device name : STM32WBxx
Flash size  : 1 MBytes
Device type : MCU
Device CPU  : Cortex-M0+/M4
 
 
 
Memory Programming ...
Opening and parsing file: FUS_Operator.bin
  File          : FUS_Operator.bin
  Size          : 16882 Bytes
  Address       : 0x08000000 
 
 
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 4]
Download in Progress:
[==================================================] 100% 
 
File download complete
Time elapsed during download operation: 00:00:00.645
 
 
 
Verifying ...
 
 
Read progress:
[==================================================] 100% 
 
Download verified successfully 
 
 
Application is running
Reconnecting...
Reconnected !
Error: FUS_STATE_ERR_UNKNOWN
./STM32_Programmer_CLI -c port=swd -fwupgrade stm32wb5x_FUS_fw.bin 0x080EC000 firstinstall=1
      -------------------------------------------------------------------
                        STM32CubeProgrammer v2.3.0                  
      -------------------------------------------------------------------
 
ST-LINK SN  : 066CFF545057717867054218
ST-LINK FW  : V2J34M25
Voltage     : 3,23V
SWD freq    : 4000 KHz
Connect mode: Normal
Reset mode  : Software reset
Device ID   : 0x495
Device name : STM32WBxx
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.bin
  File          : stm32wb5x_FUS_fw.bin
  Size          : 24492 Bytes
  Address       : 0x080EC000 
 
 
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [236 241]
Error: failed to erase memory
 
 
Error: failed to erase memory
Error: Failed to download image!

What can I do in this situatioon? How to unlock MCU and update FUS?

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
JNewe.1
Associate II

As far as i am aware ST updated their FUS a few months ago and the new code cannot be put on devices with an older FUS. We had to destroy a number of boards due to this

View solution in original post

5 REPLIES 5
Bass
Associate II

According to Application note AN5185, I found Device info table address:

0x20030890 : A94656B9 00000001 00010000 00040200
0x200308A0 : 00000004 00010102 00000022 00000000
0x200308B0 : 00000000 20030668 ABCDABCD 12341234
0x200308C0 : 20030496 2002005C 00000000 520FDB4E

It said that FUS version is 0.4.2. Is it upgradeable?

MHami.1
Associate

I have the same problem. I get FUS_STATE_ERR_UNKNOWN when I send -fwdelete. According to AN5185, C2Boot should be 1 to make sure FUS is running. But when I write PWR_CR4 register with SWD interface, the value of this register is still zero. AN5185 doesn't explain how to do that.

Bass
Associate II

You should start from system bootloader (DFU mode). It will prepare all communication with CPU2 by itself.

JNewe.1
Associate II

As far as i am aware ST updated their FUS a few months ago and the new code cannot be put on devices with an older FUS. We had to destroy a number of boards due to this

Thanks for sharing your experience. It's pretty sad, but confirms my guess :(

Do you know how can I use crypto functionality (AES decoding) with old FUS? Or it's impossible up to version 1.x?