English
Language : 

MC9S12NE64_06 Datasheet, PDF (96/554 Pages) Freescale Semiconductor, Inc – Microcontrollers
Chapter 2 64 Kbyte Flash Module (S12FTS64KV3)
2.4.1.3.5 Mass Erase Command
The mass erase command is used to erase a Flash memory block using an embedded algorithm. If the Flash
block to be erased contains any protected area, the PVIOL flag in the FSTAT register will set and the mass
erase command will not launch. After the mass erase command has successfully launched, the CCIF flag
in the FSTAT register will set after the mass erase operation has completed unless a second command has
been buffered.
Read: Register FCLKDIV
Clock Register
Loaded
Check
Bit FDIVLD set? no
yes
Write: Register FCLKDIV
1.
Write: Flash Block Address
and Dummy Data
2.
Write: Register FCMD
Mass Erase Command 0x41
3.
Write: Register FSTAT
Clear bit CBEIF 0x80
Read: Register FSTAT
NOTE: command write sequence
aborted by writing 0x00 to
FSTAT register.
NOTE: command write sequence
aborted by writing 0x00 to
FSTAT register.
Protection
Violation Check
Bit
PVIOL
Set?
no
yes
Write: Register FSTAT
Clear bit PVIOL 0x20
Access
Error Check
Address, Data,
Command
Buffer Empty Check
Bit
ACCERR
Set?
no
Bit
CBEIF
Set?
no
yes Write: Register FSTAT
Clear bit ACCERR 0x10
yes
yes
Next Write?
no
Bit Polling for
Command
Completion Check
Bit
CCIF
no
Set?
yes
Read: Register FSTAT
EXIT
Figure 2-26. Example Mass Erase Command Flow
MC9S12NE64 Data Sheet, Rev. 1.1
96
Freescale Semiconductor