27/89
PSD4235G2
entitled “Programming Flash Memory”, on page
25. The Error Flag (DQ5/DQ13) bit returns a 1 if
there has been an Erase F ailure (maximum num-
ber of Eras e cycles hav e been exec ut e d) .
It is not necessary to program the memory with
00h because the PSD auto matically does this be-
fore erasing to 0FFh.
During execut ion of the Bulk Erase instruction, the
Flash mem ory does not accept any i ns tructions.
Flash Sector Erase . The Sector Erase instruc-
tion uses six Write operations, as described in Ta-
ble 29. Additional Flash Sector Erase confirm
commands and Flash memory sector addresses
can be written subsequently to erase other F lash
memory sectors in parallel, without fu rther co ded
cycles, if the additional commands are transmit ted
in a shorter time than the tim e-out period of about
100 µs. The input of a new Sector Erase command
restarts the tim e-out period.
The status of the interna l timer can be monitored
through the level of the Erase Time-out Flag (DQ3/
DQ11) bit. If the Erase Time-out Flag (DQ3/DQ11)
bit is 0, the S ector Er ase instructio n has been re-
ceived and the time-out period is counting. If the
Erase Time-out Flag (DQ3/DQ11) bit is 1, the
time-out period has expired and the PSD is busy
erasing the Flash memory sector(s). Before and
during Erase time-out, any instruction other than
Suspend Sector Erase and Resume Sector Erase,
abort the cycle that is current ly in progress, and re-
set t he device to Read mode. It is not necessary to
program the Flash me mory sector with 00h as t he
PSD does this automatically bef ore erasing.
During a Sector Erase, the memory status may be
checked by reading the Error Flag (DQ5/DQ13)
bit, the Toggle Fl ag (DQ6/DQ14) bit, and the Data
Pollin g ( DQ 7/DQ 15) b it, as d etaile d in t he se ctio n
entitled “Programming Flash Memory”, on page
25.
During execution of the Erase cycle, the Flash
memory accepts only Reset and Susp end Se ctor
Erase in structi ons. Erasure of one Flash memory
sector may be suspended, in order to read data
from another Flash memory sector, and then re-
sumed.
Suspend Sector Erase. When a Sector Erase
cycle is in progress, the Suspend Sector Erase in-
struction can be used to suspend t he cycle by writ-
ing 0B0h to any even address when an
appropriate Sector Select (FS0-FS7 or
CSBOOT0-CSBOOT3) is High. (See Table 29).
This allows reading of data from another Flash
memory sector after the Erase cycle has been
suspended. Suspend Sector Erase is accepted
only during the Flash Secto r E ra se inst ruction ex-
ecution and defaults to Read mode. A Suspend
Sector Erase instruction executed during an Erase
time-out period, in addition to suspending the
Erase cycle, terminates the time out period.
The Toggle Flag (DQ6/DQ14) bit stops toggling
when the PSD internal logic is suspended. The
status of th is bit m ust be m onitored at an address
within the F lash memory sector bei ng erased. The
Toggle Flag (DQ6/DQ14) bit stops toggling be-
tween 0.1 µs and 15 µs after the Suspen d Sector
Erase in struction has been executed. The PSD is
then automatically set to Read mode.
If an Suspend Sector Erase instruction was exe-
cuted, the following rules apply:
– Attempting to read from a Flash memory se ctor
that was being erased outputs invalid data.
– Reading from a Flash memory sector that was
not
b eing erased is valid.
– The Flash memory
cannot
be program med, and
only responds to Resum e Sector Erase and Re-
set instructions (Read is a n operation an d is al-
lowed).
– If a Reset instruction is received, data in the
Flash memory sector that was being erased is
invalid.
Resume Sector Erase. If a Suspend Sector
Erase instruction was previously executed, the
Erase cycle may be resu med with th is instruction.
The Resume Sector Erase instruction consists of
writing 030h to any even address while an appro-
priate Sector Select (FS0-FS7 or CSBOOT0-
CSBOOT 3) is High. (See Table 29.)
Flash Memory Sector Protect
Ea ch sect o r o f P r i mar y or Seco nda ry Flash m e m-
ory ca n be separately protected aga inst Program
and Erase cycles. Sector Protection provides ad-
ditional data security because it disables all Pro-
gram or Erase cycles. This mode can be activated
(or deactivated) through the JTAG-ISP Port or a
Device Pro g ra mmer.
Sector protection c an be selected for each sector
using the PSDsoft Express program. This auto-
matically protects selected sectors when the de-
vice is programmed through the JTAG Port or a
Device Programmer. Flash memory sectors can
be unprote cted to allo w upda ting of their co ntents
using the JTA G Port or a Device Programmer. The
MCU can read (but cannot change) the sector pro-
tection bits.
Any att empt to progr am or erase a protected Flash
memory sector is ignored by the dev ice. The V erify
operation results in a read of the protected data.
This allows a guarantee of the r etention of the Pro-
tection status.
The sector protection status can be read by the
MCU through the Flash memory protection and
Secondary Flash memory protection registers (in