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 STM32MP153 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.

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

WordNameBitsDescriptionprogwp lockswpr lock1swpr lock2swpr lock3Detail description
0CFG0OTP mode encoding
0 to 5OTP mode encodingsnswswsw-
6Closed_device bit(1)u
7 to 31Reserved for STMicroelectronicss
1CFG1RPN coding
0 to 7RPN codingsyswswswSection 65.2: Device part number (RPN)
8 to 31Reserved for STMicroelectronics
2CFG2Rerserved for STMicroelectronics
0 to 3SSP_ATTEMPTSryswprcswprcswprcSet by bootROM during SSP process.
4 to 31Reserved for STMicroelectronicss-
3CFG3Boot / source definition
0qspi_not_default_afun-sw-0: QSPI uses default hard coded AFmux
1: QSPI uses AFmux defined in OTP
1 to 2emmc_if_id0: Source is default one: SDMMC2 with default AFMux
1: SDMMC1. 2: SDMMC2 (uses non default AFmux defined in OTP)
3 to 4sd_if_id0: Source is default one: SDMMC1 with default AFMux
1: SDMMC1 (uses non default AFmux defined in OTP)
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
7 to 14uart_instances_disabled0b00000001 reserved.
0b00000010 disable USART2.
0b00000100 disable USART3.
0b00001000 disable UART4.
0b00010000 disable UART5.
0b00100000 disable UART6.
0b01000000 disable UART7.
0b10000000 disable USART8.
15no_data_cache0: Data cache is used by bootrom.
1: Data cache is not used by bootrom.

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

WordNameBitsDescriptionprogwp lockswpr lock1swpr lock2swpr lock3Detail description
3CFG3Boot / source definition (continued)
16 to 23boot_source_disableun-sw-0b00000001 disable FMC boot source.
0b00000010 disable QSPI NOR boot source.
0b00000100 disable eMMC boot source.
0b00001000 disable SD boot source.
0b00010000 disable UART boot source.
0b00100000 disable USB boot source.
0b01000000 disable QSPI NAND boot source.
24 to 26secondary_boot_source0: No secondary boot source is defined
1: FMC NAND
2: QSPI NOR
3: eMMC
4: SD
5: QSPI NAND
27 to 29primary_boot_source0: No primary boot source is defined
1: FMC NAND
2: QSPI NOR
3: eMMC
4: SD
5: QSPI NAND
30 to 31HSE value0b00 HSE is autodetected.
0b01 HSE is 24 MHz.
0b10 HSE is 25 MHz.
0b11 HSE is 26 MHz.
4CFG4Boot / monotonic counter
0 to 31Boot / monotonic counterun---Value of monotonic counter is 31 is 2*X where X is position of the most significant bit at 1.

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

WordNameBitsDescriptionprogwp lockswpr lock1swpr lock2swpr lock3Detail description
5CFG5Boot / AFmux configuration 1
0 to 3mode0un-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
4 to 7afmux0AF mux value between 0 and 15.
8 to 11pin0pin id between 0 and 15 for GPIOA to GPIOJ and between 0 and 7 for GPIOK and GPIOZ.
12 to 15port00: unused (in that case, mode0, afmux0 and pin0 fields could be used as general purpose OTP)
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: Bank J
11: Bank K
12: Bank Z
Others: Invalid configuration
16 to 19mode1idem CFG5.mode0
20 to 23afmux1idem CFG5.afmux0
24 to 27pin1idem CFG5.pin0
28 to 31port1idem CFG5.port0

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

WordNameBitsDescriptionprogwp lockswpr lock1swpr lock2swpr lock3Detail description
6CFG6Boot / AFmux configuration 2
0 to 3mode2un-sw-idem CFG5.mode0
4 to 7afmux2idem CFG5.afmux0
8 to 11pin2idem CFG5.pin0
12 to 15port2idem CFG5.port0
16 to 19mode3idem CFG5.mode0
20 to 23afmux3idem CFG5.afmux0
24 to 27pin3idem CFG5.pin0
28 to 31port3idem CFG5.port0
7CFG7Boot / AFmux configuration 3
0 to 3mode4un-sw-idem CFG5.mode0
4 to 7afmux4idem CFG5.afmux0
8 to 11pin4idem CFG5.pin0
12 to 15port4idem CFG5.port0
16 to 19mode5idem CFG5.mode0
20 to 23afmux5idem CFG5.afmux0
24 to 27pin5idem CFG5.pin0
28 to 31port5idem CFG5.port0
8CFG8Partially reserved for STMicroelectronics
0 to 7Reserved for STMicroelectronicssnswpswpswp-
8SSP_REQuSet by FSBL(TF-A) during SSP process.
9SSP_SUCCESSuSet by FSBL(TF-A) during SSP process.
10 to 31Reserved for STMicroelectronicss-

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

