USB Josh Rickmar John Marcoux. Topics Purpose and Goals History Bus Design Power Differential...

Post on 24-Dec-2015

214 views 1 download

Tags:

Transcript of USB Josh Rickmar John Marcoux. Topics Purpose and Goals History Bus Design Power Differential...

USB

Josh RickmarJohn Marcoux

Topics

• Purpose and Goals

• History

• Bus Design

• Power

• Differential Signaling

• Connectors

• Changes in USB 3.0

Purpose and Development History

• Goal: easier to connect external peripheralso Replace multitude of connectorso Simplify software configuration of all deviceso Provide higher data rates

• Development began in 1994, led by seven companieso Compaq, DEC, IBM, Intel, Microsoft, NEC, Nortelo USB Implementers Forum formed shortly after

• First USB IC developed by Intel in 1995

• Now used for keyboards, mice, cameras, printers, media players, disk drives (mass storage), network adapters, power, etc.

Version History

• USB 0.7-0.99: November 1994-August 1995

• USB 1: January 1996

• USB 1.1: August 1998

• USB 2.0: April 2000o Engineering Change Notices (ECNs) added to

provide new features Mini-A and Mini-B Connector: October 2000

• Implemented On-The-Go

Battery Charging Specification 1.1: March 2007 Micro-USB Specification 1.01: April 2007

• USB 3.0: November 2008

USB 1/1.1

• Data rates of 1.5 Mbps (Low-Bandwidth) and 12 Mbps (Full-Bandwidth)

• Many limitations (timing and power issues)o No extension cableso No pass-through monitors

• Not widely adopted until version 1.1 due to bugs in the version 1 specification

USB 2.0

• Added new "Hi-Speed" maximum signaling rate of 480 Mbps

• Later additions to the specification added with Engineering Change Notices

• USB 2.0 hosts backwards compatible with USB 1/1.1 devices

Topics

• Purpose and Goals

• History

• Bus Designo High level designo Transaction protocol and packetso Logical pipes and endpointso Device functions and interfaceso Enumeration

• Power

• Differential Signaling

• Connectors

• Changes in USB 3.0

High-Level Design

• USB is a host-centric buso Single host connects to multiple deviceso Maximum of 127 devices

• Device functions defined by USB specificationo Human Interface, Mass Storage, Audio, Video, etc.

• Composite devices may implement many device functionso Webcam uses both video and audio device functions

High-Level Design

http://www.beyondlogic.org/usbnutshell/endpoint.gif

Transaction Protocol

• All transactions transmitted as packets

• All packet transactions initiated by host controller

• First packet (token packet) of every transaction specifies type

OUT packets inform the device the host wishes to send information

IN packets inform the device the host wishes to read information

Other tokens for synchronizationFor more information about the transaction protocol:http://www.beyondlogic.org/usbnutshell/usb3.shtml#USBProtocols

Logical Pipes and Endpoints

• USB defines multiple (<= 32) logical pipes (connections) to device endpointso Endpoints are permanent, pipes are transient

• Two types of pipeso Stream: Unidirectional, used for isochronous (continuous and

periodic), interrupt (device wants an ISR run), or bulk (large, non-periodic) transfers Ex: streaming a video (isochronous) Ex: sending a print job (bulk) Interrupt streams require host polling (USB 1-2.0)

o Message: Bidirectional, used for control transfers Ex: command from host and device's response

High-Level Design (Logical Pipes)

http://www.beyondlogic.org/usbnutshell/endpoint.gif

High-Level Design (Endpoints)

http://www.beyondlogic.org/usbnutshell/endpoint.gif

Device Functions and Interfaces

• Multiple endpoints are grouped into interfaces

• Each interface is associated with a single device function

• Endpoint 0 is the exceptiono Connects to a message pipeo Used for device configurationo Only one Endpoint 0 for composite devices

High-Level Design (Device Functions)

http://www.beyondlogic.org/usbnutshell/endpoint.gif

Enumeration

• Upon first connection, enumeration process beginso Reset signal sent to USB deviceo Data rate is determined during reset signalingo Host reads device's informationo Device assigned unique 7-bit addresso Device drivers are loaded (if supported)

High-Level Design (Enumeration)

http://www.beyondlogic.org/usbnutshell/endpoint.gif

Topics

• Purpose and Goals

• History

• Bus Design

• Powero Standardso Improvements

• Differential Signaling

• Connectors

• Changes in USB 3.0

Power

