
M451
May. 4, 2018
Page
315
of
1006
Rev.2.08
M4
51
S
E
RI
E
S
T
E
CH
NICA
L RE
F
E
R
E
NC
E
M
A
NU
A
L
Enable ISPEN
Set ISPGO = 1
End of ISP
Operation
?
(Read FMC_ISPDAT)
&
Check ISPFF = 1?
YES
End of Flash
Operation
NO
Write FMC_ISPADDR
Write FMC_ISPCMD
(Write FMC_ISPDAT )
Add ISB instruction
Check ISPGO = 0
?
NO
YES
Start
Stop
Figure 6.4-9 ISP Procedure Example
Finally, set the ISPGO (FMC_ISPTRG[0]) register to perform the relative ISP function. The
ISPGO(FMC_ISPTRG[0]) bit is self-cleared when ISP function has been done. To make sure ISP
function has been finished before CPU goes ahead, ISB (Instruction Synchronization Barrier)
instruction is used right after ISPGO(FMC_ISPTRG[0]) setting.
Several error conditions will be checked after ISP is completed. If an error condition occurs, ISP
operation is not started and the ISP fail flag will be set instead. ISPFF(FMC_ISPSTS[6]) flag can
only be cleared by software. The next ISP procedure can be started even
ISPFF(FMC_ISPSTS[6]) bit is kept as 1. Therefore, it is recommended to check the
ISPFF(FMC_ISPSTS[6]) bit and clear it after each ISP operation if it is set to 1.
When the ISPGO(FMC_ISPTRG[0]) bit is set, CPU will wait for ISP operation to finish during this
period; the peripheral still keeps working as usual. If any interrupt request occurs, CPU will not
service it till ISP operation is finished. When ISP operation is finished, the ISPGO bit will be
cleared by hardware automatically. User can check whether ISP operation is finished or not by
the ISPGO(FMC_ISPTRG[0]) bit. User should add 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.
Embedded Flash Memory Programming
6.4.4.5
The NuMicro
®
M451 series provides 32-bit, 64-bit and multi-word flash memory programming
function to speed up flash updated procedure. Table6.4-3 lists required FMC control registers in
each embedded flash programming function.
Register
Description
32-Bit
Programming
64-Bit
Programming
Multi-Word
Programming