M58BW016BT, M58BW016BB, M58BW016DT, M58BW016DB
Figure 23. Block Erase Flowchart and Pseudo Code
Start
Write 20h
Write Block Address
& D0h
Read Status
Register
NO
Suspend
YES
NO
b7 = 1
Suspend
Loop
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
Erase Command:
– write 20h
– write Block Address
(A11-A18) & D0h
(memory enters read status
state after the Erase command)
do:
– read status register
(E or G must be toggled)
if Erase command given execute
suspend erase loop
while b7 = 1
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
AI03851
Note: 1. If an error is found, the Status Register must be cleared before further P/E operations.
51/63