Information

28.4.11.6 Erase Flash Block Command
The Erase Flash Block operation erases all addresses in a single program flash or data
flash block.
Table 28-47. Erase Flash Block Command FCCOB Requirements
FCCOB Number FCCOB Contents [7:0]
0 0x08 (ERSBLK)
1 Flash address [23:16] in the flash block to be erased
2 Flash address [15:8] in the flash block to be erased
3 Flash address [7:0]
1
in the flash block to be erased
1. Must be longword aligned (Flash address [1:0] = 00).
Upon clearing CCIF to launch the Erase Flash Block command, the flash memory
module erases the main array of the selected flash block and verifies that it is erased.
When the data flash is targeted, DEPART must be set for no EEPROM (see Table 28-4)
else the Erase Flash Block command aborts setting the FSTAT[ACCERR] bit. The Erase
Flash Block command aborts and sets the FSTAT[FPVIOL] bit if any region within the
block is protected (see the description of the FPROT and FDPROT registers). If the erase
verify fails, the MGSTAT0 bit in FSTAT is set. The CCIF flag will set after the Erase
Flash Block operation has completed.
Table 28-48. Erase Flash Block Command Error Handling
Error Condition Error Bit
Command not available in current mode/security FSTAT[ACCERR]
Program flash is selected and the address is out of program flash range FSTAT[ACCERR]
Data flash is selected and the address is out of data flash range FSTAT[ACCERR]
Data flash is selected with EEPROM enabled 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.11.7 Erase Flash Sector Command
The Erase Flash Sector operation erases all addresses in a flash sector.
Table 28-49. Erase Flash Sector Command FCCOB Requirements
FCCOB Number FCCOB Contents [7:0]
0 0x09 (ERSSCR)
Table continues on the next page...
Chapter 28 Flash Memory Module (FTFL)
K20 Sub-Family Reference Manual, Rev. 2, Feb 2012
Freescale Semiconductor, Inc. 539