We are having some issues with the GPIO interrupts (on the DSP side) on the OMAP L-138. We are interrupting on both the rising and falling edges of GPIO bank 5 pin 14 and GPIO bank 4 pin 0. When both interrupts are active we are sometimes seeing one of the interrupts (in all cases so far the one for GPIO bank 5 pin 14) not set the INTSTAT when we enter our interrupt routine . We setup our code to have any external source continuously pulse the GPIO5 pin 14 and we tied one of our GPIO outputs (that we toggle in the code) to GPIO 4 pin 0. As we increase how often we toggle the GPIO output that is connected to GPIO4 pin 0, we started to see interrupts appear on GPIO bank 5 that we didn’t recognize - we are checking the INTSTAT bit to determine the cause of the interrupt and added some debug code to capture a GPIO bank 5 interrupts that we don’t recognize. When we looked at this closer we realized when we hit the breakpoint indicating we didn’t recognize the interrupt, the INTSTAT bit was correct (we are checking the INTSTAT[2] bits while in the ISR). It looks like the INTSTAT bit was not set when we checked it at the start of the ISR but was set by the time we hit the breakpoint later in the ISR. When does the INTSTAT bit corresponding to the interrupt get set? (We assumed it was set as soon as the interrupt occurred.)
We are mapping the GPIO bank 4 and 5 interrupts to hardware interrupt 8 (we tried mapping GPIO bank 4 to hardware interrupt 8 and bank 5 to hardware interrupt 9 but we still saw the same problem), with the Dispatcher enabled. Our pulse width on GPIO5 pin 14 is ~270 mircoseconds spaced 1 second apart. Therefore we will get a two bank 5 interrupts 270 mircoseconds apart, followed by a 1 second delay. We are spending ~ 2 – 4 microseconds in the interrupt routine for bank 5. We toggle the input to GPIO4 pin 0 every 20 msec. We are enabling interrupt events 54 and 59 in the DSP and set the ARM to ignore these interrupts. We are calling Gpio_clearInterruptStatus() to clear the INTSTAT bit once we determine the interrupt(we got this routine from TI example code). We are using CCS3.3 with bios 5.41.03.17.
EW