![Freescale Semiconductor MCF52230 ColdFire Скачать руководство пользователя страница 261](http://html1.mh-extra.com/html/freescale-semiconductor/mcf52230-coldfire/mcf52230-coldfire_reference-manual_2330648261.webp)
ColdFire Flash Module (CFM)
MCF52235 ColdFire® Integrated Microcontroller Reference Manual, Rev. 6
Freescale Semiconductor
17-23
Program
The program operation programs a previously erased address in the flash memory using an embedded
algorithm.
An example flow to execute the program operation is shown in
. The program command write
sequence is as follows:
1. Write to a word address in a flash physical block to start the command write sequence for the
program command. The word address written determines the flash physical block address to
program while the data written during the program command write sequence determines the data
stored at that address.
To write to two physical blocks simultaneously, perform the following steps:
a) Write data to even address (where address is a multiple of eight)
b) Write data to odd address (previous a 4)
c) Write PROGRAM command to CFMCMD
d) Clear CBEIF, by writing a 1 to it
The flash physical block written to in the first array write limits the ability to simultaneously
program in block order only those flash physical blocks that remain.
2. Write the program command, $20, to the CFMCMD register.
3. Clear the CBEIF flag by writing a 1 to CBEIF to launch the program command.
If the address to be programmed is in a protected sector of the flash memory, the PVIOL flag in the
CFMUSTAT register sets and the program command does not launch. After the program command has
successfully launched, the CCIF flag in the CFMUSTAT register sets after the program operation has
completed unless a new command write sequence has been buffered.
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