Modify Mode - STMicroelectronics SPC572L series Reference Manual

Table of Contents

Advertisement

RM0400
Note:
When some Flash blocks are used for EEPROM emulation, reserve at least 3 blocks for this
purpose.
29.4.5

Modify mode

All the Modify operations of the Flash Memory module are managed through the Flash User
Registers interface.
When a Modify operation is active on some blocks, no Read access is possible on any other
block of the same Flash Partition. The Read-While-Modify is supported only among different
flash partitions.
During a Flash Modify operation any attempt to read any Flash location in the same Flash
partition outputs invalid data and MCR[RWE] is automatically set.
If a reset occurs during a Modify operation, the operation is immediately terminated and the
module is reset to Read mode. The data integrity of the Flash section where the Modify
operation was 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:
1.
The first instruction is used to select the desired operation by setting its corresponding
selection bit in MCR[PGM] or MCR[ERS] or UT0[MRE].
2.
The second step is the definition of the operands: the address and the data for
Programming, or the blocks for Array Integrity Check or Margin Read.
3.
The third instruction is used to start the Modify operation by setting MCR[EHV] or
UT0[AIE].
Once selected, but not yet initiated, one operation can be canceled by resetting the
operation selection bit.
A summary of the available Flash Modify operations are shown in
Operation
Doubleword Program
Block Erase
Array Integrity Check
Margin Read
Once MCR[EHV] (or UT0[AIE]) is set, all the operands can no longer be modified until
MCR[DONE] (or UT0[AID]) is high.
In general each Modify operation is completed through a sequence of 4 steps:
1.
Wait for operation completion: wait for MCR[DONE] (or UT0[AID]) to go high.
2.
Check operation result: check MCR[PEG] (or compare UM0–UM9 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]).
Note:
Do not initiate a Modify operation on a Flash Memory module while another Modify
operation is in progress on a separate module.
Table 324. Flash Modify operations
Select bit
MCR[PGM]
Address and Data by Interlock Writes
MCR[ERS]
None
UT0[MRE]
UT0[MRV] + SEL0, SEL1 and SEL2
DocID027809 Rev 4
Embedded Flash Memory (MP55)
Operands
SEL0, SEL1 and SEL2
SEL0, SEL1 and SEL2
Table
324.
Start bit
MCR[EHV]
MCR[EHV]
UT0[AIE]
UT0[AIE]
633/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?

Table of Contents