User Row Programming Sequence

A Row programming sequence typically includes the following steps, subject to the constraints externally imposed by the Security module:

  1. Load NVMSRCADR with the address of data in device RAM.
  2. Load NVMADR with the Flash address to be programmed.
  3. Configure NVMCON to the Row program:
    • WREN = 1
    • PROGOP = 0x2 (see NVMCON)
  4. Set the WR bit.
  5. The program sequence completes and the WR bit is cleared by hardware.
  6. Clear WREN bit to avoid accidental writes.
  7. Test the WRERR bit to ensure the program sequence completed successfully.
Note: Writes to RAM used during Bus Mastered Row programming cannot be protected. Consequently, the user must be aware that inadvertent corruption of this area of RAM is possible during programming.