Chapter 4 4 Kbyte EEPROM Module (S12EETS4KV2)
MC9S12KT256 Data Sheet, Rev. 1.16
170
Freescale Semiconductor
4.3.2.7
EEPROM Command Register (ECMD)
The ECMD register defines the EEPROM commands.
Table 4-7. ESTAT Field Descriptions
Field
Description
7
CBEIF
Command Buffer Empty Interrupt Flag — The CBEIF ag indicates that the address, data, and command
buffers are empty so that a new command sequence can be started. The CBEIF ag is cleared by writing a 1 to
CBEIF. Writing a 0 to the CBEIF ag has no effect on CBEIF. Writing a 0 to CBEIF after writing an aligned word
to the EEPROM address space but before CBEIF is cleared will abort a command sequence and cause the
ACCERR ag in the ESTAT register to be set. Writing a 0 to CBEIF outside of a command sequence will not set
the ACCERR ag. The CBEIF ag is used together with the CBEIE bit in the ECNFG register to generate an
interrupt request.
0 Buffers are full
1 Buffers are ready to accept a new command
6
CCIF
Command Complete Interrupt Flag — The CCIF ag indicates that there are no more commands pending. The
CCIF ag is cleared when CBEIF is cleared and sets automatically upon completion of all active and pending
commands. The CCIF ag does not set when an active command completes and a pending command is fetched
from the command buffer. Writing to the CCIF ag has no effect. The CCIF ag is used together with the CCIE
bit in the ECNFG register to generate an interrupt request.
0 Command in progress
1 All commands are completed
5
PVIOL
Protection Violation — The PVIOL ag indicates an attempt was made to program or erase an address in a
writing a 1 to PVIOL. Writing a 0 to the PVIOL ag has no effect on PVIOL. While PVIOL is set, it is not possible
to launch another command in the EEPROM.
0 No failure
1 A protection violation has occurred
4
ACCERR
EEPROM Access Error — The ACCERR ag indicates an illegal access to the selected EEPROM array
an illegal command (illegal combination of the CMDBx bits in the ECMD register) or the execution of a CPU
STOP instruction while a command is executing (CCIF = 0). The ACCERR ag is cleared by writing a 1 to
ACCERR. Writing a 0 to the ACCERR ag has no effect on ACCERR. While ACCERR is set, it is not possible to
launch another command in the EEPROM.
0 No failure
1 Access error has occurred
2
BLANK
Array Has Been Veried as Erased — The BLANK ag indicates that an erase verify command has checked
the EEPROM array and found it to be erased. The BLANK ag is cleared by hardware when CBEIF is cleared
as part of a new valid command sequence. Writing to the BLANK ag has no effect on BLANK.
0 If an erase verify command has been requested and the CCIF ag is set, then a 0 in BLANK indicates array
is not erased
1 EEPROM array veries as erased
1
FAIL
Flag Indicating a Failed EEPROM Operation — The FAIL ag will set if the erase verify operation fails
(EEPROM block veried as not erased). The FAIL ag is cleared writing a 1 to FAIL. Writing a 0 to the FAIL ag
has no effect on FAIL.
0 EEPROM operation completed without error
1 EEPROM operation failed
0
DONE
Flag Indicating a Completed EEPROM Operation
0 EEPROM operation is active (program, erase, erase verify)
1 EEPROM operation not active