31.1.16 Interrupts

The Flash module has an interrupt output that is controlled by INTENSET and INTENCLR. The interrupt status is reported via INTFLAG. A read of either INTENSET or INTENCLR returns the enable state for the specific interrupt condition. The Flash interrupt is asserted if a condition is enabled and its associated bit is set in INTFLAG. Interrupt flags are cleared by writing a 1 to its bit position in the INTFLAG register.

It is recommended to always enable DONE as interrupt source in INTENSET. Using DONE masks side effects of WRERR, RSTERR, BUSERR, and FIFOERR being set before the FCW has finished cleaning up after an error.

The NVM Busy Status (STATUS.BUSY) indicates if the FCW is performing an operation (from the CPU). When NVMOP completes, the FSM clears BUSY and sets Done.

The NVM Operation Done Flag (INTFLAG.DONE) indicates that the FCW has completed an NVMOP (for the CPU).

Note: The FCW does not clear DONE automatically. Also, DONE = 1 does not prevent NVM operations. Therefore, software must clear DONE before the next NVM operation is started.