usb connection with the hid class driver

5
USB USB Communication/Configuration Communication/Configuration Overview Overview How does communication between a How does communication between a USB device and a PC work? USB device and a PC work? How does a USB device initiate contact with a PC?

Upload: allankliu

Post on 08-Jul-2015

1.514 views

Category:

Technology


2 download

DESCRIPTION

USB development

TRANSCRIPT

Page 1: Usb Connection With The Hid Class Driver

USB USB Communication/Configuration Communication/Configuration

OverviewOverview

How does communication between a How does communication between a USB device and a PC work?USB device and a PC work?

How does a USB device initiate contact with a PC?

Page 2: Usb Connection With The Hid Class Driver

Endpoint 1 Endpoint 2 Endpoint N Endpoints Have 4 Transfer Types:

Control Transfer – For sending commands

Interrupt Transfer – Host must poll this EP

Isochronous Transfer – Time sensitive Info

Bulk Transfer – For large data bursts

How does communication between a USB device How does communication between a USB device and a PC work? and a PC work?

Logical Communication Flow

Buffer 1 Buffer 2 Buffer NData is sent to memory buffers which will be processed by the software application

Interface 1

Software Application

Interfaces :

grouping of the endpoints into a functional group performing a single feature of the device.

For example:

Keyboard,Mouse,Camera,Scanner

,DVD drive

Operating System

Page 3: Usb Connection With The Hid Class Driver

Renesas H8S /2215 Device

c

PC

OS

Firmware

Hardware

Firmware

Hardware

Firmware

Firmware

How does communication between a USB device How does communication between a USB device and a PC work?and a PC work?

Interface Description

Grouping of endpoints performing a single feature of the device

Relationship

Collection of Endpoints

Various transfer types: Control,Interrupt,Isochronous,Bulk

Data Transfer Per Endpoint

Serial Interface Engine

USB Bus Interface

Physical/Signal/Packet Connectivity

Data

USB Driver

Software Application

Interprets data based on Interfaces

Buffered Data

USB Bus Interface

Serial Interface Engine

Physical/Signal/Packet ConnectivityUSB Cable

Data

Host Controller Driver

Device’s configuration, status, and control information.

Endpoint 0: Control Pipe

Manages System

Devices.

Data USB System Software

Host ControllerUHCIOHCIEHCI

Data

Page 4: Usb Connection With The Hid Class Driver

Configuration Descriptor

How the Device is setup

Device Address

Device Descriptor

Represents the device

How does a USB device initiate contact with a PC?How does a USB device initiate contact with a PC?

1

USB System Software

Endpoint 0 Control PipeDevice’s configuration, status, and control information.

Wait 100ms for USB Stabilization

2

3

PC gives Device an Address4

PC requests Device Descriptor

5PC requests Configuration Descriptor

6 Windows asks for driver for the device.

Driver is then located and installed.

7

Page 5: Usb Connection With The Hid Class Driver

USB System Software

Endpoint 0

How does a USB device initiate contact with a PC?How does a USB device initiate contact with a PC?1

Wait 100ms for USB Stabilization

2 This descriptor contains the Interface and Endpoint descriptor

5Configuration Descriptor

How the Device is setup

PC gives Device an Address

Device Address

43

Device Descriptor

Represents the device

PC requests Device Descriptor

6

Windows asks for driver for the device.

Driver is then located and installed.

7