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:
- The PFM runs the following unlock
sequence using the selected panel erase command to start the sequence:
- Set NVMCON.WREN =
1
(allow writes to NVMCON.NVMWR), and set NVMCON.NVMOP to LOWER_ERASE (using a single write). - Set NVMKEY = 0x00000000 (reset key).
- Set NVMKEY = 0xAA996655.
- Set NVMKEY = 0x556699AA.
- 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. - Set NVMCON.WREN =
- Clear the NVMCON.NVMWREN bit.
- Check the NVMCON.NVMERR and NVMCON.BORERR bits to ensure that the erase sequence completes successfully.