4. OTP mapping (OTP)

The OTP bits are read or programmed by the Boot and Security and OTP control (BSEC). Before being programmed the OTP bit default is '0'.

The STM32MP13xx device has 3072 OTP (one time programmable) bits which can be read-accessed in 96 words: BSEC_OTP_DATAx (x = 0 to 95):

The tables list the OTP word and bit field relevant properties using the following columns:

Name: OTP word synonym (for example OTP word0 is aka CFG0).

Description: OTP word or bit field description.

Boot: after a system reset and after boot ROM execution.

Prog: programming according to:

wplock:

swprlockx: sticky lock set by boot listed as s[w][p][r][c] with character w, p, r, c according to:

swprlock1: sticky lock set after boot in secured-open.

swprlock2: sticky lock set after boot in secured-closed (only possible for device with secure boot capabilities).

swprlock3: sticky lock set after boot for RMA.

Table 17. OTP list words 0 to 31

WordNameBitsDescriptionprogwlockswprlock1swprlock2swprlock3Detail description
0CFG0OTP mode encoding
9:0OTP mode encoding(1)snswswsw-
31:10Reserved for STMicroelectronics
1CFG1RPN coding
11:0RPN codingsyswswswSection 60.2: Device Part Number (RPN)
31:12Reserved for STMicroelectronics
2CFG2Rerserved for STMicroelectronics
31:0Reserved for STMicroelectronicssyswpswpswp-
3CFG3Boot / source definition
0qspi_not_default_afun-sw-0: QSPI uses default hard coded AFmux
1: QSPI no default AFmux (uses non default AFmux defined in OTP word5, 6 and 7)
2:1emmc_if_id0: Source is default one: SDMMC2 with default AFMux
1: SDMMC1
2: SDMMC2 (uses non default AFmux defined in OTP word5, 6 and 7)
4:3sd_if_id0: Source is default one: SDMMC1 with default AFMux
1: SDMMC1 (uses non default AFmux defined in OTP word5, 6 and 7)
2: SDMMC2
5no_cpu_pll0: PLLs for CPU/AXI are enable for cold boot
1: PLLs for CPU/AXI are not enable for cold boot
6no_usb_dp_pullup0: USB DP pull-up is set. 1: USB DP pull-up is not set
14:7uart_instances_disabled0b00000001: Reserved
0b00000010: Reserved
0b00000100: Disable USART3
0b00001000: Disable UART4
0b00010000: Disable UART5
0b00100000: Disable UART6
0b01000000: Disable UART7
0b10000000: Disable USART8
0b11111111: All UART instances are enabled

Table 17. OTP list words 0 to 31 (continued)

WordNameBitsDescriptionprogwplockswprlock1swprlock2swprlock3Detail description
3CFG315no_data_cacheun-sw-0:Data cache is used by boot ROM
1:Data cache is not used by boot ROM
22:16boot_source_disable(2)0b0000001: Disable FMC boot source
0b0000010: Disable QSPI NOR boot source
0b0000100: Disable eMMC boot source
0b0001000: Disable SD boot source
0b0010000: Disable UART boot source
0b0100000: Disable USB boot source
0b1000000: Disable QSPI NAND boot source
23Reserved for STMicroelectronics-
26:24secondary_boot_source0:No secondary boot source is defined
1:FMC NAND
2:QSPI NOR
3:eMMC
4:SD
5:QSPI NAND
29:27primary_boot_source0:No primary boot source is defined
1:FMC NAND
2:QSPI NOR
3:eMMC
4:SD
5:QSPI NAND
31:30HSE value0b00 HSE is autodetected
0b01 HSE is 24 MHz
0b10 HSE is 25 MHz
0b11 HSE is 26 MHz
4CFG4Boot / monotonic counter
31:0Boot / monotonic counterun---Value of monotonic counter is X where X is the position of the most significant bit at 1.

Table 17. OTP list words 0 to 31 (continued)

