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?
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.