ColdFire Flash Module (CFM)
MCF52235 ColdFire® Integrated Microcontroller Reference Manual, Rev. 6
17-18
Freescale Semiconductor
Before starting a command write sequence, the ACCERR and PVIOL flags in the CFMUSTAT register
must be clear and the CBEIF flag should be tested to determine the state of the address, data, and command
buffers. If the CBEIF flag is set, indicating the buffers are empty, a new command write sequence can be
executed.
A command write sequence consists of three steps which must be strictly adhered to, because writes to the
CFM are not permitted between steps. However, flash register and array reads are allowed during a
command write sequence. The basic command write sequence is as follows:
1. Write to one or more addresses in the flash memory.
2. Write a valid command to the CFMCMD register.
3. Clear CBEIF flag by writing a 1 to CBEIF to launch the command.
When the CBEIF flag is cleared, the CCIF flag is cleared on the same bus cycle by the flash command
controller indicating that the command was successfully launched. The CBEIF flag is set again indicating
that the address, data, and command buffers are ready for a new command write sequence to begin. A
buffered command waits for the active command to be completed before being launched. The CCIF flag
in the CFMUSTAT register is set upon completion of all active and buffered commands.
A command write sequence can be aborted at anytime prior to clearing the CBEIF flag in the CFMUSTAT
register by writing a 0 to the CBEIF flag. The ACCERR flag in the CFMUSTAT register is set after
successfully aborting a command write sequence and the ACCERR flag must be cleared prior to starting
a new command write sequence.
17.4.2.3.3
Bus Arbitration During Write Operations
After a command has been successfully launched, the CFM signals the core platform to hold off read
accesses to any active flash physical block until all active and buffered commands have completed
(CCIF=1). A flash write operation from the internal flash bus holds off the Core platform until it is
completed.
17.4.2.3.4
Flash Normal Mode Commands
summarizes the valid flash normal mode commands.
Table 17-16. CFM Flash Memory Command Description
CFMCMD
Meaning
Description
$05
Blank Check
Verify that the entire flash memory is erased. If all bits are erased, the BLANK bit is set
in the CFMUSTAT register,
, upon command completion.
$06
Page Erase
Verify
Verifies that a flash logical page is erased. If the flash logical page is erased, the BLANK
bit is set in the CFMUSTAT register,
, upon command completion.
$20
Program
Program a 32-bit word.
$40
Page Erase
Erase a flash logical page.
$41
Mass Erase
Erase the entire flash memory. All flash memory protection must be disabled.
Because
of
an
order
from
the
United
States
International
Trade
Commission,
BGA-packaged
product
lines
and
part
numbers
indicated
here
currently
are
not
available
from
Freescale
for
import
or
sale
in
the
United
States
prior
to
September
2010:MCF52234CVM60,
MCF52235CVM60