This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM3352: IRQ latency

Part Number: AM3352

Tool/software: Linux

Hi All, 

I have a question about latency of IRQ in TI-SDK-Am335x. My device driver converts GPIO to IRQ and registers using devm_request.

Driver misses IRQ(IRQ handler is not called ) when the interval between IRQ is 25 Micro seconds. 

Any pointers would be very helpful.  Does it help to change it to INTC ? and How ?

Note: If you need more info let me know.

  • Hi,

    Which version of Linux are you using? Also are you using the RT TI SDK?

    How is your driver being scheduled to run now? Could also please describe GPIO to IRQ and then I assume application stack that you are trying to implement?

    Best Regards,

    Schuyler

  • Linux Version is 3.12.10 and I am using "ti-sdk-am335x-evm-07.00.00.00"

    The driver creates network device and registers as SPI devices with chip select CS0 to talk to slave device. The Slave device triggers IRQ to get SPI-master's attention.

    GPIO to IRQ is used in device driver not in application.
  • Hi Johnnie,

    Since you are using a non-RT kernel, this is to be expected. The kernel turns off interrupts to do various processing. If your interrupt comes in during this time, it will be delayed. Even with RT, meeting 25 usecs is challenging.

    If you want to use Linux, you'll need to find some other way to relax this timing requirement. Or, maybe you could use the PRU to handle this deadline. It has a more real-time nature and allows more full control of such timing requirements like this.
  • Thanks Ron,

    Quick question, do you happen to know the actual IRQ latency in TISDK-Linux with AM335x ? It would help me in adding HW-IRQ timer delay in the FPGA.

    Note: 25 Microsecond described in my query is the time taken to toggle from inactive to active state. In teledyne scope i can see that IRQ is toggled but there is no interrupt triggered in Linux driver.

  • Johnnie,

    Take a look our our RT Latency numbers here:

    http://software-dl.ti.com/processor-sdk-linux/esd/docs/latest/linux/Release_Specific.html#rt-kernel-performance-guide

    Take a look at the OSADL recommended cyclictest and the methodology recommended. I would recommend running something like this in your system to figure out your system's latency. Then, adjust the FPGA logic accordingly.

    Note that the benchmarks are for RT and will be better than non-RT. That's why I recommend running a latency test in your own system to profile it.

    I hope you find this helpful!

    Make it a great day!