User Word Programming Sequence
A word programming sequence typically includes the following steps, subject to the constraints externally imposed by the Security module:
- Write data to be programmed to NVMDATAx.
- Load NVMADR with the Flash address to be programmed.
- Configure NVMCON to word
program:
- WREN =
1
- PROGOP = Word program (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 program sequence completed successfully.
Note: Writes to NVMDATAx registers are inhibited while WR =
1
.