M58BW016DT, M58BW016DB, M58BW016FT, M58BW016FB
Appendix B Flowcharts
Flowcharts
Figure 22. Program flowchart and pseudocode
Start
Write 40h
Write Address
& Data
Program Command:
– write 40h
– write Address & Data
(memory enters read status
state after the Program command)
Read Status
Register
do:
– read status register
(E or G must be toggled)
NO
b7 = 1
YES
NO
b3 = 0
YES
NO
b4 = 0
YES
NO
b1 = 0
YES
End
VPP Invalid
Error (1)
Program
Error (1)
Program to Protect
Block Error
while b7 = 0
If b3 = 1, VPP invalid error:
– error handler
If b4 = 1, Program error:
– error handler
If b1 = 1, Program to Protected Block Error:
– error handler
AI03850b
1. If an error is found, the status register must be cleared before further program/erase operations.
59/70