How to receive a sync signal from external hardware, interrupts
Hello,
I have a project where I have an application that runs in real time and it must process new data every 1 ms. Now, in order to get this to work, I need to take a sync signal from some external hardware. How the sync signal will arrive is not specified. Now I need suggestions on how to handle this the best way.
My idea was to have some hw device that receives an electric signal, (RJ45, GPIO) or whatever, and then write a driver in Linux that registers the interrupt every time the signal arrives and awakes all the processes that must do the execution during the 1 ms before the next interrupt arrives.
Now I need some ideas and suggestions on how to implement this the best way. However, the external sync signal will not arrive at every 1 ms, I could perhaps have an internal timer in Linux that elapses every 1 ms to wake up all the processes? The important thing with the sync cable is to make sure that we are staying on sync. Is there any problem with Linux internal timers to handle this precision you think? What else technique could I use to generate an interrupt at every 1 ms on an x86 platform running Linux?
Sorry for this fuzzy question but I need some people to drift this problem with.
Regards
|