TC1796
System Units (Vol. 1 of 2)
Program Memory Unit
User’s Manual
7-12
V2.0, 2007-07
PMU, V2.0
For verify operations, the standard read can be combined with a margin check to find
problematic bits (a 0 is read instead of a programmed 1) in advance. The change of
margins is controlled via the margin registers (see
7.2.4.2
Command Mode
Every write operation to the Flash memory space is interpreted as a command cycle,
belonging to a command sequence. A command sequence is composed of one to at
maximum six command cycles (write operations) with well defined address and data
values. After the last command cycle of a correct command sequence, the Command
Mode is entered. The Command Mode remains active during the whole command
execution. The state of a command execution is indicated by several status flags in the
FSR status register.
Some command sequences that do not affect the Flash banks, e.g. the Enter Page Mode
command or the Clear Status command, are immediately executed and finished after the
last command cycle of the command. For such type of command sequences, the
Command Mode is terminated immediately after its execution. After all other command
sequences which activate a Flash bank operation such as erasing or programming, the
Command Mode and the related status flags remain active until the command is really
finished.
Note that all write operations to the Flash memory space are handled by the FCS.
Writing incorrect addresses or data values within a command sequence, or writing them
in an wrong sequence, generates a sequence error (FSR.SQER is set) and terminates
Command Mode.
If one DFLASH bank is busy with erasing, a programming command sequence for the
other DFLASH bank is accepted immediately and the execution of the erase operation
is interrupted until the programming operation is terminated (automatic suspend/resume
operation).
When accessing a busy PFLASH or DFLASH bank by a data read operation (e.g. by a
CPU read in a user program), the read operation is blocked (halted) until the related
Flash bank is no more busy. Therefore, it is recommended to access a PFLASH or
DFLASH bank by data read operations only when they are no longer busy (check the
corresponding busy flags first).
The cycle definitions of command sequences are based on the JEDEC standard. The
different write cycles of command sequences are not only used for operation definitions
such as a sector-erase command, but also as fail-safe and unlock cycles in order to
protect the Flash against inadvertent changes.
Note: The write cycles to the Flash belonging to a command sequence are/may be
buffered in the DMI in store/write buffers. To maintain data coherency (defined
sequence of command cycles is mandatory) and to guarantee immediate transfer
of the command sequence to the PMU, all write cycles to the Flash must access