Information

The supplied address must be longword aligned (flash address [1:0] = 00):
Byte 0 data is written to the supplied address ('start'),
Byte 1 data is programmed to byte address start+0b01,
Byte 2 data is programmed to byte address start+0b10, and
Byte 3 data is programmed to byte address start+0b11.
Table 28-40. Program Longword 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 longword aligned FSTAT[ACCERR]
Flash address points to a protected area FSTAT[FPVIOL]
Any errors have been encountered during the verify operation FSTAT[MGSTAT0]
28.4.10.6 Erase Flash Block Command
The Erase Flash Block operation erases all addresses in a single program flash.
Table 28-41. 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 FTFL erases the
main array of the selected flash block and verifies that it is erased. 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 registers). The swap indicator address in
each program flash block is implicitly protected from block erase unless the swap system
is in the UPDATE or UPDATE-ERASED state and the program flash block being erased
is the non-active block. 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-42. Erase Flash Block Command Error Handling
Error Condition Error Bit
Command not available in current mode/security FSTAT[ACCERR]
Table continues on the next page...
Flash Operation in Low-Power Modes
K20 Sub-Family Reference Manual, Rev. 6, Nov 2011
632 Freescale Semiconductor, Inc.