Flash Memory
MPC5606S Microcontroller Reference Manual, Rev. 7
Freescale Semiconductor 627
 
Example 17-10. 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 17-11. Sector erase resume
MCR = 0x00000005; /* Reset ESUS in MCR: Erase Resume */
17.3.7.4 User Test mode
User Test mode is a mode, that customers can put the flash module in, to do specific tests to check the 
integrity of the flash module.
Three kinds of Test can be performed:
• Array Integrity Self Check
• Margin mode 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 (RWE of MCR set).
It is not allowed to perform User Test operations on the Test and Shadow blocks.
17.3.7.4.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 5 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.
2. The second pass will scan only bits 63-32 of each page.
3. The third pass will scan only bits 95-64 of each page.