views:

37

answers:

3

Hey Guys

At present we are using fedora core 3 for a system we are working on. This system needs to communicate via serial. The timing of communications is timing critical. At present it seems that the serial driver has delays in pushing the data from the 4k fifo into the 16byte hardware uart.

Is there any way in force linux to treat this action with a higher priority?

Please help

+1  A: 

If you have a hard real-time processing requirement, you may be better off using a distribution that's built with that in mind, for example RTLinux.

Jim Lewis
Cheers, but it seems that we are locked into using fedora core 3.
Dark Templer
I doubt that latency on the CPU is causing it. On most systems, most of the time, unless the server is overloaded or swapping, you will have responses quick enough for a serial port.
MarkR
+1  A: 

Try the using setserial to set the low_latency option.

By default serial ports are optimised for throughput not latency, this option I think lets you change it.

MarkR
This seems to help a little bit, but mainly to do with the RX. Cheers
Dark Templer
A: 

Consider getting the device vendor to change the protocol to something less stupid where timing doesn't matter.

Having a timing-critical serial protocol, or indeed one which requires you to acknowledge one message before sending the next, is really stupid.

rs232-style serial ports are really slow, and anything which makes them worse is a bad idea.

I wrote a program to control a device which had a stupid protocol - each byte of data was individually acknowledged (duuh!) and the next one wasn't sent until the ack arrived - which meant that the data transfer rate was a tiny fraction of what it should have been.

Look at the zmodem protocol, for example, which is less stupid.

Better still, get the vendor to enter the 1990s and use USB.

MarkR
Hey MarkI am with you all the way on this. But the system is fixed. Legacy is a bitch.Next version of the system will use more up todate tech.
Dark Templer