WordNameBitsDescriptionprogwplockswprlock1swprlock2swprlock3Detail description
5CFG5Boot / AFmux configuration 1
3:0mode0un-sw-0: AF; no pull; low speed
1: AF; no pull; medium speed
2: AF; no pull; high speed
3: AF; pull up; low speed
4: AF; pull up; medium speed
5: AF; pull up; high speed
6: AF; pull down; low speed
7: AF; pull down; medium speed
8: AF; pull down; high speed
9: GPIO output high
10: GPIO output low
11: GPIO input
12: GPIO open drain; No pull
13: GPIO open drain; pull up
14: GPIO open drain; pull down
15: GPIO analog mode
7:4afmux0AF mux value between 0 and 15
11:8pin0pin id between 0 and 15 for GPIOA to GPIOH and between 0 and 7 for GPIOI
15:12port00: Unused
1: Bank A
2: Bank B
3: Bank C
4: Bank D
5: Bank E
6: Bank F
7: Bank G
8: Bank H
9: Bank I
10-15: Unused
19:16mode1idem CFG5.mode0
23:20afmux1idem CFG5.afmux0
27:24pin1idem CFG5.pin0
31:28port1idem CFG5.port0

Table 17. OTP list words 0 to 31 (continued)

WordNameBitsDescriptionprogwplockswprlock1swprlock2swprlock3Detail description
6CFG6Boot / AFmux configuration 2
3:0mode2un-sw-idem CFG5.mode0
7:4afmux2idem CFG5.afmux0
11:8pin2idem CFG5.pin0
15:12port2idem CFG5.port0
19:16mode3idem CFG5.mode0
23:20afmux3idem CFG5.afmux0
27:24pin3idem CFG5.pin0
31:28port3idem CFG5.port0
7CFG7Boot / AFmux configuration 3
3:0mode4un-sw-idem CFG5.mode0
7:4afmux4idem CFG5.afmux0
11:8pin4idem CFG5.pin0
15:12port4idem CFG5.port0
19:16mode5idem CFG5.mode0
23:20afmux5idem CFG5.afmux0
27:24pin5idem CFG5.pin0
31:28port5idem CFG5.port0
8CFG8Reserved for STMicroelectronics
31:0Reserved for STMicroelectronicssnswpswpswp-
9CFG9Boot ROM / configuration
0Boot_traces_disabledun---0: No
1: Yes
1hse_frequency_autodetection_disableu0: No
1: Yes
2hse_bypass_disableu0: No
1: Yes
3Reserved for STMicroelectronicss-
4emmc_128k_boot_partitionSupport eMMC with 128 Kbytes boot partition:
0: No
1: Yes
5ssp_reqSet to 1 to request SSP process

Table 17. OTP list words 0 to 31 (continued)

WordNameBitsDescriptionprogwplockswprlock1swprlock2swprlock3Detail description
9CFG96ssp_successsn---1: SSP process was run successfully
7fsbl_decrypt_prioFSBL decryption priority:
0: Use CRYP
1: Use SAES
13:8not used yet-
14snand_need_plane_select_1u0:sNAND plane select not needed
1:sNAND plane select is needed
17:15pnand_number_of_ecc_bits_1u0:ECC unset.
1: ECC 1bit (Hamming)
2:ECC 4bit (BCH4)
3:ECC 8bit (BCH8)
4:on-die ECC
18pnand_bus_width_1u0:8 bit
1:16 bit
26:19nand_nb_of_blocks_1uNumber of blocks in unit of 256 blocks
28:27nand_block_size_1uBlock size in number of pages:
0:64 pages per block
1:128 pages per block
2:256 pages per block
30:29nand_page_size_1u0:2 Kbytes
1:4 Kbytes
2:8 Kbytes
31pnand_param_stored_in_otp_1u0:No
1:Nand parameters bits 15 to 30 are used
10CFG10Boot ROM/configuration
0nand_config_distributionun---0:pNAND config in nand*_2 fields;
sNAND config in nand*_1 fields
1:sNAND config in nand*_2 fields;
pNAND config in nand*_1 fields
1snand_need_plane_select_2u0:sNAND plane select not needed
1:sNAND plane select is needed
4:2pnand_number_of_ecc_bits_2u0:ECC unset.
1: ECC 1bit (Hamming)
2:ECC 4bit (BCH4)
3:ECC 8bit (BCH8)
4:on-die ECC
5pnand_bus_width_2u0:8 bit
1:16 bit

Table 17. OTP list words 0 to 31 (continued)

