512 Kbyte Flash Module (S12XFTX512K4V2)
BookTitle, Rev. 2.4
138 Freescale Semiconductor
2.4.2.6 Sector Erase Abort Command
The sector erase abort operation will terminate the active sector erase operation so that other sectors in a
Flash block are available for read and program operations without waiting for the sector erase operation to
complete.
An example flow to execute the sector erase abort operation is shown in Figure 2-31. The sector erase abort
command write sequence is as follows:
1. Write to any Flash block 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 CBEIF flag in the FSTAT register by writing a 1 to CBEIF 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 ACCERR flag will set once the operation completes as indicated by the CCIF flag being set.
The ACCERR 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 ACCERR
flag will not set upon completion of the operation as indicated by the CCIF flag being set. Therefore, if the
ACCERR flag is not set after the sector erase abort command has completed, a Flash sector being erased
when the abort command was launched will be fully erased. The maximum number of cycles required to
abort a sector erase operation is equal to four FCLK periods (see Section 2.4.1.1, “Writing the FCLKDIV
Register”) plus five bus cycles as measured from the time the CBEIF flag is cleared until the CCIF flag is
set. If sectors in multiple Flash blocks are being simultaneously erased, the sector erase abort operation
will be applied to all active Flash blocks without writing to each Flash block in the sector erase abort
command write sequence.
NOTE
Since the ACCERR bit in the FSTAT register may be set at the completion
of the sector erase abort operation, a command write sequence is not
allowed to be buffered behind a sector erase abort command write sequence.
The CBEIF flag will not set after launching the sector erase abort command
to indicate that a command should not be buffered behind it. If an attempt is
made to start a new command write sequence with a sector erase abort
operation active, the ACCERR flag in the FSTAT register will be set. A new
command write sequence may be started after clearing the ACCERR flag, if
set.
NOTE
The sector erase abort command should be used sparingly since a sector
erase operation that is aborted counts as a complete program/erase cycle.