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