
Chapter 4 Memory
MC9S08DN60 Series Data Sheet, Rev 3
52
Freescale Semiconductor
4.5.5
Sector Erase Abort
The sector erase abort operation will terminate the active sector erase operation so that other sectors are
available for read and program operations without waiting for the sector erase operation to complete.
The sector erase abort command write sequence is as follows:
1. Write to any Flash or EEPROM address to start the command write sequence for the sector erase
abort command. The address and data written are ignored.
2. Write the sector erase abort command, 0x47, to the FCMD register.
3. Clear the FCBEF ag in the FSTAT register by writing a 1 to FCBEF to launch the sector erase
abort command.
If the sector erase abort command is launched resulting in the early termination of an active sector erase
operation, the FACCERR flag will set once the operation completes as indicated by the FCCF flag being
set. The FACCERR flag sets to inform the user that the Flash sector may not be fully erased and a new
sector erase command must be launched before programming any location in that specific sector.
If the sector erase abort command is launched but the active sector erase operation completes normally,
the FACCERR flag will not set upon completion of the operation as indicated by the FCCF flag being set.
Therefore, if the FACCERR flag is not set after the sector erase abort command has completed, a sector
being erased when the abort command was launched will be fully erased.
A flowchart to execute the sector erase abort operation is shown in
Figure 4-4.Figure 4-4. Sector Erase Abort Flowchart
START
WRITE 0x47 TO FCMD
WRITE 1 TO FCBEF
TO LAUNCH COMMAND
AND CLEAR FCBEF (2)
1
0
FCCF?
SECTOR ERASE ABORTED
(2) Wait at least four bus cycles
0
1
FCCF?
WRITE TO Flash
TO BUFFER ADDRESS AND DATA
FACCERR?
0
1
SECTOR ERASE COMPLETED
before checking FCBEF or FCCF.
SECTOR ERASE
ABORT FLOW