![NXP Semiconductors MPC5605BK Скачать руководство пользователя страница 860](http://html.mh-extra.com/html/nxp-semiconductors/mpc5605bk/mpc5605bk_reference-manual_1721852860.webp)
Chapter 30 Flash Memory
MPC5606BK Microcontroller Reference Manual, Rev. 2
860
Freescale Semiconductor
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 30-1. 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 */
30.6.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 sector (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 bit(s) in the LMS register.
If the shadow sector is to be erased, this step may be skipped, and LMS is 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.
Содержание MPC5605BK
Страница 2: ...This page is intentionally left blank...
Страница 20: ...MPC5606BK Microcontroller Reference Manual Rev 2 20 Freescale Semiconductor...
Страница 103: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 103 Clocks and power...
Страница 104: ...MPC5606BK Microcontroller Reference Manual Rev 2 104 Freescale Semiconductor This page is intentionally left blank...
Страница 243: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 243 Core platform modules...
Страница 244: ...MPC5606BK Microcontroller Reference Manual Rev 2 244 Freescale Semiconductor This page is intentionally left blank...
Страница 395: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 395 Communication modules...
Страница 396: ...MPC5606BK Microcontroller Reference Manual Rev 2 396 Freescale Semiconductor This page is intentionally left blank...
Страница 548: ...Chapter 24 LIN Controller LINFlexD MPC5606BK Microcontroller Reference Manual Rev 2 548 Freescale Semiconductor...
Страница 645: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 643 Timers...
Страница 646: ...MPC5606BK Microcontroller Reference Manual Rev 2 644 Freescale Semiconductor This page is intentionally left blank...
Страница 715: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 713 ADC system...
Страница 716: ...MPC5606BK Microcontroller Reference Manual Rev 2 714 Freescale Semiconductor This page is intentionally left blank...
Страница 787: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 787 Memory...
Страница 788: ...MPC5606BK Microcontroller Reference Manual Rev 2 788 Freescale Semiconductor This page is intentionally left blank...
Страница 893: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 893 Integrity...
Страница 894: ...MPC5606BK Microcontroller Reference Manual Rev 2 894 Freescale Semiconductor This page is intentionally left blank...
Страница 943: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 943 Debug...
Страница 944: ...MPC5606BK Microcontroller Reference Manual Rev 2 944 Freescale Semiconductor This page is intentionally left blank...