Da ta
Shee t
(Prelimi nar y)
Table 7.4
Autoselect Entry in System
(LLD Function = lld_AutoselectEntryCmd)
Cycle
Unlock Cycle 1
Unlock Cycle 2
Autoselect Command
Operation
Write
Write
Write
Byte Address
Base + AAAh
Base + 555h
Base + AAAh
Word Address
Base + 555h
Base + 2AAh
Base + 555h
Data
0x00AAh
0x0055h
0x0090h
Software Functions and Sample Code
Table 7.5
Autoselect Exit
(LLD Function = lld_AutoselectExitCmd)
Cycle
Unlock Cycle 1
Note
1. Any offset within the device works.
2. base = base address.
Operation
Write
Byte Address
base + XXXh
Word Address
base + XXXh
Data
0x00F0h
The following is a C source code example of using the autoselect function to read the manufacturer ID. Refer
to the
Spansion Low Level Driver User’s Guide
www.spansion.com)
for general information on
Spansion Flash memory software development guidelines.
/* Here is an example of Autoselect mode (getting manufacturer ID) */
/* Define UINT16 example: typedef unsigned short UINT16; */
UINT16 manuf_id;
/* Auto Select Entry */
*( (UINT16 *)base_addr + 0x555 ) = 0x00AA; /* write unlock cycle 1 */
*( (UINT16 *)base_addr + 0x2AA ) = 0x0055; /* write unlock cycle 2 */
*( (UINT16 *)base_addr + 0x555 ) = 0x0090; /* write autoselect command */
/* multiple reads can be performed after entry */
manuf_id = *( (UINT16 *)base_addr + 0x000 ); /* read manuf. id */
/*
Autoselect exit */
*( (UINT16 *)base_addr + 0x000 ) = 0x00F0; /* exit autoselect (write reset command) */
November 8, 2007 S29GL-P_00_A7
S29GL-P MirrorBit
®
Flash Family
23