Date post: | 26-Dec-2015 |
Category: |
Documents |
Upload: | jeremy-skinner |
View: | 217 times |
Download: | 2 times |
Introduction to
USB
© 2010 Renesas Electronics America Inc. All rights reserved.
USB = Universal Serial Bus
HID Class Mass Storage Class Printer Class
Serial bus standard for interfacing devices
Advantages
Hot Swapable
Multiple Classes with unified drivers
Large number of devices (128)
High data transfer rates
– 1.5Mbps (Low Speed)
– 12 Mbps (Full Speed)
– 480 Mbps (High Speed USB 2.0)
– 3Gbps (Super Speed USB 3.0)
Differential signaling
Automatic Error Detection and Recovery
Examples:
© 2010 Renesas Electronics America Inc. All rights reserved.
Topology
Three Device Types
Host Only one per system
Function Any device that
connects to a host
Hub Self Powered Bus Powered
Peripheral Device HUB
Peripheral Device
Peripheral Device
Peripheral Device
HUB
Peripheral Device
Peripheral Device
Peripheral Device
HUB
Peripheral Device
Peripheral Device
Peripheral Device
USB CablePort Port
USB
HUB
USB
© 2010 Renesas Electronics America Inc. All rights reserved.
On-The-GoUSB
Allows two USB devices to talk to each other
without a PC acting as host.
DRD (Dual Role Device).
Functions as both Device and Host
Limited Host capabilities
Unique mini-AB receptacle.
Common applications Cell phones MP3 players PDA
OTG
© 2010 Renesas Electronics America Inc. All rights reserved.
Four kinds
Control
Interrupt
Bulk
Isochronous
Direction is from the host perspective IN: Data sent to host OUT: Data received from host
Endpoint FIFO size determines transfer rate
EndpointsUSB a uniquely addressable portion of a USB device that is
either a source or sink of info in a communications flow.
Bidirectional
Unidirectional
Unidirectional
Unidirectional
Fixed at Zero (0)
IN only
Separate Send/Receive Endpoints
Separate Send/Receive Endpoints
Direction Endpoint Notes
© 2010 Renesas Electronics America Inc. All rights reserved.
Quiz1
PROPERTIES
On passing, 'Finish' button: Goes to Next SlideOn failing, 'Finish' button: Goes to SlideAllow user to leave quiz: At any timeUser may view slides after quiz: After passing quizUser may attempt quiz: Unlimited times
Control Transfers
Intended to support configuration, command and
status operations between the software on the host
and the device
Required for all USB function devices
Bidirectional
Interrupt Transfers
Intended for devices that send and receive small
amounts of data infrequently or in an asynchronous
time frame
Full speed up to 64 bytes/packet
Data is ACK’ed (error correcting)
Transfer TypesUSB
© 2010 Renesas Electronics America Inc. All rights reserved.
Transfer TypesUSB Bulk Transfers
Transfer large amounts of non-time sensitive data,
and that can use any available bandwidth
Data is ACK’ed (error correcting)
Not Guaranteed for latency
Transfer time dependent on Bus activity
Isochronous transfers
Transfer data at guaranteed time intervals
Example – Audio/video streaming
Guaranteed bus bandwidth
Data is not ACK’ed (not error correcting)
© 2010 Renesas Electronics America Inc. All rights reserved.
Defined by USB Implementers Forum
Group of devices or interfaces with similar
attributes or services
Examples of commonly used classes
MSC (Mass Storage Class)
HID (Human Interface Device)
Other important classes
Audio, Video
Vendor Specific
ClassesUSB
© 2010 Renesas Electronics America Inc. All rights reserved.
EnumerationUSB
Control Endpoint
Endpoint 0(EP0)
Endpoint 3(EP3)
Interrupt IN Endpoint
HIDDriver
Request forDevice Descriptor
Request for Interface Descriptor
Request for Configuration Descriptor
Request for Report Descriptor
Reply with Configuration Descriptor
Reply with Interface Descriptor
Reply with Endpoint Descriptor
Reply with Report Descriptor
CONTROL pipe
Reply with Device Descriptor
Request for Endpoint Descriptor
INTERRUPT-IN pipe
© 2010 Renesas Electronics America Inc. All rights reserved.
* 6th Descriptor = String Descriptor
Quiz2
PROPERTIES
On passing, 'Finish' button: Goes to Next SlideOn failing, 'Finish' button: Goes to SlideAllow user to leave quiz: At any timeUser may view slides after quiz: After passing quizUser may attempt quiz: Unlimited times
Start of Frame Keyboard Mouse
USBSpeakers
Bus Management Printer, Scanner and bulk transfers
ControlInterruptand/orcontrol Isochronous
ControlBulk
FrameUSB
1 ms or 0.125 ms
© 2010 Renesas Electronics America Inc. All rights reserved.
USB Transfer on the protocol analyzer
© 2010 Renesas Electronics America Inc. All rights reserved.
Quiz3
PROPERTIES
On passing, 'Finish' button: Goes to Next SlideOn failing, 'Finish' button: Goes to SlideAllow user to leave quiz: At any timeUser may view slides after quiz: After passing quizUser may attempt quiz: Unlimited times
Type a H8S2215
Type b H8S2218 H8S2212
Type c H8S2472
Type d H8SX1653 H8SX1663H8SX1658R H8SX1668R
Controller types
USB line-up
© 2010 Renesas Electronics America Inc. All rights reserved.
The H8SX1664, H8S2218/2212
Endpoint Abbrev.Transfer
typeMaximum
packet size
FIFO capacity (Bytes)
DMA transfer
Endpoint 0 EP0 Control 8 8 -
Endpoint 1 EP1 Bulk-IN 64 128 Possible
Endpoint 2 EP2 Bulk-OUT 64 128 Possible
Endpoint 3 EP3 Interrupt 8 8 -
Endpoint Abbrev.Transfer
typeMaximum
packet size
FIFO capacity (Bytes)
DMA transfer
Endpoint 0 EP0 Control 8 64 -
Endpoint 1 EP1 Bulk-OUT 64 128 Possible
Endpoint 2 EP2 Bulk-IN 64 128 Possible
Endpoint 3 EP3 Interrupt 64 64 -
H8SX1664
H8S2218/2212
© 2010 Renesas Electronics America Inc. All rights reserved.
The H8S/2215
Self/USB powered Can use either System clock or External Clock for USB Configurable endpoint addresses
H8S/2215
Self/USB powered Can use either System clock or External Clock for USB Configurable endpoint addresses
Endpoint Abbrev. Transfer typeMaximum
packet size
FIFO capacity (Bytes)
DMA transfer
Endpoint 0 EP0 Control 8 64 -
Endpoint n EPn Bulk-OUT (2) 64 128 Possible
Endpoint n EPn Bulk-IN (2) 64 128 Possible
Endpoint n EPnInterrupt (2)
64 64 -
Endpoint n EPnIsochronous-IN
128 256 -
Endpoint n EPnIsochronous-
OUT 128 256 -
© 2010 Renesas Electronics America Inc. All rights reserved.
MSD HID CDCBulk-Only
with GUI and source
H8S/2215RSK/Web RSK/Web RSK/Web RSK/Web Web
H8S/2212/2218Web Web Web Web Web
H8SX1664 / 1668 RSK/Web RSK/Web RSK/Web RSK/Web Web
H8S/2472RSK/Web RSK/Web RSK/Web RSK/Web
-
Open source USB library LibUSB-Win32. Host stack available from Renesas and third party vendors
like Micrium.
USB software
© 2010 Renesas Electronics America Inc. All rights reserved.
Renesas Electronics America Inc.
Thank You