2026-01-16 2:56 AM - last edited on 2026-01-16 3:25 AM by Andrew Neil
Hello everyone,
I am trying to implement SBSFU (Secure Boot Secure Firmware Update) on NUCLEO-G474RE using STM32CubeExpansion_SBSFU_V2.7.0.
Initially, everything was working fine and I was able to program the board normally.
I followed the SBSFU documentation and examples.
While configuring SBSFU, I modified Option Bytes, specifically Write Protection (WRP) addresses to match the SBSFU memory layout.
After applying the option bytes, the problem started.
Now I cannot program or erase the MCU anymore.
I get the following errors:
1.In STM32CubeIDE
'Launching SBSFU (1)' has encountered a problem.
Failed to execute MI command:
load ...\SBSFU.elf
Error finishing flash operation
2. In STM32CubeProgrammer
Full chip erase fails
Mass erase fails with error:
Error: Mass erase operation failed. Please verify flash protection
3.I also tried:
Full chip erase
Erase selected sectors
Hardware reset / power cycle
“Under reset” connection mode
Factory reset via STM32CubeProgrammer
→ All fail with flash protection–related errors.
RDP = AA (Level 0)
PCROP and WRP were modified for SBSFU
After this change, the device seems to be locked and refuses erase/program operations
Board: NUCLEO-G474RE
MCU: STM32G474RE
Toolchain:
STM32CubeIDE
STM32CubeProgrammer
ST-LINK (on-board)
OS: Windows
Is it possible that I permanently locked the flash by misconfiguring WRP / PCROP while setting up SBSFU?
Is there any recovery method to fully unlock or erase the MCU?
Is there a recommended safe procedure for changing Option Bytes when using SBSFU to avoid this situation?
I want to implement SBSFU in stm32, is there have any documentation?
Any advice or recovery steps would be greatly appreciated.
Thank you very much.
2026-01-16 7:01 AM
Hi @RogueOne & welcome to ST community
If write protection is enabled, Safe boot cannot complete a factory reset until the write protection is removed.
To avoid flash locking issues when changing Option Bytes during SBSFU setup, you need to ensure FUS is Idle. Also avoid interruptions during the modification process and ensure stable power supply.
To implement SBSFU in STM32, refer to the following resources:
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.