‎2020-06-07 04:00 AM
HI all,
I tried change option bytes for STM32WB55 in code, and probably something went wrong when I did this. After programming MCU I found that my flash was probably be blocked:
How can I unblock FLASH? I tried change security config options in STM32CubeProgrammer, used CLI, used DFU mode but It didn not help. In all the time I have error:
STM32_Programmer_CLI -c port=swd -ob SFSA=0xcb
-------------------------------------------------------------------
STM32CubeProgrammer v2.4.0
-------------------------------------------------------------------
ST-LINK SN : 066FFF393738425043065240
ST-LINK FW : V2J35M26
Voltage : 3.27V
SWD freq : 4000 KHz
Connect mode: Normal
Reset mode : Software 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 ...
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:
Error: Expected value for Option Byte "sfsa": 0xCB, found: 0x0
Error: Option Byte Programming failed
Greetings
Solved! Go to Solution.
‎2021-06-22 07:01 AM
hi
My MCU has FUS version the chip is V0.0.0, how clearig flash memory in this wersion ?
‎2022-06-08 08:37 AM
Same thing. I tried to change watchdog option bytes and mcu somehow set SFSA as 0x0 and blocked the flash completely.:pouting_face:
‎2022-06-08 08:48 AM
Can you still access the option byte ad dtry to set the watchdog option back to its original value.
Then try
The SFSA value should revert to 0xF4 with all the user memory erased of any previous FW.
‎2022-06-08 08:49 AM
Additional questions:
Is it your custom board or an ST board?
What is the FUS version installed on that board?
‎2022-06-15 02:53 AM
Thank you for quick reply! Fortunatelly I had FUS v1.2.0, so this command helped me. However i didn't get how to use this command, because I never worked with cubeCLI, but I've read FUS manual again and found same instruction in Q&A and tried it in cubeprogrammer with GUI. So it worked. MCU has been unbricked. Thanks again!