31.1.10.3 Configuration Write Protect

The CWP register is used to write/erase protect individual pages within CFM. A single register supports the CFM for a 1 Panel system, and Panels 1 and 2 for the dual flash model.

At reset, all CWP bits are set to logic ‘1’, write protecting all user accessible CFM pages. Clearing a CFM page bit within its register removes write protect from the corresponding page.

The CWP register contains write/erase protection control for Configuration Flash Memory (CFM).

All VSS pages are reserved for use by the HSM if the device family supports one. Some pages are always protected from write/erase commands as noted in the access type for the CWP bit.

CWP Lock/Unlock Sequence

This register requires a lock/unlock sequence as described in SFR Write Unlock Values. Any attempt to write to this register when locked will have no effect.

Local Lock Bits

The user may optionally select to prevent further writes to a CWP register bit by also setting the local LOCK bit (in the same register) when writing the CWP value.

When the local lock bit is set (LOCK = 1), subsequent writes to that register bit (even if the unlock sequence is followed) have no effect, creating a “write once’ register bit. Local LOCK bits revert to the unlocked state at reset.

Some bits cannot be modified but show the protection state of the CFM page. VSS pages cannot be modified by the system for devices that have an HSM option and are shown as Read Only.

See CWP Register and HSMCWP Register for full interaction of lock and protection bits.