-1

I have an external device attached to my arm board that generates interrupts in microsecond interval. What I want is a fast irq handler that can just get the jiffies timestamps into an array.

The linux irq handler is acquiring most of the irqs but not really running all the handlers. I am getting 10 ms time for an irq that should run every 25 microsecond. Some handlers have run with 0 delay. Looks like they got queued. How to get a real time IRQ handler?

I am using a qualcomm 800 series board which is really fast.

preetam
  • 1,451
  • 1
  • 17
  • 43
  • Jiffies run at CONFIG_HZ; it is not possible to use them to measure microseconds. – CL. Nov 22 '14 at 15:10
  • I said, an exteral device generates interrupts. I am not setting up a time in the system. I want the IRQs to run faster. IRqs must fire according to the events, not after 20 milliseconds. – preetam Nov 25 '14 at 00:48
  • The interrupts run correctly; you will not be able to notice this if the jiffies increase only every 20 ms. – CL. Nov 25 '14 at 07:41

1 Answers1

0

Jiffies is not the right timestamps you would use and save into an array. What you have to use is a high resolution timer (that provides a timestamps in ns) which is more appropriate compared to jiffies. Jiffies is a global variable incremented based on CONFIG_HZ (usually each 10 ms), but it depends on the platform. If you can clarify the use case targeted, way be that will helps to get the right answer. Using a simple interrupt can cover the need in your case, but you have to keep the right timestamps. Jiffies is not the one.

Anyway, if you are interested by knowing the resolution of your local timer, you can experiment the code posted here : How to implement elapsed time by jiffies

Hope that helps. Aymen.

Community
  • 1
  • 1