UG-549
ADuCM310 Hardware Reference Manual
Rev. C | Page 84 of 192
Flash Controller Abort
Commands (erase, sign, or mass verify) and writes can be aborted upon receipt of an interrupt as listed in Table 63. Aborts are also
possible by writing an abort command to the FEECMD register. However, if flash is being programmed and the routine controlling the
programming is in flash, it is not possible to use the abort command to abort the cycle because instructions cannot be read. Therefore, the
ability to abort a cycle on the assertion of any system interrupt is provided. The FEEAENx register enables aborts upon receipt of an interrupt.
Each bit in the FEEAENx registers corresponds to an interrupt listed in Table 63. Setting a bit in the FEEAENx register enables the
corresponding interrupt to abort flash operations.
When a command or write is aborted via a system interrupt, FEESTA[5:4] indicates an abort (FEESTA[5:4] = 11).
Depending on the state that a write cycle is in when the abort asserts, the write cycle may or may not complete. If the write or erase cycle
did not complete, a fail status of aborted can be read in the status register.
If an immediate response to an interrupt is required during an erase or program cycle, the interrupt service routine and the interrupt
vector table must be moved to SRAM or must be in the other flash block for the duration of the cycle.
If the DMA engine is set up to write a block of data to flash, an interrupt can be set up to abort the current write; however, the DMA engine starts
the next write immediately. The interrupt causing the abort stays asserted so that there is a number of aborted write cycles in this case before the
processor gains access to flash.
When an abort is triggered by an interrupt, all commands are repeatedly aborted until the appropriate FEEAENx bit is cleared or the
interrupt source is cleared.