10.2 Unlock Sequence

As an additional layer of protection against memory corruption, a specific code execution unlock sequence is required to initiate a write or erase operation. All interrupts need to be disabled before starting the unlock sequence to ensure proper execution.

Unlock Sequence in C

NVMLOCK = 0x55;
NVMLOCK = 0xAA;
NVMCON0bits.GO = 1;