Flash Memory
MPC5606S Microcontroller Reference Manual, Rev. 7
588 Freescale Semiconductor
It is not possible to program or to erase during an erase suspend.
During erase suspend, all reads to blocks targeted for erase return indeterminate data.
An erase suspend can be initiated by changing the value of the MCR.ESUS bit from 0 to 1. MCR.ESUS
can be set to 1 at any time when MCR.ERS and MCR.EHV are high and MCR.PGM is low. A 0 to 1
transition of MCR.ESUS causes the Module to start the sequence which places it in erase suspend.
The user must wait until MCR.DONE = 1 before the Module is suspended and further actions are
attempted. MCR.DONE will go high no more than t
ESUS
after MCR.ESUS is set to 1.
Once suspended, the array may be read. flash core reads while MCR.ESUS = 1 from the block(s) being
erased return indeterminate data.
Example 17-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 17-4. Sector Erase Resume
MCR = 0x00000005; /* Reset ESUS in MCR: Erase Resume */
17.2.7.1.3 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.
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