Information
Table 28-42. Erase Flash Block Command Error Handling (continued)
Error Condition Error Bit
Program flash is selected and the address is out of program flash range FSTAT[ACCERR]
Flash address is not longword aligned FSTAT[ACCERR]
Any area of the selected flash block is protected FSTAT[FPVIOL]
Any errors have been encountered during the verify operation FSTAT[MGSTAT0]
28.4.10.7 Erase Flash Sector Command
The Erase Flash Sector operation erases all addresses in a Flash sector.
Table 28-43. Erase Flash Sector Command FCCOB Requirements
FCCOB Number FCCOB Contents [7:0]
0 0x09 (ERSSCR)
1 Flash address [23:16] in the flash sector to be erased
2 Flash address [15:8] in the flash sector to be erased
3 Flash address [7:0]
1
in the flash sector to be erased
1. Must be phrase aligned (flash address [2:0] = 000).
After clearing CCIF to launch the Erase Flash Sector command, the FTFL erases the
selected program flash sector and then verifies that it is erased. The Erase Flash Sector
command aborts if the selected sector is protected (see the description of the FPROT
registers). The swap indicator address in each program flash block is implicitly protected
from sector erase unless the swap system is in the UPDATE or UPDATE-ERASED state
and the program flash sector containing the swap indicator address being erased is the
non-active block. If the erase-verify fails the FSTAT[MGSTAT0] bit is set. The CCIF
flag is set after the Erase Flash Sector operation completes. The Erase Flash Sector
command is suspendable (see the FCNFG[ERSSUSP] bit and Figure 28-25).
Table 28-44. Erase Flash Sector Command Error Handling
Error Condition Error Bit
Command not available in current mode/security FSTAT[ACCERR]
An invalid Flash address is supplied FSTAT[ACCERR]
Flash address is not phrase aligned FSTAT[ACCERR]
The selected program flash sector is protected FSTAT[FPVIOL]
Any errors have been encountered during the verify operation FSTAT[MGSTAT0]
Chapter 28 Flash Memory Module (FTFL)
K20 Sub-Family Reference Manual, Rev. 6, Nov 2011
Freescale Semiconductor, Inc. 633
