Chapter 25 2 Kbyte EEPROM Module (S12XEETX2KV1)
MC9S12XDP512 Data Sheet, Rev. 2.17
1064
Freescale Semiconductor
25.4.2.5
Sector Erase Abort Command
The sector erase abort operation will terminate the active sector erase or sector modify operation so that
other sectors in an EEPROM block are available for read and program operations without waiting for the
sector erase or sector modify operation to complete.
An example ow to execute the sector erase abort operation is shown in
Figure 25-22. The sector erase
abort command write sequence is as follows:
1. Write to any EEPROM memory 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 ECMD register.
3. Clear the CBEIF ag in the ESTAT 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
or sector modify 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 EEPROM sector may not be fully
erased and a new sector erase or sector modify 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 or
sector modify operation completes normally, the ACCERR ag will not set upon completion of the
operation as indicated by the CCIF ag being set. If the sector erase abort command is launched after the
sector modify operation has completed the sector erase step, the program step will be allowed to complete.
The maximum number of cycles required to abort a sector erase or sector modify operation is equal to four
from the time the CBEIF ag is cleared until the CCIF ag is set.
NOTE
Since the ACCERR bit in the ESTAT 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 ESTAT 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.