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 (see NVMCON)
- WREN =
- Set the WR bit.
- The program sequence completes and the WR bit is cleared by hardware.
- Clear WREN bit.
- Test the WRERR bit to ensure the erase sequence completed successfully.