6.4.2 Write-Protect Enable Function
The WRSR instruction allows the user to enable or disable the
Write-Protect (WP) pin through the use of the Write-Protect
Enable (WPEN) bit. When the WPEN bit is set to logic ‘0’, the ability
to write to the EEPROM array is determined by the values of the Block Write-Protect
(BP1, BP0) bits. The ability to write to the STATUS register is controlled by the WEL
bit. When the WPEN bit is set to logic ‘1’, the STATUS register is
read-only.
Hardware Write Protection is enabled when both the WP pin is low
and the WPEN bit is set to logic ‘1’. When the device is Hardware
Write‑Protected, writes to the STATUS register—including the Block Write‑Protect, WEL
and WPEN bits—as well as writes to the sections of the memory array selected by the
Block Write‑Protect bits, are disabled. When Hardware Write Protection is enabled,
writes are allowed only to sections of memory that are not block‑protected.
Hardware Write Protection is disabled when either the WP pin is
high or the WPEN bit is set to logic ‘0’. When Hardware Write
Protection is disabled, writes are allowed only to sections of memory that are not
block‑protected. Refer to Table 6-5 for
additional information.
0’ while the
WP pin is held low.| WPEN | WP Pin | WEL | Protected Blocks | Unprotected Blocks | STATUS Register |
|---|---|---|---|---|---|
0 | x | 0 | Protected | Protected | Protected |
0 | x | 1 | Protected | Writable | Writable |
1 | Low | 0 | Protected | Protected | Protected |
1 | Low | 1 | Protected | Writable | Protected |
x | High | 0 | Protected | Protected | Protected |
x | High | 1 | Protected | Writable | Writable |
