Fast timing and serial port ?

From: Charles Sullivan (cwsulliv_at_triad.rr.com)
Date: 11/13/05


Date: Sun, 13 Nov 2005 16:30:18 GMT

I have an app which controls an external device via an RS232
serial port and standard port driver.

To actuate one feature in the app I need a timer in the 500-1000
microsecond range, however the basic timing resolution available
with nanosleep() under Linux is 10 milliseconds for a user
program. (I understand that setting a real-time scheduling
policy can provide finer resolution, but that it would require
running the app with root privileges.)

A serial port has it's own internal clock and I was wondering
if there is any way of accessing this through the standard
driver ioctl() to provide a timer with the required resolution?

Any thoughts will be appreciated.

Regards,
Charles Sullivan
 



Relevant Pages

  • Re: Fast timing and serial port ?
    ... > I have an app which controls an external device via an RS232 ... > serial port and standard port driver. ... however the basic timing resolution available ...
    (comp.os.linux.development.apps)
  • Re: Reading Serial Port
    ... The problem with reading stale data is that if you have filled up the buffer with old ... every packet, which will help identify the packet sequences that are being lost. ... you program your test app to put data out at a rate ... I've successed to read correctly the serial port through a new ...
    (microsoft.public.vc.mfc)
  • Re: Serial port monitoring
    ... serial port and rather not change horses in mid stride. ... I would then have a loop that checks for char in serial buffer. ... Everything is done within my app. ... monitor a serial port from another app unless you install some kind ...
    (microsoft.public.vc.mfc)
  • Re: Serial port monitoring
    ... In the background I need to act upon any data that comes in the serial port. ... I would then have a loop that checks for char in serial buffer. ... Everything is done within my app. ... monitor a serial port from another app unless you install some kind ...
    (microsoft.public.vc.mfc)
  • Re: Application xxx has encountered a serious error and must shut
    ... Chris Tacke, Embedded MVP ... that - but I guess not - if the exception is from another managed thread ... stopped my Serial port thread - last time it stopped the whole app:-O. ...
    (microsoft.public.windowsce.app.development)