DocID024597 Rev 5 91/1830
RM0351
92
PH3/BOOT0 GPIO is configured in:
• Input mode during the complete reset phase if the option bit nSWBOOT0 is set into the
FLASH_OPTR register and then switches automatically in analog mode after reset is
released (BOOT0 pin).
• Input mode from the reset phase to the completion of the option byte loading if the bit
nSWBOOT0 is cleared into the FLASH_OPTR register (BOOT0 value coming from the
option bit). It switches then automatically to the analog mode even if the reset phase is
not complete.
Note: When the device boots from SRAM, in the application initialization code, you have to
relocate the vector table in SRAM using the NVIC exception table and the offset register.
When booting from the main Flash memory, the application software can either boot from
bank 1 or from bank 2. By default, boot from bank 1 is selected.
To select boot from Flash memory bank 2, set the BFB2 bit in the user option bytes. When
this bit is set and the boot pins are in the boot from main Flash memory configuration, the
device boots from system memory, and the boot loader jumps to execute the user
application programmed in Flash memory bank 2. For further details, please refer to
AN2606.
Physical remap
Once the boot pins mode is selected, the application software can modify the memory
accessible in the code area (in this way the code can be executed through the ICode bus in
place of the System bus). This modification is performed by programming the SYSCFG
memory remap register (SYSCFG_MEMRMP) in the SYSCFG controller.
The following memories can thus be remapped:
• Main Flash memory
• System memory
• Embedded SRAM1 (256 KB)
• FSMC bank 1 (NOR/PSRAM 1 and 2)
• Quad-SPI memory
Table 7. Memory mapping versus boot mode/physical remap
Addresses
Boot/remap in
main Flash
memory
Boot/remap in
embedded
SRAM 1
Boot/remap in
system
memory
Remap in
FSMC
Remap in
QUADSPI
0x2000 0000 - 0x2003 FFFF SRAM1 SRAM1 SRAM1 SRAM1 SRAM1
0x1FFF 0000 - 0x1FFF FFFF
System
memory/OTP/
Options bytes
System
memory/OTP/
Options bytes
System
memory/OTP/
Options bytes
System
memory/OTP/
Options bytes
System
memory/OTP/
Options bytes
0x1000 8000 - 0x1FFE FFFF Reserved Reserved Reserved Reserved Reserved
0x1000 0000 - 0x1000 FFFF SRAM2 SRAM2 SRAM2 SRAM2 SRAM2
0x0810 0000 - 0x0FFF FFFF Reserved Reserved Reserved Reserved Reserved
0x0800 0000 - 0x080F FFFF Flash memory Flash memory Flash memory Flash memory Flash memory