AnsweredAssumed Answered

Software-triggered interrupts on the K22F?

Question asked by SCOTT MILLER on Oct 22, 2017
Latest reply on Oct 24, 2017 by SCOTT MILLER

Is there a good way to trigger an interrupt from a write operation on the K22F?  My goal is specifically this:  I've got an external SPI NOR flash that's slow to erase.  During the erase cycle, it has to be constantly polled for completion, and that can take a large fraction of a second.  Rather than set up a periodic interrupt to check up on the progress, I'd prefer to have a DMA channel keep feeding the poll command to SPI and have the result written somewhere that it'll trigger an interrupt as soon as the 'busy' bit in the result clears.


Even if there's nothing specifically designed for that (the ARM Cortex M NVIC manual mentions a Software Trigger Interrupt Register that sounds promising) there are enough peripherals with configurable interrupts and maybe some extra flexibility from the aliased bit-band regions that there *must* be a way to generate an interrupt based on that one changing bit.