![](http://datasheet.mmic.net.cn/370000/P9S12XEP100J1VVLR_datasheet_16728329/P9S12XEP100J1VVLR_915.png)
Chapter 23 1024 KByte Flash Module (S12XFTM1024K5V2)
MC9S12XE-Family Reference Manual Rev. 1.07
Freescale Semiconductor
915
23.6.1
Flash Reset Sequence - Core Hold Phase
During the core hold phase of the Flash reset sequence, the Flash module will hold CPU activity and the
CCIF flag in the FSTAT register will remain clear while executing the following steps:
1. Copy block configuration parameters from the P-Flash IFR to the Memory Controller Scratch
RAM. For any block configuration parameter, if a double bit fault is detected or the location reads
0xFFFF, default values for all block configuration parameters are copied from the Memory
Controller ROM to the Memory Controller Scratch RAM.
2. WriteblockconfigurationparametersfromtheMemoryControllerScratchRAMtoallP-Flashand
D-Flash blocks.
3. Copy the EEE protection and P-Flash protection bytes from the Flash configuration field (see
Table 23-3
) to the EPROT and FPROT registers, respectively (see
Section 23.3.2.10
and
Section 23.3.2.9
). If a double bit fault is detected, the EPROT and FPROT registers will each be
loaded with 0x7F to leave the buffer RAM EEE partition and P-Flash memory fully protected after
the reset sequence.
4. Copy the nonvolatile and security bytes from the Flash configuration field to the FOPT and FSEC
registers,respectively(see
Section 23.3.2.14
and
Section 23.3.2.2
).Ifadoublebitfaultisdetected,
theFOPTandFSECregisterswilleachbeloadedwith0xFF,leavingtheFlashmoduleinasecured
state with backdoor key access disabled after the reset sequence.
23.6.2
Flash Reset Sequence - Core Active Phase
During the core active phase of the Flash reset sequence, the Flash module will release CPU activity and
the CCIF flag in the FSTAT register will remain clear while executing the following steps:
1. If a double bit fault was not detected during step 1 of the core hold phase, copy algorithm
parameters from the P-Flash IFR to the Memory Controller Scratch RAM. If a double bit fault was
detected during step 1 of the core hold phase or if a double bit fault is detected during the copy of
the algorithm parameters or if any algorithm parameter reads 0xFFFF, default values for all
algorithm parameters are copied from the Memory Controller ROM to the Memory Controller
Scratch RAM.
2. IfERPART>0,copyallvalidEEErecordsfromtheD-FlashEEEpartitiontothebufferRAMEEE
partition.
UponcompletionofthecoreactivephaseoftheFlashresetsequence,theCCIFflagintheFSTATregister
will be set.
23.6.3
Error Handling during Reset Sequence
If a double bit fault is detected during either phase of the Flash reset sequence, the MGSTAT bits in the
FSTAT register will both be set along with the CCIF flag at the end of the core active phase of the Flash
reset sequence.