beautypg.com

5 global protect/unprotect – Rainbow Electronics AT25DF081A User Manual

Page 21

background image

21

8715C–SFLSH–11/2012

AT25DF081A

9.5

Global Protect/Unprotect

The Global Protect and Global Unprotect features can work in conjunction with the Protect Sector and Unprotect
Sector functions. For example, a system can globally protect the entire memory array and then use the Unprotect
Sector command to individually unprotect certain sectors and individually reprotect them later by using the Protect
Sector command. Likewise, a system can globally unprotect the entire memory array and then individually protect
certain sectors as needed.

Performing a Global Protect or Global Unprotect is accomplished by writing a certain combination of data to the
Status Register using the Write Status Register Byte 1 command (see

“Write Status Register Byte 1” on page 35

for command execution details). The Write Status Register command is also used to modify the SPRL (Sector Pro-
tection Registers Locked) bit to control hardware and software locking.

To perform a Global Protect, the appropriate WP pin and SPRL conditions must be met, and the system must write
a logical “1” to bits five, four, three, and two of the first byte of the Status Register. Conversely, to perform a Global
Unprotect, the same WP and SPRL conditions must be met but the system must write a logical “0” to bits five, four,
three, and two of the first byte of the Status Register.

Table 9-2

details the conditions necessary for a Global Pro-

tect or Global Unprotect to be performed.

Table 9-2.

Valid SPRL and Global Protect/Unprotect Conditions

WP

State

Current

SPRL
Value

New Write Status

Register Byte 1

Data

Protection Operation

New

SPRL
Value

Bit

7 6 5 4 3 2 1 0

0

0

0 x 0 0 0 0 x x
0 x 0 0 0 1 x x

0 x 1 1 1 0 x x
0 x 1 1 1 1 x x

1 x 0 0 0 0 x x
1 x 0 0 0 1 x x

1 x 1 1 1 0 x x
1 x 1 1 1 1 x x

Global Unprotect – all Sector Protection Registers reset to 0
No change to current protection.
No change to current protection.
No change to current protection.
Global Protect – all Sector Protection Registers set to 1

Global Unprotect – all Sector Protection Registers reset to 0
No change to current protection.
No change to current protection.
No change to current protection.
Global Protect – all Sector Protection Registers set to 1

0
0
0
0
0

1
1
1
1
1

0

1

x x x x x x x x

No change to the current protection level. All sectors currently protected will remain protected
and all sectors currently unprotected will remain unprotected.

The Sector Protection Registers are hard-locked and cannot be changed when the WP pin is
LOW and the current state of SPRL is 1. Therefore, a Global Protect/Unprotect will not occur.
In addition, the SPRL bit cannot be changed (the WP pin must be HIGH in order to change
SPRL back to a 0).

1

0

0 x 0 0 0 0 x x
0 x 0 0 0 1 x x

0 x 1 1 1 0 x x
0 x 1 1 1 1 x x

1 x 0 0 0 0 x x
1 x 0 0 0 1 x x

1 x 1 1 1 0 x x
1 x 1 1 1 1 x x

Global Unprotect – all Sector Protection Registers reset to 0
No change to current protection.
No change to current protection.
No change to current protection.
Global Protect – all Sector Protection Registers set to 1

Global Unprotect – all Sector Protection Registers reset to 0
No change to current protection.
No change to current protection.
No change to current protection.
Global Protect – all Sector Protection Registers set to 1

0
0
0
0
0

1
1
1
1
1