Chapter 20 96 Kbyte Flash Module (S12FTS96KV1)
Freescale Semiconductor
MC9S12C-Family / MC9S12GC-Family
603
Rev 01.24
Figure 20-25. Example Program Command Flow
Write: Flash Address
Write: FCMD register
Program Command 0x20
Write: FSTAT register
Clear CBEIF 0x80
1.
2.
3.
Clear ACCERR/PVIOL 0x30
Write: FSTAT register
yes
no
Access Error and
Protection Violation
no
and program Data
Bit Polling for
Buffer Empty
Check
Read: FSTAT register
yes
Read: FSTAT register
no
START
yes
Check
CBEIF
Set?
Address, Data,
Command
Buffer Empty Check
CBEIF
Set?
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
yes
Sequential
Programming
Decision
Next
Word?
no
Bit Polling for
Command Completion
Check
Read: FSTAT register
yes
CCIF
Set?
Summary of Contents for MC9S12C Family
Page 689: ......