S29PL-N_07 SPANSION [SPANSION], S29PL-N_07 Datasheet - Page 28

no-image

S29PL-N_07

Manufacturer Part Number
S29PL-N_07
Description
256/128/128 Mb (16/8/8 M x 16-Bit) CMOS, 3.0 Volt-only Simultaneous Read/Write, Page-Mode Flash Memory
Manufacturer
SPANSION [SPANSION]
Datasheet
28
Software Functions and Sample Code
Notes
1. Base = Base Address.
2. Last = Last cycle of write buffer program operation; depending on number of words written, the total number of cycles can be from 6 to 37.
3. For maximum efficiency, it is recommended that the write buffer be loaded with the highest number of words (N words) possible.
The following is a C source code example of using the write buffer program function. See the Spansion Low
Level Driver User’s Guide (available on www.spansion.com) for general information on Spansion Flash
memory software development guidelines.
5 to 36
Cycle
/* Example: Write Buffer Programming Command
/* NOTES: Write buffer programming limited to 16 words. */
/*
/*
/*
/*
loop:
confirm:
/* Example: Write Buffer Abort Reset */
Last
UINT16 *src = source_of_data;
UINT16 *dst = destination_of_data;
UINT16 wc
*((UINT16 *)base_addr + 0x555) = 0x00AA;
*((UINT16 *)base_addr + 0x2AA) = 0x0055;
*((UINT16 *)sector_address)
*((UINT16 *)sector_address)
*dst = *src; /* ALL dst MUST BE SAME PAGE */ /* write source data to destination */
dst++;
src++;
if (wc == 0) goto confirm
wc--;
goto loop;
*((UINT16 *)sector_address)
/* poll for completion */
*((UINT16 *)addr + 0x555) = 0x00AA;
*((UINT16 *)addr + 0x2AA) = 0x0055;
*((UINT16 *)addr + 0x555) = 0x00F0;
1
2
3
4
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 0x20.
Write Buffer Load Command
Write Buffer to Flash
= words_to_program -1;
Load Buffer Word N
Write Word Count
(LLD Functions Used = lld_WriteToBufferCmd, lld_ProgramBufferToFlashCmd)
Description
Number of words (N) loaded into the write buffer can be from 1 to 32 words.
Unlock
Unlock
S29PL-N MirrorBit
D a t a
Table 7.8 Write Buffer Program
= 0x0025;
= wc;
= 0x0029;
S h e e t
Operation
Write
Write
Write
Write
Write
Write
Flash Family
/* write unlock cycle 1
/* write unlock cycle 2
/* write buffer abort reset
( P r e l i m i n a r y )
/* write unlock cycle 1
/* write unlock cycle 2
/* write write buffer load command */
/* write word count (minus 1)
/* write confirm command
/* flash destination address
/* address of source data
/* word count (minus 1)
/* increment destination pointer
/* increment source pointer
/* done when word count equals zero */
/* decrement word count
/* do it again
Program Address, Word N
Program Address
Program Address
Word Address
Sector Address
Base + 2AAh
Base + 555h
*/
*/
*/
*/
*/
S29PL-N_00_A5 June 6, 2007
Word Count (N–1)h
*/
*/
*/
Word N
00AAh
0055h
0025h
0029h
Data
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/

Related parts for S29PL-N_07