6.4.3.2.1 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 (0x1)
- 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 program sequence is completed successfully.
Note: Writes to NVMDATAx registers are inhibited while WR = 1.