AT32F421
Series Reference Manual
2022.11.11
Page 32
Rev 2.02
Figure 1-6 Example of MSP and PC initialization
1st push data
2nd push data
Other Memory
0x2000_8000
0x0000_0101
Other Exception
Vectors
Boot Code
Other Memory
Code
Stack
Memory
Stack grows
downward
Initial SP Value
0x2000_8000
0x0000_0000
0x0000_0004
0x0000_0100
0x2000_7C00
0x2000_7FFC
0x2000_7FF8
0x2000_8000
In the AT32F421 series, the main Flash memory, Boot code or SRAM can be remapped to the code
area between 0x0000_0000 and 0x07FF_FFFF. nBOOT1 corresponds to the system configuration byte
nBOOT1 of the User System Data area. BOOT0 and nBOOT1 are used to determine the specific
memory from which CODE starts.
{BOOT1, BOOT0}=00/10, CODE starts from the main Flash memory
{BOOT1, BOOT0}=11, CODE starts from Boot code
{BOOT1, BOOT0}=01, CODE starts from SRAM
After a system reset or when leaving from Standby mode, the pin values of both nBOOT1 and BOOT0
will be relatched.
When booting from SRAM, BOOT status will be latched. In this case, it is not possible to load a new
boot mode after system reset, and it is mandatory to perform a power-on reset in order to select a new
boot mode.
Boot code memory contains an embedded boot loader program that allows to reprogram Flash through
USART1 or USART2 interface. Besides, it provides extra firmware including communication protocol
stacks that can be called by software developers using API.