Re: 8ms Timer for serial port access
From: Byron A Jeff (byron_at_cc.gatech.edu)
Date: 10/29/03
- Next message: Jens Schumacher: "Re: 8ms Timer for serial port access"
- Previous message: David Schwartz: "Re: 8ms Timer for serial port access"
- In reply to: Jens Schumacher: "8ms Timer for serial port access"
- Next in thread: Jens Schumacher: "Re: 8ms Timer for serial port access"
- Reply: Jens Schumacher: "Re: 8ms Timer for serial port access"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 28 Oct 2003 18:12:13 -0500
In article <BBC40CFE.17F7%jens.schumacher@uni.de>,
Jens Schumacher <jens.schumacher@uni.de> wrote:
-Hello,
-
-I need to collect data from the serial port every 8ms since the device
-connected to the port works at 120Hz. This doesn't seems to work properly
-due to the 10ms time slice interval of a normal i386 kernel. The
-communication to the serial port is done in user space at the moment and is
-not loaded as a module. I read a lot in the history of the newsgroup and
-there are some solutions recommended. From low latency kernel patches to the
-use of real-time Linux. But I'm pretty new to Linux and feel not comfortable
-by patching the kernel since I don't know how a low latency path affects
-other programs on the system.
-
-It is important that I get the data nearly every 8 ms because I don't want
-the serial port buffer to overflow and loose data. But the use of real-time
-Linux seems to be a overhead to me.
My head is swirling with confusion. I seek clarity in this matter. You wish
to collect data, and not have the buffer overflow.
The last time I checked on this matter, that was exactly the purpose of the
kernel serial driver, serial.o.
So I'm very confused as to why you are attempting to reinvent a wheel that
rolls quite well.
Now it may be another matter if you in fact need to time the receipt of each
byte, but that wasn't clear from the description above.
Since you are newbie, and I'm confused, would you mind if we started over?
Here's what I got from above:
1) Device sends data via the serial port.
2) You need to collect the data.
3) You do not want to lose any data.
But there's a bunch missing:
1) What bit rate is the data transmitted?
2) Does the data need to be timestamped?
3) Is the data bursty or does it come in a steady stream?
4) What makes you think that the data will overrun the serial port and kernel
driver?
In the grand scheme of things, the serial port is a low speed device. The
current Linux serial port driver can receive and buffer a 460k continuous
stream without breaking a sweat. It isn't the old DOS BIOS serial driver.
-What about soft-real-time? I looked at the sched* functions, but could'nt
-get it running as fast as I want.
-What about using the rtc?
-
-Is it also possible to run the application at that frequency to work with
-the data I get?
I'm still trying to figure out what you require from the OS. Care to explain
the goals of the application?
BAJ
- Next message: Jens Schumacher: "Re: 8ms Timer for serial port access"
- Previous message: David Schwartz: "Re: 8ms Timer for serial port access"
- In reply to: Jens Schumacher: "8ms Timer for serial port access"
- Next in thread: Jens Schumacher: "Re: 8ms Timer for serial port access"
- Reply: Jens Schumacher: "Re: 8ms Timer for serial port access"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|