7.3.2.2 Flash Programming Operations

A program or erase operation is necessary for programming or erasing the internal Flash program memory. The following operations can be used to modify the Flash contents.

  1. Word program
  2. Row program
  3. Page erase

Setting the WR bit (NVMCON[15]) starts the operation. The WR bit is automatically cleared when the operation is finished.

The CPU stalls until the programming operation is finished. The CPU will not execute any instructions or respond to interrupts during this time. If any interrupts occur during the programming cycle, they will remain pending until the cycle completes.

Note: In the event of any Reset other than a POR or BOR, the erase or program operation underway can complete while the device resets.