s29ns01gs Meet Spansion Inc., s29ns01gs Datasheet - Page 51

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
8.4
April 20, 2009 S29NS-S_00_02
Sector Lock/Unlock Command
Note
To lock large sectors word address bit A6, byte address bit A7, must be 0. If word address bit A6, byte address bit A7 is one on both cycle 3
and 4 then no sectors are locked and no further Sector Lock Range commands are accepted. Bits A0-A3 control locking the small sectors as
described earlier.
Software Function and Sample Code
The Sector Lock/Unlock command sequence allows the system to protect all sectors from accidental writes
or, unprotect one sector to allow programming or erasing of the sector.
When the device is first powered up, all sectors are unlocked by the POR Unlock Mode. To lock all sectors
(enter protected mode), a Sector Lock/Unlock command may be issued to any Sector Address with A6 = V
Once this command is issued, only one sector at a time can be unlocked until power is cycled.
To unlock one sector, the system must write the Sector Lock/Unlock command sequence. Two cycles are first
written: addresses are CAP1 and CAP2 with data 60h. During the third cycle, the sector address (SA) and
unlock command (60h) are written, with address A6 = V
address and the SA identifies the one sector in the device that is unlocked. To again lock the selected sector,
issue a Sector Lock/Unlock command to any Sector Address with A6 = V
invalid, thus the previously unlocked sector is locked. And, because the one sector unlock address is now
invalid, by default all sectors are locked.
The SLR has higher priority than the Sector Lock/Unlock command. If a Sector Unlock command tries to
unlock a Sector within the Sector Lock Range, the Sector will remain in locked state. Also, all sectors in the
part will be locked. This is because attempting to unlock a sector in the SLR will not unlock the addressed
sector and leaves no sector outside the SLR unlocked, thus all sectors remain locked by default.
Similarly, if a Sector that is currently unlocked by the Sector Unlock command is overlapped by a subsequent
Sector Lock Range command, that sector will be locked and program or erase commands for that sector will
be ignored. Also, all sectors in the part will be locked because no sector outside the SLR is unlocked, thus all
sectors remain locked by default.
A Program or Erase operation will check the unlocked Sector Address only at the beginning of the Program or
Erase operation. It is not necessary to keep the sector being Programmed or Erased unlocked during the
operation. The system can change the unlocked Sector after programming or erasing the sector has begun.
An Erase Resume or Program Resume command does not check whether the sector is still unlocked.
Cycle
/* Example: Sector Lock Range Command */
/* Lock a sector range
UINT16 *CAP1 = ((UINT16 *) low_sector_address + 0x555); /* Define CAP1 */
UINT16 *CAP2 = ((UINT16 *) low_sector_address + 0xAAA); /* Define CAP2 */
*CAP1 = 0x0060;
*CAP2 = 0x0060;
*( (UINT16 *)(low_sector_address & 0xFFFFFF80h) ) = 61;
*( (UINT16 *)(high_sector_address & 0xFFFFFF80h) ) = 61;
1
2
3
4
Write First Setup Command to CAP1
Write Second Setup Command to CAP2
Write lowest sector address
Write highest sector address
D a t a
Description
S h e e t
S29NS-S MirrorBit
and not the small sectors */
Table 8.4 Sector Lock Range Command
( P r e l i m i n a r y )
®
Eclipse
Operation
Write
Write
Write
Write
Flash Family
IH
. The A6 = V
Sector Address + 1554h
Sector Address + AAAh
High Sector Address
Low Sector Address
Byte Address
IH
indicates that the SA is a valid
IL
. With A6 = V
Sector Address + AAAh
Sector Address + 555h
High Sector Address
Low Sector Address
Word Address
IL
the SA is made
0060h
0060h
0061h
0061h
Data
IL
51
.

Related parts for s29ns01gs