Table 24-46. 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 flash memory module
erases all program flash memory, then verifies that all are erased.
If the flash memory module verifies that all flash memories were properly erased,
security is released by setting the FSEC[SEC] field to the unsecure state. The Erase All
Blocks command aborts if any flash region is protected. 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 24-47. 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 is protected
FSTAT[FPVIOL]
Any errors have been encountered during the verify operation
FSTAT[MGSTAT0]
1. User margin read may be run using the Read 1s All Blocks command to verify all bits are erased.
24.4.10.9.1 Triggering an Erase All External to the Flash Memory Module
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 regardless of the protection settings. If
the post-erase verify passes, the routine then releases security by setting the FSEC[SEC]
field register to the unsecure state. The security byte in the Flash Configuration Field is
also programmed to the unsecure state. The status of the erase-all request is reflected in
the FCNFG[ERSAREQ] bit. The FCNFG[ERSAREQ] bit is cleared once the operation
completes and the normal FSTAT error reporting is available as described in
.
Functional Description
KL02 Sub-Family Reference Manual, Rev. 2.1, July 2013
334
Freescale Semiconductor, Inc.