On  8 Mar, Greg KH wrote:
> On Thu, Mar 08, 2001 at 10:47:30AM -0500, [EMAIL PROTECTED] wrote:
>> > Some USB to serial devices handle latencies better than others.  But of
>> > course they cost more :)
>> 
>> Naturally, ;-)  ...I'm using stock Intel UHCI.
> 
> No, I mean that the USB to serial device _itself_ is probably where the

Oops!  I mis-read that.

> greatest latency happens.  The cheaper devices use a very small and slow
> microcontroller.  They more expensive ones don't.

This one claims to be real hardware and not a micro-controller.  It
requires no prom or programming.

> If you have a test script or program, I'd be glad to run it on some of
> the devices I have here, on both OHCI and UHCI and see what the times
> are.

I have attached serial-test.tgz.  It contains source and a stripped
binary.  It also contains the patch I use to increase the scheduler
rate to 1024Hz.

The program is very simplisitic about how it takes command line
arguements.

argv[1] = device port name  i.e. /dev/ttyS1 or /dev/usb/tts/01
argv[2] = baud rate
argv[3] = max packet size
argv[4] = Number of packets for each size

The program will start at a packet size of 1 and time argv[4] packets. 
It will then do 2, 4, 8, 16 byte packets up to size<argv[3]+1.

Note that this program runs as a posix reatime task:

  schparms.sched_priority = 10;
  sched_setscheduler(0, SCHED_FIFO, &schparms);

As such it must be run as root.  ...actually, I think it will run as
non-root but will fail to set the scheduler parameters.  It also
measures time using both gettimeofday and the pentium cycle counter
because I wanted to check the accuracy of gettimeofday.

I attached tx to rx to create the loopback.  No flow control is used.

In addition to the latency, I found that the USB-UART I am using started
dropping bytes above 115200 bps if the packets are sufficiently large. 
I don't recall what sufficiently large is.

> greg k-h
 
Thanks!
Ty

-- 
Tyson D Sawyer                             iRobot Corporation
Senior Systems Engineer                    Real World Interface Div.
[EMAIL PROTECTED]                         Robots for the Real World
603-532-6900 ext 206                       http://www.irobot.com

serial-test.tgz

Reply via email to