English
Language : 

PXD10RM Datasheet, PDF (627/1332 Pages) Freescale Semiconductor, Inc – PXD10 Microcontroller
2. Ensure the block that contains the address to be programmed is unlocked.
Write the first address to be programmed with the program data.
The Flash Module latches address bits (22:3) at this time.
The Flash Module latches data written as well.
This write is referred to as a program data interlock write. An interlock write may be as large as 64
bits, and as small as 32 bits (depending on the CPU bus).
3. If more than 1 word is to be programmed, write the additional address in the Double Word with
data to be programmed. This is referred to as a program data write.
The Flash Modules ignores address bits (22:3) for program data writes.
The eventual unwritten data word default to 0xFFFFFFFF.
4. Write a logic 1 to the MCR.EHV bit to start the internal program sequence or skip to step 9 to
terminate.
5. Wait until the MCR.DONE bit goes high.
6. Confirm MCR.PEG=1.
7. Write a logic 0 to the MCR.EHV bit.
8. If more addresses are to be programmed, return to step 2.
9. Write a logic 0 to the MCR.PGM bit to terminate the program operation.
Program may be initiated with the 0 to 1 transition of the MCR.PGM bit or by clearing the MCR.EHV bit
at the end of a previous program.
The first write after a program is initiated determines the page address to be programmed. This first write
is referred to as an interlock write. The interlock write determines if the shadow, test or normal array space
will be programmed by causing MCR.PEAS to be set/cleared.
An interlock write must be performed before setting MCR.EHV. The user may terminate a program
sequence by clearing MCR.PGM prior to setting MCR.EHV.
After the interlock write, additional writes only affect the data to be programmed at the word location
determined by address bit 2. Unwritten locations default to a data value of 0xFFFFFFFF. If multiple writes
are done to the same location the data for the last write is used in programming.
While MCR.DONE is low and MCR.EHV is high, the user may clear EHV, resulting in a program abort.
A Program abort forces the Module to step 8 of the program sequence.
An aborted program will result in MCR.PEG being set low, indicating a failed operation. MCR.DONE
must be checked to know when the aborting command has completed.
The data space being operated on before the abort will contain indeterminate data. This may be recovered
by repeating the same program instruction or executing an erase of the affected blocks.
Example 17-8. Double Word Program of data 0x55AA55AA at address 0x00AAA8 and data 0xAA55AA55 at
address 0x00AAAC.
MCR
(0x00AAA8)
(0x00AAAC)
MCR
do
{ tmp
= 0x00000010;
= 0x55AA55AA;
= 0xAA55AA55;
= 0x00000011;
= MCR;
/* Set PGM in MCR: Select Operation */
/* Latch Address and 32 LSB data */
/* Latch 32 MSB data */
/* Set EHV in MCR: Operation Start */
/* Loop to wait for DONE=1 */
/* Read MCR */
Freescale Semiconductor
PXD10 Microcontroller Reference Manual, Rev. 1
Preliminary—Subject to Change Without Notice
17-77