Periodic Interrupt timers in Colibri iMX7D

Hi everyone,

I would like to syncronize the threads of my application by using periodic timer interrupt.
Is it possible in iMX7?
If yes, is it better to use an FTM or a GPT?
With you colibri evaluation board, I tried to enable flextimer1 in the device tree but in /proc/interrupts i cannot see the interrupts.
There is an example to follow about how to configure a generic timer?

Thank you very much,

Luca

Hi Luca

Could you provide the software version of your module?

I would like to syncronize the threads of my application by using periodic timer interrupt. Is it possible in iMX7?

What is your application? What are you trying to achieve?

With you colibri evaluation board, I tried to enable flextimer1 in the device tree but in /proc/interrupts i cannot see the interrupts.

How did you enable the Flextimer?

Best regards,
Jaski

Hi @jaski.tx ,

The kernel version is 4.9.166-rt125-2.8.6.

I would like that each thread, at the end of its cycle, put itself in wait for an event.
For each thread, I’d like to define a timeout used by, for example, an interrupt handler in order to wake up a specific thread.

es:

thread 1 -> 100 ms
thread 2 -> 50 ms

With a periodic interrupt of, for example, 1ms I could increment a counter per each interrupt and verify which thread to wake up

count 50 -> wake thread 2
count 100 -> wake thread 1 and 2
count 150 -> wake thread 2

The scope is to have syncronouse thread executions dictated by a specific timer.

Simpy, I enabled flextimer in this way in my .dts:

&flextimer1 {
        status = "okay";
};

But I suppose that something else has to be defined.

I hope my explanation was clear!

Thanks for your help,

Luca

Hi Luca

Thanks for the Information.

To do the thread synchronization, you need to use Mutex lock as explained here and here.

For further information using Flextimer, please have a look at the Documentation of Flextimer.

Best regards,
Jaski