Document Number: 002-00833 Rev. *L
Page 36 of 74
S29VS256R
S29VS128R
S29XS256R
S29XS128R
7.7.5
Erase Suspend/Erase Resume Commands
The Erase Suspend command allows the system to interrupt a sector erase operation and then read data from, or program data to,
the device. This command is valid only during the sector erase operation. The Erase Suspend command is ignored if written during
the chip erase operation.
When the Erase Suspend command is written during the sector erase operation, the device requires a maximum of t
ESL
(erase
suspend latency) to suspend the erase operation and update the status bits.
After the erase operation has been suspended, the bank enters the erase-suspend mode. The system can read data from or
program data to the device. Reading at any address within erase-suspended sectors produces undetermined data. The system can
read the Status Register to determine if a sector is actively erasing or is erase-suspended. Refer to
for
information on these status bits.
After an erase-suspended program operation is complete, the bank returns to the erase-suspend mode. The system can determine
the status of the program operation by reading the Status Register, just as in the standard program operation.
To resume the sector erase operation, the system must write the Erase Resume command. The device will revert to erasing and the
status bits will be updated. Further writes of the Resume command are ignored. Another Erase Suspend command can be written
after the chip has resumed erasing.
Software Functions and Sample Code
The following is a C source code example of using the erase suspend function. Refer to the
Cypress Low Level Driver User’s Guide
(available on
) for general information on Cypress Flash memory software development guidelines.
/* Example: Erase suspend command */
*( (UINT16 *)ban 0x000 ) = 0x00B0; /* write suspend command */
The following is a C source code example of using the erase resume function. Refer to the
Cypress Low Level Driver User’s Guide
(available on
) for general information on Cypress Flash memory software development guidelines.
/* Example: Erase resume command */
*( (UINT16 *)sector_a 0x000 ) = 0x0030; /* write resume command */
/* The flash needs adequate time in the resume state */
Table 35. Erase Suspend
Cycle
Operation
Byte Address
Word Address
Data
1
Write
Bank Address
Bank Address
00B0h
Table 36. Erase Resume
Cycle
Operation
Byte Address
Word Address
Data
1
Write
Sector A 000h
Sector A 000h
0030h