English
Language : 

MC9S08DN60_08 Datasheet, PDF (52/356 Pages) Freescale Semiconductor, Inc – Microcontrollers
Chapter 4 Memory
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 flag 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.
SECTOR ERASE
ABORT FLOW
START
1
FCCF?
0
WRITE TO Flash
TO BUFFER ADDRESS AND DATA
WRITE 0x47 TO FCMD
WRITE 1 TO FCBEF
TO LAUNCH COMMAND
AND CLEAR FCBEF (2)
(2) Wait at least four bus cycles
before checking FCBEF or FCCF.
SECTOR ERASE COMPLETED
0
FCCF?
1
0
FACCERR?
1
SECTOR ERASE ABORTED
Figure 4-4. Sector Erase Abort Flowchart
MC9S08DN60 Series Data Sheet, Rev 3
52
Freescale Semiconductor