Block Guide — S12EETX4KV0 V00.04
34
Figure 4-4 Example Sector Erase Command Flow4.1.3.4 Mass Erase CommandThe mass erase operation will erase all addresses in an EEPROM block using an embedded algorithm.An example flow to execute the mass erase operation is shown in Figure 4-5. The mass erase commandwrite sequence is as follows:1. Write to an EEPROM memory address to start the command write sequence for the mass erasecommand. The address and data written will be ignored.2. Write the mass erase command, $41, to the ECMD register.3. Clear the CBEIF flag in the ESTAT register by writing a “1” to CBEIF to launch the mass erasecommand.
Write: EEPROM Sector Address
Write: ECMD register
Sector Erase Command $40
Write: ESTAT register
Clear CBEIF $80
1.
2.
3.
Clear ACCERR/PVIOL $30
Write: ESTAT register
yes
no
Access Error and
Protection Violation
and Dummy Data
Read: ESTAT register
NOTE: command write sequence
aborted by writing $00 to
ESTAT register.
NOTE: command write sequence
aborted by writing $00 to
ESTAT register.
Read: ESTAT register
no
START
yes
Check
CBEIF
Set?
Address, Data,
Command
Buffer Empty Check
ACCERR/
PVIOL
Set?
EXIT
Write: ECLKDIV register
Read: ECLKDIV register
yes
no
Clock Register
Written
Check
EDIVLD
Set? NOTE: ECLKDIV needs to
be set once after each reset.
no
Bit Polling for
Command Completion
Check
yes
CCIF
Set?
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...