ST STM32L4 Option Bytes Unlock
Jump to navigation
Jump to search
The option bytes of the STM32L4 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. STM32L4 Option Bytes Reset features are implemented in the PCode_DevPro_ST_STM32L4.pex script file.
Usage
DevPro -operation [operation_name] -if SWD -speed 4000 [-SetConfigVal parameter_name=value] -ScriptFile PCode_DevPro_ST_STM32L4.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_STM32L4.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_STM32L4.pex
Firmware: J-Link STLink V21 compiled Aug 12 2019 10:29:20
S/N: 773749541
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: Resetting FLASH_OPTR...
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: Resetting Write protection (WRP) and PCROP...
J-Link log: DAP initialized successfully.
J-Link log: Reset target...
J-Link log: DAP initialized successfully.
J-Link log: Option bytes reset successfully!