5 Boot configuration
5.1 Boot mode selection
At startup, a BOOT0 pin, nBOOT0 and NSBOOTADDx[24:0]/SECBOOTADD0[24:0] 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)
• Boot from any address in embedded SRAM
• Boot from root security service (RSS)
The BOOT0 value may come from the PH3-BOOT0 pin or from an option bit depending on the value of a user
option bit to free the GPIO pad if needed.
When TrustZone
®
is disabled by resetting TZEN option bit (TZEN = 0), the boot space is as detailed in the table
below.
Table 4. Boot modes when TrustZone is disabled (TZEN = 0)
nBOOT0
FLASH_
OPTR[27]
BOOT0
pin PH3
nSWBOOT0
FLASH_
OPTR[26]
Boot address
option‑byte selection
Boot area
ST programmed
default value
- 0 1 NSBOOTADD0[24:0]
Boot address defined by user option
bytes NSBOOTADD0[24:0]
Flash: 0x0800 0000
- 1 1 NSBOOTADD1[24:0]
Boot address defined by user option
bytes NSBOOTADD1[24:0]
Bootloader:
0x0BF9 0000
1 - 0 NSBOOTADD0[24:0]
Boot address defined by user option
bytes NSBOOTADD0[24:0]
Flash: 0x0800 0000
0 - 0 NSBOOTADD1[24:0]
Boot address defined by user option
bytes NSBOOTADD1[24:0]
Bootloader:
0x0BF9 0000
When TrustZone is enabled by setting the TZEN option bit (TZEN = 1), the boot space must be in a secure area.
The SECBOOTADD0[24:0] option bytes are used to select the boot secure memory address. A unique boot entry
option can be selected by setting the BOOT_LOCK option bit. All other boot options are ignored.
AN5373
Boot configuration
AN5373 - Rev 1
page 20/37