Flowcharts and pseudocodes
Figure 24. Erase suspend and resume flowchart and pseudocode
Start
M58LT256JST, M58LT256JSB
Write B0h
erase_suspend_command ( ) {
writeToFlash (bank_address, 0xB0) ;
writeToFlash (bank_address, 0x70) ;
/* read status register to check if
erase has already completed */
Write 70h
Read Status
Register
do {
status_register=readFlash (bank_address) ;
/* E or G must be toggled*/
SR7 = 1
YES
SR6 = 1
NO
} while (status_register.SR7== 0) ;
NO
Erase Complete
if (status_register.SR6==0) /*erase completed */
{ writeToFlash (bank_address, 0xFF) ;
Write FFh
Read Data
YES
Write FFh
Read data from another block
or
Program
or
Block Protect/Unprotect
Write D0h
else
}
read_data ( ) ;
/*The device returns to Read Array
(as if program/erase suspend was not issued).*/
{ writeToFlash (bank_address, 0xFF) ;
read_program_data ( );
/*read or program data from another block*/
writeToFlash (bank_address, 0xD0) ;
/*write 0xD0 to resume erase*/
writeToFlash (bank_address, 0x70) ;
/*read status register to check if erase has completed */
}
}
Write 70h
(1)
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