6.4.3.1.1 User Page Erase Sequence
Executing a page erase sequence typically includes the following user code steps, subject to the constraints externally imposed by the Security module:
- Load NVMADR with an address within the page to be erased.
- Configure NVMCON to page erase:
- WREN = 1
- PROGOP = Page erase (0x3)
- Set the WR bit.
- The program sequence is completed and the WR bit is cleared by hardware.
- Clear WREN bit.
- Test the WRERR bit to ensure the erase sequence is completed successfully.