English
Language : 

MC9S12XD256MAL Datasheet, PDF (1221/1348 Pages) Freescale Semiconductor, Inc – Freescale’s Scalable Controller Area Network
Chapter 29 128 Kbyte Flash Module (S12XFTX128K1V1)
START
Read: FCLKDIV register
Clock Register
Written
Check
FDIVLD
no
Set?
NOTE: FCLKDIV needs to
be set once after each reset.
yes
Write: FCLKDIV register
Read: FSTAT register
Address, Data,
Command
Buffer Empty Check
CBEIF
no
Set?
yes
Access Error and
Protection Violation
Check
ACCERR/
yes
PVIOL
Set?
no
Write: Flash Block Address
1. and Dummy Data
2.
Write: FCMD register
Mass Erase Command 0x41
3.
Write: FSTAT register
Clear CBEIF 0x80
Read: FSTAT register
Write: FSTAT register
Clear ACCERR/PVIOL 0x30
Bit Polling for
Command Completion
Check
CCIF
Set?
no
yes
EXIT
Figure 29-28. Example Mass Erase Command Flow
Freescale Semiconductor
MC9S12XDP512 Data Sheet, Rev. 2.21
1223