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.

OMAP-L138: OMAP-L137 : Calculation of HW Interrupt overhead

Part Number: OMAP-L138
Other Parts Discussed in Thread: OMAP-L137, SYSBIOS, , OMAPL138

I am looking at an (inherited) design using the OMAP-L137 with a 16-bit parallel ADC.

As there doesn't appear to be any way that the L137 interfaces seamlessly to a parallel ADC, the ADC pins have been connected to GPIO pins, including one GPIO pin which is used to trigger a HWI when the ADC data is ready. This means that I need to call a HWI on a per sample basis.

I was trying to find out what kind of overhead would be incurred by each of these HWIs and found SPRAAX9, which is not related to this processor (is for C2800), but does give information about the interrupt overheads. If I am reading it correctly, it seems to be suggesting that for a HW Interrupt within DSP/BIOS, there would be an overhead of  217 cycles per HW interrupt, increasing to over 1000 cycles overhead if my HWI posts a semaphore. Doing a HWI outside the RTOS would reduce the number to 16 cycles.  

This would seem to hugely impact the maximum rate at which my ADC would be able to run.

Are equivalent numbers available for the OMAP-L137 ? If not, are the numbers going to be in the same ballpark ?

Also, is this actually the best way to connect a parallel ADC to the L137?

Could a move to the L138 take away much of the overhead by processing the samples through the UPP?

Thanks and regards

Lorraine

 

  • Hi,

    I've notified the design team. They will post their feedback directly here.

    Best Regards,
    Yordan
  • Hello Lorraine,

    Timing benchmarks can be found in the BIOS install directory under packages/ti/sysbios/benchmarks/doc-files. The OMAP-L137 DSP (C6748) benchmarks are listed in the file "TI_C674_ti_platforms_evmTI814X_time.html." It lists 227 cycles for interrupt latency, 113 cycles for the hwi prolog, 138 cycles for the hwi epilog, and 246 cycles for the hwi dispatcher.

    I believe you can reduce these numbers by using Hwi_plug, which basically allows for hardware interrupts without the SYS/BIOS overhead. Take a look at this thread for more info:
    e2e.ti.com/.../372449

    I think using the OMAP-L138's uPP would result in less overhead since the uPP has an internal DMA, but I need to check with the hardware team and get back to you.

    Which ADC are you using?

    Regards,
    Sahin
  • Hi Lorraine,
    Yes please clarify what ADC;s you are using.

    In general uPP maybe better suited for such ADCs , but I have to admit that we have limited eco system in term of software in the Processor SDK and our ability to hook up an ADC directly to the EVM (OMAPL138 LCDK), that makes it harder for customers to evaluate performance in proto /development stage, so you need to be careful about that.

    We do have strong 3P who have hardware and software references around this
    www.criticallink.com/.../

    So please keep that in mind.

    On OMAPL137 the parallel interface to use is the EMIFA .

    This is assuming that the ADCs you are using cannot be used with some of the standard serial ports like SPI etc (likely if the bandwidth requirement is higher).

    Regards
    Mukul
  • Thanks for your prompt and detailed responses.

    It looks like I'm going to have to work with the existing HW at the moment where the ADC is connected into GPIO pins. If/when I get a chance to re-spin the HW, I am sure I'll be back with lots of extra questions regarding EMIF, UPP, ADCs etc

    In the meantime, I need to work out the limitations on the existing HW.

    Can you please look at the calculation below and let me know if I am using the supplied numbers correctly.

    I have a 300MHz L137. My ADC is working at a sampling frequency of 50kHz, so I calculate that I have 6000 L137 clock cycles between hardware interrupts.

    If I estimate that 'user defined' part of my HWI handler will require 100 cycles, then I can estimate that the total processing cycles to handle the HWI will be
    113(dispatcher prolog) + 100(user defined) + 138(dispatcher epilogue) = 351 cycles.
    This would allow me to estimate that handling the HWI will require 351/6000 = 5.85% of my processing power.

    If I want the HWI to post a semaphore to indicate when a buffer has been filled and is ready for processing, then I need to increase my estimate by 47/160/220(?) cycles .

    I have assumed that the interrupt latency is not a factor in this calculation as the L137 will be doing other useful work during that time.

    Does that all make sense ??

    with thanks and regards

    Lorraine
  • Hello Lorraine,

    That looks correct. Although, the TI-RTOS forums will be more qualified to provide advice on the latency of the SYS/BIOS functions.

    Also, if you need general info on the timing benchmarks, you can refer to Appendix B of the SYS/BIOS User's Guide: www.ti.com/.../spruex3t.pdf

    Best,
    Sahin