USB Under the Hood
-
Upload
tennis5luv -
Category
Documents
-
view
227 -
download
0
Transcript of USB Under the Hood
-
8/8/2019 USB Under the Hood
1/33
Colin [email protected]
USB Under the Hood
mailto:[email protected]:[email protected] -
8/8/2019 USB Under the Hood
2/33
Mentor Graphics Confidential Information
USB is a Good Thing
U
S
B
2
-
8/8/2019 USB Under the Hood
3/33
Mentor Graphics Confidential Information
What is USB?
nAlternative to old-fashioned serial and parallel
interfacesnMinimises number of PC connectors
nSimplifies I/O and offers true plug-n-play
nSupports up to 127 devices
nMultiple data rates
USB 1.1: full speed [12Mb/s] and low speed [1.5Mb/s]
USB 2.0: high speed [480Mb/s]
USB 3.0: very high speed [4.8Gb/s]
3
-
8/8/2019 USB Under the Hood
4/33
Mentor Graphics Confidential Information
USB Technology Overview
nThree types of USB device
Host
Peripheral
On-The-Go (OTG)
Std-A
Std-A
Std-A
Hub
Std-B
Mini-B
4
-
8/8/2019 USB Under the Hood
5/33
Mentor Graphics Confidential Information
Typical Peripheral Applications
5
Low Speed
(LS)
Mice
KeyboardsJoysticksGamepads
Full Speed
(FS)
Modems
Digital CamerasPrintersScanners
Microphones
Mass Storage
BroadbandHome NetworkingResidential GatewaysDigital Video/Audio
Hi-Speed
(HS)
-
8/8/2019 USB Under the Hood
6/33
Mentor Graphics Confidential Information
USB Topology
6
Hub4
Peripheral Peripheral Peripheral
PeripheralPeripheralHub
3
Hub2
PeripheralPeripheral
Hub1
Host
Root Hub
-
8/8/2019 USB Under the Hood
7/33
Mentor Graphics Confidential Information
USB Topology
7
Hub4
Peripheral Peripheral Peripheral
PeripheralPeripheralHub
3
Hub2
PeripheralPeripheral
Hub1
HostRoot Hub
-
8/8/2019 USB Under the Hood
8/33
Mentor Graphics Confidential Information
USB Topology
8
Hub4
Peripheral Peripheral Peripheral
PeripheralPeripheralHub
3
Hub2
PeripheralPeripheral
Hub1
Host
Root Hub
-
8/8/2019 USB Under the Hood
9/33
Mentor Graphics Confidential Information
USB Topology
9
Hub4
Peripheral Peripheral Peripheral
PeripheralPeripheralHub
3
Hub2
PeripheralPeripheral
Hub1
Host
Root Hub
-
8/8/2019 USB Under the Hood
10/33
Mentor Graphics Confidential Information
USB Topology
10
Hub4
Peripheral Peripheral Peripheral
PeripheralPeripheralHub
3
Hub2
PeripheralPeripheral
Hub1
Host
Root Hub
-
8/8/2019 USB Under the Hood
11/33
Mentor Graphics Confidential Information
USB Topology
11
Hub4
Function Function Function
FunctionFunctionHub
3
Hub2
FunctionFunction
Hub1
Host
Root Hub
-
8/8/2019 USB Under the Hood
12/33
Mentor Graphics Confidential Information
USB Communications
12
USB
Interface
Endpoint 0
Endpoint 1
Endpoint 15
CPU
Input/Output Device
USB Peripheral Controller
To
hostor hub
-
8/8/2019 USB Under the Hood
13/33
Mentor Graphics Confidential Information
USB Communications
13
USB
Interface
Endpoint 0
Endpoint 1
Endpoint 15
CPU
Input/Output Device
USB Peripheral Controller
To
hostor hub
-
8/8/2019 USB Under the Hood
14/33
Mentor Graphics Confidential Information
USB Transfers
nUSB is a master/slave protocol
n 4 types of data transfer:
Control [Endpoint 0]
Bulk
Interrupt
Isochronous
14
-
8/8/2019 USB Under the Hood
15/33
Mentor Graphics Confidential Information
USB Software Layers
15
Application
Middleware
Class Driver
Host Stack
Hardware
Controller Driver
Host
Middleware
Application
Class Driver
Function Stack
Hardware
Controller Driver
Function
-
8/8/2019 USB Under the Hood
16/33
Mentor Graphics Confidential Information
USB Software Layers
16
Application
Middleware
Class Driver
Host Stack
Hardware
Controller Driver
Host
Application
Class Driver
Function Stack
Hardware
Controller Driver
Function
Middleware
-
8/8/2019 USB Under the Hood
17/33
Mentor Graphics Confidential Information
USB Software Layers
17
Application
Middleware
Class Driver
Host Stack
Hardware
Controller Driver
Host
Application
Class Driver
Function Stack
Hardware
Controller Driver
Function
Middleware
-
8/8/2019 USB Under the Hood
18/33
Mentor Graphics Confidential Information
USB Software Layers
18
Application
Middleware
Class Driver
Host Stack
Hardware
Controller Driver
Host
Application
Class Driver
Function Stack
Hardware
Controller Driver
Function
Middleware
-
8/8/2019 USB Under the Hood
19/33
Mentor Graphics Confidential Information
USB Software Layers
19
Application
Middleware
Class Driver
Host Stack
Hardware
Controller Driver
Host
Application
Class Driver
Function Stack
Hardware
Controller Driver
Function
Middleware
-
8/8/2019 USB Under the Hood
20/33
Mentor Graphics Confidential Information
USB Software Layers
20
Application
Middleware
Class Driver
Host Stack
HardwareController Driver
Host
Application
Class Driver
Function Stack
HardwareController Driver
Function
Middleware
-
8/8/2019 USB Under the Hood
21/33
Mentor Graphics Confidential Information
USB and Embedded Systems
21
-
8/8/2019 USB Under the Hood
22/33
Mentor Graphics Confidential Information
Creating USB Peripherals
22
-
8/8/2019 USB Under the Hood
23/33
Mentor Graphics Confidential Information
Using USB Peripherals
23
-
8/8/2019 USB Under the Hood
24/33
Mentor Graphics Confidential Information
Both Sides of the Bus
24
-
8/8/2019 USB Under the Hood
25/33
Mentor Graphics Confidential Information
USB On-The-Go
25
-
8/8/2019 USB Under the Hood
26/33
Mentor Graphics Confidential Information
Typical OTG Applications
nPeripheral actingas temporary host
Camera to printer
Print without a PC
MP3 player to disk Load/unload songs
n Like-to-like deviceconnectivity
PDA to PDA
Data synchronization
MP3 to MP3File sharing
26
-
8/8/2019 USB Under the Hood
27/33
Mentor Graphics Confidential Information
Host Negotiation Protocol
PDA
A-host
Browse web
A-peripheral
Cell phone
B-peripheral
B-host
Upload addresses
HNP
-
8/8/2019 USB Under the Hood
28/33
Mentor Graphics Confidential Information
Nucleus USB Objectives
nProvide USB connectivity for Nucleus-powered
systemsnFast, small, portable and modularised
nGround-up design to take full advantage ofNucleus
nSource code and templates for easy porting
nSingle vendor solution
28
-
8/8/2019 USB Under the Hood
29/33
Mentor Graphics Confidential Information
Nucleus USB Features
n Supports USB hostsand functions
n USB 1.1 and USB 2.0
nOTG support
n USB logo certified
nMany controllerssupported
n Key embedded CPUs
n USB class drivers
29
-
8/8/2019 USB Under the Hood
30/33
Mentor Graphics Confidential Information
Function Class Drivers
30
Nucleus USB Function Class Drivers
Mass Storage
Human Interface
Device (HID)
CommunicationsDevice (CDC)
Printer
Still Image
Video
Audio
Media Transfer
Protocol (MTP)
Pict Bridge
MS Subclass
SCSI
HID Subclass
Keyboard
Mouse
CDC Subclass
Ethernet/RNDIS
Modem
Ethernet
Device Mgmt
30
-
8/8/2019 USB Under the Hood
31/33
Mentor Graphics Confidential Information
Host Class Drivers
31
Nucleus USB Host Class Drivers
Mass Storage
Human Interface
Device (HID)
Communications
Device (CDC)
Printer
Still Image
Video
Audio
Media Transfer
Protocol (MTP)
Pict Bridge
CCID
MS Subclass
SCSI
CD ROM
Floppy
HID Subclass
Keyboard
Mouse
Power
CDC Subclass
Ethernet
Modem
-
8/8/2019 USB Under the Hood
32/33
Mentor Graphics Confidential Information
USB The Future
nUSB has been subject to constant extension and
enhancementnSome less successful
USB OTG not as ubiquitous as expected
Wireless USB never took off at all
nUSB 3.0 coming
very high speed: 4.8 Gb/s
new power management
higher power delivery to devices
change in connectors
32
-
8/8/2019 USB Under the Hood
33/33
Colin [email protected]
http://blogs.mentor.com/colinwalls
Thank you
mailto:[email protected]://blogs.mentor.com/colinwallshttp://blogs.mentor.com/colinwallsmailto:[email protected]