24.9 Interrupts
An interrupt is generated when the WR bit is cleared by the Flash Controller upon completion of a
Flash program or erase operation. The interrupt event will cause a CPU interrupt if it
was configured and enabled in the Nested Interrupt Vector Controller. See Nested
Vector Interrupt Controller (NVIC) from Related Links for the vector mapping
table. The interrupt occurs regardless of the outcome of the program or erase operation,
successful or unsuccessful. The only exception is the No Operation (NOP) programming
operation (NVMOP = 0
), which is used to manually clear the error flags
and does not create an interrupt event on completion but does clear the WR bit.
The Flash Controller interrupts are not persistent, and, therefore, no additional steps are required to clear the cause or source of the interrupt.
Once the Interrupt Controller is configured, the Flash event causes the CPU to jump to the vector assigned to the Flash event. The CPU starts executing the code at the vector address. The user software at this vector address must perform the required operations and, then, exit.