STMicroelectronics SPC572L series Reference Manual page 635

Table of Contents

Advertisement

RM0400
The Flash Memory modules ignore address bits (23:7) for program data writes. The
eventual unwritten data word defaults to 0xFFFFFFFF.
4.
Write a logic '1' to MCR[EHV] to start the internal program sequence or terminate via
step 9.
5.
Wait until MCR[DONE] goes high.
6.
Confirm MCR[PEG]=1.
7.
Write a logic '0' to the MCR[EHV].
8.
If more addresses are to be programmed, return to step 2.
9.
Write a logic '0' to MCR[PGM] to terminate the program operation.
Programs may be initiated with the 0–1 transition of MCR[PGM] or by clearing MCR[EHV] 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 UTEST or normal array space will be programmed via
MCR[PEAS].
In the case of an erase-suspended program, the values in MCR[PEAS] may be modified via
the Program Interlock Write, enabling erase-suspended programs to UTEST Nonvolatile
Memory space and revert back to their original state (related to erase-suspended operation)
once the erase-suspended program is completed.
An Interlock Write must be performed before setting MCR[EHV]. An Interlock Write
performed after setting MCR[EHV] is forbidden and data and address passed through
interlock is lost.The user may terminate a program sequence by clearing MCR[PGM] prior to
setting MCR[EHV].
After the Interlock Write, additional writes affect the data to be programmed at the word
location determined by address bits [4:2], as well as the page location within a 1024 bit
segment (determined by address bits [6:5]). Unwritten locations default to a data value of
0xFFFF_FFFF. If multiple writes are performed on 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 results 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 contains indeterminate data. This may
be recovered by repeating the same program instruction or executing an Erase of the
affected blocks.
The user may not abort a program sequence while in Program Suspend.
Example 4. Doubleword program of data 0x55AA_55AA at address 0x00_AAA8 and
MCR
= 0x0000_0010;/* Set PGM in MCR: Select Operation */
(0x00_AAA8) = 0x55AA_55AA;/* Latch Address and 32 LSB data */
(0x00_AAAC) = 0xAA55_AA55;/* Latch 32 MSB data */
MCR = 0x0000_0011;/* Set EHV in MCR: Operation Start */
do
{ tmp = MCR; /* Read MCR */
data 0xAA55_AA55 at address 0x00_AAAC.
/* Loop to wait for DONE=1 */
DocID027809 Rev 4
Embedded Flash Memory (MP55)
635/2058
644

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the SPC572L series and is the answer not in the manual?

Questions and answers

Table of Contents