I am trying to track the position of a quadrature encoder using edge-triggered (rising & falling) interrupts on the gpio pins of the beagleboard. At the moment, it counts fine if the encoder rotates slowly. If the change is fast, the count “skips” or the interrupts get “stuck”. My estimate for the speed of interrupts is roughly 10kHz. So that’s about 10us between interrupts for the handler to process. I am not exactly sure what the problem is… I suspect that there is too much overheard in scheduling the handler or there is not enough time for the handler to finish before the next interrupt or both.
In system profiler, I can see that the time for the ISR and handler to complete is about 40us. Is this normal?