WordNameBitsDescriptionprogwplockswprlock1swprlock2swprlock3Detail description
10CFG1013:6nand_nb_of_blocks_2un---Number of blocks in unit of 256 blocks
15:14nand_block_size_2uBlock size in number of pages:
0: 64 pages per block
1: 128 pages per block
2: 256 pages per block
17:16nand_page_size_2u0: 2 Kbytes
1: 4 Kbytes
2: 8 Kbytes
20:18rng_htcr_valueu0: default RNG value, RNG_HTCR not modified.
1: 0xA2B3 (unsigned long)
2: 0xAA74 (unsigned long)
3: 0xA6BA (unsigned long)
4: 0x9AAE (unsigned long)
5: 0x72AC (unsigned long)
6: 0xAAC7 (unsigned long)
Other values: default RNG value, RNG_HTCR not modified.
31:21Reserved for STMicroelectronicss-
11CFG11Device configuration
31:0for OEM device configurationun----
12CFG12Engineering purposes
31:0Reserved for STMicroelectronicssy----
13ID0Unique device ID (96-bit)
31:0UID[31:0]sy----
14ID1Unique device ID (96-bit)
31:0UID[63:32]sy----
15ID2Unique device ID (96-bit)
31:0UID[95:64]sy----

Table 17. OTP list words 0 to 31 (continued)

WordNameBitsDescriptionprogwplockswprlock1swprlock2swprlock3Detail description
16HW0Hardware trimming / analog 1
5:0Reserved for STMicroelectronicssy----
9:6I/O compensation trimmingUsed for I/O calibration
11:10Reserved-
15:121V8 reference trimming1V8 Regulator Trim
21:16LSI trimming-
26:221V1 reference trimming1V1 Regulator Trim
31:27Reserved for STMicroelectronics-
17HW1Hardware trimming / analog 2
7:0CSITRIM[7:0]sy---CSI Trim
19:8HSITRIM[11:0]HSI Trim
23:20TEMPHTRIM[3:0]High temperature threshold trimming
27:24TEMPLTRIM[3:0]Low temperature threshold trimming
31:28VBATHTRIM[3:0]High VBAT threshold trimming

Table 17. OTP list words 0 to 31 (continued)

WordNameBitsDescriptionprogwplockswprlock1swprlock2swprlock3Detail description
18HW2Hardware trimming / PKG / WDG config
2:0Reserved for STMicroelectronicssn----
3IWDG1_HWuIWDG1 start
0: Start by software
1: Auto start
4IWDG2_HWuIWDG2 start
0: Start by software
1: Auto start
5IWDG1_FZ_STOPuIWDG1 freeze in Stop
0: No
1: Freeze in Stop
6IWDG2_FZ_STOPuIWDG2 freeze in Stop
0: No
1: Freeze in Stop
7IWDG1_FZ_STANDBYuIWDG1 freeze in Standby
0: No
1: Freeze in Standby
8IWDG2_FZ_STANDBYuIWDG2 freeze in Standby
0: No
1: Freeze in Standby
9RNG_BYPASS_DISABLEsRNG noise observation
0: Enable
1: Disable
10Reserved for STMicroelectronicss-
12:11SELINBORH[1:0]u00: BOR Disabled
01: BOR = 2.1 V
10: BOR = 2.4 V
11: BOR = 2.7 V
18HW213PRODUCT_BELOW_2V5un---1: Required when VDD is below 2.5 V to allow the SYSCFG high speed low-voltage enable registers HSLVEN bits to be taken into account.
For more information see Section 12.6.17: SYSCFG high-speed low-voltage enable register x (SYSCFG_HSLVENxR) and Table 79: High-speed low-voltage interfaces.
31:14Reserved for STMicroelectronicss-

Table 17. OTP list words 0 to 31 (continued)

