|
From: Tim R. <ti...@pr...> - 2018-10-22 18:20:11
|
Zheng Rong wrote: > > Yes, I tried two off-the-shelf USB cameras simultaneously and get > 60fps+60fps performance. And, these cameras use non-compressed image > format and have the same size as my design. They also use BULK > endpoint for data transfer. Actually this is the reason why I chose to > use bulk xfer type in my design, I thought I could be able to get the > similar performance. But at the current point I can not get that. Any > clue to explain this? How much buffering do you have in your design? If you were delayed for a millisecond, would you lose data? > I will try isochronous xfer mode in my design as you suggested. You > said the isochronous xfer can guarantee the bandwidth for 2 cameras. > Why? Is it because isochronous xfer won't do retry when it get NACK? No. When you select an alternate setting for an isochronous endpoint, the system reserves a piece of each frame specifically for that endpoint, whether it uses it or not. You are guaranteed that your device will have a time slot when your turn comes around. With two isoch devices, assuming there is room for both, each gets its own guaranteed time slot. There is no competition. With a bulk pipe, there is no such reservation. You are competing with all the other bulk devices for whatever bandwidth is left over. > One more question: My computer's USB is version 3.0, and cameras are > USB2.0. If I connect multiple USB2.0 cameras to the computer, the > bandwidth for upstream is 480Mbps or 5Gbps? For a USB2.0 hub, the > upstream bandwidth is certainly 480Mbps. What is the total upstream > bandwidth for a USB3.0 hub connected with USB2.0 devices? The USB 2.0 devices are all sharing 480Mbps. The USB 3 host controller ends up exposing an xHCI controller that runs at USB 3 speeds, and an EHCI controller that runs at USB 2 speeds. > I ask this question because I found: if 2 off-the-shelf cameras are > connected to PC through a USB2.0 hub, the frame rate can only get > about 45fps+45fps; But if I connect the cameras directly to PC, the > frame rate can be 60fps+60fps even more. The frame rate is not important. What's important is bytes per second. Adding a hub always affects the timing by introducing delays. It's possible that the hub's communication is causing your retries to fall across some threshhold so that you lose a packet time. -- Tim Roberts, ti...@pr... Providenza & Boekelheide, Inc. |