ST STM32F2 Option Bytes Unlock

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

The option bytes of the STM32F2 series of devices can be reset to default values. SEGGER implemented support for these features via a dedicated utility called Device Provisioner. For more information about this, please refer to the Device Provisioner article. STM32F2 Option Bytes Reset features are implemented in the PCode_DevPro_ST_STM32F2.pex script file.

Usage

DevPro -operation [operation_name] -if SWD -speed 4000 [-SetConfigVal parameter_name=value] -ScriptFile PCode_DevPro_ST_STM32F2.pex
Operation Parameters Values Description
PerformUnlock - - Unlocks the device by resetting the option bytes to default values.

Examples

Option Byte Reset

Example
DevPro.exe -operation STM32F2Unlock -if SWD -speed 4000 -ScriptFile PCode_DevPro_ST_STM32F2.pex  
SEGGER Device Provisioner V8.54
Compiled Jul 29 2025 15:57:59
Command line: -operation PerformUnlock -if SWD -speed 4000 -ScriptFile PCode_DevPro_ST_STM32F2.pex
Firmware: J-Link V12 compiled Jul 21 2025 13:15:53
S/N: 602004466

J-Link log: Reset: Halt core after reset via DEMCR.VC_CORERESET.
J-Link log: Reset: Reset device via AIRCR.SYSRESETREQ.
J-Link log: Reset: Halt core after reset via DEMCR.VC_CORERESET.
J-Link log: Reset: Reset device via AIRCR.SYSRESETREQ.
J-Link log: Reset: Halt core after reset via DEMCR.VC_CORERESET.
J-Link log: Reset: Reset device via AIRCR.SYSRESETREQ.
J-Link log: Option bytes reset successfully!