Hi Pavel
Thank you for the reply. You understood me correctly, i'm looking for a method for demodulating IR code.
If I go back to my solution using flextimers, I have an issue whenever input signals are more than 450 kHz and my system has an requirement of handling frequency up to 500kHz .
It uses a lot of resources with high frequency inputs, as the ISR is called very often and I'm not able to control if the interrupt is disabled, meanwhile it should have triggered a pulse. Interrupts could be disabled by another task in the system or when I change the state of my task to run. I tried to avoid that by changing the priority of the interrupt, but it doesn't seems to make any difference.
Do you have any ideas how to solve this problem in an efficient way?
Thanks again.
Kenneth