An Introduction to Universal Serial Bus

Similar documents
USB Complete. The Developer's Guide Fifth Edition. Jan Axelson. Lakeview Research LLC Madison, WI 53704

Universal Serial Bus - USB 2.0

Chapter 11: Input/Output Organisation. Lesson 17: Standard I/O buses USB (Universal Serial Bus) and IEEE1394 FireWire Buses

USB for Embedded Devices. Mohit Maheshwari Prashant Garg

Bus Example: Pentium II

SERIAL BUS COMMUNICATION PROTOCOLS USB

LibUSB - Create a Solution Without the Class Struggle

David Harrison, Design Engineer for Model Sounds Inc.

USB 3.0 A Cost Effective High Bandwidth Solution for FPGA Host Interface Introduction

USB INTERFACE AND DRIVER Mentor: Dr. Yann Hang Lee Team Members: Jubin Mehta, Koshik Samota (jmehta3,

M Tech credit seminar report, Electronic Systems group, EE Dept, IIT Bombay, submitted Nov 2002 UNIVERSAL SERIAL BUS

PSoC 5LP Vendor-Specific USBFS Tutorial

Introduction to USB/LPC23xx

USB evaluation kits and reference tools

Microprocessors LCD Parallel Port USB Port

PIC-P28-USB development board Users Manual

Course 10: Interfaces Agenda

Raspberry Pi - I/O Interfaces

Design Of Linux USB Device Driver For LPC2148 Based Data Acquisition System Including GSM.

Fuzzing the USB in your devices

USB (Universal Serial Bus) Presentation to UCHUG - 2/06/08 G. Skalka

ECE 471 Embedded Systems Lecture 30

Introducing Class-Level Decoding Video See a video demonstration of the new real-time class-level decoding feature of the Data Center Software.

Universal Serial Bus Host Stack User s Manual V3.41

PDF created with pdffactory Pro trial version How USB Ports Work by Marshall Brain. Introduction to How USB Ports Work

Serial Communications

High speed USB interface for digital processor system

* USB Full-Speed Hub Controller

USB 3.0 Software Architecture and Implementation Issues. Terry Moore, CEO MCCI Corporation

Genesys Logic, Inc. GL862. USB 2.0 PC Camera Controller. Product Overview

More on IO: The Universal Serial Bus (USB)

ADVANCED OPERATING SYSTEMS USB in a microkernel based operating system

EZ-USB SX2 Development Kit Manual Getting Started. Rev 2.0

Cypress Semiconductor

Intelop. *As new IP blocks become available, please contact the factory for the latest updated info.

Making USB Device Drivers Easier Using the HID Class

USB: Features and Circuits Manoj Purohit ( ) Supervisor: Prof P.C.Pandey

USB BF70x Bulk Library v.1.1 Users Guide Users Guide Revision 1.1. For Use With Analog Devices ADSP-BF70x Series Processors. Closed Loop Design, LLC

FX3 Programmers Manual. Doc. # Rev. *C

Organisasi Sistem Komputer

USB BF70x Audio 1.0 Library v.1.2 Users Guide Users Guide Revision 1.3. For Use With Analog Devices ADSP-BF70x Series Processors

Clear Hat Consulting, Inc.

Wind River USB for VxWorks 6 Programmer's Guide. Wind River USB for VxWorks 6 PROGRAMMER S GUIDE 2.3

This process is a fundamental step for every USB device, fore without it, the device would never be able to be used by the OS.

USB Interrupt Transfer Example PSoC 3 / PSoC 5

BOOTSTRAP YOURSELF WITH LINUX-USB STACK: DESIGN, DEVELOP, DEBUG, AND VALIDATE EMBEDDED USB

PLX USB Development Kit

USB Framework, IP Core and related software Tropea S.E., Melo R.A.

Agenda. Introduction Market trend and application 1394 Market Analysis Data 1394 and industry Applications. Other Technologies USB DVI

AN INTRODUCTION TO USB EXTENDERS

Interrupt transfers & USB 2.0 & USB 3.0. Group Members Mehwish Awan Mehwish Kiran

Certified Wireless USB Wire Adapter Model

ADI Solution for Industrial Communications

Computer Organization

Cypress EZ-USB FX3 SDK Release Notes

Input/Output Problems. External Devices. Input/Output Module. I/O Steps. I/O Module Function Computer Architecture

Exam: A+ Practice Exam 3: Chapter 6

USB. The Universal Serial Bus. Most of the material is taken from Jan Axelsson: USB Complete, third edition Lakeview Research ISBN:

Inside the Computer System

CLD SC58x CDC Library v.1.00 Users Guide Users Guide Revision For Use With Analog Devices ADSP-SC58x Series Processors. Closed Loop Design, LLC

The EZ-USB TM Integrated Circuit. Technical Reference

CLD BF70x CDC Library v.1.3 Users Guide Users Guide Revision 1.3. For Use With Analog Devices ADSP-BF70x Series Processors. Closed Loop Design, LLC

Understand USB (in Linux)

EZ-Link (AN2720SC) Single-Chip USB-to-USB Networking Solution FEATURES OVERVIEW

Release Notes. Cypress EZ-USB FX3 SDK. Version 1.2.2

LibUSB: Create a Solution Without the Class Struggle!

ARM Cortex core microcontrollers

User s Guide. IP-201 I2C Bus Multiplexer Board Revision 1. Micro Computer Control Corporation

An Universal USB 3.0 FIFO Interface For Data Acquisition

Design and Implementation of Peripheral Sharing Mechanism on Pervasive Computing with Heterogeneous Environment

Dariusz Makowski Department of Microelectronics and Computer Science tel

Serial Port Complete

AN EZ-USB FX3 I 2 C Boot Option. Application Note Abstract. Introduction. FX3 Boot Options

EPIC board ensures reliability in the toughest environment

Introduction to USB Development

Testing and Debugging

EZ-USB AT2LP USB 2.0 to ATA/ATAPI Bridge

Serial Communications

Computer Organization

Using the HID class eases the job of writing USB device drivers

How to fix Usually Slightly Broken devices and drivers?

Serial Communications

EZ-USB FX Technical Reference Manual

LM1010 Long Range Bluetooth v4.0 Dual Mode Adapter Host Controller Interface (HCI) via USB Interface

MCCI USB DATAPUMP. Architectural Overview. Device Architecture

Compute Node Design for DAQ and Trigger Subsystem in Giessen. Justus Liebig University in Giessen

The PEXUSB3S2 PCI Express USB 3.0 card lets you add two USB 3.0 ports to your PC through a PCI Express slot.

Introduction to USB. Alan Ott SCaLE 15x March 2-5, 2017

ACR101I SIMicro (CCID)

FT245 USB Modual. - Ver FT245 Module Features

Functional Verification of xhci (extensible host controller Interface) for USB 3.1 Using HDL

AN How to Implement an Image Sensor Interface Using EZ-USB FX3 in a USB Video Class (UVC) Framework

USB BF70x HID Library v.1.1 Users Guide Users Guide Revision 1.1. For Use With Analog Devices ADSP-BF70x Series Processors. Closed Loop Design, LLC

Hardware. Multimedia computers. Embedded devices. Mobile Phones. Multimedia PC (MPC) Current equipment

Reference Projects. USB Drivers. USB Audio Class 2.0 Driver for Windows. Universal USB Device Driver for Windows

Four Components of a Computer System

Using Embedded Tools for I2C, SPI, and USB Debugging for the Renesas RX63N RDK

XE 900: Fastest EPIC board now available with Windows XPe

Joseph D. Cornwall, CTS-D, CTS-I Technology Evangelist

STUDY, DESIGN AND SIMULATION OF FPGA BASED USB 2.0 DEVICE CONTROLLER

Transcription:

An Introduction to Universal Serial Bus Neil Scott June 27, 2008 NEIL SCOTT JUNE 27, 2008 1

Overview Introduction History Hierarchy Enumeration Demonstration Circuit Conclusions Questions NEIL SCOTT JUNE 27, 2008 2

Introduction USB Universal Serial Bus Replaces legacy interfaces RS232 and Parallel Plug-and-play Fast, user-friendly (usually) Commonly found in printers, scanners, keyboard/mouse, external hard disk, flash drives, digital cameras, webcams... NEIL SCOTT JUNE 27, 2008 3

History USB has gone through several revisions Initial release USB1.0 in November 1995 USB1.0 1.5Mbps (Low-Speed) and 12Mbps (Full-Speed) Re-release USB1.1 in Sept. 1998 rectify adoption problem USB2.0 Released in April 2000 USB2.0 480Mbps(High-Speed) and backward compatible NEIL SCOTT JUNE 27, 2008 4

Why so popular? USB is low cost in comparison to high-speed serial bus technologies like IEEE1394 (FireWire) USB is tiered-star topology, FireWire is peerto-peer based requiring smarter peripherals USB devices cannot initiate communication, FireWire devices can communicate with any node, at any time. USB network has single host, where in FireWire any node can control the network NEIL SCOTT JUNE 27, 2008 5

Topology of USB Tiered-Star Topology Hubs used for branching 5 tiers of hubs permitted 127 devices maximum bandwidth is limited and varies with device count USB Topology NEIL SCOTT JUNE 27, 2008 6

USB Connector & Cabling USB Connectors USB Cable NEIL SCOTT JUNE 27, 2008 7

USB Device Classes Devices can be fully custom requiring a custom driver, or may belong to a device class Device classes define behaviour of device so a single device driver can be used for various devices Common Device Classes include: Mass Storage Device, Human Interface Device (HID), USB hub and Printer NEIL SCOTT JUNE 27, 2008 8

USB Device Single Physical device may consist of several logical sub-devices Interfaces used to separate device functionality Drivers exchange data with endpoints over pipes (logical channels) Endpoints are unidirectional USB Device NEIL SCOTT JUNE 27, 2008 9

Endpoint Zero (Control Endpoint) Endpoint Zero required by all devices for standard requests (device descriptors) During enumeration, device identifies itself with the host OS by set of standard requests over EP0 Endpoint Zero is only bi-directional endpoint Often used for vendor control requests also NEIL SCOTT JUNE 27, 2008 10

Data Flow Types (Endpoints) Control for enumeration, control and status where data is non-periodic (device control) Bulk large payloads, guaranteed data with built-in error checking and hardware retries (flash drive, external hard drive) Interrupt when data is small and infrequent with bounded service period (keyboards/mice) Isochronous periodic data where data rate is supersedes integrity (webcam) NEIL SCOTT JUNE 27, 2008 11

Designing a USB Device Application speed requirements Full Speed 480Mbps High Speed 12Mbps Low Speed 1.5Mbps Find a suitable USB peripheral controller Determine the interface(s) and endpoints of the device Write firmware, driver and software! NEIL SCOTT JUNE 27, 2008 12

Cypress EZ-USB FX2 Controller Integrated high-speed USB microcontroller Single Chip USB2.0 transceiver, serial interface engine and enhanced 8051 core Firmware can be loaded from external EEPROM or over USB Two USART controllers, an I2C controller Integrated 4kB FIFO for endpoints (slave mode or general purpose interface) NEIL SCOTT JUNE 27, 2008 13

Cypress EZ-USB GPIF GPIF provides internal master for internal endpoint FIFOs. User defined waveform descriptors control GPIF state machine Can be used for interface between ASICs, DSPs, or even more complex interfaces such as ATAPI for PATA hard drive interface. NEIL SCOTT JUNE 27, 2008 14

USB Driver Development Device driver required to interact with device Drivers are OS specific and HW dependent Kernel Drivers Requires proficient programming or may crash system by overwriting memroy User-Space / User-Mode Drivers More stable than kernel drivers, cannot crash kernel. Performance overhead when transitioning between user and kernel space NEIL SCOTT JUNE 27, 2008 15

libusb Collection of User-Space routines for manipulating USB devices without need for kernel driver Available for Linux, Windows, Mac OSX and FreeBSD (and others). Supporting functions for finding devices on in a USB system selecting and claiming interfaces control, bulk and interrupt transfers no isochronous endpoint support NEIL SCOTT JUNE 27, 2008 16

libusb Allows a designer a relatively easy API to use when interacting with devices Not as fast as a kernel-mode driver but much easier to develop Wrappers have been created for Python, Perl and Java NEIL SCOTT JUNE 27, 2008 17

Demo Circuit - USBLCD Set of Vendor Specific Requests to control character LCD Data is sent to default control endpoint. No additional endpoints used. I/O Expander board used to control inputs of LCD operating at 5V USBLCD Block Diagram NEIL SCOTT JUNE 27, 2008 18

Demo Circuit User-Mode Driver Written in Python using pyusb wrapper for libusb class DeviceDescriptor(object) : def init (self, vendor_id, product_id, interface_id) : self.vendor_id = vendor_id self.product_id = product_id self.interface_id = interface_id def getdevice(self) : buses = usb.busses() for bus in buses : for device in bus.devices : if device.idvendor == self.vendor_id : if device.idproduct == self.product_id : return device return None Python Code Snippet for finding a USB Device NEIL SCOTT JUNE 27, 2008 19

Demo Circuit User-Mode Driver class devusblcd(object): USBLCD_VID = 0xabcd USBLCD_PID = 0x0501 USBLCD_IFID = 0... def init (self): self.device_descriptor = DeviceDescriptor (self.usblcd_vid, self.usblcd_pid, self.usblcd_ifid) self.device = self.device_descriptor.getdevice() self.handle = None...... def open(self): self.device = self.device_descriptor.getdevice() self.handle = self.device.open() self.handle.claiminterface(self.device_descriptor.interface_id) def setlcdl1(self, msg): ret = self.handle.controlmsg(self.vendor_request_out, self.vrq_set_lcd_l1, msg, value=0, index=0, timeout=100) Python Code Snippet for finding a USB Device NEIL SCOTT JUNE 27, 2008 20

Questions?? NEIL SCOTT JUNE 27, 2008 21