s29ns01gs Meet Spansion Inc., s29ns01gs Datasheet - Page 39

no-image

s29ns01gs

Manufacturer Part Number
s29ns01gs
Description
S29ns01gs 1024 Megabit 128 Megabyte 16-bit Data Width, Burst Access, Simultaneous Read/write, 1.8 Volt-only Flash Memory In 65 Nm Mirrorbit Technology
Manufacturer
Meet Spansion Inc.
Datasheet
April 20, 2009 S29NS-S_00_02
Software Functions and Sample Code
Notes
1. Last = Last cycle of write buffer program operation; depending on number of words written, the total number of cycles may be from 4 to
2. For maximum efficiency, it is recommended that the write buffer be loaded with the highest number of words (N words) possible.
3. For all address locations where A3=1, PD must be FFFFh
Note: The example above assumes that the data to be programmed using the Bit-Field Programming
command is stored contiguously in source_of_data. If the data in source_of_data is stored with the reserved
area taken into account. (16 bytes of data followed by 16 bytes of FF) Then the code example in the Page
Programming command must be used with the 0x0025 (write buffer load command) rather than with 0x00BF.
Note: The source data buffer must contain FFs in locations corresponding to the reserved areas, and the
word count (wc) should include the total number of words including the reserved areas.
3 to 258
Cycle
Last
259.
/* Example: Bit-Field Programming Command
/* NOTES: Bit-Field programming limited to 128 words. */
/* All addresses to be written to the flash in
/* one operation must be within the same flash
/* page. A flash page begins at addresses
/* evenly divisible by 0x200.
/* The destination address must have A4=0.
UINT16 *src = source_of_data;
UINT16 *dst = destination_of_data; /* flash destination address */
UINT16 wc = words_to_program;
UINT16 *CAP1 = ((UINT16 *) sector_address + 0x555); /* Define CAP1 */
UINT16 *CAP2 = ((UINT16 *) sector_address + 0xAAA); /* Define CAP2 */
*CAP1 = 0x00BF; /* write bit-field load command */
*CAP2 = wc - 1; /* write word count (minus 1)
do /* write all source data to destination */
{
*dst = *src; /* ALL dst MUST BE SAME PAGE */
dst++; /* increment destination pointer */
src++; /* increment source pointer */
wc--; /* decrement word count */
} while (wc != 0); /* loop until all words are moved */
1
2
Write Buffer Load Command to CAP1
Write Word Count to CAP2
Write Buffer to flash Command to CAP1
D a t a
Description
S h e e t
S29NS-S MirrorBit
Number of words (N) loaded into the write buffer can be from 1 to 256
( P r e l i m i n a r y )
Table 7.16 Bit Field Program
Operation
®
Write
Write
Write
Eclipse
/* address of source data */
/* word count */
Sector Address + 1554h
Sector Address + AAAh
Sector Address + AAAh
Flash Family
Byte Address
*/
*/
*/
*/
*/
*/
*/
Sector Address + AAAh
Sector Address + 555h
Sector Address + 555h
Word Address
Word Count (N-1)
00BFh
0029h
Data
39

Related parts for s29ns01gs