Sunteți pe pagina 1din 33

USB Under the Hood

Colin Walls
colin_walls@mentor.com
USB is a Good Thing

U
S
B

Mentor Graphics Confidential Information

2
What is USB?
n Alternative to old-fashioned serial and parallel
interfaces
n Minimises number of PC connectors
n Simplifies I/O and offers true plug-n-play
n Supports up to 127 devices
n Multiple 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]

Mentor Graphics Confidential Information

3
USB Technology Overview

Std-B

Std-A

Hub Std-A Mini-B

Std-A

n Three types of USB device


– Host
– Peripheral
– On-The-Go (OTG)
Mentor Graphics Confidential Information

4
Typical Peripheral Applications

Low Speed Full Speed Hi-Speed


(LS) (FS) (HS)

Mice Modems Mass Storage


Keyboards Digital Cameras Broadband
Joysticks Printers Home Networking
Gamepads Scanners Residential Gateways
Microphones Digital Video/Audio
Mentor Graphics Confidential Information

5
USB Topology

Host
Root Hub

Hub
1

Peripheral Hub Peripheral


2

Hub Hub
3 Peripheral 4 Peripheral

Peripheral Peripheral Peripheral

Mentor Graphics Confidential Information

6
USB Topology

Host
Root Hub

Hub
1

Peripheral Hub Peripheral


2

Hub Hub
3 Peripheral 4 Peripheral

Peripheral Peripheral Peripheral

Mentor Graphics Confidential Information

7
USB Topology

Host
Root Hub

Hub
1

Peripheral Hub Peripheral


2

Hub Hub
3 Peripheral 4 Peripheral

Peripheral Peripheral Peripheral

Mentor Graphics Confidential Information

8
USB Topology

Host
Root Hub

Hub
1

Peripheral Hub Peripheral


2

Hub Hub
3 Peripheral 4 Peripheral

Peripheral Peripheral Peripheral

Mentor Graphics Confidential Information

9
USB Topology

Host
Root Hub

Hub
1

Peripheral Hub Peripheral


2

Hub Hub
3 Peripheral 4 Peripheral

Peripheral Peripheral Peripheral

Mentor Graphics Confidential Information

10
USB Topology

Host
Root Hub

Hub
1

Function Hub Function


2

Hub Hub
3 Function 4 Function

Function Function Function

Mentor Graphics Confidential Information

11
USB Communications

USB Peripheral Controller

Endpoint 15

To USB
host CPU
Interface
or hub Endpoint 1

Endpoint 0

Input/Output Device

Mentor Graphics Confidential Information

12
USB Communications

USB Peripheral Controller

Endpoint 15

To USB
host CPU
Interface
or hub Endpoint 1

Endpoint 0

Input/Output Device

Mentor Graphics Confidential Information

13
USB Transfers
n USB is a master/slave protocol

n 4 types of data transfer:


– Control [Endpoint 0]
– Bulk
– Interrupt
– Isochronous

Mentor Graphics Confidential Information

14
USB Software Layers

Host Function

Application Application

Middleware Middleware

Class Driver Class Driver

Host Stack Function Stack

Hardware Hardware
Controller Driver Controller Driver

Mentor Graphics Confidential Information

15
USB Software Layers

Host Function

Application Application

Middleware Middleware

Class Driver Class Driver

Host Stack Function Stack

Hardware Hardware
Controller Driver Controller Driver

Mentor Graphics Confidential Information

16
USB Software Layers

Host Function

Application Application

Middleware Middleware

Class Driver Class Driver

Host Stack Function Stack

Hardware Hardware
Controller Driver Controller Driver

Mentor Graphics Confidential Information

17
USB Software Layers

Host Function

Application Application

Middleware Middleware

Class Driver Class Driver

Host Stack Function Stack

Hardware Hardware
Controller Driver Controller Driver

Mentor Graphics Confidential Information

18
USB Software Layers

Host Function

Application Application

Middleware Middleware

Class Driver Class Driver

Host Stack Function Stack

Hardware Hardware
Controller Driver Controller Driver

Mentor Graphics Confidential Information

19
USB Software Layers

Host Function

Application Application

Middleware Middleware

Class Driver Class Driver

Host Stack Function Stack

Hardware Hardware
Controller Driver Controller Driver

Mentor Graphics Confidential Information

20
USB and Embedded Systems

Mentor Graphics Confidential Information

21
Creating USB Peripherals

Mentor Graphics Confidential Information

22
Using USB Peripherals

Mentor Graphics Confidential Information

23
Both Sides of the Bus

Mentor Graphics Confidential Information

24
USB On-The-Go

Mentor Graphics Confidential Information

25
Typical OTG Applications

n Peripheral acting n Like-to-like device


as temporary host connectivity
– Camera to printer – PDA to PDA
– Print without a PC – Data synchronization
– MP3 player to disk – MP3 to MP3
– Load/unload songs – File sharing

Mentor Graphics Confidential Information

26
Host Negotiation Protocol
PDA Cell phone

A-host B-peripheral
Browse web

HNP

A-peripheral B-host
Upload addresses

Mentor Graphics Confidential Information


Nucleus USB – Objectives
n Provide USB connectivity for Nucleus-powered
systems
n Fast, small, portable and modularised
n Ground-up design to take full advantage of
Nucleus
n Source code and templates for easy porting
n Single vendor solution

Mentor Graphics Confidential Information

28
Nucleus USB – Features

n Supports USB hosts


and functions
n USB 1.1 and USB 2.0
n OTG support
n USB logo certified
n Many controllers
supported
n Key embedded CPUs
n USB class drivers

Mentor Graphics Confidential Information

29
Nucleus USB Function Class Drivers
CDC Subclass

MS Subclass HID Subclass Ethernet

SCSI Keyboard Ethernet/RNDIS

Mouse Modem

Device Mgmt

Function Class Drivers

Mass Storage Printer Audio

Human Interface Media Transfer


Still Image
Device (HID) Protocol (MTP)
Communications
Video Pict Bridge
Device (CDC)

Mentor Graphics Confidential Information

30
Nucleus USB Host Class Drivers

MS Subclass HID Subclass CDC Subclass

SCSI Keyboard Ethernet

CD ROM Mouse Modem

Floppy Power

Host Class Drivers

Mass Storage Printer Audio

Human Interface Media Transfer


Still Image
Device (HID) Protocol (MTP)
Communications
Video Pict Bridge
Device (CDC)

CCID

Mentor Graphics Confidential Information

31
USB – The Future
n USB has been subject to constant extension and
enhancement
n Some less successful
– USB OTG not as ubiquitous as expected
– Wireless USB never took off at all
n USB 3.0 coming
– very high speed: 4.8 Gb/s
– new power management
– higher power delivery to devices
– change in connectors

Mentor Graphics Confidential Information

32
Thank you

Colin Walls
colin_walls@mentor.com
http://blogs.mentor.com/colinwalls

S-ar putea să vă placă și