6.1.8.2 Panel Erase

The Program Flash Memory (PFM) can be erased using the respective Higher Addressed or Lower Addressed Panel Erase NVMOP command. These commands leave the boot/config Flash intact. A single panel can be erased if its associated page write protection is not enabled.

Follow this sequence of steps to erase a panel:

  1. The PFM runs the following unlock sequence using the selected panel erase command to start the sequence:
    1. Set NVMCON.WREN = 1 (allow writes to NVMCON.NVMWR), and set NVMCON.NVMOP to LOWER_ERASE (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 begins the FC operation.
    Note: The erase sequence completes when the hardware clears the NVMCOM.NVMWR bit. This generates an interrupt.
  2. Clear the NVMCON.NVMWREN bit.
  3. Check the NVMCON.NVMERR and NVMCON.BORERR bits to ensure that the erase sequence completes successfully.