uclinux-dev-requ...@uclinux.org wrote:
Message: 1
Date: Thu, 08 Jul 2010 10:55:15 +0600
From: Alexey Goncharov <goncha...@kb-agava.ru>
Subject: Re: [uClinux-dev] how to decrease serial port tx latency?
To: uClinux development list <uclinux-dev@uclinux.org>
Message-ID: <4c355a33.8040...@kb-agava.ru>
Content-Type: text/plain; charset=UTF-8; format=flowed

Did you try "fflush()" after the "write()" syscall?
fflush() is supposed to be used in combination with fwrite(), so.. i didn't

Ok, fine, did you try opening the deivce with O_SYNC to not return until the
data hits the port or with O_DIRECT to eliminate buffering?

Currently device is opened with following flags:

ttyfd = open( device, O_RDWR  | O_NOCTTY |  O_NDELAY | O_SYNC )

O_SYNC is one of them..

I've also tried with O_DIRECT, but the result was the same. In linux-2.6.x/include/asm-arm/fcntl.h has the string:

#define O_DIRECT        0200000 /* direct disk access hint - currently ignored 
*/

What was the first 2.6.x kernel which supported O_DIRECT flag for transmitting via serial port? I guess my kernel is kind of old..
Not sure if it applies here, but I use a utility called "setserial" to set the "low_latency" flag on the port. I also build my kernel with a 1000hz tick rate. It seems to reduce some of the latency, but I have never seen it as high as what you are seeing.

_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to