Nations N32H7x Option Bytes Programming

From SEGGER Knowledge Base [STAGING]
Jump to navigation Jump to search

The N32H7x series of devices comes with various security features that are controlled via programming of non-volatile option byte registers.

Important notes

  • Setting RDP protection to level 2 will permanently lock the device(debug access is disabled).
  • Writing of PFOER_CFG1 register is not supported in current version of the silicon.

Usage

DevPro -operation [operation_name] -if SWD -speed 4000 [-SetConfigVal parameter_name=value] -ScriptFile PCode_DevPro_ST_STM32H5.pex
Operation Parameters Values Description
ReadOptionBytes OptionName RDP Read read-out protection level
WRP Read flash write protection
BOOTADDR_M7 Read Cortex-M7 boot address
BOOTADDR_M4 Read Cortex-M4 boot address
ENCRYPTION Read encryption level
SEC_CFG1 Read flash secure region
PFOER_CFG1 Read flash PFOER region
WriteOptionBytes OptionName RDP Write read-out protection level
WRP Write flash write protection
BOOTADDR_M7 Write Cortex-M7 boot address
BOOTADDR_M4 Write Cortex-M4 boot address
ENCRYPTION Write encryption level
SEC_CFG1 Write flash secure region

Examples

Reading RDP option byte register

Example
DevPro -operation ReadOptionBytes -SetConfigVal "OptionName=RDP" -if SWD -speed 4000 -ScriptFile PCode_DevPro_Nations_N32H7xx.pex
SEGGER Device Provisioner V8.50
Compiled Jul  9 2025 14:42:54
Command line: -operation ReadOptionBytes -SetConfigVal OptionName=RDP -if SWD -speed 4000 -ScriptFile PCode_DevPro_Nations_N32H7xx.pex
Firmware: J-Link V12 compiled Jul 21 2025 13:15:53
S/N: 602000001

J-Link log: Value: 0x00000000

Setting RDP protection to level 1

Example
DevPro -operation WriteOptionBytes -SetConfigVal "OptionName=RDP" -SetConfigVal "Value=0" -if SWD -speed 4000 -ScriptFile PCode_DevPro_Nations_N32H7xx.pex
SEGGER Device Provisioner V8.50
Compiled Jul  9 2025 14:42:54
Command line: -operation WriteOptionBytes -SetConfigVal OptionName=RDP -SetConfigVal Value=0 -if SWD -speed 4000 -ScriptFile PCode_DevPro_Nations_N32H7xx.pex
Firmware: J-Link V12 compiled Jul 21 2025 13:15:53
S/N: 602000001

J-Link log: RDP level is changed, memory access may be restricted