English
Language : 

S912XHZ512F1VAG Datasheet, PDF (165/978 Pages) Freescale Semiconductor, Inc – Covers MC9S12XHZ384, MC9S12XHZ256
Chapter 3 512 Kbyte Flash Module (S12XFTX512K4V3)
3.4.2.5 Mass Erase Command
The mass erase operation will erase all addresses in a Flash block using an embedded algorithm.
An example flow to execute the mass erase operation is shown in Figure 3-30. The mass erase command
write sequence is as follows:
1. Write an aligned word to any valid address in a Flash block to start the command write sequence
for the mass erase command. The data written will be ignored while the address written determines
which Flash block is erased. Multiple Flash blocks can be simultaneously mass erased by writing
to the same relative address in each Flash block.
2. Write the mass erase command, 0x41, to the FCMD register.
3. Clear the CBEIF flag in the FSTAT register by writing a 1 to CBEIF to launch the mass erase
command.
If a Flash block to be erased contains any protected area, the PVIOL flag in the FSTAT register will set and
the mass erase command will not launch. Once the mass erase command has successfully launched, the
CCIF flag in the FSTAT register will set after the mass erase operation has completed unless a new
command write sequence has been buffered.
MC9S12XHZ512 Data Sheet, Rev. 1.06
Freescale Semiconductor
165