Information

28.4.12.12 Erase All Blocks Command
The Erase All Blocks operation erases all flash memory, initializes the FlexRAM, verifies
all memory contents, and releases MCU security.
Table 28-61. Erase All Blocks Command FCCOB Requirements
FCCOB Number FCCOB Contents [7:0]
0 0x44 (ERSALL)
After clearing CCIF to launch the Erase All Blocks command, the FTFL erases all
program flash memory, program flash 1 IFR space, data flash memory, data flash IFR
space, EEPROM backup memory, and FlexRAM, then verifies that all are erased.
If the FTFL verifies that all flash memories and the FlexRAM were properly erased,
security is released by setting the FSEC[SEC] field to the unsecure state and the
FCNFG[RAMRDY] bit is set. The Erase All Blocks command aborts if any flash or
FlexRAM region is protected. The swap indicator address in each program flash block is
not implicitly protected from the Erase All Blocks operation. The security byte and all
other contents of the flash configuration field (see Flash Configuration Field Description)
are erased by the Erase All Blocks command. If the erase-verify fails, the
FSTAT[MGSTAT0] bit is set. The CCIF flag is set after the Erase All Blocks operation
completes.
Table 28-62. Erase All Blocks Command Error Handling
Error Condition Error Bit
Command not available in current mode/security FSTAT[ACCERR]
Any region of the program flash memory, data flash memory, or FlexRAM is protected FSTAT[FPVIOL]
Any errors have been encountered during the verify operation FSTAT[MGSTAT0]
28.4.12.12.1 Triggering an Erase All External to the FTFL
The functionality of the Erase All Blocks command is also available in an uncommanded
fashion outside of the flash memory. Refer to the device's Chip Configuration details for
information on this functionality.
Before invoking the external erase all function, the FSTAT[ACCERR and PVIOL] flags
must be cleared and the FCCOB0 register must not contain 0x44. When invoked, the
erase-all function erases all program flash memory, program flash 1 IFR space, data flash
memory, data flash IFR space, EEPROM backup, and FlexRAM regardless of the
protection settings or if the swap system has been initialized. If the post-erase verify
passes, the routine then releases security by setting the FSEC[SEC] field register to the
Chapter 28 Flash Memory Module (FTFL)
K10 Sub-Family Reference Manual, Rev. 6, Nov 2011
Freescale Semiconductor, Inc. 661