English
Language : 

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