|
S9S12C128F0MFUE Datasheet, PDF (529/690 Pages) Freescale Semiconductor, Inc – Reference Manual | |||
|
◁ |
Chapter 18 32 Kbyte Flash Module (S12FTS32KV1)
18.4.1.3.3 Sector Erase Command
The sector erase operation will erase all addresses in a 512 byte sector of the Flash array using an
embedded algorithm.
An example ï¬ow to execute the sector erase operation is shown in Figure 18-24. The sector erase
command write sequence is as follows:
1. Write to a Flash array address to start the command write sequence for the sector erase command.
The Flash address written determines the sector to be erased while MCU address bits [8:0] and the
data written are ignored.
2. Write the sector erase command, 0x40, to the FCMD register.
3. Clear the CBEIF ï¬ag in the FSTAT register by writing a 1 to CBEIF to launch the sector erase
command.
If a Flash sector to be erased is in a protected area of the Flash array, the PVIOL ï¬ag in the FSTAT register
will set and the sector erase command will not launch. Once the sector erase command has successfully
launched, the CCIF ï¬ag in the FSTAT register will set after the sector erase operation has completed unless
a new command write sequence has been buffered.
Freescale Semiconductor
MC9S12C-Family / MC9S12GC-Family
529
Rev 01.24
|
▷ |