English
Language : 

M58WR128ET Datasheet, PDF (72/87 Pages) STMicroelectronics – 128 Mbit 8Mb x 16, Multiple Bank, Burst 1.8V Supply Flash Memory
M58WR128ET, M58WR128EB
Figure 24. Quadruple Word Program Flowchart and Pseudo Code
Start
Write 56h
Write Address 1
& Data 1 (3, 4)
Write Address 2
& Data 2 (3)
Write Address 3
& Data 3 (3)
Write Address 4
& Data 4 (3)
Read Status
Register (4)
quadruple_word_program_command (addressToProgram1, dataToProgram1,
addressToProgram2, dataToProgram2,
addressToProgram3, dataToProgram3,
addressToProgram4, dataToProgram4)
{
writeToFlash (addressToProgram1, 0x56);
/*see note (4) */
writeToFlash (addressToProgram1, dataToProgram1) ;
/*see note (3) */
writeToFlash (addressToProgram2, dataToProgram2) ;
/*see note (3) */
writeToFlash (addressToProgram3, dataToProgram3) ;
/*see note (3) */
writeToFlash (addressToProgram4, dataToProgram4) ;
/*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
NO
SR3 = 0
YES
NO
SR4 = 0
YES
NO
SR1 = 0
YES
End
} while (status_register.SR7== 0) ;
VPP Invalid
Error (1, 2)
if (status_register.SR3==1) /*VPP invalid error */
error_handler ( ) ;
Program
Error (1, 2)
if (status_register.SR4==1) /*program error */
error_handler ( ) ;
Program to Protected
Block Error (1, 2)
if (status_register.SR==1) /*program to protect block error */
error_handler ( ) ;
}
AI06977b
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 to Address 4 must be consecutive addresses differing only for bits A0 and A1.
4. Any address within the bank can equally be used.
72/87