
NUC126
Aug. 08, 2018
Page
221
of 943
Rev 1.03
NUC12
6 S
E
RI
E
S
T
E
CH
NI
CA
L R
E
F
E
RE
NCE
MA
NUA
L
ISB (Instruction Synchronization Barrier) instruction next to the instruction in which ISPGO
(FMC_ISPTRG[0]) bit is set 1 to ensure correct execution of the instructions following ISP operation.
6.4.4.5
VECMAP for Interrupt and Memory Programming
Accelerate Interrupt by VECMAP
In IAP mode, VECMAP function could be used to map 512 bytes SRAM to vector map space. It means
it is possible to store all exception vectors to SRAM. Then, if any exceptions assert, CPU can read
exception handler from SRAM with zero wait state to speed up exception latency.
Because the vector map space is fixed to be 512 bytes, user must copy all 512 bytes to SRAM before
remapping SRAM to vector map space. Otherwise, CPU may get wrong data from vector map space
after remapping. Figure 6.4-10 shows an example to accelerating interrupt by VECMAP.
...
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 Holt when Flash Programming
When flash memory controller is in busy, any CPU access to flash memory will cause CPU holt for
waiting flash controller ready. If flash controller is busy in page erasing, it may cause CPU holt 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 won’t need to get exception handler from flash memory.
6.4.4.6
Embedded Flash Memory Programming
The NUC126 series provides 32-bit, 64-bit and multi-word flash memory programming function to
speed up flash updated procedure. Table 6.4-3 lists required FMC control registers in each embedded
flash programming function.
Register
Description
32-Bit
Programming
64-Bit
Programming
Multi-Word
Programming
FMC_ISPCTL
ISP Control Register
FMC_ISPADDR
ISP Address Register
FMC_ISPDAT
ISP Data Register
N/A
N/A