WordNameBitsDescriptionprogwp lockswpr lock1swpr lock2swpr lock3Detail description
9CFG9BootROM / configuration
0Boot_traces_disable_dun---0: no. 1: yes
1hse_frequency_auto_detection_disableu0: no. 1: yes
2hse_bypass_detection_disableu0: no. 1: yes
3Reserved for STMicroelectronicss-
4 to 13not used yets-
14spinand_need_plane_selectu0: SPI NAND plane select not need
1: SPI NAND plane select is needed
15 to 17nand_number_of_ec_bitsu0: ECC unset.
1: ECC 1bit (Hamming)
2: ECC 4bit (BCH4)
3: ECC 8bit (BCH8)
4: on-die ECC
18nand_bus_widthu0: 8 bit
1: 16 bit
19 to 26nand_nb_of_blocksuNumber of blocks in unit of 256 blocks.
27 to 28nand_block_sizeuBlock size in number of pages:
0: 64 pages per block
1: 128 pages per block
2: 256 pages per block
29 to 30nand_page_sizeu0: 2Kbytes
1: 4Kbytes
2: 8Kbytes
31nand_param_stored_in_otpu0: no
1: nand parameters bits 15 to 30 are used
10CFG10Device configuration
0 to 31for OEM device configurationun----
11CFG11Device configuration
0 to 31for OEM device configurationun----
12CFG12Engineering purposes
0 to 31Reserved for STMicroelectronicssy----
13ID0Unique device ID (96-bit)
0 to 31UID[31:0]sy----
14ID1Unique device ID (96-bit)
0 to 31UID[63:32]sy----

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

WordNameBitsDescriptionprogwp lockswpr lock1swpr lock2swpr lock3Detail description
15ID2Unique device ID (96-bit)
0 to 31UID[95:64]sy----
16HW0Hardware trimming / analog 1
0 to 5VREFBUF trimmingsyswpswpswpVREFBUF Trim
6 to 9I/O compensation trimmingUsed for I/O calibration
10 to 11Reserved-
12 to 151V8 reference trimming1V8 Regulator Trim
16 to 21LSI trimming-
22 to 261V1 reference trimming1V1 Regulator Trim
27 to 29PKG: factory programmedRefer to Section 65.4: Package data register (PKG).
30 to 31Reserved for STMicroelectronics-
17HW1Hardware trimming / analog 2
0 to 7CSITRIM[7:0]sy---CSI Trim
8 to 19HSITRIM[11:0]HSI Trim
20 to 24DAC1 factory trimmingDAC1 Trim
25 to 29DAC2 factory trimmingDAC2 Trim
30 to 31Reserved for STMicroelectronics-

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

WordNameBitsDescriptionprogwp lockswpr lock1swpr lock2swpr lock3Detail description
18HW2Hardware trimming / PKG / WDG config
0 to 2Reserved for STMicroelectronicssn----
3IWDG1_HWuIWDG1 start:
0: start by software
1: auto start
4IWDG2_HWIWDG2 start:
0: start by software
1: auto start
5IWDG1_FZ_STOPIWDG1 freeze in Stop:
0: no
1: freeze in Stop
6IWDG2_FZ_STOPIWDG2 freeze in Stop:
0: no
1: freeze in Stop
7IWDG1_FZ_STANDBYIWDG1 freeze in Standby:
0: no
1: freeze in Standby
8IWDG2_FZ_STANDBYIWDG2 freeze in Standby:
0: no
1: freeze in Standby
9OTP_MCU_SYSRST_ENsMCU allowed to generate System Reset.
10Reserved for STMicroelectronics-
11 to 12SELINBORH[1:0]u00: BOR Disabled
01: BOR = 2.1 V
10: BOR = 2.4 V
11: BOR = 2.7 V
13PRODUCT_BELOW_2V51: required when VDD is below 2.5 V to allow the SYSCFG IO control register HSLVEN_XXX bits to be taken into account.
For more information see Section 14.3: SYSCFG registers
SYSCFG_IOCTRLSETR and SYSCFG_IOCTRLCLRR registers.
14 to 31Reserved for STMicroelectronicss-
19HW3Hardware trimming / calibration for DTS
0 to 15TS1_FMT0[15:0]sy---DTS frequency measured freq at T0
16 to 31TS1_RAMP_COEF[15:0]sy---DTS ramp coefficient

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

