ISD94100 Series Technical Reference Manual
Sep 9, 2019
Page
204
of 928
Rev1.09
IS
D
9
410
0
S
ER
IE
S
T
E
C
HN
ICA
L
RE
F
E
RE
NCE
M
AN
U
AL
Code snippet for 32_bit flash write:
FMC->ISPCMD = FMC_ISPCMD_PROGRAM;
// op code for 32-bit write is 0x21
FMC->ISPCTL &= ~(7<<8);
// Set PT = 0
FMC->ISPADDR = u32Addr;
FMC->ISPDAT = u32Data;
FMC->ISPTRG = FMC_ISPTRG_ISPGO_Msk;
while (FMC->ISPTRG & FMC_ISPTRG_ISPGO_Msk) ;
// Check ISPFF flag (FMC_ISPCTL[6])
64-bit Write
Figure 6.4-10 illustrates the operation flow of 64-bit flash write. Two data registers are involved:
FMC_MPDAT0 for LSB word, and FMC_MPDAT1 for MSB word. The ISP command is 0x61.
Enable ISPEN
Set ISPGO = 1
End of ISP
Operation
?
Check ISPFF = 1?
YES
End of Flash Operation
NO
Set PT
Write FMC_ISPADDR
Write FMC_ISPCMD
Write FMC_MPDAT0
Write FMC_MPDAT1
Check ISPGO = 0
?
NO
YES
Start
Stop
Figure 6.4-10 Flash 64-bit write procedure
Sample code for 64_bit flash write:
FMC->ISPCMD = FMC_ISPCMD_PROGRAM_64;
// op code for 64-bit write is 0x61
FMC->ISPCTL |= (3<<8);
//extend programming pulse
FMC->ISPADDR = u32addr;
FMC->MPDAT0 = u32data0;
FMC->MPDAT1 = u32data1;
FMC->ISPTRG = FMC_ISPTRG_ISPGO_Msk;
while (FMC->ISPSTS & FMC_ISPSTS_ISPBUSY_Msk) ;
FMC->ISPCTL &= ~(7<<8);
// Check ISPFF flag(FMC_ISPCTL[6])
…
Multi-word Write
The ISD94100 series supports Multi-word Write function to speed up flash programming. Each one