1 erase sector protection register, 2 program sector protection register – Rainbow Electronics AT45DQ321 User Manual

Page 24

Advertising
background image

24

AT45DQ321 [ADVANCE DATASHEET]

DS-45DQ321-031–DFLASH–12/2012

7.3.1

Erase Sector Protection Register

In order to modify and change the values of the Sector Protection Register, it must first be erased using the Erase Sector
Protection Register command.

To erase the Sector Protection Register, a 4-byte command sequence of 3Dh, 2Ah, 7Fh, and CFh must be clocked into
the device. After the last bit of the opcode sequence has been clocked in, the CS pin must be deasserted to initiate the
internally self-timed erase cycle. The erasing of the Sector Protection Register should take place in a maximum time of
t

PE

. 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.

The Sector Protection Register can be erased with sector protection enabled or disabled. Since the erased state (FFh) of
each byte in the Sector Protection Register is used to indicate that a sector is specified for protection, leaving the sector
protection enabled during the erasing of the register allows the protection scheme to be more effective in the prevention
of accidental programming or erasing of the device. If for some reason an erroneous program or erase command is sent
to the device immediately after erasing the Sector Protection Register and before the register can be reprogrammed,
then the erroneous program or erase command will not be processed because all sectors would be protected.

Table 7-6.

Erase Sector Protection Register Command

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

Command

Byte 1

Byte 2

Byte 3

Byte 4

Erase Sector Protection Register

3Dh

2Ah

7Fh

CFh

3Dh

2Ah

7Fh

CFh

CS

Each transition represents eight bits

SI

Advertising