S29WS-P SPANSION [SPANSION], S29WS-P Datasheet - Page 42

no-image

S29WS-P

Manufacturer Part Number
S29WS-P
Description
512/256/128 Mb (32/16/8 M x 16 bit) 1.8 V Burst Simultaneous Read/Write MirrorBit Flash Memory
Manufacturer
SPANSION [SPANSION]
Datasheet
40
Software Functions and Sample Code
The following are C source code examples of using the unlock bypass entry, program, and exit functions.
Refer to the Spansion Low Level Driver User’s Guide (available soon on www.spansion.com) for general
information on Spansion Flash memory software development guidelines.
Cycle
Cycle
Cycle
/* Example: Unlock Bypass Entry Command
/* Example: Unlock Bypass Program Command
/* Do while in Unlock Bypass Entry Mode!
/* Example: Unlock Bypass Exit Command */
1
2
3
1
2
1
2
*( (UINT16 *)bank_addr + 0x555 ) = 0x00AA;
*( (UINT16 *)bank_addr + 0x2AA ) = 0x0055;
*( (UINT16 *)bank_addr + 0x555 ) = 0x0020;
/* At this point, programming only takes two write cycles.
/* Once you enter Unlock Bypass Mode, do a series of like
/* operations (programming or sector erase) and then exit
/* Unlock Bypass Mode before beginning a different type of
/* operations.
*( (UINT16 *)bank_addr + 0x555 ) = 0x00A0;
*( (UINT16 *)pa )
/* Poll until done or error.
/* If done and more to program, */
/* do above two cycles again.
*( (UINT16 *)base_addr + 0x000 ) = 0x0090;
*( (UINT16 *)base_addr + 0x000 ) = 0x0000;
Program Setup Command
Program Command
Reset Cycle 1
Reset Cycle 2
Description
Description
Entry Command
Description
Unlock
Unlock
D a t a
(LLD Function = lld_UnlockBypassProgramCmd)
S h e e t
(LLD Function = lld_UnlockBypassResetCmd)
(LLD Function = lld_UnlockBypassEntryCmd)
Table 7.33 Unlock Bypass Program
Table 7.34 Unlock Bypass Reset
Table 7.32 Unlock Bypass Entry
Operation
Operation
S29WS-P
Write
Write
Write
Write
Operation
*/
*/
= data;
Write
Write
Write
( A d v a n c e
Program Address
Byte Address
Byte Address
*/
*/
*/
Base + xxxh
Base + xxxh
Base + xxxh
Byte Address
Base + AAAh
Base + AAAh
Base + 554h
/* write unlock cycle 1
/* write unlock cycle 2
/* write unlock bypass command
/* write program setup command
/* write data to be programmed
I n f o r m a t i o n )
Program Address
Word Address
Word Address
S29WS-P_00_A7 November 8, 2006
Base +xxxh
Base +xxxh
Base +xxxh
Word Address
Base + 2AAh
Base + 555h
Base + 555h
*/
*/
*/
*/
*/
Program Data
00A0h
0090h
0000h
00AAh
Data
0055h
0020h
Data
Data
*/
*/
*/
*/
*/

Related parts for S29WS-P