cancel
Showing results for 
Search instead for 
Did you mean: 

Failed to read memory after RDP set/reset

Stecklo
Senior

I'm trying to program BLE stack on a custom board based on STM32WB55CG. I'm using SWD, CubeProgrammer 2.2, CubeFW_WB 1.1.1.

First I've successfully performed -fwdelete. But then I got "Firmware not authentic" error trying to make -fwupgrade. So I've set RDP 0xBB and back to 0xAA folowing this advice . And now I'm just unable to read or download anything except option bytes.

STM32_Programmer_CLI.exe -c port=swd mode=UR -ob nSWboot0=0 nboot1=1 nboot0=1 -fwupgrade stm32wb5x_FUS_fw.bin 0x080EC000 firstinstall=0
      -------------------------------------------------------------------
                       STM32CubeProgrammer v2.2.0
      -------------------------------------------------------------------
 
ST-LINK SN  : 066EFF393738425043094308
ST-LINK FW  : V2J33M25
Voltage     : 2.38V
SWD freq    : 4000 KHz
Connect mode: Under Reset
Reset mode  : Hardware 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%
 
 
PROGRAMMING OPTION BYTES AREA ...
Warning: Option Byte: nboot0, value: 0x1, was not modified.
Warning: Option Byte: nboot1, value: 0x1, was not modified.
 
  Bank          : 0x00
  Address       : 0x58004020
  Size          : 104 Bytes
 
██████████████████████████████████████████████████ 100%
 
Reconnecting...
Reconnected !
 
 
UPLOADING OPTION BYTES DATA ...
 
  Bank          : 0x00
  Address       : 0x58004020
  Size          : 104 Bytes
 
██████████████████████████████████████████████████ 100%
 
OPTION BYTE PROGRAMMING VERIFICATION:
 
Option Bytes successfully programmed
 
 
Old Firmware delete ...
 
 
 
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:
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
 
Error: failed to download Segment[0]
Error: failed to download the File
Time elapsed during download operation: 00:00:00.721
 
 
 
Verifying ...
 
 
Read progress:
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
 
Error: Failed to read memory at address 0x08000000 during verification
 
 
Error: Download verification failed
 
 
Error: Failed to download FUS operator!
STM32_Programmer_CLI.exe -c port=swd mode=UR -ob displ
      -------------------------------------------------------------------
                       STM32CubeProgrammer v2.2.0
      -------------------------------------------------------------------
 
ST-LINK SN  : 066EFF393738425043094308
ST-LINK FW  : V2J33M25
Voltage     : 2.47V
SWD freq    : 4000 KHz
Connect mode: Under Reset
Reset mode  : Hardware 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)
     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      : 0x3FFF  (0x3FFF)
 
   Security Configuration Option bytes:
 
     ESE          : 0x1 (Security enabled)
     SFSA         : 0x0  (0x0)
     FSD          : 0x0 (System and Flash secure)
     DDS          : 0x1 (CPU2 debug access disabled)
     C2OPT        : 0x1 (SBRV will address Flash)
     NBRSD        : 0x0 (SRAM2b is secure)
     SNBRSA       : 0x0  (0x0)
     BRSD         : 0x0 (SRAM2a is secure)
     SBRSA        : 0x0  (0x0)
     SBRV         : 0x3FC00  (0x3FC00)
 
   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)

1 ACCEPTED SOLUTION

Accepted Solutions
Remi QUINTIN
ST Employee

>I'm using SWD, CubeProgrammer 2.2, CubeFW_WB 1.1.1.

Please use the latest FW Package 1.3.0 at least to have the correct FUS and RF stack.

>STM32_Programmer_CLI.exe -c port=swd mode=UR -ob nSWboot0=0 nboot1=1 nboot0=1 -fwupgrade stm32wb5x_FUS_fw.bin 0x080EC000 firstinstall=0

Before launching this command, please be use to have issued a FWdelete command

Now the SFSA to 0 is showing a bloked board!!!

View solution in original post

2 REPLIES 2
Remi QUINTIN
ST Employee

>I'm using SWD, CubeProgrammer 2.2, CubeFW_WB 1.1.1.

Please use the latest FW Package 1.3.0 at least to have the correct FUS and RF stack.

>STM32_Programmer_CLI.exe -c port=swd mode=UR -ob nSWboot0=0 nboot1=1 nboot0=1 -fwupgrade stm32wb5x_FUS_fw.bin 0x080EC000 firstinstall=0

Before launching this command, please be use to have issued a FWdelete command

Now the SFSA to 0 is showing a bloked board!!!

Stecklo
Senior

Thanks. If somebody would end up in similar situation here is the more specific discussion