mc9s12hz256v2 Freescale Semiconductor, Inc, mc9s12hz256v2 Datasheet - Page 85

no-image

mc9s12hz256v2

Manufacturer Part Number
mc9s12hz256v2
Description
Hcs12 Microcontrollers
Manufacturer
Freescale Semiconductor, Inc
Datasheet
2.4.1.3.3
The program command is used to program a previously erased word in the Flash memory using an
embedded algorithm. If the word to be programmed is in a protected area of the Flash block, the PVIOL
flag in the FSTAT register will set and the program command will not launch. After the program command
has successfully launched, the CCIF flag in the FSTAT register will set after the program operation has
completed unless a second command has been buffered.
A summary of the launching of a program operation is shown in
Freescale Semiconductor
Clock Register
Loaded
Check
Program Command
Protection
Violation Check
Access
Error Check
Address, Data,
Command
Buffer Empty Check
Bit Polling for
Command
Completion Check
Read: Register FCLKDIV
1.
2.
3.
Bit FDIVLD set?
Figure 2-25. Example Program Command Flow
yes
Write: Flash Address and
Program Data
Program Command 0x20
Write: Register FSTAT
Clear bit CBEIF 0x80
Write: Register FCMD
Read: Register FSTAT
MC9S12HZ256 Data Sheet, Rev. 2.05
no
no
no
yes
ACCERR
PVIOL
CBEIF
Set?
CCIF
Set?
EXIT
Write: Register FCLKDIV
Set?
Bit
Set?
Bit
Bit
Bit
no
yes
yes
yes
no
Clear bit PVIOL 0x20
Write: Register FSTAT
Clear bit ACCERR 0x10
Write: Register FSTAT
NOTE: command write sequence
aborted by writing 0x00 to
FSTAT register.
NOTE: command write sequence
aborted by writing 0x00 to
FSTAT register.
Read: Register FSTAT
Figure
Chapter 2 256 Kbyte Flash Module (FTS256K2V1)
2-25.
Next Write?
yes
no
85

Related parts for mc9s12hz256v2