Interrupt can't get cleared | Cypress Semiconductor
Interrupt can't get cleared
I post a lot recently and I hope it's not too much ...
I have an SPI block that requests an interrupt when its FIFO is above 2 bytes. And only under this condition. Sadly the interrupt type I get inside the ISR is SPI done (0x200). This and the fact that the interrupt keeps coming even when the FIFO is completely empty bothers me much because I will be trapped in reoccurring ISR forever without the possibility of leaving it.
I tried like 10 different ways to clear the interrupt and none of them worked. The SPI itself works fine and the first interrupt occurs after the RX FIFO is at 3 bytes which is right. But when I read the 3 bytes and no more bytes get shoved in there (so the count stays 0), The interrupts keep occuring ...
I attached the project and hope someone can give me a tip because it starts to get annoying :(