4. Boot modes
At startup, a BOOT0 pin and NSBOOTADD[31:8]/SECBOOTADD[31:8] option bytes are used to select the boot memory address that includes:
- • Boot from any address in user flash memory
- • Boot from system memory
- – Bootloader
- – ST immutable root of trust (ST-iROT)
- – Root security service (RSS)
- – Debug authentication library (RSS-DA)
Embedded bootloader
The embedded bootloader is located in the system memory, programmed by ST during production. It is used to reprogram the flash memory by using USART, I2C, I3C, OTG_FS, or OTG_HS in device mode through the DFU (device firmware upgrade).
Refer to AN2606 “STM32 microcontroller system memory boot mode”.
Embedded root security services (RSS)
The embedded RSS is located in the secure information block, programmed by ST during production.
Refer to AN4992 “Introduction to secure firmware install (SFI) for STM32 MCUs”.
Embedded immutable root of trust (ST-iROT)
The embedded ST-iROT in the system memory, programmed by ST during production. ST-iROT is the immutable root of trust managing the secure boot and secure install of the first updatable level to execute in a boot sequence.
Embedded debug authentication (ST-DA)
The embedded ST-DA in the system memory, programmed by ST during production. ST-DA is the library that manages the debug authentication protocol by allowing it to securely reopen the debug or to launch regressions on secured products in the field.
4.1 STM32H5Ex boot modes
Table 19 provides the detail of the boot mode when the TrustZone® is disabled (TZEN = 0xC3), for the STM32H5Ex devices.
Table 19. STM32H5Ex Boot mode when TrustZone® is disabled (TZEN = 0xC3)
| PRODUCT_STATE | BOOT0 pin | Boot address option-byte selection | Boot area | ST programmed default value |
|---|---|---|---|---|
| Open | 0 | NSBOOTADD[31:8] | Boot address defined by user option byte NSBOOTADD[31:8] | Flash: 0x0800 0000 |
| 1 | NA | Bootloader | Bootloader | |
| Provisioning | x | NA | RSS | RSS |
| Provisioned, Closed, Locked | x | NSBOOTADD[31:8] | Boot address defined by user option byte NSBOOTADD[31:8] | Flash: 0x0800 0000 |
Note: The BOOT_UBE is only available on STM32H5Fx devices. Refer to Section 4.2.
Table 20 provides the detail of the boot mode when the TrustZone® is enabled (TZEN=0xB4), for the STM32H5Ex devices.
Table 20. STM32H5Ex Boot mode when TrustZone® is enabled (TZEN = 0xB4)
| PRODUCT_STATE | BOOT0 pin | Boot address option-byte selection | Boot area | ST programmed default value |
|---|---|---|---|---|
| Open | 0 | SECBOOTADD[31:8] | Boot address defined by user option byte SECBOOTADD[31:8] | Flash: 0x0C00 0000 |
| 1 | NA | Bootloader | Bootloader | |
| Provisioning | x | NA | RSS | RSS |
| Provisioned, TZ_Closed, Closed, Locked | x | SECBOOTADD[31:8] | Boot address defined by user option byte SECBOOTADD[31:8] | Flash: 0x0C00 0000 |
Note: The BOOT_UBE is only available on STM32H5Fx devices. Refer to Section 4.2.
When TrustZone® is enabled (TZEN=0xB4), the boot space must be in a secure area. The SECBOOTADD[24:0] option bytes are used to select the boot secure memory address. A unique boot entry option can be selected by setting the SECBOOT_LOCK option bit.
4.2 STM32H5Fx boot modes
Table 21 provides the detail of the boot mode when the TrustZone® is disabled (TZEN = 0xC3), for the STM32H5Fx products.
Table 21. STM32H5Fx Boot mode when TrustZone® is disabled (TZEN = 0xC3)
| PRODUCT_STATE | BOOT0 pin | BOOT_UBE FLASH_OPTSR [29:22] | Boot address option-byte selection | Boot area | ST programmed default value |
|---|---|---|---|---|---|
| Open | 0 | NA | NSBOOTADD[31:8] | Boot address defined by user option byte NSBOOTADD[31:8] | Flash: 0x0800 0000 |
| 1 | NA | NA | Bootloader | Bootloader | |
| Provisioning | x | NA | NA | RSS | RSS |
| Provisioned, Closed, Locked | x | NA | NSBOOTADD[31:8] | Boot address defined by user option byte NSBOOTADD[31:8] | Flash: 0x0800 0000 |
Table 22 provides the detail of the boot mode when the TrustZone® is enabled (TZEN = 0xB4), for the STM32H5Fx products.
Table 22. STM32H5Fx Boot mode when TrustZone® is enabled (TZEN = 0xB4)
| PRODUCT_STATE | BOOT0 pin | BOOT_UBE FLASH_OPTSR [29:22] | Boot address option-byte selection | Boot area | ST programmed default value |
|---|---|---|---|---|---|
| Open | 0 | x | SECBOOTADD [31:8] | Boot address defined by user option byte SECBOOTADD[31:8] | Flash: 0x0C00 0000 |
| 1 | 0xB4 | NA | Bootloader | Bootloader | |
| 1 | 0xC3 | NA | ST-iROT | ST-iROT | |
| Provisioning | x | NA | NA | RSS | RSS |
| Provisioned, TZ_Closed, Closed, Locked | x | 0xC3 | ST-iROT | ST-iROT | ST-iROT |
| 0xB4 | SECBOOTADD [31:8] | Boot address defined by user option byte SECBOOTADD[31:8] | Flash: 0x0C00 0000 |
When TrustZone® is enabled (TZEN=0xB4), the boot space must be in a secure area. The SECBOOTADD[24:0] option bytes are used to select the boot secure memory address. A unique boot entry option can be selected by setting the SECBOOT_LOCK option bit.