Jump to content
  • 0

Would using a USB Hub for UART communication cause any issues?


digility

Question

I want to get a USB hub because my laptop doesn't have enough USB ports. I'll connect a keyboard, mouse, a USB cable for UART communication, and another cable for programming the FPGA. So let's say I connect 4 USB cables. What concerns me is that ultimately these 4 USB inputs are connected to the same USB port at the final. In this case, would it be possible to both program the FPGA and communicate via UART through the same USB port? and at the same i will be using keyobard, mouse I hope I've explained it clearly.

As far as I've researched on the internet, a USB hub should be of high quality, meaning it should be able to provide high power (some USB hubs can be powered by an adapter). However, the question I'm asking is a bit more specific. Because UART is a serial communication protocol. I don't know the internal structure of USB, but I don't think we can perform parallel processing. Please correct me if I'm wrong.

@asmi @zygot

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Hi @digility,

A hub will only become a problem if the USB traffic back to the host computer (whether that's UART or JTAG or your keyboard/mouse or whatever) becomes congested and you end up losing samples (or if your hub cannot provide sufficient power to all of the connected devices).

A lot of computer motherboards have internal USB hubs for their multiple USB ports (albeit potentially with controllers for each connection depending on the setup). I have two USB hubs (out of necessity) for the collection of Digilent devices that I have at my work station.
If I know that I am going to be streaming a lot of data at a rate that can't afford to have dropped packets (or that is going to saturate the bandwidth of the hubs connection back to the host computer), I'll just make sure that I let that device have a direct connection to the host computer so it is not competing with other devices for bandwidth.

But using a device with a USB 2.0 connection, a keyboard, and a mouse on some hub should realistically not be a problem, as keyboards and mice are pretty "light weight".

I don't quite understand your use case of communicating with the FPGA over UART while also configuring the FPGA as that would reset the entire FPGA (unless you're doing partial reconfiguration that doesn't touch the UART portion?)

Thanks,
JColvin

Link to comment
Share on other sites

  • 0
5 hours ago, JColvin said:

If I know that I am going to be streaming a lot of data at a rate that can't afford to have dropped packets (or that is going to saturate the bandwidth of the hubs connection back to the host computer), I'll just make sure that I let that device have a direct connection to the host computer so it is not competing with other devices for bandwidth.

The only caveat being what you've said just above the quoted - just because you connect a device directly to a USB port of a motherboard, it doesn't mean that this is actually a root USB port and not merely one of ports from onboard USB hub. This is not so bad for USB 2.0 as most hub chipsets I've came across had no problems processing nearly full USB 2.0 bandwidth at line speed, but things get a lot dicier with USB 3.x hubs and multiple USB 3.x devices. But since USB 3.x hubs actually contain two separate hubs (one for USB 2.0 and below, and another one for USB 3.x), a USB 3.x device can coexist with USB 2.0 device(s) without any interference because these two standards use physically separate channels for communication (and two separate controllers inside chipset/port controller).

Given the question in the OP - since UART doesn't come anywhere near saturating USB 2.0 bus, (infact it won't saturate even USB FS at 12 Mbps), I don't see the problem. Unfortunately there is another "but" - if you use some sort of UART over USB-JTAG adapter (like Digilent's HS2/HS3), there are known cases when they refuse to work when connected through certain hubs. I'm not entirely sure if it's a hardware problem or a software one (or a combination of two), but it does happen sometimes, and in this case user will need to connect those adapters directly to motherboard USB port.

Edited by asmi
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...