MPC563XM Reference Manual, Rev. 1
Freescale Semiconductor
291
Preliminary—Subject to Change Without Notice
The erase sequence is presented graphically in
. The erase suspend operation detailed in
Section 11.7.12.4.1, “Flash Erase Suspend/Resume
.”
After settingCFLASH_MCR[ERS], one write, referred to as an interlock write, must be performed before
CFLASH_MCR[EHV] can be set to a 1. Data words written during erase sequence interlock writes are
ignored. The user can terminate the erase sequence by clearing CFLASH_MCR[ERS] before setting
CFLASH_MCR[EHV].
Example 11-1. Erase of sectors B0F1 and B0F2.
MCR
= 0x00000004;
/* Set ERS in MCR: Select Operation */
LMS
= 0x00000006;
/* Set LSL2-1 in LMS: Select Sectors to erase */
(0x000000)
= 0xFFFFFFFF;
/* Latch a Flash Address with any data */
MCR
= 0x00000005;
/* Set EHV in MCR: Operation Start */
do
/* Loop to wait for DONE=1 */
{ tmp
= MCR;
/* Read MCR */
} while ( !(tmp & 0x00000400) );
status
= MCR & 0x00000200;
/* Check PEG flag */
MCR
= 0x00000004;
/* Reset EHV in MCR: Operation End */
MCR
= 0x00000000;
/* Reset ERS in MCR: Deselect Operation */
An erase operation can be aborted by clearing CFLASH_MCR[EHV] assuming CFLASH_MCR[DONE]
is low, CFLASH_MCR[EHV] is high and CFLASH_MCR[ESUS] is low. An erase abort forces the
module to step 8 of the erase sequence. An aborted erase results in CFLASH_MCR[PEG] being set low,
indicating a failed operation. The blocks being operated on before the abort contain indeterminate data.
The user cannot abort an erase sequence while in erase suspend.
WARNING
Aborting an erase operation leaves the Flash core blocks being erased in an
indeterminate data state. This can be recovered by executing an erase on the
affected blocks.
11.7.12.4.1
Flash
Erase Suspend/Resume
The erase sequence can be suspended to allow read access to the Flash core. The erase sequence can also
be suspended to program (erase-suspended program) the Flash core. 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 Flash core locations targeted for program and blocks targeted for
erase return indeterminate data. Programming locations in blocks targeted for erase during
erase-suspended program can result in corrupted data.
An erase suspend operation is initiated by setting the CFLASH_MCR[ESUS] bit. CFLASH_MCR[ESUS]
can be set to a 1 at any time when CFLASH_MCR[ERS] and CFLASH_MCR[EHV] are high and
CFLASH_MCR[PGM] is low. A 0 to 1 transition of CFLASH_MCR[ESUS] causes the Flash module to
start the sequence which places it in erase suspend. The user must wait until CFLASH_MCR[DONE] = 1
Содержание MPC5632M
Страница 22: ...MPC563XM Reference Manual Rev 1 22 Freescale Semiconductor Preliminary Subject to Change Without Notice ...
Страница 62: ...MPC563XM Reference Manual Rev 1 62 Freescale Semiconductor Preliminary Subject to Change Without Notice ...
Страница 92: ...MPC563XM Reference Manual Rev 1 92 Freescale Semiconductor Preliminary Subject to Change Without Notice ...
Страница 168: ...MPC563XM Reference Manual Rev 1 168 Freescale Semiconductor Preliminary Subject to Change Without Notice ...
Страница 242: ...MPC563XM Reference Manual Rev 1 242 Freescale Semiconductor Preliminary Subject to Change Without Notice ...
Страница 302: ...MPC563XM Reference Manual Rev 1 302 Freescale Semiconductor Preliminary Subject to Change Without Notice ...
Страница 410: ...MPC563XM Reference Manual Rev 1 410 Freescale Semiconductor Preliminary Subject to Change Without Notice ...
Страница 440: ...MPC563XM Reference Manual Rev 1 440 Freescale Semiconductor Preliminary Subject to Change Without Notice ...
Страница 464: ...MPC563XM Reference Manual Rev 1 464 Freescale Semiconductor Preliminary Subject to Change Without Notice ...
Страница 554: ...MPC563XM Reference Manual Rev 1 554 Freescale Semiconductor Preliminary Subject to Change Without Notice ...
Страница 590: ...MPC563XM Reference Manual Rev 1 590 Freescale Semiconductor Preliminary Subject to Change Without Notice ...
Страница 622: ...MPC563XM Reference Manual Rev 1 622 Freescale Semiconductor Preliminary Subject to Change Without Notice ...
Страница 716: ...MPC563XM Reference Manual Rev 1 716 Freescale Semiconductor Preliminary Subject to Change Without Notice ...
Страница 1114: ...MPC563XM Reference Manual Rev 1 1114 Freescale Semiconductor Preliminary Subject to Change Without Notice ...
Страница 1144: ...MPC563XM Reference Manual Rev 1 1144 Freescale Semiconductor Preliminary Subject to Change Without Notice ...
Страница 1266: ...MPC563XM Reference Manual Rev 1 1266 Freescale Semiconductor Preliminary Subject to Change Without Notice ...
Страница 1316: ...MPC563XM Reference Manual Rev 1 1316 Freescale Semiconductor Preliminary Subject to Change Without Notice ...
Страница 1348: ...MPC563XM Reference Manual Rev 1 1348 Freescale Semiconductor Preliminary Subject to Change Without Notice ...
Страница 1362: ...MPC563XM Reference Manual Rev 1 1362 Freescale Semiconductor Preliminary Subject to Change Without Notice ...
Страница 1382: ...MPC563XM Reference Manual Rev 1 1382 Freescale Semiconductor Preliminary Subject to Change Without Notice ...