Flowcharts and pseudocodes
M58LT256JST, M58LT256JSB
Figure 24. Erase suspend and resume flowchart and pseudocode
Start
erase_suspend_command ( ) {
Write B0h
Write 70h
writeToFlash (bank_address, 0xB0) ;
writeToFlash (bank_address, 0x70) ;
/* read status register to check if
erase has already completed */
do {
Read Status
Register
status_register=readFlash (bank_address) ;
/* E or G must be toggled*/
NO
NO
} while (status_register.SR7== 0) ;
SR7 = 1
YES
SR6 = 1
Erase Complete
Write FFh
if (status_register.SR6==0) /*erase completed */
{ writeToFlash (bank_address, 0xFF) ;
read_data ( ) ;
Read Data
/*The device returns to Read Array
(as if program/erase suspend was not issued).*/
YES
}
else
Write FFh
{ writeToFlash (bank_address, 0xFF) ;
read_program_data ( );
Read data from another block
or
Program
or
Block Protect/Unprotect
/*read or program data from another block*/
writeToFlash (bank_address, 0xD0) ;
/*write 0xD0 to resume erase*/
Write D0h
writeToFlash (bank_address, 0x70) ;
/*read status register to check if erase has completed */
(1)
Write 70h
}
}
Erase Continues with
Bank in Read Status
Register Mode
AI12897b
1. The Read Status Register command (Write 70h) can be issued just before or just after the Erase Resume command.
94/108