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/AM5728: High precision interrupt

Part Number: AM5728

Tool/software: Linux

Hi Sitara team,

After following  "Building the SDK" in  "Processor SDK Linux Software Developer’s Guide"

I was able to build rt linux, and I am able to boot the board. Kernel version is 4.9.65.

To run my application on the board I require a high precision interrupt that will drive my kernel module.

I also need the ability to make minor adjustments to the interrupt frequency on the fly.

These adjustments are very delicate, that's why I need that the interrupt will be driven by a high frequency clock, in the MHz range.

After reviewing arch/arm/mach-omap2/timer.c I'm not sure if OMAP gp timers are good enough because these timers are driven by a 32KHz clock, that is too crude for my needs.

Could any one point out an example of suitable functionality?

Thanks a lot,

Nir.

  • Hi,

    At the moment I am not aware of any timer examples like what you are asking for kernel level modules. Typically TI supports SOC drivers and system latency application level questions. I will check on a possible suggestion to do what your asking. Could you describe the timer resolution you are looking for, you mentioned MHz? Could you also describe how the adjustments would be made? Would this run only in a kernel module?

    Best Regards,
    Schuyler
  • Hi,

    I will try to clarify my needs.

    I have a kernel module in which I have a function that must be invoked every 1ms, in hard real time accuracy, and the lowest jitter possible.
    Furthermore, during runtime I need to make very fine adjustments to the interrupt frequency on the fly, making the interrupt cycle time a little bit longer or shorter.

    In my x86 platform I invoke this function from the context of HPET ISR, after configuring the interrupt frequency to fire every 1ms, and I'm able to modify the load register of the timer on the fly, thus affecting the cycle time of the periodic interrupt.

    I'm new to am5728, on which I'm trying to set up my system now.
    If exists, a pointer to something that resembles the functionality I need would be great.
    If not, a recommendation on a high precision event timer in the CPU and an example of use in the kernel would also be great.

    Thanks a lot.
  • Hi,
    Just an update, if you perform this command you can see the source clock for each timer using the pre-built images from the TI SDK.

    cat /sys/kernel/debug/clk/clk_summary | grep timer

    According to the TRM each timer can be selected with either 32KHz or the system clock. On the AM5728 gp-evm most of the timers are set to using the 20MHz system clock. Some of these timers are used by the other SOC drivers.

    Which peripherals were planning to use in your system?

    Best Regards,
    Schuyler
  • I needed something similar to this:

    e2e.ti.com/.../467959

    Thank you