• Well, the timer might be possible. The problem is I'm pretty sure Linux uses at least one timer for the Kernel, so it's whether anything is left over for you to use really - I had a quick google but I can't see any examples of getting an IRQ for a timer while under Linux :(

    The WiringPi library is used for getting the IRQs when pins change state, but for its soft PWM it actually uses normal threads, which makes me think that using a timer IRQ directly may not be possible: https://github.com/WiringPi/WiringPi/blo­b/master/wiringPi/softPwm.c

    Doing something similar to that could be an option. It's not perfect but it would be better than nothing.

About

Avatar for Gordon @Gordon started