6.1.7.1 Single or Quad Word Programming Sequence

Follow this sequence of steps for single word or quad word programming:

  1. Write data to be programmed into the NVMDATA0 register for a single word, NVMDATA0-3 for a quad word.
  2. Load NVMADDR with the address to be programmed.
  3. Run the following sequencer start unlock sequence using a word (quad) program command to start the sequence:
    1. Set NVMCON.WREN = 1 (allow writes to NVMCON.NVMWR), and set NVMCON.NVMOP to the desired operation WORD or QUAD (using a single write).
    2. Set NVMKEY = 0x00000000 (reset key).
    3. Set NVMKEY = 0xAA996655.
    4. Set NVMKEY = 0x556699AA.
    5. Write to the target register NVMCONSET to set the NVMWR bit (not the NVMCON register itself). This starts the FC operation.
    Note: The program sequence completes when the hardware clears the NVMCON.NVMWR bit. This pulses the Flash event.
  4. Clear the NMVCOM.WREN bit.
  5. Check the NVMCON.NVMERR and NVMCON.BORERR bits to ensure that the programming is successful.