Boot configuration
4
Boot configuration
In the STM32F0xxx, three different boot modes can be selected through the BOOT0 pin and
nBOOT1 option bit, as shown in
Table 2.
Boot mode selection
BOOT1
x
0
1
1. The BOOT1 value is the opposite of the nBOOT1 option bit.
The values of both BOOT0 pin and nBOOT1 bit are latched on the 4th rising edge of
SYSCLK after a reset. The user must set nBOOT1 and BOOT0 to select the required boot
mode.
The BOOT0 pin and nBOOT1 bit are also re-sampled when exiting from Standby mode.
Consequently they must be kept in the required Boot mode configuration in Standby mode.
After the startup delay has elapsed, the CPU fetches the top-of-stack value from address
0x0000 0000, then starts code execution from the boot memory at 0x0000 0004.
Depending on the selected boot mode, main Flash memory, system memory or SRAM is
accessible as follows:
●
Boot from main Flash memory: the main Flash memory is aliased in the boot memory
space (0x0000 0000), but is still accessible from its original memory space
(0x0800 0000). In other words, the Flash memory contents can be accessed starting
from address 0x0000 0000 or 0x0800 0000.
●
Boot from System memory: the system memory is aliased in the boot memory space
(0x0000 0000), but is still accessible from its original memory space (0x
●
Boot from embedded SRAM: the SRAM is aliased in the boot memory space (0x0000
0000), but is still accessible from its original memory space (0x2000 0000).
Embedded boot loader
The embedded boot loader is located in the System memory, programmed by ST during
production. It is used to reprogram the Flash memory using one of the following serial
interfaces:
●
USART1 (PA9/PA10)
●
USART2 (PA14/PA15)
For additional information, refer to application note AN2606.
18/29
Boot modes
(1)
BOOT0
0
Main Flash memory
1
System memory
1
Embedded SRAM
Doc ID 023035 Rev 2
Table
2.
Boot mode
Main Flash memory is selected as boot space
System memory is selected as boot space
Embedded SRAM is selected as boot space
AN4080
Aliasing
).
1FFF EC00
Need help?
Do you have a question about the STM32F0 Series and is the answer not in the manual?
Questions and answers