Chapter 18 32 Kbyte Flash Module (S12FTS32KV1)
530
MC9S12C-Family / MC9S12GC-Family
Freescale Semiconductor
Rev 01.24
Figure 18-24. Example Sector Erase Command Flow
Write: Flash Sector Address
Write: FCMD register
Sector Erase Command 0x40
Write: FSTAT register
Clear CBEIF 0x80
1.
2.
3.
Clear ACCERR/PVIOL 0x30
Write: FSTAT register
yes
no
Access Error and
Protection Violation
and Dummy Data
Read: FSTAT register
Read: FSTAT register
no
START
yes
Check
CBEIF
Set?
Address, Data,
Command
Buffer Empty Check
ACCERR/
PVIOL
Set?
EXIT
Write: FCLKDIV register
Read: FCLKDIV register
yes
no
Clock Register
Written
Check
FDIVLD
Set?
NOTE: FCLKDIV needs to
be set once after each reset.
no
Bit Polling for
Command Completion
Check
yes
CCIF
Set?
Summary of Contents for MC9S12C Family
Page 689: ......