• Defines devices to be high-power/low-power

• USB 1.x and 2.0:o Provides 5 V (+- 5%) supplyo Defines a unit load as 100 mAo Can supply up to 5 unit loadso low-power: at most 1 unit load (100 mA) &

minimum operating voltage of 4.4 Vo high-power: at most 5 unit loads (500 mA) &

up to maximum operating voltage

• Some devices require more than 500 mA to power them, which 1.x-2.0 cannot provide

• Solution: two USB connectors (373 SmartFusions) 1 for power+data, 1 for power

USB Battery Charging Specification

• 2007: Charging ports, unlike the standard downstream ports, can supply above 500 mA

• Dedicated charging ports (DCP)o Does not support data transfero 500 - 1500 mA

• Charging downstream ports (CDP)o Supports data transfero Higher current draw can interfere with high-speed transfer

(usually limited to 900 mA)

• 2010: they introduced another ECN which upped the max current to 5A for DCP and 1.5A for CDP

Topics

• Purpose and Goals

• History

• Bus Design

• Power

• Differential Signalingo Technique used to reduce electromagnetic noiseo Used since USB 1.0

• Connectors

• Changes in USB 3.0

Differential Signaling: Basics

• Sending data on two lines, which are twisted together to form a differential pairo Each wire is sent the complement of the other

• External noise affects the pair equally

• Data is then received on the other side by taking the difference of the two signals

• Reduces electromagnetic noise

How Differential Signaling Works

http://en.wikipedia.org/wiki/Differential_signaling

with editing

How Differential Signaling Works

http://en.wikipedia.org/wiki/Differential_signaling

with editing

Topics

• Purpose and Goals

• History

• Bus Design

• Power

• Differential Signaling

• Connectorso Standard Connectorso Different types of USB Connectors

• Changes in USB 3.0

Standard Connectors

• Connection "A"o Host connection

• Connection "B"o Device connection

Mini and Micro Connectors

• Mini - Released October 2000o Had A, B, and A-B receptacleso On-The-Goo Introduced a 5th pin (ID Pin)

Allows distinction between

host/slave devices (PDA's)

• Micro - Released April 2007o Thinner, more durableo 2009: almost all cell phone manufacturers accepted

it as standard charging porto Mini deprecated shortly after

*not to scale

Topics

• Purpose and Goals

• History

• Bus Design

• Power

• Differential Signaling

• Connectors

• Changes in USB 3.0o Similar concepts (endpoints, logical pipes)o Different electrical connection and implementationo Improvements

USB 3.0• Released November 2008

• New transfer typeo SuperSpeed (SS) - 5 Gbit/s (10x faster than 2.0)

Includes overhead (~4.8 Gbits/s)

• Increased Bandwidtho Uses additional two unidirectional data paths: one to receive data, one

to send

• Better Bus Utilizationo Added the use of new packets to avoid polling

• Increase maximum currento Defines a unit load of 150 mAo Low-power: 1 unit load (150 mA), 4 Vo High-power: up to 6 unit loads (900 mA), 5 V

USB 3.0 Connector

• 3.0's new dual-bus architecture allows both 2.0 (High/Low/Full speed) and 3.0 (SuperSpeed) to take place at the same time

• Allows backward compatibilityo Except the 'B' side

http://www.legitreviews.com/article/1150/1/ http://appleinsider.com/articles/12/09

/11/apples_new_9_pin_dock_connector_for_iphone_5_may_support_usb_30

USB 3.0 Bus Utilization

• Prior to 3.0, the host controller would poll the bus for traffico The addition of 2 additional differential pairs allows

communication to be full duplex

• 3.0 - Introduced the use of NRDY and ERDY packetso Because 3.0 is full duplex, the device can communicate to the

host Device sends a NRDY (Not Ready) packet to host if it

needs to catch up (full buffer, etc) Once device is ready to receive data again, it sends a

ERDY (Endpoint Ready) packet• Data transmission resumes

Conclusion

• Purpose and Goals

• History

• Bus Design

• Connectors

• Power

• Differential Signaling

• Changes in USB 3.0

Sources

• http://en.wikipedia.org/wiki/Universal_Serial_Bus

• http://www.cablestogo.com/resources/usb.asp

• http://www.beyondlogic.org/usbnutshell/usb1.shtml

• http://www.legitreviews.com/article/1150/1/

• http://www.everythingusb.com/superspeed-usb.html

• http://www.absoluteastronomy.com/topics/Cable