Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Latency in USB Communication

Status
Not open for further replies.

srija

Member level 1
Joined
Oct 26, 2011
Messages
37
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Bangalore
Activity points
1,567
Hi

Can Anybody tell me how the latency occurs while communicating???how to calculate that latency???

Actually I have four USB devices connected to the USB Hub. The Hub is connected to the PC. HOw the Communication takes place?

What I mean is If four devices are sending the data simultaneously(At a time) to the USB hub then how the Hub will handle the data transfer???


Its needed for me. Can anybody tell me how it happens??
Thanks in advance.............
 

USB Protocol Specification
**broken link removed**

Each hub has exactly one upstream port and a number of downstream ports. The upstream port connects the hub (directly or through other hubs) to the host. Other hubs or devices can be attached to the downstream ports. During normal transmission, hubs are essentially transparent: data received from its upstream port is broadcast to all devices attached to its downstream ports; data received from a downstream port is generally forwarded to the upstream port only. This way, what is sent by the host is received by all hubs and devices, and what sent by a device is received by the host but not by the other devices (an exception is resume signaling).

Hubs are not transparent when dealing with changes in the status of downstream ports, such as insertion or removal of devices. In particular, if a downstream port of a hub changes status, this change is dealt with in an interaction between the host and this hub; the hubs between them act as transparent in this case.

To this aim, each hub has a single interrupt endpoint "1 IN" (endpoint address 1, hub-to-host direction) used to signal changes in the status of the downstream ports. When someone plugs in a device, the hub detects voltage on either D+ or D- and signals the insertion to the host via this interrupt endpoint. When the host polls this interrupt endpoint, it learns that the new device is present. It then instructs the hub (via the default control pipe) to reset the port where the new device was plugged in. This reset makes the new device assume address 0, and the host can then interact with it directly; this interaction will result in the host assigning a new (non-zero) address to the device.

USB in a NutShell

USB in a NutShell - Chapter 1 - Introduction

Another more notable feature of USB, is its transfer modes. USB supports Control, Interrupt, Bulk and Isochronous transfers. While we will look at the other transfer modes later, Isochronous allows a device to reserve a defined amount of bandwidth with guaranteed latency. This is ideal in Audio or Video applications where congestion may cause loss of data or frames to drop. Each transfer mode provides the designer trade-offs in areas such as error detection and recovery, guaranteed latency and bandwidth.
 

Hi tpetar
first of all thanks for the reply .

I just wonna clarify one doubt in my application as if All the USB devices send the data at the same time, the data is reached the USB Hub then how the USB Hub manages the incoming data?
 

Devices can't send data spontaneously. They are polled for new data by the host. In standard full speed (12 MHz) USB, the devices are polled once per ms. Assuming there's no congestion created on the respective bus segment, you can expect 1 ms as the maximum latency.
 

Thanking you FvM. I got some related information from your post. As I am a beginner My question may be looking something Confusing.
can U suggest me any resource for how the host manages the Bandwidth allocation and polling of devices in USB Communication?
 

Everything should be managed by the host driver and the OS. If you are requiring guaranteed bandwidth, you should refer to the isochronous transfer type mentioned by tpetar. In addition, you'll most likely get better performance, if the Hub is HS capable and connects to the host by a HS link. Then hopefully full 12 MBit/s bandwidth are achieved for each device.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top