Flash Memory
MPC5606S Microcontroller Reference Manual, Rev. 7
Freescale Semiconductor
625
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
= 0x00000010;
/* Set PGM in MCR: Select Operation */
(0x00AAA8)
= 0x55AA55AA;
/* Latch Address and 32 LSB data */
(0x00AAAC)
= 0xAA55AA55;
/* Latch 32 MSB data */
MCR
= 0x00000011;
/* Set EHV in MCR: Operation Start */
do
/* Loop to wait for DONE=1 */
{ tmp
= MCR;
/* Read MCR */
} while ( !(tmp & 0x00000400) );
status
= MCR & 0x00000200;
/* Check PEG flag */
MCR
= 0x00000010;
/* Reset EHV in MCR: Operation End */
MCR
= 0x00000000;
/* Reset PGM in MCR: Deselect Operation */
17.3.7.3
Sector erase
Erase changes the value stored in all bits of the selected block(s) to logic 1.
An erase sequence operates on any combination of blocks (sectors) in the low, mid or high address space,
or the Shadow block (if available). The test block cannot be erased.
The erase sequence is fully automated within the flash memory. The user only needs to select the blocks
to be erased and initiate the erase sequence.
Locked/disabled blocks cannot be erased.
If multiple blocks are selected for erase during an erase sequence, no specific operation order must be
assumed.
The Erase operation consists of the following sequence of events:
1. Change the value in the MCR.ERS bit from 0 to 1.
2. Select the block(s) to be erased by writing 1s to the appropriate register(s) in LMS or HBS
registers.
If the Shadow block is to be erased, this step may be skipped, and LMS and HBS are ignored.
Note that Lock and Select are independent. If a block is selected and locked, no erase will occur.
3. Write to any address in flash memory. This is referred to as an erase interlock write.
4. Write a logic 1 to the MCR.EHV bit to start the internal erase sequence or skip to step 9 to
terminate.
5. Wait until the MCR.DONE bit goes high.
Содержание MPC5602S
Страница 76: ...Overview MPC5606S Microcontroller Reference Manual Rev 7 74 Freescale Semiconductor...
Страница 82: ...Memory Map MPC5606S Microcontroller Reference Manual Rev 7 80 Freescale Semiconductor...
Страница 112: ...Signal Description MPC5606S Microcontroller Reference Manual Rev 7 110 Freescale Semiconductor...
Страница 166: ...Analog to Digital Converter ADC MPC5606S Microcontroller Reference Manual Rev 7 164 Freescale Semiconductor...
Страница 182: ...Boot Assist Module BAM MPC5606S Microcontroller Reference Manual Rev 7 180 Freescale Semiconductor...
Страница 234: ...Clock Description MPC5606S Microcontroller Reference Manual Rev 7 232 Freescale Semiconductor...
Страница 286: ...Crossbar Switch XBAR MPC5606S Microcontroller Reference Manual Rev 7 284 Freescale Semiconductor...
Страница 470: ...e200z0h Core MPC5606S Microcontroller Reference Manual Rev 7 468 Freescale Semiconductor...
Страница 524: ...Enhanced Direct Memory Access eDMA MPC5606S Microcontroller Reference Manual Rev 7 522 Freescale Semiconductor...
Страница 546: ...Error Correction Status Module ECSM MPC5606S Microcontroller Reference Manual Rev 7 544 Freescale Semiconductor...
Страница 669: ...Flash Memory MPC5606S Microcontroller Reference Manual Rev 7 Freescale Semiconductor 667...
Страница 670: ...Flash Memory MPC5606S Microcontroller Reference Manual Rev 7 668 Freescale Semiconductor...
Страница 716: ...FlexCAN MPC5606S Microcontroller Reference Manual Rev 7 714 Freescale Semiconductor...
Страница 882: ...LIN Controller LINFlex MPC5606S Microcontroller Reference Manual Rev 7 880 Freescale Semiconductor...
Страница 901: ...Memory Protection Unit MPU MPC5606S Microcontroller Reference Manual Rev 7 Freescale Semiconductor 899...
Страница 902: ...Memory Protection Unit MPU MPC5606S Microcontroller Reference Manual Rev 7 900 Freescale Semiconductor...
Страница 955: ...Mode Entry Module MC_ME MPC5606S Microcontroller Reference Manual Rev 7 Freescale Semiconductor 953...
Страница 956: ...Mode Entry Module MC_ME MPC5606S Microcontroller Reference Manual Rev 7 954 Freescale Semiconductor...
Страница 1072: ...Quad Serial Peripheral Interface QuadSPI MPC5606S Microcontroller Reference Manual Rev 7 1070 Freescale Semiconductor...
Страница 1096: ...Reset Generation Module MC_RGM MPC5606S Microcontroller Reference Manual Rev 7 1094 Freescale Semiconductor...
Страница 1106: ...Real Time Clock RTC API MPC5606S Microcontroller Reference Manual Rev 7 1104 Freescale Semiconductor...
Страница 1186: ...Stepper Stall Detect SSD MPC5606S Microcontroller Reference Manual Rev 7 1184 Freescale Semiconductor...
Страница 1213: ...System Integration Unit Lite SIUL MPC5606S Microcontroller Reference Manual Rev 7 Freescale Semiconductor 1211...
Страница 1214: ...System Integration Unit Lite SIUL MPC5606S Microcontroller Reference Manual Rev 7 1212 Freescale Semiconductor...
Страница 1238: ...Voltage Regulators and Power Supplies MPC5606S Microcontroller Reference Manual Rev 7 1236 Freescale Semiconductor...
Страница 1252: ...Wakeup Unit WKPU MPC5606S Microcontroller Reference Manual Rev 7 1250 Freescale Semiconductor...
Страница 1258: ...Registers Under Protection MPC5606S Microcontroller Reference Manual Rev 7 1256 Freescale Semiconductor...
Страница 1323: ...Register Map MPC5606S Microcontroller Reference Manual Rev 7 Freescale Semiconductor 1321...
Страница 1324: ...Register Map MPC5606S Microcontroller Reference Manual Rev 7 1322 Freescale Semiconductor...