3 sector protection register, 1 erase sector protection register – Rainbow Electronics AT45DB161E User Manual
Page 20

20
Adesto AT45DB161E [DATASHEET]
8782D–DFLASH–11/2012
7.3
Sector Protection Register
The nonvolatile Sector Protection Register specifies which sectors are to be protected or unprotected with either the
software or hardware controlled protection methods. The Sector Protection Register contains 16 bytes of data, of which
byte locations 0 through 15 contain values that specify whether Sectors 0 through 15 will be protected or unprotected.
The Sector Protection Register is user modifiable and must be erased before it can be reprogrammed.
illustrates the format of the Sector Protection Register.
Table 7-4.
Sector Protection Register
Note:
1. The default values for bytes 0 through 15 are 00h when shipped from Adesto.
Table 7-5.
Sector 0 (0a, 0b) Sector Protection Register Byte Value
Note:
1. x = Don’t care
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
Sector Number
0 (0a, 0b)
1 to 15
Protected
FFh
Unprotected
00h
Bit 7:6
Bit 5:4
Bit 3:2
Bit 1:0
Data
Value
Sector 0a
(Page 0-7)
Sector 0b
(Page 8-255)
N/A
N/A
Sectors 0a and 0b Unprotected
00
00
XX
XX
0xh
Protect Sector 0a
11
00
XX
XX
Cxh
Protect Sector 0b
00
11
XX
XX
3xh
Protect Sectors 0a and 0b
11
11
XX
XX
Fxh
Command
Byte 1
Byte 2
Byte 3
Byte 4
Erase Sector Protection Register
3Dh
2Ah
7Fh
CFh