Chapter 3 4 Kbyte EEPROM Module (S12XEETX4KV2)
MC9S12XDP512 Data Sheet, Rev. 2.11
162 Freescale Semiconductor
Figure 3-15. Example Erase Verify Command Flow
Write: EEPROM Address
Write: ECMD register
Erase Verify Command 0x05
Write: ESTAT register
Clear CBEIF 0x80
1.
2.
3.
Clear ACCERR/PVIOL 0x30
Write: ESTAT register
yes
no
Access Error and
Protection Violation
no
and Dummy Data
Bit Polling for
Command Completion
Check
Read: ESTAT register
yes
NOTE: command write sequence
aborted by writing 0x00 to
ESTAT register.
NOTE: command write sequence
aborted by writing 0x00 to
ESTAT register.
Read: ESTAT register
no
START
yes
Check
CBEIF
Set?
Address, Data,
Command
Buffer Empty Check
CCIF
Set?
ACCERR/
PVIOL
Set?
no
Erase Verify
Status
yes
EXIT EEPROM Memory
Not Erased
EXIT EEPROM Memory
Erased
BLANK
Set?
Write: ECLKDIV register
Read: ECLKDIV register
yes
no
Clock Register
Written
Check
EDIVLD
Set?
NOTE: ECLKDIV needs to
be set once after each reset.