Flowcharts and pseudo codes
M58LT128HST, M58LT128HSB
Figure 20. Blank Check flowchart and pseudo code
Start
blank_check_command (blockToCheck) {
writeToFlash (blockToCheck, 0xBC);
Write Block
Address & BCh
writeToFlash (blockToCheck, 0xCB);
/* Memory enters read status state after
the Blank Check Command */
Write Block
Address & CBh
do {
Read
Status Register (1)
status_register = readFlash (blockToCheck);
/* see note (1) */
/* E or G must be toggled */
} while (status_register.SR7==0);
NO
SR7 = 1
YES
if (status_register.SR4==1) && (status_register.SR5==1)
/* command sequence error */
YES
Command Sequence
Error (2)
SR4 = 1
SR5 = 1
error_handler () ;
if (status_register.SR5==1)
/* Blank Check error */
error_handler () ;
NO
Blank Check Error (2)
SR5 = 0
End
}
ai10520c
1. Any address within the bank can equally be used.
2. If an error is found, the Status Register must be cleared before further Program/Erase operations.
92/110