English
Language : 

MC9S12KG128_10 Datasheet, PDF (135/606 Pages) Freescale Semiconductor, Inc – HCS12 Microcontrollers
Chapter 3 2 Kbyte EEPROM Module (S12EETS2KV1)
9. The part enters stop mode and a program or erase command is in progress. The command is aborted
and any pending command is killed.
10. A 0 is written to the CBEIF bit in the ESTAT register.
The ACCERR flag will not be set if any EEPROM register is read during the command sequence.
If the EEPROM array is read during execution of an algorithm (i.e., CCIF bit in the ESTAT register is
low), the read will return non-valid data and the ACCERR flag will not be set.
When an ACCERR flag is set in the ESTAT register, the command state machine is locked. It is not
possible to launch another command until the ACCERR flag is cleared.
The PVIOL flag will be set during the command write sequence after the word write to the EEPROM
address space and the command sequence will be aborted if any of the following illegal operations are
performed.
1. Writing a EEPROM address to program in a protected area of the EEPROM.
2. Writing a EEPROM address to erase in a protected area of the EEPROM.
3. Writing the mass erase command to ECMD while any protection is enabled.
When the PVIOL flag is set in the ESTAT register the command state machine is locked. It is not possible
to launch another command until the PVIOL flag is cleared.
3.5 Operating Modes
3.5.1 Wait Mode
If an EEPROM command is active (CCIF = 0) when the MCU enters wait mode, that command and any
pending command will be completed.
The EETS2K module can recover the MCU from wait mode if the interrupts are enabled (see Section 3.7,
“Interrupts”).
3.5.2 Stop Mode
If a command is active (CCIF = 0) when the MCU enters stop mode, the operation will be aborted and if
the operation is program, erase, or sector modify, the data being programmed or erased may be corrupted
and the CCIF and ACCERR flags will be set. If active, the high voltage circuitry to the EEPROM array
will be switched off when entering stop mode. Upon exit from stop mode, the CBEIF flag is set and any
pending command will not be launched. The ACCERR flag must be cleared before starting a new
command write sequence.
NOTE
As active commands are immediately aborted when the MCU enters stop
mode, it is strongly recommended that the user does not use the STOP
instruction during program, erase, or sector modify operations.
MC9S12KG128 Data Sheet, Rev. 1.16
Freescale Semiconductor
135