
Flash memory
MPC5644A Microcontroller Reference Manual, Rev. 6
Freescale Semiconductor
253
NOTE
Lock and select are independent. If a block is selected and locked, no erase
will occur. See
Section 12.3.2.2, Low/Mid-Address Space Block Lock
Section 12.3.2.3, High-Address Space Block Lock
and
Section 12.3.2.4, Secondary Low/Mid-Address Space
for more information.
3. Write to any address in flash. This is referred to as an erase interlock write. The interlock write
causes the values of SOC specific shadow enable to be captured and causing MCR[PEAS] to be
set/cleared.
4. Write a logic 1 to the MCR[EHV] bit to start an internal erase sequence or skip to step 9 to
terminate.
5. Wait until the MCR[DONE] bit goes high.
6. Confirm MCR[PEG] = 1.
7. Write a logic 0 to the MCR[EHV] bit.
8. If more blocks are to be erased, return to step 2.
9. Write a logic 0 to the MCR[ERS] bit to terminate the erase.
The erase sequence is presented graphically in
. The erase suspend operation detailed in
Section 12.4.6.1, Flash erase suspend/resume
.
After setting MCR[ERS], one write, referred to as an interlock write, must be performed before MCR[EHV] can be set to a 1. This
interlock causes the values of SOC specific shadow enable to be captured. Data words written during erase sequence interlock
writes are ignored. The user may terminate the erase sequence by clearing MCR[ERS] before setting MCR[EHV].
An erase operation may be aborted by clearing MCR[EHV] assuming MCR[DONE] is low, MCR[EHV]
is high, and MCR[ESUS] is low. An erase abort forces the module to step 8 of the erase sequence. An
aborted erase results in MCR[PEG] being set low, indicating a failed operation. The blocks being operated
on before the abort contain indeterminate data. The user may not abort an erase sequence while in erase
suspend.
WARNING
Aborting an erase operation will leave the flash core blocks being erased in
an indeterminate data state. This may be recovered by executing an erase on
the affected blocks.
12.4.6.1
Flash
erase suspend/resume
The erase sequence may be suspended to allow read access to the FC. The erase sequence may also be
suspended to program (erase-suspended program) the FC. A program started during erase suspend can in
turn be suspended. Only one erase suspend and one program suspend are allowed at a time during an
operation. It is not possible to erase during an erase suspend, or program during a program suspend. During
suspend, all reads to FC locations targeted for program and blocks targeted for erase return indeterminate
data. Programming locations in blocks targeted for erase during erase-suspended program may result in
corrupted data. Read While Write may also be used to read the array during an erase sequence providing
the read is to a partition not selected for erase.
An erase suspend can be initiated by changing the value of the MCR[ESUS] bit from a 0 to a 1.
Summary of Contents for MPC5644A
Page 2: ...MPC5644A Microcontroller Reference Manual Rev 6 2 Freescale Semiconductor...
Page 24: ...MPC5644A Microcontroller Reference Manual Rev 6 24 Freescale Semiconductor...
Page 26: ...MPC5644A Microcontroller Reference Manual Rev 6 26 Freescale Semiconductor...
Page 52: ...Introduction MPC5644A Microcontroller Reference Manual Rev 6 52 Freescale Semiconductor...
Page 56: ...Memory Map MPC5644A Microcontroller Reference Manual Rev 6 56 Freescale Semiconductor...
Page 1228: ...Decimation Filter MPC5644A Microcontroller Reference Manual Rev 6 1228 Freescale Semiconductor...
Page 1440: ...FlexCAN Module MPC5644A Microcontroller Reference Manual Rev 6 1440 Freescale Semiconductor...