ST STM32MP25x OTP programming
Jump to navigation
Jump to search
The STM32MP25 series implements the BSEC peripheral which provides a variety of option and user configurable bytes. 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. STM32MP25 OTP programming features are implemented in the PCode_DevPro_ST_STM32MP25.pex script file, which is shipped by default in the J-Link installation.
Usage
DevPro -operation [operation_name] -if SWD -speed 4000 [-SetConfigVal parameter_name=value] -ScriptFile PCode_DevPro_ST_STM32MP25.pex
| Operation | Parameters | Parameter description | Values | Operation description |
|---|---|---|---|---|
| PrintOTP | - | - | - | Print the entire OTP configuration in a human readable format. |
| ReadOTPMem | Index | Word index to start reading from | 0 - 255 (Upper area cannot be read) | Reads raw bytes from the OTP flash area. |
| NumBytes | Number of bytes to read | 1 - 1024 | ||
| ProgramOTPMem | Index | Word index to start programming to | 0 - 255 | Programs raw bytes into the OTP flash. Programming can be done only word-wise (32-bit). The user must ensure that the selected byte range is programmable. |
| Data | Data to program into the OTP | HEX bytes (max. 512 bytes) | ||
| Lock | Permanently lock OTP word | 0 (no-lock), 1 (force-lock). Default: no-lock | ||
| ProgramOTPWord | Index | Word index to program | 23-101 (Lower area) 176-254 (Mid area) |
Programs a single word (32-bit) into the OTP flash. It uses auto-lock mechanism by default: As lower area fuses can be blown bitwise we do NOT lock the OTP word if not explicitly requested. The mid area is locked by default. |
| Data | Word data to program | 32-bit word | ||
| Lock | Permanently lock OTP word | 0 (no-lock), 1 (force-lock). Default: auto-lock |
Examples
Print OTP configuration
Example
DevPro.exe -if SWD -speed 4000 -scriptfile PCode_DevPro_ST_STM32MP25.pex -operation PrintOTP
SEGGER Device Provisioner V9.28
Compiled Mar 5 2026 14:41:30
Command line: -if SWD -speed 4000 -scriptfile PCode_DevPro_ST_STM32MP25.pex -operation PrintOTP
Firmware: J-Link V13 compiled Feb 26 2026 08:54:38
S/N: XXXXXXXXX
J-Link log: Found supported device STM32MP23/25x. Device ID: 0x00000505
J-Link log: Boot ROM Configuration:
J-Link log: ECIES ST Key provisioning: SUCCESSFUL
J-Link log: HW ST Key provisioned: YES
J-Link log: Security counter: 0x00000002
J-Link log: ST ECDSA Public Key ID: 0x0000000E
J-Link log: RSSe FW Active Signing Key: 0x00000000
J-Link log: Number of ST provisioned secrets: 0x00000000
J-Link log: PLLs for CPU/AXI at cold boot: ENABLED
J-Link log: USART2: ENABLED
J-Link log: UART5: ENABLED
J-Link log: UART6: ENABLED
J-Link log: UART8: ENABLED
J-Link log: UART9: ENABLED
J-Link log: Data cache used by boot ROM: ENABLED
J-Link log: Boot Source FMC: ENABLED
J-Link log: Boot Source QSPI: ENABLED
J-Link log: Boot Source eMMC: ENABLED
J-Link log: Boot Source SD: ENABLED
J-Link log: Boot Source UART: ENABLED
J-Link log: Boot Pins Layout: 0x00000000
J-Link log: Boot Source: 0x00000000
J-Link log: OEM FSBLA Counter: 0x00000000
J-Link log: Boot ROM traces: ENABLED
J-Link log: HSE Frequency Autodetection: ENABLED
J-Link log: HSE Bypass Autodetection: ENABLED
J-Link log: Blocking failure Traces: ENABLED
J-Link log: FSBL-A mode: AArch64
J-Link log: FMC Force SW reset: Hardware reset (via RCC)
J-Link log: Emergency debug request: NOT REQUESTED
J-Link log: Boot ROM 128 kB Boot Partition: Not Supported
J-Link log: FSBL Decryption Speed Priority: Slow (via SAES)
J-Link log: IOMGR Port Selection: IOM Port 1
J-Link log: IOMGR Muxing: DISABLED
J-Link log: HSE Value: Autodetection (16-48 MHz)
J-Link log: Serial NAND plane select 1: NOT REQUIRED
J-Link log: Parallel NAND ECC bits 1: Unset
J-Link log: Parallel NAND Bus Width 1: 8-bits
J-Link log: NAND Number of blocks 1: 0x00000000
J-Link log: NAND Block size 1: 0x00000000
J-Link log: NAND Page size 1: 64 pages per block
J-Link log: Parallel NAND Param Stored: OFNI table
J-Link log: OEM Active Signing Key 1: 0x00000000
J-Link log: OEM Keys 2: NOT USED, Same key for FSBLA and FSBLM
J-Link log: Secure Boot: UNLOCKED
J-Link log: RSSe Provisioning: NOT DONE
J-Link log: Debugging enable: UNLOCKED
J-Link log: OTP Provisioning: NOT DONE
J-Link log: Number of ST added secrets: 0x00000000
J-Link log: Number of RSSe retry attempts: 0x00000000
J-Link log: OEM FSBLM Counter: 0x00000000
J-Link log: NAND Config Distribution: pNAND in nand_2
J-Link log: HyperFlash Device (3.3V): NO
J-Link log: RNG HTCR value Unset
J-Link log: OSPI IO Speed Overwrite: NO
J-Link log: OSPI IO Speed Clock: Low
J-Link log: OSPI IO Speed Data: Low
J-Link log: RSSe FW Version Counter: 0x00000000
J-Link log: OEM Active Signing Key 2: 0x00000000
J-Link log: Revision Identification: 0x00000011
J-Link log: CRC HSM value: 0xCF5E5EAE
J-Link log: IWDG1 Start on Reset: NO
J-Link log: IWDG1 Freeze on Stop: NO
J-Link log: IWDG1 Freeze on Standby: NO
J-Link log: IWDG2 Start on Reset: NO
J-Link log: IWDG2 Freeze on Stop: NO
J-Link log: IWDG2 Freeze on Standby: NO
J-Link log: IWDG3 Start on Reset: NO
J-Link log: IWDG3 Freeze on Stop: NO
J-Link log: IWDG3 Freeze on Standby: NO
J-Link log: IWDG4 Start on Reset: NO
J-Link log: IWDG4 Freeze on Stop: NO
J-Link log: IWDG4 Freeze on Standby: NO
J-Link log: Brown-out-Reset: Disabled
J-Link log: Vddio_4 I/O segment: < 2.5 V
J-Link log: Vddio_3 I/O segment: < 2.5 V
J-Link log: Vddio_2 I/O segment: < 2.5 V
J-Link log: Vddio_1 I/O segment: < 2.5 V
J-Link log: Main Vdd I/O segment: < 2.5 V
J-Link log: SYSRAM upper half erase on reset: NO
J-Link log: Scan Chains in CLOSED_UNLOCKED: ENABLED
...
Program OTP word
Example (Succeeded)
DevPro.exe -if SWD -speed 4000 -scriptfile PCode_DevPro_ST_STM32MP25.pex -operation ProgramOTPWord -SetConfigVal Index=23 -SetConfigVal Lock=1 -SetConfigVal Data=0xAABBCCDD
SEGGER Device Provisioner V9.28
Compiled Mar 5 2026 14:41:30
Command line: -if SWD -speed 4000 -scriptfile PCode_DevPro_ST_STM32MP25.pex -operation ProgramOTPWord -SetConfigVal Index=23 -SetConfigVal Lock=1 -SetConfigVal Data=0xAABBCCDD
Firmware: J-Link V13 compiled Feb 26 2026 08:54:38
S/N: XXXXXXXXX
J-Link log: Found supported device STM32MP23/25x. Device ID: 0x00000505
J-Link log: OK: Program operation succeeded for index 0x00000017
J-Link log: OK: Value that have been programmed is 0xAABBCCDD
Example (Failed)
DevPro.exe -if SWD -speed 4000 -scriptfile PCode_DevPro_ST_STM32MP25.pex -operation ProgramOTPWord -SetConfigVal Index=23 -SetConfigVal Lock=1 -SetConfigVal Data=0xAABBCCDD
SEGGER Device Provisioner V9.28
Compiled Mar 5 2026 14:41:30
Command line: -if SWD -speed 4000 -scriptfile PCode_DevPro_ST_STM32MP25.pex -operation ProgramOTPWord -SetConfigVal Index=23 -SetConfigVal Lock=1 -SetConfigVal Data=0xBBCCDDEE
Firmware: J-Link V13 compiled Feb 26 2026 08:54:38
S/N: XXXXXXXXX
J-Link log: Found supported device STM32MP23/25x. Device ID: 0x00000505
J-Link log: ERR: Permanent fuse lock detected. Programming aborted for index 0x00000017
Script file function 'ProgramOTPWord' returned with error code -1