
AT32F421
Series Reference Manual
2022.11.11
Page 31
Rev 2.02
26
33
Configurable
SPI2
SPI2 global interrupt
0x0000_00A8
27
34
Configurable
USART1
USART1 global interrupt
0x0000_00AC
28
35
Configurable
USART2
USART2 global interrupt
0x0000_00B0
29
36
Configurable
-
Reserved
0x0000_00B4
30
37
Configurable
-
Reserved
0x0000_00B8
31
38
Configurable
-
Reserved
0x0000_00BC
32
39
Configurable
I2C1_ERR
I
2
C1 error interrupt
0x0000_00C0
33
40
Configurable
-
Reserved
0x0000_00C4
34
41
Configurable
I2C2_ERR
I
2
C2 error interrupt
0x0000_00C8
1.1.4
System Tick (SysTick)
The System Tick is a 24-bit downcounter. It will be reloaded with the initial value automatically when it is
decremented to zero. It can generate periodic interrupts, so it is often used as multi-task scheduling
counter for embedded operating system, and also to call the periodic tasks for non-embedded system.
The System Tick calibration value is fixed to 9000, which gives a reference time base of 1 ms when the
System Tick clock is set to 9 MHz.
1.1.5
Reset
The processor reads the first two words from the CODE memory after a system reset and before program
execution.
Get the initial value of the main stack pointer (MSP) from address 0x0000_0000
Get the initial value of the program counter (PC) from address 0x0000_0004. This value is a reset
vector and LSB must be 1. Then take the instructions from the address corresponding to this value.
Figure 1-5 Reset process
reset
Fetch MSP
Fetch reset
vector
Fetch 1st
instruction
Read address
0x0000_0000
Read address
0x0000_0004
Read reset vector
address
Read next
instruction
time
Cortex™-M4 uses a full stack that increases downward, so the initial value of the main stack pointer
(MSP) must be the end address of the stack memory plus 1. For example, if the stack area is set between
0x2000_7C00 and 0x2000_7FFF, then the initial value of MSP must be defined as 0x2000_8000.
The vector table starts following the initial value of MSP. Cortex™-M4 operates in Thumb state, and thus
each value in the vector table must set the LSB to 1. In
, 0x0000_0101 is used to represent
0x0000_0100. Once the instruction at 0x0000_0100 is executed, the program starts running formally.
Before that, it is mandatory to initialize MSP, because the first instruction may be interrupted by NMI or
other faults before being executed. After the completion of MSP initialization, it is ready to prepare stack
room for its service routines.