USB serial port latency

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Hi Linux USB serial port experts,

I recently bought a 4-port USB RS485 serial port box. It is immediately recognized by our Linux machines and works fine for the simple things. My particular application uses RS485 on a monitor and control bus for telescope control and has strict timing requirements. For this device to work it will need to respond with an ACK signal within ~500 microseconds of receiving the last byte of an address word. We are operating at 57600 baud.

Reading a knowledgebase article at http://www.ftdichip.com/Support/Knowledgebase/index.html (transcript of page below [*]) I learned that USB being packet-based does not generate interrupts upon receiving traffic and may be fundamentally rate limited for one-character-at-a-time operation. My question for you (or someone else you might be able to point me to) is whether or not such a device can be programmed to poll often enough to not miss our timing window. I have enabled low-latency and done everything I can think of, short of digging into driver code.

For reference, I've tried this on RedHat Enterprise Linux with kernel 2.6.18-194.32.1.el5 and on my Gentoo laptop with 2.6.38 kernel and the device is a VSCOM 4 port RS482/485 using FTDI FT232 series UARTs.

Any advice? If there is no solution here with the USB device (as I suspect) can you recommend any PCI boards that may work better for my application?

	Thanks in advance for any help you may be able to offer.

	Walter

P.S.: Please make sure to cc me in any response.


---

[*] For a USB device, data transfer is done in packets. If data is to be sent from the PC, then a packet of data is built up by the device driver and sent to the USB scheduler. This scheduler puts the request onto the list of tasks for the USB host controller to perform. This will typically take at least 1 millisecond to execute because it will not pick up the new request until the next 'USB Frame' (the frame period is 1 millisecond). Therefore there is a sizable overhead (depending on your required throughput) associated with moving the data from the application to the USB device. If data were sent 'a byte at a time' by an application, this would severely limit the overall throughput of the system as a whole.


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux