Freescale Semiconductor Starter Kit for MC9S12G TRK-USB-S12G128 TRK-USB-S12G128 数据表

产品代码
TRK-USB-S12G128
下载
页码 1292
96 KByte Flash Module (S12FTMRG96K1V1)
MC9S12G Family Reference Manual,
Rev.1.23
1012
Freescale Semiconductor
Figure 28-26. Generic Flash Command Write Sequence Flowchart
Write to FCCOBIX register
Write: FSTAT register (to launch command)
Clear CCIF 0x80
Clear ACCERR/FPVIOL 0x30
Write: FSTAT register
yes
no
Access Error and
Protection Violation
Read: FSTAT register
START
Check
FCCOB
ACCERR/
FPVIOL
Set?
EXIT
Write: FCLKDIV register
Read: FCLKDIV register
yes
no
FDIV
Correct?
no
Bit Polling for
Command Completion
Check
yes
CCIF Set?
to identify specific command
parameter to load.
Write to FCCOB register
to load required command parameter.
yes
no
More
Parameters?
Availability Check
Results from previous Command
Note: FCLKDIV must be
set after each reset
Read: FSTAT register
no
yes
CCIF
Set?
no
yes
CCIF
Set?
Clock Divider
Value Check
Read: FSTAT register