M58WR064FT, M58WR064FB
Figure 23. Double Word Program Flowchart and Pseudo code
Start
Write 35h
Write Address 1
& Data 1 (3, 4)
Write Address 2
& Data 2 (3)
Read Status
Register (4)
double_word_program_command (addressToProgram1, dataToProgram1,
addressToProgram2, dataToProgram2)
{
writeToFlash (addressToProgram1, 0x35);
/*see note (4)*/
writeToFlash (addressToProgram1, dataToProgram1) ;
/*see note (3) */
writeToFlash (addressToProgram2, dataToProgram2) ;
/*see note (3) */
/*Memory enters read status state after
the Program command*/
do {
status_register=readFlash (addressToProgram) ;
"see note (4)"
/* E or G must be toggled*/
NO
SR7 = 1
YES
} while (status_register.SR7== 0) ;
NO
SR3 = 0
YES
VPP Invalid
Error (1, 2)
if (status_register.SR3==1) /*VPP invalid error */
error_handler ( ) ;
NO
SR4 = 0
Program
Error (1, 2)
if (status_register.SR4==1) /*program error */
error_handler ( ) ;
YES
NO
SR1 = 0
YES
End
Program to Protected
Block Error (1, 2)
if (status_register.SR1==1) /*program to protect block error */
error_handler ( ) ;
}
AI06171b
Note: 1. Status check of SR1 (Protected Block), SR3 (VPP Invalid) and SR4 (Program Error) can be made after each program operation or
after a sequence.
2. If an error is found, the Status Register must be cleared before further Program/Erase operations.
3. Address 1 and Address 2 must be consecutive addresses differing only for bit A0.
4. Any address within the bank can equally be used.
71/87