2 program sector protection register – Rainbow Electronics AT45DB041E User Manual

Page 21

Advertising
background image

21

AT45DB041E [ADVANCE DATASHEET]

8783B–DFLASH–11/2012

Figure 7-4. Erase Sector Protection Register

7.3.2

Program Sector Protection Register

Once the Sector Protection Register has been erased, it can be reprogrammed using the Program Sector Protection
Register command.

To program the Sector Protection Register, a 4-byte command sequence of 3Dh, 2Ah, 7Fh, and FCh must be clocked
into the device followed by eight bytes of data corresponding to Sectors 0 through 7. After the last bit of the opcode
sequence and data have been clocked in, the CS pin must be deasserted to initiate the internally self-timed program
cycle. The programming of the Sector Protection Register should take place in a maximum time of t

P

. During this time,

the RDY/BUSY

bit in the Status Register will indicate that the device is busy. If the device is powered-down before the

completion of the erase cycle, then the contents of the Sector Protection Register cannot be guaranteed.

If the proper number of data bytes is not clocked in before the CS pin is deasserted, then the protection status of the
sectors corresponding to the bytes not clocked in cannot be guaranteed.

Example:

If only the first two bytes are clocked in instead of the complete eight bytes, then the protection status of the
last 14 sectors cannot be guaranteed. Furthermore, if more than eight bytes of data is clocked into the
device, then the data will wrap back around to the beginning of the register. For instance, if nine bytes of
data are clocked in, then the ninth byte will be stored at

byte location 0 of the Sector Protection Register.

The data bytes clocked into the Sector Protection Register need to be valid values (0xh, 3xh, Cxh, and Fxh for Sector 0a
or Sector 0b, and 00h or FFh for other sectors) in order for the protection to function correctly. If a non-valid value is
clocked into a byte location of the Sector Protection Register, then the protection status of the sector corresponding to
that byte location cannot be guaranteed.

Example:

If a value of 17h is clocked into byte location 2 of the Sector Protection Register, then the protection status
of Sector 2 cannot be guaranteed.

The Sector Protection Register can be reprogrammed while the sector protection is enabled or disabled. Being able to
reprogram the Sector Protection Register with the sector protection enabled allows the user to temporarily disable the
sector protection to an individual sector rather than disabling sector protection completely.

The Program Sector Protection Register command utilizes Buffer 1 for processing. Therefore, the contents of Buffer 1
will be altered from its previous state when this command is issued.

Table 7-7.

Program Sector Protection Register Command

Figure 7-5. Program Sector Protection Register

3Dh

2Ah

7Fh

CFh

CS

Each transition represents eight bits

SI

Command

Byte 1

Byte 2

Byte 3

Byte 4

Program Sector Protection Register

3Dh

2Ah

7Fh

FCh

Data Byte

n

3Dh

2Ah

7Fh

FCh

Data Byte

n + 1

Data Byte

n + 7

CS

Each transition represents eight bits

SI

Advertising