English
Language : 

PXD10RM Datasheet, PDF (588/1332 Pages) Freescale Semiconductor, Inc – PXD10 Microcontroller
17.2.7 Programming Considerations
17.2.7.1 Modify Operation
All the Modify Operations of the Flash Module are managed through the Flash User Registers Interface.
All the sectors of the Flash Module belong to the same partition (Bank), therefore when a Modify operation
is active on some sectors no read access is possible on any other sector (Read-While-Modify is not
supported).
During a Flash Modify Operation any attempt to read any Flash location will output invalid data and bit
RWE of MCR will be automatically set. This means that the Flash Module is not fetchable when a Modify
Operation is active and these commands must be executed from another Memory (internal Ram or another
flash Module).
If during a Modify Operation a reset occurs, the operation is suddenly terminated and the Macrocell is reset
to Read Mode. The data integrity of the Flash section where the Modify Operation has been terminated is
not guaranteed — the interrupted Flash Modify Operation must be repeated.
In general each Modify Operation is started through a sequence of 3 steps:
• The first instruction is used to select the desired operation by setting its corresponding selection bit
in MCR (PGM or ERS) or UT0 (MRE or EIE).
• The second step is the definition of the operands: the Address and the Data for programming or the
Sectors for erase or margin read.
• The third instruction is used to start the Modify Operation, by setting EHV in MCR or AIE in UT0.
Once selected, but not yet started, one operation can be canceled by resetting the operation selection bit.
A summary of the available Flash Modify Operations are shown in the following Table 17-36.
Table 17-36. Flash modify operations
Operation
Double Word Program
Sector Erase
Array Integrity Check
Margin Read
ECC Logic Check
Select bit
MCR.PGM
MCR.ERS
None
UT0.MRE
UT0.EIE
Operands
Address and Data by Interlock Writes
LMS, HBS
LMS, HBS
UT0.MRV + LMS, HBS
UT0.DSI, UT1, UT2
Start bit
MCR.EHV
MCR.EHV
UT0.AIE
UT0.AIE
UT0.AIE
Once bit MCR.EHV (or UT0.AIE) is set, all the operands can no more be modified until bit MCR.DONE
(or UT0.AID) is high.
In general each Modify Operation is completed through a sequence of four steps:
1. Wait for operation completion: wait for bit MCR.DONE (or UT0.AID) to go high.
2. Check operation result: check bit MCR.PEG (or compare UMISR0-4 with expected value).
3. Switch-Off FPEC by resetting MCR.EHV (or UT0.AIE).
4. Deselect current operation by clearing MCR.PGM/ERS (or UT0.MRE/EIE).
17-38
PXD10 Microcontroller Reference Manual, Rev. 1
Preliminary—Subject to Change Without Notice
Freescale Semiconductor