question about serial communication

Bas Wijnen wijnen at debian.org
Fri May 28 11:45:22 EDT 2010


Hi,

On Fri, May 28, 2010 at 07:34:34AM -0400, Tao Jin wrote:
> Actually i am pretty sure the latency is not on SoC.  I used  
> oscilloscope to monitor the signal on uart link and the latency between 
> incoming byte and echo byte is very short.

Ok, that's good.

> Also I used a USB to serial adapter that connects to pc and test a  
> selfloop which connects the uart rx and tx pins using jump wires. I  
> still see the latency around 10 ms.

That confirms it's not in the SoC then.

> Btw I used a user space c program to read the ttyusb device. Any
> chance that may be the reason?

I think it's in the kernel overhead for handling interrupts.  If you
would write a kernel driver, it would indeed be faster, but you most
probably don't want to do that.  Note that the PC driver does have a
fifo and kernel buffers, which make the throughput very acceptable.
It's just the time before the event reaches user space (and perhaps the
time for the command to reach the serial port) that bothers you.

Thanks,
Bas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.en.qi-hardware.com/pipermail/discussion/attachments/20100528/84929913/attachment.pgp>


More information about the discussion mailing list


interactive