Skip to main content
Visitor II
September 4, 2026
Question

STM32H7B3I-EVAL Secure Access Mode: Procedure to Revert to Standard Mode Using RDP Regression

  • September 4, 2026
  • 1 reply
  • 70 views

Reverting STM32H7B3 from Secure Access Mode to Standard Mode

Hello,

I am working with an STM32H7B3 and currently evaluating the Secure Access Mode and secure user area functionality.

I am going to configure the device as follows:

  • Create a secure user area in Bank 1 with DMES1 = 1
  • Create a secure user area in Bank 2 with DMES2 = 1
  • Enable Secure Access Mode (SECURITY = 1)
  • The device is currently at RDP Level 0

My requirement is to support reverting the device from Secure Access Mode back to Standard Mode during development/service.

My understanding is that the following sequence can be used:

  1. Change RDP from Level 0 to Level 1.
  2. Perform an RDP regression from Level 1 to Level 0.
  3. Since DMES1/DMES2 are set to 1, the secure areas should be erased during the RDP regression.
  4. After the secure areas have been removed, disable Secure Access Mode (SECURITY = 0).
  5. Reset the device and boot normally in Standard Mode.

In other words:

RDP Level 1 → RDP Level 0 regression → secure areas removed due to DMES1/DMES2 = 1 → disable SECURITY → Standard Mode

Could someone please confirm whether this is a supported and safe procedure for the STM32H7B3?

In particular, I would like to confirm:

  • Does an RDP Level 1 → Level 0 regression with DMES1/DMES2 = 1 reliably remove the secure areas?
  • Is it then safe to clear the SECURITY bit and return to Standard Mode?
  • Is there any additional required step before disabling Secure Access Mode?
  • Does the RDP regression automatically perform the required reset/option-byte reload?
  • Are there any conditions under which this sequence could leave the device permanently inaccessible or otherwise brick the device?

I want to verify the procedure, since I would like to avoid putting the device into an unrecoverable state.

Any clarification or recommended procedure would be greatly appreciated.

Thank you.

1 reply

Moktar SELLAMI
ST Employee
September 9, 2026

Hello ​@Sinehan

Yes, that is the correct sequence, with one very important condition: the application must successfully exit the secure area before performing the RDP regression. Otherwise, the device may become inaccessible.

To transition from Secure Access Mode back to Standard Mode, the secure user memories  must first be removed. Once the protected code has been erased, the SECURITY option bit can be cleared. After the option-byte reload/reset, the MCU can boot normally in Standard Mode.

Important notes:

  • The device must not be left executing from an erased secure area.  Meaning, if DMES1/DMES2 = 0, the secure-area contents are retained during the RDP regression. This can result in the device becoming inaccessible if the jump out of the secure area points to an erased Flash region containing no valid application.
  • The jumping to the application from secure area uses a RSS service call called   RSS->exitSecureArea((uint32_t) 0x08100000, RSS_ENABLE_JTAG_AT_EXIT , Make Sure to enable the debug port (JTAG) RSS_ENABLE_JTAG_AT_EXIT  before jumping or the debug port no longer becomes accessible during the application runtime. 
  • If secure areas are configured in both Flash banks, the secure area must be disabled in both banks during RDP regression.

About the RDP regression

The RDP Level 1 to Level 0 regression triggers a full mass erase. The operation must therefore be allowed to complete. It also triggers the required erase and option-byte loading sequence. When option-byte loading is launched, the MCU automatically resets so that the new configuration takes effect.

 

Removing secure area

To remove the secure area in to ways: 

STM32CubeProgrammer following this sequence described in Section 2.4 of AN5601.: 

  1. Set the RDP level to Level 1 using STM32CubeProgrammer.
  2. Perform a power-on reset of the device. In practice, this can be done by disconnecting and reconnecting the ST-LINK power cable.
  3. Allow the application to boot and make sure that it exits the secure area and jumps to code outside the secure area.
  4. Connect to the device using STM32CubeProgrammer in Hot Plug mode.
  5. Perform the RDP regression using the following sequence. Do not click Apply until all settings have been configured:
    • Set RDP Level = 0.
    • Disable the secure area by configuring:
      START_ADDRESS > END_ADDRESS.
    • Enable DMES1/DMES2, as applicable.
    • Clear/reset the SECURITY bit as required by the target configuration.
    • Click Apply.

Option Byte programming, It is possible at runtime to trigger an RDP regression by programming the correct sequence of OB. 
I attach below a project that is created by ​@Jocelyn RICARD you can have as reference. The project has 2 applications Boot and Appli on NUCLEO-H753
The bootloader code contains a menu :

  • how to jump to exit the secure application.
  • option byte configuration (enable/disable security bit, configure secure area …. )
  • Perform RDP regression
  • Perform Firmware upload via UART/YMODEM 

The application code also has a menu to perform an RDP regression from within the application code.  

This is very helpful during development and testing  while creating a recovery path.

 Resources

These are related posts that may help you:

B.R 
Moktar SELLAMI