15
3686H–DFLASH–11/2017
AT25DF321A
8.5 Program/Erase Suspend
In some code plus data storage applications, it is often necessary to process certain high-level system interrupts that require
relatively immediate reading of code or data from the Flash memory. In such an instance, it may not be possible for the system
to wait the microseconds or milliseconds required for the Flash memory to complete a program or erase cycle. The
Program/Erase Suspend command allows a program or erase operation in progress to a particular 64-Kbyte sector of the Flash
memory array to be suspended so that other device operations can be performed. For example, by suspending an erase
operation to a particular sector, the system can perform functions such as a program or read operation within another 64-Kbyte
sector in the device. Other device operations, such as a Read Status Register, can also be performed while a program or erase
operation is suspended. Table 8-1 outlines the operations that are allowed and not allowed during a program or erase suspend.
Since the need to suspend a program or erase operation is immediate, the Write Enable command does not need to be issued
prior to the Program/Erase Suspend command being issued. Therefore, the Program/Erase Suspend command operates
independently of the state of the WEL bit in the Status Register.
To perform a Program/Erase Suspend, the CS pin must first be asserted and the opcode of B0h must be clocked into the
device. No address bytes need to be clocked into the device, and any data clocked in after the opcode will be ignored. When
the CS pin is deasserted, the program or erase operation currently in progress will be suspended within a time of tSUSP. The
Program Suspend (PS) bit or the Erase Suspend (ES) bit in the Status Register will then be set to the logical “1” state to
indicate that the program or erase operation has been suspended. In addition, the RDY/BSY bit in the Status Register will
indicate that the device is ready for another operation. The complete opcode must be clocked into the device before the CS pin
is deasserted, and the CS pin must be deasserted on an even byte boundary (multiples of eight bits); otherwise, no suspend
operation will be performed.
Read operations are not allowed to a 64-Kbyte sector that has had its program or erase operation suspended. If a read is
attempted to a suspended sector, then the device will output undefined data. Therefore, when performing a Read Array
operation to an unsuspended sector and the device’s internal address counter increments and crosses the sector boundary to a
suspended sector, the device will then start outputting undefined data continuously until the address counter increments and
crosses a sector boundary to an unsuspended sector.
A program operation is not allowed to a sector that has been erase suspended. If a program operation is attempted to an erase
suspended sector, then the program operation will abort and the WEL bit in the Status Register will be reset back to the logical
“0” state. Likewise, an erase operation is not allowed to a sector that has been program suspended. If attempted, the erase
operation will abort and the WEL bit in the Status Register will be reset to a logical “0” state.
During an Erase Suspend, a program operation to a different 64-Kbyte sector can be started and subsequently suspended. This
results in a simultaneous Erase Suspend/Program Suspend condition and will be indicated by the states of both the ES and PS
bits in the Status Register being set to the logical “1” state.
If a Reset operation (see “Reset” on page 36) is performed while a sector is erase suspended, the suspend operation will abort
and the contents of the block in the suspended sector will be left in an undefined state. However, if a Reset is performed while
a sector is program suspended, the suspend operation will abort but only the contents of the page that was being programmed
and subsequently suspended will be undefined. The remaining pages in the 64-Kbyte sector will retain their previous contents.
If an attempt is made to perform an operation that is not allowed during a program or erase suspend, such as a Protect Sector
operation, then the device will simply ignore the opcode and no operation will be performed. The state of the WEL bit in the
Status Register, as well as the SPRL (Sector Protection Registers Locked) and SLE (Sector Lockdown Enabled) bits, will not
be affected.