How many isochronous USB2.0 devices can a USB3.0 Hub enumerate? - usb

I am working on a hardware-embedded software project involving USB protocol. My plan is to use a USB3.0 Hub that clusters many USB2.0 isochronous devices, each requiring around 33 Mbps BW.
Now, I know that USB3 is able to enumerate up to 127 devices [1], what I'd like to know is whether this is true if I connect USB2 devices to the USB3 Hub. Can I, in theory, use the hub with 97 USB2 devices?
Also, could I utilize the entire BW (yes, only around 70% is feasible) of a USB3 port this way? The above figures add up to 5 Gbps*70% = 3.2 Gbps = 97*33Mbps.
Any help is much appreciated.

I believe there is some confusion with your understanding.
USB 3.0 hub contains 2 logical hub partitions.
1 - USB 3.0 hub
2 - USB 2.0 hub
USB 2.0 devices communicate through the USB 2.0 hub data path which has nothing to do with USB 3.0 data path. So the assumption of the bandwidth is incorrect as they are for USB 3.0 devices connected via USB 3.0 data path.
Also USB 2.0 devices will get connected via USB 2.0 lines and NOT USB 3.0 lines.
Another misconception in your question.
The speed which you mentioned i.e. 5 Gbps, that is USB 3.0 link speed.
What that means is that 2 devices over USB 3.0 link can send or receive data at 5 Gbps. Since every hub downstream port is physically a separate link, the link speed will be same for all i.e. 5 Gbps. So its speed between 2 link partners and not end to end speed.
Now when you say End to End data transfer rate, that will depend on your host controller driver architecture, your OS performance, your Hub, etc.
For Isochronous endpoints, the hub will start data transfer on service intervals for each endpoints on each port as per USB spec but you cannot be sure that End to End data transfer rate will be equally divided.
PS - You will get a lot less end to end bandwidth by the way as the link speed for USB 2.0 is 480 Mbps. :)

Related

LoRa UART or SPI?

I have a Gateway - Node application using the LoRa module but I don't know whether to choose the LoRa module to interface UART or SPI.
Can someone help me distinguish the difference when using these two types? Example: when I have 5 Nodes connected to Gatewway, which one should I use? and same when I have 50 Nodes.
Thanks!
A UART converts the signals to RS232 signaling(NOT VOLTAGES, You will need an additional adapter chip like the FTDI 232H) to hook up to a serial port on a computer. Speeds are usually limited to less than 400 Kilobits per second(varies based on distance and devices)
If you are connecting multiple devices to the same micro-controller(Arduino), use SPI. The connection speeds are not limited by standards. It is a bus arrangement with 4 pins (clock SCLK, input MISO, output MOSI and Slave select SS) The SCLK, MISO, MOSI are connected to all devices.To chain additional devices it requires an additional SS pin per device.
SPI is going to be faster(several (<5?)Megabits per second is not uncommon (depends on length(not greater than .3 meters), wire quality, environmental noise and device specifications) and requires less discrete components.
Since LoRa speeds max out around 300kbps, a single SPI connected gateway could theoretically handle 15 LoRa transceivers on a single gateway.
Doing 15 devices may violate local RF duty cycle restrictions resulting in fines and/or imprisonment.
Please check with your regulatory institutions prior to implementation of any solution.
I would suggest using four transceivers with external antennas each pointing in a different cardinal direction(possibly offset) at each gateway. This configuration should permit 400+(depending on usage patterns) client devices per gateway.

USB Full Speed polling interval

I have 1 Full Speed (12 Mbps) CDC-ACM type USB device connected directly to a High Speed (EHCI - 480 Mbps) controller on a SoC.
When there is no user-space application opening the CDC-ACM device in linux, I see a pulse which is repeated every 1 ms (SOF). Once an application (example cat) opens the CDC-ACM device, I see a lot of IN tokens (~102) between 2 SOF's from the host and the device NAKs the IN token. We are suspecting the device is busy NAKing that it hampers its operation.
Q1: Is there a way to reduce the number of IN tokens within the 1 ms interval?
Thanks
0_l_0

USB host/peripheral design

I'm looking to create a device that acts as a host to a USB peripheral, format the data, then send it out to another host (the PC). Are on-the-go chips capable of accomplishing this or would you need to implement both a host USB microcontroller and a peripheral USB controller? I don't see much information out there for creating a middleman that performs data molding for USB prior to reaching a host. Any information would be appreciated, hopefully I didn't butcher this concept.
you should use a microcontroller with 2 USB busses.
One should act as a host, and the other as a slave.
You will need to implement them both.
USB OTG is used to create a host and a slave in 1 device with 1 connector,
so it's impossible to use them together at the same time.

Wire two USB devices to one PC port

I have an old hub that sucks, so I converted it to a USB-tripler by soldering all of the input 4 wires to the corresponding wires on the output connectors. I had to do this because modern devices require 2.0 or 2.8 volts on d+, and refuse to charge if d+ is shortened or not connected. It works well charging three devices from a 1a wall adapter.
But if someone accidentally connects this to a PC port, what will happen? Well if there is only one device, it would be detected no problem. But if two devices are wired to the same port, how dangerous is that?
I would prefer the first connected device to be identified in the system, while the second connected devices just get the power.
One of the first steps in USB enumeration is to send a reset signal by driving D+ and D- low. All the devices plugged in will see the reset and think it was intended for them. After the reset they will each think they have address 0 and respond to requests to that address. The result will be multiple devices trying to drive the bus at the same time, for a brief period before the host gives up.
I think it wouldn't damage anything, but you will be causing a short circuit for a few microseconds which is bad.

Routing Multiple USB 2.0 connections through a USB 3.0 connection

Is there any USB 3.0 hub or device that multiple USB 2.0 devices can be connected to and still retain the maximum USB 2.0 bandwidth for each device by utilizing the higher bandwidth of USB 3.0?
These devices exist for USB2.0/1.1 interfacing (they are called Multi-TT USB hubs).
Are there any such devices that exist for USB3.0/2.0? What I'm trying to do is connect 3 high-bandwidth USB 2.0 cameras to one USB 3.0 port.
I've been personally trying to find details about this as well. I'm trying to get multiple USB based audio cards to MUX over USB 3.0.
So far the following two URLs are giving me my details:
http://www.via-labs.com/en/products/vl810/index.jsp
http://electronicdesign.com/embedded/what-s-difference-between-usb-20-and-30-hubs
-- 1 --
This is interesting because it shows a block diagram of the VIA VL810 controller chip. Unfortunately, it sure looks like the USB2.0 functions are completely seperate from the USB 3.0 sections. This leads me to believe that, at least this chip, and HUBs that use it, can not multiplex USB2.0 transfers over USB3.0.
-- 2 --
This site spends a lot of time talking about how the HUBs are suppose to work. It takes the time to explain that the USB3.0 bus is separate from the USB2.0 bus:
Within the hub, only the port power control logic is shared between the USB 3.0 path and the USB 2.0 path, since there is only one 5-V power path in either USB 2.0 or USB 3.0.
This leads me to assume that most if not all current USB 3.0 HUBs can't multiplex.
You comment about Multi-TT Hubs being available for USB 2.0/1.1 gives me hope that some time in the (near?) future we'll have the same ability with USB3.0/2.0.