English
Language : 

MC9S12C_10 Datasheet, PDF (603/690 Pages) Freescale Semiconductor, Inc – Reference Manual
Chapter 20 96 Kbyte Flash Module (S12FTS96KV1)
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/
PVIOL
Set?
no
Write: Flash Address
1. and program Data
yes
2.
Write: FCMD register
Program Command 0x20
3.
Write: FSTAT register
Clear CBEIF 0x80
Read: FSTAT register
Write: FSTAT register
Clear ACCERR/PVIOL 0x30
Bit Polling for
Buffer Empty
Check
Sequential
Programming
Decision
CBEIF
no
Set?
yes
Next
Word?
yes
no
Read: FSTAT register
Bit Polling for
Command Completion
Check
CCIF
Set?
no
yes
EXIT
Figure 20-25. Example Program Command Flow
Freescale Semiconductor
MC9S12C-Family / MC9S12GC-Family
603
Rev 01.24