WordNameBitsDescriptionprogwp lockswpr lock1swpr lock2swpr lock3Detail description
20HW4Hardware trimming / calibration for VREFINT, DTS
0 to 6TRIM_DTP_R[6:0]sy---DTS R Trim
7 to 8TS1_T0[1:0]sy---DTS T0 value
9 to 15Reserved for STMicroelectronicssy----
16 to 31VREFINT_CAL[15:0]sy---ADC VBG measurement to correct for VREF
21HW5Memory repair word 1
31 to 0Reserved for STMicroelectronicssy----
22HW6Memory repair word 2
0 to 31Reserved for STMicroelectronicssy----
23HW7Hardware trimming / calibration for analog temp sensor
0 to 15TS_CAL1[15:0]sy---ADC TEMP measurement at T0
16 to 31TS_CAL2[15:0]sy---ADC TEMP measurement at T1
24PKH0-
0 to 31Public Key Hash(2)u/sn/y(3)swswsw-
25PKH1-
0 to 31Public Key Hashu/sn/y(3)swswsw-
26PKH2-
0 to 31Public Key Hashu/sn/y(3)swswsw-
27PKH3-
0 to 31Public Key Hashu/sn/y(3)swswsw-
28PKH4-
0 to 31Public Key Hashu/sn/y(3)swswsw-
29PKH5-
0 to 31Public Key Hashu/sn/y(3)swswsw-
30PKH6-
0 to 31Public Key Hashu/sn/y(3)swswsw-
31PKH7-
0 to 31Public Key Hashu/sn/y(3)swswsw-
  1. This bit must never be programmed to 1 on products without secure-boot option available (refer to product datasheet). As an example, setting this bit on STM32MP15xA and STM32MP15xD products might make them permanently fail to boot. To avoid this case, it is recommended to make the OTP Word 0 permanent write locked (see Section : OTP permanent write lock in BSEC chapter).
  2. 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, and so on.
  3. This word is permanent write locked on devices without secure-boot option (see datasheet).

Table 18. OTP list words 32 to 95

WordNameBitsDescriptionprogwplockswpr lock1swpr lock2swpr lock3
32XK00 to 31Reserved for STMicroelectronicssyswprcswprcswprc
33XK10 to 31Reserved for STMicroelectronicssyswprcswprcswprc
34XK20 to 31Reserved for STMicroelectronicssyswprcswprcswprc
35XK30 to 31Reserved for STMicroelectronicssyswprcswprcswprc
36XK40 to 31Reserved for STMicroelectronicssyswprcswprcswprc
37XK50 to 31Reserved for STMicroelectronicssyswprcswprcswprc
38XK60 to 31Reserved for STMicroelectronicssyswprcswprcswprc
39XK70 to 31Reserved for STMicroelectronicssyswprcswprcswprc
40XK8ST Public ECDSA Chip Certificate for SSP
0 to 31Certificate bits(1)syswpswpswp
41XK9ST Public ECDSA Chip Certificate for SSP
0 to 31Certificate bits(1)syswpswpswp
42XK10ST Public ECDSA Chip Certificate for SSP
0 to 31Certificate bits(1)syswpswpswp
43XK11ST Public ECDSA Chip Certificate for SSP
0 to 31Certificate bits(1)syswpswpswp
44XK12ST Public ECDSA Chip Certificate for SSP
0 to 31Certificate bits(1)syswpswpswp
45XK13ST Public ECDSA Chip Certificate for SSP
0 to 31Certificate bits(1)syswpswpswp
46XK14ST Public ECDSA Chip Certificate for SSP
0 to 31Certificate bits(1)syswpswpswp
47XK15ST Public ECDSA Chip Certificate for SSP
0 to 31Certificate bits(1)syswpswpswp
48XK16ST Public ECDSA Chip Certificate for SSP
0 to 31Certificate bits(1)syswpswpswp
49XK17ST Public ECDSA Chip Certificate for SSP
0 to 31Certificate bits(1)syswpswpswp
50XK18ST Public ECDSA Chip Certificate for SSP
0 to 31Certificate bits(1)syswpswpswp
51XK19ST Public ECDSA Chip Certificate for SSP
0 to 31Certificate bits(1)syswpswpswp
52XK20ST Public ECDSA Chip Certificate for SSP
0 to 31Certificate bits(1)syswpswpswp

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

WordNameBitsDescriptionprogwlockswpr lock1swpr lock2swpr lock3
53XK21ST Public ECDSA Chip Certificate for SSP
0 to 31Certificate bits(1)syswpswpswp
54XK22ST Public ECDSA Chip Certificate for SSP
0 to 31Certificate bits(1)syswpswpswp
55XK23ST Public ECDSA Chip Certificate for SSP
0 to 31Certificate bits(1)syswpswpswp
56XK24Password for RMA
0 to 14RMA unlock passwordunswrcswrcswrc
15 to 29RMA relock password
30 to 31Not useds
57XK25MAC address 1
0 to 31mac[31:0]unccswprc
58XK26MAC address 2
0 to 15mac[47:32]unccswprc
16 to 31Free for user
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

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

WordNameBitsDescriptionprogwplockswpr lock1swpr lock2swpr lock3
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
89XK57-Free for userunccswprc
90XK58-Free for userunccswprc
91XK59-Free for userunccswprc
92XK60-Free for userunccswprc
93XK61-Free for userunccswprc
94XK62-Free for userunccswprc
95XK63-Free for userunccswprc
  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, and so on.