MPC5604B/C Microcontroller Reference Manual, Rev. 8
708 Freescale Semiconductor
Once suspended, the array may be read. flash memory core reads while MCR[ESUS] = 1 from the block(s)
being erased return indeterminate data.
Example 27-3. Sector erase suspend
MCR = 0x00000007; /* Set ESUS in MCR: Erase Suspend */
do /* Loop to wait for DONE=1 */
{ tmp = MCR; /* Read MCR */
} while ( !(tmp & 0x00000400) );
Notice that there is no need to clear MCR[EHV] and MCR[ERS] in order to perform reads during erase
suspend.
The erase sequence is resumed by writing a logic 0 to MCR[ESUS].
MCR[EHV] must be set to ‘1’ before MCR[ESUS] can be cleared to resume the operation.
The module continues the erase sequence from one of a set of predefined points. This may extend the time
required for the erase operation.
Example 27-4. Sector erase resume
MCR = 0x00000005; /* Reset ESUS in MCR: Erase Resume */
27.6.3.2 User Test mode
The user can perform specific tests to check flash memory module integrity by putting the flash memory
module in User Test Mode.
Three kinds of test can be performed:
• Array Integrity Self Check
• Margin Read
• ECC Logic Check
The User Test Mode is equivalent to a Modify operation: read accesses attempted by the user during User
Test Mode generates a Read-While-Write Error (MCR[RWE] set).
It is not allowed to perform User Test operations on the Test and shadow sectors.
27.6.3.2.1 Array integrity self check
Array Integrity is checked using a predefined address sequence (proprietary), and this operation is
executed on selected and unlocked blocks. Once the operation is completed, the results of the reads can be
checked by reading the MISR value (stored in UMISR0–4), to determine if an incorrect read, or ECC
detection was noted.
The internal MISR calculator is a 32-bit register.
The 128 bit data, the 16 ECC data and the single and double ECC errors of the two Double Words are
therefore captured by the MISR through five different read accesses at the same location.
The whole check is done through five complete scans of the memory address space:
1. The first pass will scan only bits 31:0 of each page.