s29ns01gs Meet Spansion Inc., s29ns01gs Datasheet - Page 42

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
42
Software Functions and Sample Code
The following is a C source code example of using the sector erase function. Refer to the Spansion Low Level
Driver User’s Guide (available on www.spansion.com) for general information on Spansion Flash memory
software development guidelines.
Cycle
/* Example: Sector Erase Command */
UINT16 *CAP1 = ((UINT16 *) sector_address + 0x555); /* Define CAP1 */
UINT16 *CAP2 = ((UINT16 *) sector_address + 0xAAA); /* Define CAP2 */
*CAP1 = 0x0080; /* write the setup command
*CAP2 = 0x0030; /* write the sector erase command
/* poll for completion */
1
2
Write Sector Erase Command to CAP2
Write Erase Setup Command to CAP1
Issue Status Register Read
Addr = CAP1, Data = 70h
Description
Addr = CAP1, Data = 80h
Addr = CAP2, Data = 30h
Addr = (SA), Data = RR
Read Status Register
Issue Sector Erase
Status (bit7=1) ==
S29NS-S MirrorBit
Sector Locked
Erase Error?
Sector Lock
Command
Command
(bit5=1)?
(bit1=1)?
Ready ?
Start
D a t a
Figure 7.6 Sector Erase Flowchart
Yes
Yes
Yes
(LLD Function = lld_SectorEraseCmd)
S h e e t
Table 7.19 Sector Erase
®
Operation
Eclipse
Write
Write
No
No
Sector Erase Error
No
Flash Family
( P r e l i m i n a r y )
Sector Address + 1554h
Sector Address + AAAh
Byte Address
*/
*/
Sector Address + AAAh
S29NS-S_00_02 April 20, 2009
Sector Address + 555h
Completed
Word Address
0080h
0030h
Data

Related parts for s29ns01gs