Chapter 28 256 Kbyte Flash Module (S12XFTX256K2V1)
MC9S12XDP512 Data Sheet, Rev. 2.21
1184
Freescale Semiconductor
Figure 28-31. Example Sector Erase Abort Command Flow
Write: Dummy Flash Address
Write: FCMD register
Sector Erase Abort Cmd 0x47
Write: FSTAT register
Clear CBEIF 0x80
1.
2.
3.
Read: FSTAT register
and Dummy Data
Bit Polling for
Command
Completion Check
yes
CCIF
Set?
Execute Sector Erase Command Flow
no
Bit Polling for
Command
Completion Check
Read: FSTAT register
yes
CCIF
Set?
no
yes
Abort
Needed?
Erase
Clear ACCERR 0x10
Write: FSTAT register
yes
no
Access
Error Check
ACCERR
Set?
Sector Erase
Completed
Sector Erase
Aborted
no
EXIT
Sector Erase
Completed
EXIT