
M0A21/M0A23 Series
May 06, 2022
Page
223
of 746
Rev 1.02
M0
A21
/M
0
A
2
3
SE
RIES
TEC
H
NICAL
RE
FEREN
C
E
M
ANUAL
...
Interrupt 1
Interrupt 0
APROM
...
Interrupt 1
Interrupt 0
SRAM
APROM
...
Interrupt 1
Interrupt 0
SRAM
...
Interrupt 1
Interrupt 0
APROM
SRAM
...
Interrupt 1
Interrupt 0
C
o
p
y
t
o
S
R
A
M
0x0000_0000
0x2000_0000
R
e
m
a
p
p
in
g
t
o
V
e
c
to
r
M
a
p
S
p
a
c
e
0x0000_0200
0x0000_0200
VECMAP = 0x0
VECMAP = 0x0
VECMAP =
0x2000_0000
Figure 6.4-10 Example for Accelerating Interrupt by VECMAP
Avoid CPU halt when Flash programming
When Flash memory controller is busy, any CPU access to Flash memory will cause CPU halt for waiting
Flash controller ready. If Flash controller is busy in page erasing, it may cause CPU halt for a long time
to erase pages. To avoid this situation, user needs to avoid CPU access Flash memory when page
erasing. The easiest way is to execute code in SRAM and use VECMAP to map all exceptions to SRAM.
By executing code in SRAM, CPU will not access Flash to get instructions. By mapping all exceptions
to SRAM, all interrupts will not need to get exception handler from Flash memory.
Embedded Flash Memory Programming
This chip provides 32-bit Flash memory programming function to updated procedure. Table 6.4-3 lists
required FMC control registers in each embedded Flash programming function.
Register
Description
32-Bit
Programming
FMC_ISPCTL
ISP Control Register
FMC_ISPADDR
ISP Address Register
FMC_ISPDAT
ISP Data Register
FMC_ISPCMD
ISP Command Register
0x21
FMC_ISPTRG
ISP Trigger Control Register
FMC_ISPSTS
ISP Status Register
Table 6.4-3 FMC Control Registers for Flash Programming