25-08-2017, 09:32 PM
USB Tutorial
USB-tutorial.ppt (Size: 856.5 KB / Downloads: 55)
Few generalities on USB
Tiered start topology
2 types of peripherals:
HUB
Function
Up to 127 peripherals
A master/slave architecture
USB 2.0 spec supercedes USB 1.1 spec
USB 2.0 LS ( USB1.1 at 1.5Mbps)
USB 2.0 FS ( USB 1.1 at 12Mbps)
USB 2.0 HS (480 Mbps)
Power Management
Different device class: bus powered or self powered
Vbus > 4.35V. 100mA, (500mA after negociation), 500uA in suspend mode
Host disables power to ill-behaved peripherals
The Transaction Protocol is Host Based
Host based token polling
Data from host-to-function and function-to-host
Host handles most of the protocol complexity
Peripheral design is simple and low-cost
Robustness
Handshake to acknowledge data transfer and flow control
Very low raw physical bit error rate (< 10 –10)
CRC protection plus hardware retry option
Data toggle Sequence bits
Bounded transfer characteristics
Data transfer bandwidth and latency prenegociated
Flow control for peripheral buffer management
USB Transactions
Token: device address, endpoint number, transfer type
Data : data to be sent
Handshake: acknowledge
USB scheduling
The bus allocation depends on the host controller
A constant interval width is allocated to isochronous and interrupt transfer
A minimum interval width is reserved for control transfer
The rest of interval is for bulk transfer
Device detection
The host (hub) downstream port integrates 2 pull-downs (15Kohms). The bus state is SE0 (DP = DM = 0V)
When a device is connected, the bus state is idle (DP = 3.3V DM = 0V). DP is forced by the device pull-up (1.5Kohms).
The hub/host detects the port status change and forces a bus reset to the new device (DP = 0V DM = 0V).
Then the host sends requests to the device through the default control endpoint (endpoint number 0). A newly connected device address is 0.