Threaded IRQ Performance in Jetson Xavier NX


I’m configuring one of the GPIOs as interrupt in my driver and registered the Threaded IRQ as shown below in order to detect the Rising and Falling Edge events.

result = request_threaded_irq(irqNumber, (void *)r_irq_handler, irq_interrupt_thread_fn, IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, "irqHandler", NULL);

In the handler, I’m registering the timestamp to a variable and printing the timestamp in the threaded function. Along with that, I’m printing the difference of Rising and Falling edge also in the threaded function. I’m facing some irregularities in the IRQ handler execution. These are the observations.

  1. In the loaded condition, the execution of IRQ handler got delayed by 10 to 13ms.

  2. If I’m expecting the interval of Rising to Falling edge needs to be constant(ex: 25ms), +/-3 ms deviation is expected, but it’s going upto +/-6ms.

Is this level of deviation expected for Threaded IRQ Implementation, or are there any errors occurring in my implementation? Your assistance in resolving this issue would be greatly appreciated.


Can you please try enabling the RT patch, so IRQ will be given higher priority?

Hi @DaveYYY

Thanks for your reply. I tried with RT patch and it works for me. But it’s creating some other issues in the existing code. So is there any solution other than applying RT patch?. Also, is there any way to change the threaded function priority or interrupt priority?

Some links for your reference:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.