2 program sector protection register – Rainbow Electronics AT45DB642 User Manual

Page 21

Advertising
background image

21

AT45DB321E [PRELIMINARY DATASHEET]

8784B–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 64 bytes of data corresponding to Sectors 0 through 63. 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 64 bytes, then the protection status of the
last 62 sectors cannot be guaranteed. Furthermore, if more than 64 bytes of data is clocked into the device,
then the data will wrap back around to the beginning of the register. For instance, if 65 bytes of data are
clocked in, then the 65th 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 + 63

CS

Each transition represents eight bits

SI

Advertising