On  8 Mar, To: [EMAIL PROTECTED] wrote:
> On  8 Mar, Greg KH wrote:
>> On Wed, Mar 07, 2001 at 02:34:26PM -0500, [EMAIL PROTECTED] wrote:
>>> I found that a native UART has a latency of 1-2ms for a single byte. 
>>> That latency increases with packet size.  When run over the 8U232AM
>>> the 1 byte latency is about 16-17ms and remains about 15ms longer than
>>> the native UART for larger packet sizes.  Is this latency somehow
>>> tunable?
>> 
>> USB to serial devices will always be much slower (have much greater
>> latency) than UARTs.  This is due to the fact that you add at least 1
>> USB transaction to the whole time.  And since you are doing a loopback
>> you have the following sequence to go through:
>>      - data across USB to UART in device
>>      - data out of UART
>>      - data back into UART
>>      - data back across USB to host
> 
> I anticipated this and came up with about 5ms worst case:
> 
> Frame action
> 
> 1     Submit packet to USB drivers
> 2     data to UART
> 3     data through loopback
> 4     data from UART
> 5     data from USB drivers

I thought about this some more.  The comparison was to 1-2ms for a
native UART.  That 1-2ms included:

- Data from user program to driver
- Data through loopback
- Data from driver to program

The point being that the loopback time was already included in the
1-2ms that was taken from the 16-17ms to get 15ms of overhead for USB.

Since "data through loopback" is already acounted for I end up with 4ms
that I would exect rather than 15ms.

Ty

> I'm quite open to 2 frames for the data go get through the loopback,
> but it shouldn't take more than that and we are still at 6ms which is
> less than half of what I am observing.
> 
> I'm pretty ignorant about how the USB drivers work so I could be way
> off here, but 15ms seems kinda long for a system that has 1ms frames.
> 
> I'd be really interested in any insite people might have on this as
> round trip and/or one way latency is very important for some possible
> upcoming projects as well as understanding this UART.  The latency of
> the UART isn't a killer, but I would like to understand it and it may
> be useful to reduce it if doing so is reasonable.

-- 
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


_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to