mc9s12hz256v2 Freescale Semiconductor, Inc, mc9s12hz256v2 Datasheet - Page 86

no-image

mc9s12hz256v2

Manufacturer Part Number
mc9s12hz256v2
Description
Hcs12 Microcontrollers
Manufacturer
Freescale Semiconductor, Inc
Datasheet
Chapter 2 256 Kbyte Flash Module (FTS256K2V1)
2.4.1.3.4
The sector erase command is used to erase the addressed sector in the Flash memory using an embedded
algorithm. If the Flash sector to be erased is in a protected area of the Flash block, the PVIOL flag in the
FSTAT register will set and the sector erase command will not launch. After the sector erase command
has successfully launched, the CCIF flag in the FSTAT register will set after the sector erase operation has
completed unless a second command has been buffered.
86
Clock Register
Loaded
Check
Sector Erase 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-26. Example Sector Erase Command Flow
yes
Write: Flash Sector Address
and Dummy Data
Sector Erase Command 0x40
Write: Register FSTAT
Clear bit CBEIF 0x80
Write: Register FCMD
Read: Register FSTAT
MC9S12HZ256 Data Sheet, Rev. 2.05
no
ACCERR
no
no
yes
CBEIF
PVIOL
Set?
Set?
Set?
EXIT
CCIF
Set?
Write: Register FCLKDIV
Bit
Bit
Bit
Bit
no
yes
yes
yes
no
Clear bit PVIOL 0x20
Write: Register FSTAT
Write: Register FSTAT
Clear bit ACCERR 0x10
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
yes
Next Write?
no
Freescale Semiconductor

Related parts for mc9s12hz256v2