WordNameBitsDescriptionprogwlockswprlock1swprlock2swprlock3Detail description
19HW3Hardware trimming / calibration for DTS
15:0TS1_FMT0[15:0]sy---DTS frequency measured freq at T0
31:16TS1_RAMP_COEF[15:0]DTS ramp coefficient
20HW4Hardware trimming / calibration for VREFINT, DTS
6:0TRIM_DTP_R[6:0]sy---DTS R Trim
8:7TS1_T0[1:0]DTS T0 value
15:9Reserved for STMicroelectronics-
31:16VREFINT_CAL[15:0]ADC VBG measurement to correct for VREF
21HW5Hardware trimming for VREFBUF, SDMMC I/O calibration
23:0VREFBUFTRIM[23:0]sy---6 trim bits for each of 4 VREFBUF settings
27:24SD1COMPCELL[3:0]VDDSD1 I/O calibration
31:28SD2COMPCELL[3:0]VDDSD2 I/O calibration
22HW631:0Reserved for STMicroelectronicsnswpswpswp-
23HW7Hardware trimming / calibration for analog temp sensor
15:0TS_CAL1[15:0]sy---ADC TEMP measurement at T0
31:16TS_CAL2[15:0]ADC TEMP measurement at T1
24PKH0-
31:0Public Keys Hash(3)u/sn/y(4)swswsw-
25PKH1-
31:0Public Key Hash(3)u/sn/y(4)swswsw-
26PKH2-
31:0Public Key Hash(3)u/sn/y(4)swswsw-
27PKH3-
31:0Public Key Hash(3)u/sn/y(4)swswsw-
28PKH4-
31:0Public Key Hash(3)u/sn/y(4)swswsw-

Table 17. OTP list words 0 to 31 (continued)

WordNameBitsDescriptionprogwplockswprlock1swprlock2swprlock3Detail description
29PKH5-
31:0Public Key Hash(3)u/sn/y(4)swswsw-
30PKH6-
31:0Public Key Hash(3)u/sn/y(4)swswsw-
31PKH7-
31:0Public Key Hash(3)u/sn/y(4)swswsw-
  1. These bits must never be programmed to OTP-SECURED closed_device (refer to Table 11: OTP modes definition in BSEC) on product without secure boot option (refer to “security option” in product datasheet ordering information).
    As an example, setting those bits to OTP-SECURED closed_device on STM32MP13xA and STM32MP13xD would make these products to permanently fail at boot. To avoid this situation, it is recommended to permanently write lock OTP word 0 on such devices (see Section : OTP permanent write lock in BSEC).
  2. If both UART boot and USB boot are disabled at the same time, then UART boot is kept enabled.
  3. The Public Key Hash is composed of 32 bytes: hash = byte0 byte1 byte2 ... byte31. These bytes are stored in the OTP in 8 words of 4 bytes each. The first four bytes of the hash table are stored in PKH0, the next four in PKH1, and so on. Within each word the lowest numbered byte is stored in the most significant position, and the highest numbered byte in the least significant position.
    Example: if hash = 00 01 02 03 04 05 06 07 08... then PKH0 = 0x00010203, PKH1 = 0x04050607, etc,...
  4. This word is permanent write locked on device without secure-boot option (refer to “security option” in product datasheet ordering information).

Table 18. OTP list words 32 to 95

WordNameBitsDescriptionprogwplockswpr lock1swpr lock2swpr lock3
32XK0-
31:0Reserved for STMicroelectronicssyswrcswrcswrc
33XK1-
31:0Reserved for STMicroelectronicssyswrcswrcswrc
34XK2-
31:0Reserved for STMicroelectronicssyswrcswrcswrc
35XK3-
31:0Reserved for STMicroelectronicssyswrcswrcswrc
36XK4-
31:0Reserved for STMicroelectronicssyswrcswrcswrc
37XK5-
31:0Reserved for STMicroelectronicssyswrcswrcswrc
38XK6-
31:0Reserved for STMicroelectronicssyswrcswrcswrc

Table 18. OTP list words 32 to 95 (continued)

