The GPIO driver API at present presents an impossible situation for reliable interrupt handling.
Explanation of the problem:
There is no function that returns the state of the gpio interrupt register. If byt the time the isr executes, the line is not still in the state that caused the interrupt (whether high or low) then there is no way to know that that line caused an interrupt.
There are two ways to solve this.
Solution 1.: Add a function to the API.
uint32_t Gpio_ReadInterruptStatuBits32( bankpairoffset, uint32_t mask )
uint16_t Gpio_ReadIntStatuBits16( bank,uin16_t mask )
Saves the interrupt status register before clearig the bits specified in mask. The return value is the saved status.
Solution 2: Pass the interrupt status register contents as the argument to the ISR
If the GPIO driver already does this, it is not documented and no tracks are found in the gpio source tree.
(There is perhaps an additioinal issue at the hardware level. Generally interrupts from a peripheral are disabled in its isr and then renabled when the isr returns. New interrupts that are not cleared in the isr then re-trigger the isr. One hopes that the system is bracketing the gpio interrupt routine in this manner, but there is no discussion of it in the GPIO documentation. Also there is not enough description of how the gpio interrupt enbale register works in the gpio user guide, SPRUFL8B. )