ST STM32G0x1 Option Bytes Unlock

From SEGGER Knowledge Base
Jump to navigation Jump to search

The option bytes of the STM32G0x1 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. STM32G0x1 Option Bytes Reset features are implemented in the PCode_DevPro_ST_STM32G0x1.pex script file.

Usage

DevPro -operation [operation_name] -if SWD -speed 4000 [-SetConfigVal parameter_name=value] -ScriptFile PCode_DevPro_ST_STM32G0x1.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 PerformUnlock -if SWD -speed 4000 -ScriptFile PCode_DevPro_ST_STM32G0x1.pex
SEGGER Device Provisioner V9.18
Compiled Feb 11 2026 16:31:11
Command line: -operation PerformUnlock -if SWD -speed 4000 -ScriptFile PCode_DevPro_ST_STM32G0x1.pex
Firmware: J-Link STLink V21 compiled Aug 12 2019 10:29:20
S/N: 776439203

J-Link log: DAP initialized successfully.
J-Link log: Reset target...
J-Link log: DAP initialized successfully.
J-Link log: Reset option bytes to factory settings...
J-Link log: DAP initialized successfully.
J-Link log: Reset target...
J-Link log: DAP initialized successfully.
J-Link log: DAP initialized successfully.
J-Link log: Reset target...
J-Link log: DAP initialized successfully.
J-Link log: DAP initialized successfully.
J-Link log: Reset target...
J-Link log: DAP initialized successfully.
J-Link log: Option bytes reset successfully!