M58BW016DT, M58BW016DB, M58BW016FT, M58BW016FB
Figure 24. Block erase flowchart and pseudocode
Start
Flowcharts
Write 20h
Write Block Address
& D0h
Erase Command:
– write 20h
– write Block Address
(A11-A18) & D0h
(memory enters read status
state after the Erase command)
Read Status
Register
NO
b7 = 1
NO
Suspend
YES
Suspend
Loop
do:
– read status register
(E or G must be toggled)
if Erase command given execute
suspend erase loop
while b7 = 0
YES
NO
b3 = 0
YES
b4 and b5
=1
NO
YES
NO
b5 = 0
YES
NO
b1 = 0
YES
End
VPP Invalid
Error (1)
Command
Sequence Error
Erase
Error (1)
Erase to Protected
Block Error
If b3 = 1, VPP invalid error:
– error handler
If b4, b5 = 1, Command Sequence error:
– error handler
If b5 = 1, Erase error:
– error handler
If b1 = 1, Erase to Protected Block Error:
– error handler
AI03851b
1. If an error is found, the status register must be cleared before further program/erase operations.
61/70