cancel
Showing results for 
Search instead for 
Did you mean: 

NUCLEO-G474RE locked after SBSFU option bytes change

RogueOne
Visitor

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.

What I did

  • 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.

Current problem

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.

Option Bytes status

  • 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 information

  • Board: NUCLEO-G474RE

  • MCU: STM32G474RE

  • Toolchain:

    • STM32CubeIDE

    • STM32CubeProgrammer

    • ST-LINK (on-board)

  • OS: Windows

Question

  1. Is it possible that I permanently locked the flash by misconfiguring WRP / PCROP while setting up SBSFU?

  2. Is there any recovery method to fully unlock or erase the MCU?

  3. Is there a recommended safe procedure for changing Option Bytes when using SBSFU to avoid this situation?

  4. 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.

Screenshot 2026-01-16 174022.pngScreenshot 2026-01-16 174105.pngScreenshot 2026-01-16 174131.png

 

 

0 REPLIES 0