English
Language : 

S29NS-P Datasheet, PDF (35/86 Pages) SPANSION – MirrorBit Flash Family
Data Sheet (Advance Information)
/* Here is an example of Autoselect mode (getting manufacturer ID) */
/* Define UINT16 example: typedef unsigned short UINT16; */
UINT16 manuf_id;
/* Auto Select Entry */
*( (UINT16 *)bank_addr + 0x555 ) = 0x00AA; /* write unlock cycle 1 */
*( (UINT16 *)bank_addr + 0x2AA ) = 0x0055; /* write unlock cycle 2 */
*( (UINT16 *)bank_addr + 0x555 ) = 0x0090; /* write autoselect command */
/* multiple reads can be performed after entry */
manuf_id = *( (UINT16 *)bank_addr + 0x000 ); /* read manuf. id */
/* Autoselect exit */
*( (UINT16 *)base_addr + 0x000 ) = 0x00F0; /* exit autoselect (write reset command) */
6.5
Program/Erase Operations
These devices are capable of several modes of programming and or erase operations which are described in
detail in the following sections. However, prior to any programming and or erase operation, devices can be
setup appropriately as outlined in the configuration register (Table 6.11).
For any program and or erase operations, including writing command sequences, the system must drive
AVD# and CE# to VIL, and OE# to VIH when providing an address to the device, and drive WE# and CE# to
VIL, and OE# to VIH when writing commands or programming data.
All addresses are latched on the rising edge of AVD# or falling edge of WE#, and all data is latched on the
first rising edge of WE#.
Note the following:
„ When the Embedded Program/Erase algorithm is complete, the device returns to the read mode.
„ The system can determine the status of the Program/Erase operation. Refer to the Write Operation Status
section for further information.
„ While 1 can be programmed to 0, a 0 cannot be programmed to a 1. Any such attempt is ignored as only
an erase operation can covert a 0 to a 1.
„ Any commands written to the device during the Embedded Program/Erase Algorithm are ignored except
the Program/Erase Suspend command.
„ Secured Silicon Sector, Autoselect, and CFI functions are unavailable when a program operation is in
progress.
„ A hardware reset or power removal immediately terminates the Program/Erase operation and the Program/
Erase command sequence should be reinitiated once the device has returned to the read mode, to ensure
data integrity.
„ Programming is allowed in any sequence and across sector boundaries only for single word programming
operation. See Write Buffer Programming when using the write buffer.
Note: The system may also lock or unlock any sector while the erase operation is suspended.
6.5.1
Single Word Programming
Single word programming mode is the simplest method of programming. In this mode, four Flash command
write cycles are used to program an individual Flash address. While the single word programming method is
supported by all Spansion devices, in general it is not recommended for devices that support Write Buffer
Programming. See Table 11.1 for the required bus cycles and Figure 6.2 for the flowchart.
February 20, 2007 S29NS-P_00_A1
S29NS-P MirrorBitTM Flash Family
35