English
Language : 

M58PR256J Datasheet, PDF (98/114 Pages) STMicroelectronics – 256 Mbit or 512 Mbit (x16, Multiple Bank, Multilevel, Burst) 1.8 V supply Flash memories
Flowcharts and pseudo codes
M58PR256J, M58PR512J
Figure 21.
Buffer Program flowchart and pseudo code
Start
Read Status
Register 70h command,
at Bank Address
Buffer_Program_command (Start_Address, n, buffer_Program[] )
/*The start address must be aligned to a 1KB boundary
buffer_Program [] is an array structure used to store the address and
data to be programmed to the Flash memory (the address must be within
the segment Start Address and Start Address+n) */
{
NO
SR7 = 1
YES
Buffer Program E9h
command, Block Address
status_register=readFlash (Bank_Address);
} while (status_register.SR7==0);
do {writeToFlash (Block_Address, 0xE9) ;
Write n(1),
Start Address
writeToFlash (Start_Address, n);
Write Buffer Data,
Start Address
X=0
writeToFlash (buffer_Program[0].address, buffer_Program[0].data);
/*buffer_Program[0].address is the start address*/
x = 0;
X=n
YES
NO
Write Next Buffer Data,
Next Program Address(2)
X=X+1
Program
Buffer to Flash
Confirm D0h
while (x<n)
{ writeToFlash (buffer_Program[x+1].address, buffer_Program[x+1].data);
x++;
}
writeToFlash (Start_Address, 0xD0);
Read Status
Register
do {status_register=readFlash (Start_Address);
NO
SR7 = 1
} while (status_register.SR7==0);
YES
Full Status
Register Check(3)
End
full_status_register_check();
}
AI10516b
1. n + 1 is the number of data being programmed. The maximum buffer count is 1FF (512 Words).
2. Next Program data is an element belonging to buffer_Program[].data; Next Program address is an element belonging to
buffer_Program[].address. In a Program Region configured in Control Program mode buffer_Program[].data = FFFFh if A3
= 1.
3. Routine for Error Check by reading SR3, SR4 and SR1.
98/114