English
Language : 

MC9S12KG128_10 Datasheet, PDF (109/606 Pages) Freescale Semiconductor, Inc – HCS12 Microcontrollers
Execute Sector Erase Command Flow
Chapter 2 128 Kbyte ECC Flash Module (S12FTS128K1ECCV1)
Bit Polling for
Command
Completion Check
Bit
CCIF
no
Set?
yes
Erase
Abort
Needed?
yes
no
Read: Register FSTAT
EXIT
1.
Write: Dummy Flash Address
and Dummy Data
NOTE: command write sequence
aborted by writing 0x00 to
2.
FSTAT register.
NOTE: command write sequence
aborted by writing 0x00 to
3.
FSTAT register.
Write: Register FCMD
Sector Erase Abort Cmd 0x47
Write: Register FSTAT
Clear bit CBEIF 0x80
Read: Register FSTAT
Bit Polling for
Command
Completion Check
Access
Error Check
Bit
CCIF
Set?
yes
no
Read: Register FSTAT
Bit
ACCERR
Set?
no
yes Write: Register FSTAT
Clear bit ACCERR 0x10
EXIT
Sector Erase
Completed
EXIT
Sector Erase
Aborted
Figure 2-30. Example Sector Erase Abort Command Flow
MC9S12KG128 Data Sheet, Rev. 1.16
Freescale Semiconductor
109