WordNameBitsDescriptionprogwplockswpr lock1swpr lock2swpr lock3
39XK7-
31:0Reserved for STMicroelectronicssyswrcswrcswrc
40XK8ST Public ECDSA Chip Certificate for SSP
31:0Certificate bits(1)syswpswpswp
41XK9ST Public ECDSA Chip Certificate for SSP
31:0Certificate bits(1)syswpswpswp
42XK10ST Public ECDSA Chip Certificate for SSP
31:0Certificate bits(1)syswpswpswp
43XK11ST Public ECDSA Chip Certificate for SSP
31:0Certificate bits(1)syswpswpswp
44XK12ST Public ECDSA Chip Certificate for SSP
31:0Certificate bits(1)syswpswpswp
45XK13ST Public ECDSA Chip Certificate for SSP
31:0Certificate bits(1)syswpswpswp
46XK14ST Public ECDSA Chip Certificate for SSP
31:0Certificate bits(1)syswpswpswp
47XK15ST Public ECDSA Chip Certificate for SSP
31:0Certificate bits(1)syswpswpswp
48XK16ST Public ECDSA Chip Certificate for SSP
31:0Certificate bits(1)syswpswpswp
49XK17ST Public ECDSA Chip Certificate for SSP
31:0Certificate bits(1)syswpswpswp
50XK18ST Public ECDSA Chip Certificate for SSP
31:0Certificate bits(1)syswpswpswp
51XK19ST Public ECDSA Chip Certificate for SSP
31:0Certificate bits(1)syswpswpswp
52XK20ST Public ECDSA Chip Certificate for SSP
31:0Certificate bits(1)syswpswpswp
53XK21ST Public ECDSA Chip Certificate for SSP
31:0Certificate bits(1)syswpswpswp
54XK22ST Public ECDSA Chip Certificate for SSP
31:0Certificate bits(1)syswpswpswp
55XK23ST Public ECDSA Chip Certificate for SSP
31:0Certificate bits(1)syswpswpswp

Table 18. OTP list words 32 to 95 (continued)

WordNameBitsDescriptionprogwplockswpr lock1swpr lock2swpr lock3
56XK24Password for RMA
31:0RMA passwordun(2)swrcswrcswrc
57XK25-Free for userunccswprc
58XK26-Free for userunccswprc
59XK27-Free for userunccswprc
60XK28-Free for userunccswprc
61XK29-Free for userunccswprc
62XK30-Free for userunccswprc
63XK31-Free for userunccswprc
64XK32-Free for userunccswprc
65XK33-Free for userunccswprc
66XK34-Free for userunccswprc
67XK35-Free for userunccswprc
68XK36-Free for userunccswprc
69XK37-Free for userunccswprc
70XK38-Free for userunccswprc
71XK39-Free for userunccswprc
72XK40-Free for userunccswprc
73XK41-Free for userunccswprc
74XK42-Free for userunccswprc
75XK43-Free for userunccswprc
76XK44-Free for userunccswprc
77XK45-Free for userunccswprc
78XK46-Free for userunccswprc
79XK47-Free for userunccswprc
80XK48-Free for userunccswprc
81XK49-Free for userunccswprc
82XK50-Free for userunccswprc
83XK51-Free for userunccswprc
84XK52-Free for userunccswprc
85XK53-Free for userunccswprc
86XK54-Free for userunccswprc
87XK55-Free for userunccswprc
88XK56-Free for userunccswprc

Table 18. OTP list words 32 to 95 (continued)

WordNameBitsDescriptionprogwplockswpr lock1swpr lock2swpr lock3
89XK57-Free for userunccswprc
90XK58-Free for userunccswprc
91XK59-Free for userunccswprc
92XK60-OEM secret for encrypted boot(3)unccswprc
93XK61-OEM secret for encrypted bootunccswprc
94XK62-OEM secret for encrypted bootunccswprc
95XK63-OEM secret for encrypted bootunccswprc
  1. 1. The ST Public ECDSA Chip Certificate for SSP is composed of 64 bytes: key = byte0 byte1 byte2 ... byte63. These bytes are stored in the OTP in 16 words of 4 bytes each. The first four bytes of the key table are stored in XK8, the next four in XK9, and so on. Within each word the lowest numbered byte is stored in the most significant position, and the highest numbered byte in the least significant position.
    Example: if key = 00 01 02 03 04 05 06 07 08... then XK8 = 0x00010203, XK9 = 0x04050607, etc,...
  2. 2. Important: must be permanently locked after programming.
  3. 3. The OEM secret for encrypted boot is composed of 16 bytes: key = byte0 byte1 byte2 ... byte15. These bytes are stored in the OTP in 4 words of 4 bytes each. The first four bytes of the key table are stored in XK60, the next four in XK61, and so on. Within each word the lowest numbered byte is stored in the most significant position, and the highest numbered byte in the least significant position.
    Example: if key = 00 01 02 03 04 05 06 07 08... then XK60 = 0x00010203, XK61 = 0x04050607, etc,...