Chapter 28 256 Kbyte Flash Module (S12XFTX256K2V1)
MC9S12XDP512 Data Sheet, Rev. 2.17
Freescale Semiconductor
1183
28.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 ow to execute the sector erase abort operation is shown in
Figure 28-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 ag 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 ag will set once the operation completes as indicated by the CCIF ag being set.
The ACCERR ag 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 specic sector. If the sector
erase abort command is launched but the active sector erase operation completes normally, the ACCERR
ag will not set upon completion of the operation as indicated by the CCIF ag being set. Therefore, if the
ACCERR ag 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
Register”) plus ve bus cycles as measured from the time the CBEIF ag is cleared until the CCIF ag 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 ag 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 ag in the FSTAT register will be set. A new
command write sequence may be started after clearing the ACCERR ag, 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.