Information
28.4.7 Flash Program and Erase
All flash functions except read require the user to setup and launch an FTFL command
through a series of peripheral bus writes. The user cannot initiate any further FTFL
commands until notified that the current command has completed. The FTFL command
structure and operation are detailed in FTFL Command Operations.
28.4.8 FTFL Command Operations
FTFL command operations are typically used to modify flash memory contents. The next
sections describe:
• The command write sequence used to set FTFL command parameters and launch
execution
• A description of all FTFL commands available
28.4.8.1 Command Write Sequence
FTFL commands are specified using a command write sequence illustrated in Figure
28-24. The FTFL module performs various checks on the command (FCCOB) content
and continues with command execution if all requirements are fulfilled.
Before launching a command, the ACCERR and FPVIOL bits in the FSTAT register
must be zero and the CCIF flag must read 1 to verify that any previous command has
completed. If CCIF is zero, the previous command execution is still active, a new
command write sequence cannot be started, and all writes to the FCCOB registers are
ignored.
28.4.8.1.1 Load the FCCOB Registers
The user must load the FCCOB registers with all parameters required by the desired
FTFL command. The individual registers that make up the FCCOB data set can be
written in any order.
28.4.8.1.2 Launch the Command by Clearing CCIF
Once all relevant command parameters have been loaded, the user launches the command
by clearing the FSTAT[CCIF] bit by writing a '1' to it. The CCIF flag remains zero until
the FTFL command completes.
Flash Operation in Low-Power Modes
K20 Sub-Family Reference Manual, Rev. 6, Nov 2011
620 Freescale Semiconductor, Inc.
