Hi All,
I am developing a software which is essentially a mechanical system tester, I have to use 3 serial ports (Asynch, Just Rx/Tx) to send/receive bytes at 115200 baud-rate and 1 KHz on each of them simultaneously in parallel,
Since the exact timing is critical to my needs, I tried a lot to reach the 1 ms event in user mode, finally I used NtQueryTimerResolution and NtSetTimerResolution and Waitable timers in a separate thread to create a 1 ms timer to send my bytes, but after some tests I found that sometimes the resolution of the timer changes to about 15~20 ms and then come back to 1 ms again, and this is not possible for me,
I am firmware/software and digital electronic designer/developer and completely familiar and experienced in micro-controllers and…, but this situation is defined for this project and I have to use windows which is not real time of course,
Question is that what would be the best solution for this problem, first get a exact 1ms interrupt timer on windows which does not change and be consistent, second how to use to send the serial bytes, use createfile and standard serial port driver or directly use uart controller, somehow write a simple and very customized driver?
All of these should be done in user mode or driver mode? Does writing a driver really helps? because I know that working threads and dpc timers also have latency,
I searched a lot about this, even thinking about hooking the rtc timer, writing driver, searched on your website, somewhere noted about writing a driver at clock level?
However I have never wrote a driver code, but I am not afraid, I did a lot on system programming, microcontrollers, rtos, and …,
I am essentially here looking for a solution and suggestion and really appreciate your kind helps…
Looking forward for your kind answers…
Ramin