Security commands, 1 sector lockdown – Rainbow Electronics AT25DL081 User Manual

Page 29

Advertising
background image

29

AT25DL081 [DATASHEET]

8732D–DFLASH–12/2012

10.

Security Commands

10.1 Sector Lockdown

Certain applications require that portions of the Flash memory array be permanently protected against malicious
attempts at altering program code, data modules, security information, or encryption/decryption algorithms, keys, and
routines. To address these applications, the device incorporates a sector lockdown mechanism that allows any
combination of individual 64KB sectors to be permanently locked so that they become read-only. Once a sector is locked
down, it can never be erased or programmed again and it can never be unlocked from the locked-down state.

Each 64KB physical sector has a corresponding single-bit Sector Lockdown Register that is used to control the lockdown
status of that sector. These registers are nonvolatile and will retain their state even after a device power cycle or reset
operation. The following table outlines the two states of the Sector Lockdown Registers.

Issuing the Sector Lockdown command to a particular sector address will set the corresponding Sector Lockdown
Register to the Logical 1 state. Each Sector Lockdown Register can only be set once; therefore, once set to the Logical 1
state, a Sector Lockdown Register cannot be reset back to the Logical 0 state.

Before the Sector Lockdown command can be issued, the Write Enable command must have been previously issued to
set the WEL bit in the Status Register to a Logical 1. In addition, the Sector Lockdown Enabled (SLE) bit in the Status
Register must have also been previously set to the Logical 1 state by using the Write Status Register Byte 2 command
(see

“Write Status Register Byte 2” on page 40

). To issue the Sector Lockdown command, the CS pin must first be

asserted and then the opcode 33h must be clocked into the device followed by three address bytes designating any
address within the 64KB sector to be locked down. After the three address bytes have been clocked in, a confirmation
byte of D0h must also be clocked in immediately following the three address bytes. Any additional data clocked into the
device after the first byte of data will be ignored. When the CS pin is deasserted, the Sector Lockdown Register
corresponding to the sector addressed by A23-A0 will be set to the Logical 1 state and the sector itself will then be
permanently locked down from program and erase operations within a time of t

LOCK

. In addition, the WEL bit in the

Status Register will be reset back to the Logical 0 state.

The three complete address bytes and the correct confirmation byte value of D0h must be clocked into the device before
the CS pin is deasserted, and the CS pin must be deasserted on an even byte boundary (multiples of eight bits);
otherwise, the device will abort the operation. When the device aborts the Sector Lockdown operation, the state of the
corresponding Sector Lockdown Register, as well as the SLE bit in the Status Register, will be unchanged; however, the
WEL bit in the Status Register will be reset to a Logical 0.

As a safeguard against accidental or erroneous locking down of sectors, the Sector Lockdown command can be enabled
and disabled as needed by using the SLE bit in the Status Register. In addition, the current sector lockdown state can be
frozen so that no further modifications to the Sector Lockdown Registers can be made (see

“Freeze Sector Lockdown

State”

). If the Sector Lockdown command is disabled or if the sector lockdown state is frozen, then any attempts to issue

the Sector Lockdown command will be ignored and the device will reset the WEL bit in the Status Register back to a
Logical 0 and return to the idle state once the CS pin has been deasserted.

Table 10-1. Sector Lockdown Register Values

Value

Sector Lockdown Status

0

Sector is not locked down and can be programmed and erased (the default state).

1

Sector is permanently locked down and can never be programmed or erased again.

Advertising