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 dictated by the values of the Block Write-Protect (BP1,
BP0) bits. The ability to write 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 has been set to a logic ‘1’. When the device is
Hardware Write‑Protected, writes to the STATUS register, including the Block
Write‑Protect, WEL and WPEN bits and the sections in the memory array selected by the
Block Write‑Protect bits are disabled. When Hardware Write Protection is enabled, writes
are only allowed to sections of the memory that are not block‑protected.
Hardware Write Protection is disabled when either the
WP pin is high or the WPEN bit is a logic
‘0’. When Hardware Write Protection is disabled, writes are only
allowed to sections of the memory that are not block‑protected. Refer to Table 6-5 for additional information.
0’ as long as
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 |
