AT32F425
Series Reference Manual
2022.03.30
Page 36
Ver 2.01
rable
31
38
Configu
rable
OTGFS
OTGFS global interrupt and OTGFS
wakeup interrupt through EXINT line 18
0x0000_00BC
32
39
Configu
rable
I2C1_ERR
I
2
C1
error interrupt
0x0000_00C0
33
40
Configu
rable
SPI3
SPI3 global interrupt
0x0000_00C4
34
41
Configu
rable
I2C2_ERR
I
2
C1
error interrupt
0x0000_00C8
35
42
Configu
rable
TMR13
TMR1 channel 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 follows the initial value of MSP. Cortex™-M4 operates in Thumb state, and thus each
value in the vetor table must set the LSB to 1. In
, 0x0000_0101 is used to represent
0x0000_0100. After the instruction at 0x0000_0100 is executed, the program starts running formally.
Before that, it is a must for initializing 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.