EECE494: Computer Bus and SoC Interfacing. USB (Universal Series Bus) Dr. Charles Kim Electrical and Computer Engineering Howard University

Similar documents
USB Compliance Checklist

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

Computer Peripherals

Signals and Encoding

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.

Housekeeping. Fall /5 CptS/EE 555 1

Direct Link Networks. Lecture - Encoding & Framing 1. Areas for Discussion. Problems

Point-to-Point Links. Outline Encoding Framing Error Detection Sliding Window Algorithm. Fall 2004 CS 691 1

Universal Serial Bus - USB 2.0

Data Link Layer Overview

Telematics. 5rd Tutorial - LLC vs. MAC, HDLC, Flow Control, E2E-Arguments

Data Link Layer Overview

Links. CS125 - mylinks 1 1/22/14

ARM Cortex core microcontrollers

Troubleshooting USB 2.0 Problems with Your Oscilloscope APPLICATION NOTE

Data Link Networks. Hardware Building Blocks. Nodes & Links. CS565 Data Link Networks 1

Problem Statement. Physical and Data Link Layer Overview. Five Tasks Encoding. Make two computers talk to each other

USB 2.0 Application Software

4 Multiplexer. Y Fig Keyboard Scan Matrix

USB 2.0 Application Software

CS 640 Lecture 4: 09/11/2014

Computer and Network Security

Today s Schedule. USB 2.0 Overview. USB 2.0 Compliance Testing. Demo of the Agilent Solution Q&A

Your favorite blog : (popularly known as VIJAY JOTANI S BLOG..now in facebook.join ON FB VIJAY

SRI RAMAKRISHNA INSTITUTE OF TECHNOLOGY DEPARTMENT OF INFORMATION TECHNOLOGY COMPUTER NETWORKS UNIT - II DATA LINK LAYER

Data Link Layer Overview

Data Link Layer Overview

EITF25 Internet Techniques and Applications L3: Data Link layer. Stefan Höst

Full-Speed USB 1.1 Function Controller

USB 2.0 Hi-speed Peripheral Compliance Test Report

Transmission SIGNALs

Direct Link Networks: Building Blocks (2.1), Encoding (2.2), Framing (2.3)

ECE 4450:427/527 - Computer Networks Spring 2017

More on IO: The Universal Serial Bus (USB)

CIS 551 / TCOM 401 Computer and Network Security. Spring 2007 Lecture 7

Message, Segment, Packet, and Frame Link-layer services Encoding, framing, error detection, transmission control Error correction and flow control

Serial Communications

ID 221C: USB for Embedded Systems Viewed from the Embedded Target Side

Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: Ph:

Certified Wireless USB Protocol Dan Froelich

CSMC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala Set 4. September 09 CMSC417 Set 4 1

Data Link Control. Surasak Sanguanpong Last updated: 11 July 2000

USB2.0 - Device. Universal Serial Bus Measurement

Goals of Today s Lecture. Adaptors Communicating

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

USB 2.0 High-Speed Peripheral Compliance Test Report

Midterm Exam CSCE 232: Computer Networks Fall Instructions:

Overview. Performance metrics - Section 1.5 Direct link networks Hardware building blocks - Section 2.1 Encoding - Section 2.2 Framing - Section 2.

Universal Serial Bus Host Interface on an FPGA

From Signals to Packets Computer Networking. Link Layer: Implementation. Network Delay. 06-datalink.ppt, , Fall

Serial Triggering and Analysis Application Modules AERO AUDIO AUTO AUTOMAX COMP EMBD FLEX USB ENET Datasheet

CIS 777 Telecommunications Networks

Data Link Protocols. High Level Data. Control Protocol. HDLC Framing ~~~~~~~~ Functions of a Data Link Protocol. Framing PDUs. Addressing Destination

From Signals to Packets Computer Networking. Link Layer: Implementation. Datalink Functions. Lecture 5 - Coding and Error Control

Lecture 25 March 23, 2012 Introduction to Serial Communications

Computer Network. Direct Link Networks Reliable Transmission. rev /2/2004 1

CS455: Introduction to Distributed Systems [Spring 2018] Dept. Of Computer Science, Colorado State University

MQP Packet-Master USB12. User Manual

3. Data Link Layer 3-2

TRIBHUVAN UNIVERSITY

Part 1 - Introduction to USB

Today. Last Time. Motivation. CAN Bus. More about CAN. What is CAN?

Microprocessors LCD Parallel Port USB Port

Overview. Data Link Technology. Role of the data-link layer. Role of the data-link layer. Function of the physical layer

Announcements. No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

Computer Networking. Lecture 4 - Coding and Error Control

No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

Data and Computer Communications

Faculty of Science Final Examination. Computer Science B Basics of Computer Networks

FEC. Front End Control unit for Embedded Slow Control D R A F T. C. Ljuslin C. Paillard

dec_di se0_in eop or se0[1] se0[0] load cnt dec_do bit_strip (7) pid[7:0] (8) load dev_a[6:0] (8) load =2 (4) (3) (7) load hold (8) load crc5_rx load

CY7C Errata Revision: *A. June 25, 2004 Errata Document for CY7C Part Numbers Affected. CY7C67200 Qualification Status

Direct Link Networks. Nodes. Links. Outline Building Blocks Encoding

Generic Architecture. EECS 122: Introduction to Computer Networks Switch and Router Architectures. Shared Memory (1 st Generation) Today s Lecture

AN PSoC 3 and PSoC 5LP Introduction to Implementing USB Data Transfers. Contents

Serial Triggering and Analysis Application Modules AERO AUDIO AUTO AUTOMAX COMP EMBD FLEX USB ENET Datasheet

Digital Logic Level. Buses PCI (..continued) PTE MIK MIT

CSCI-1680 Physical Layer Link Layer I Rodrigo Fonseca

USB Function IP Core. Author: Rudolf Usselmann

INTERNATIONAL STANDARD

EECS150 - Digital Design Lecture 15 - Project Description, Part 5

Parallel Data Transfer. Suppose you need to transfer data from one HCS12 to another. How can you do this?

SL811HS Embedded USB Host/Slave Controller

Embedded USB Host/Slave Controller

UNIT-II 1. Discuss the issues in the data link layer. Answer:

CS 5520/ECE 5590NA: Network Architecture I Spring Lecture 13: UDP and TCP

Lecture 3: Modulation & Layering"

Wireless USB Protocol John S. Howard. Senior Architect Intel Corporation

Distributed Systems Exam 1 Review. Paul Krzyzanowski. Rutgers University. Fall 2016

Lecture 11 Overview. Last Lecture. This Lecture. Next Lecture. Medium Access Control. Flow and error control Source: Sections , 23.

Serial Communications

EECS 122: Introduction to Computer Networks Switch and Router Architectures. Today s Lecture

CHAPTER 2 Data Representation in Computer Systems

5th Slide Set Computer Networks

CHAPTER 2 Data Representation in Computer Systems

Wireless and Mobile Networks

Solutions to Select Exercises

Additional Slides (informative)

CSCI-1680 Link Layer I Rodrigo Fonseca

Conquest_ReadMe.txt =========================== Conquest Protocol Suite Software v Release Notes Jan 22,2009 ===========================

Transcription:

EECE494: Computer Bus and SoC Interfacing USB (Universal Series Bus) Dr. Charles Kim Electrical and Computer Engineering Howard University Spring 2014 1

Review - Line Code Line Code = Digital Baseband Modulation = Digital Baseband Transmission Used for digital data transport Common Line Codes Manchester Code ( Transition Direction ) Non-Return-to-Zero (NRZ) Non-Return-to-Zero, Inverted (NRZI) (Read as State Change for 1 ) 6b/8b 2

USB Protocol Differential Signaling: D+ and D- Toggle between J state and L state J state: D+ High and D- Low K state: D+ Low and D- High NRZI Coding State change J K or K J : 0 J J or K K: 1 8-bit Synchronization, 1 bit mark, followed by USB frame, and ended with EOP (end of packet) EOP: 2 bit times of SE0 [ single-ended zero ] (D+ and D- both LOW) and 1 bit of J state (See next slide) 3

Example of USB transmission 4

USB Eye Diagram Electrical testing of D+ and D- Signal quality Rise Time Fall Time Undershoot Overshoot D+/D- Line Jitter 5

USB Communication A series of frames Each frame contains: SOF (Start of Frame) Transactions 6

Transaction Exchange of packets Sync/Data/End 3 types of packets Information in a packet USB Packet Contents Packet Identification (PID): 4 and 4 bits Device Addr (optional): 7 bits (max 27 devices) End Point (EP) (optional): 4 bits (max 16 endpoint addresses) Payload Data (optional)(up to 1023 bytes) CRC (optional) 7

PID (Packet ID): Identification of the type of packets that is being sent 8

USB Host and Devices 9

Token Packets Always come from the host Used to direct traffic on the bus The function of the token packet depends on the activity performed IN tokens - to request that devices send data to the host. OUT tokens - to send data from the host. SETUP tokens - to send commands from the host. SOF tokens - to mark time frames. With an IN, OUT, and SETUP token packet, there is a 7-bit device address, 4-bit endpoint ID, and 5-bit CRC. 10

Data Packet Data packets follow IN, OUT, and SETUP token packets. The size of the payload data ranges from 0 to 1024 bytes depending on the transfer type. The packet ID toggles between DATA0 and DATA1 for each successful data packet transfer, and the packet closes with a 16-bit CRC. The receiver of data toggles its data toggle bit when it is able to accept the data and it receives an error-free data packet with the correct identification. The sender of data toggles its data toggle bit when it receives a positive acknowledgement from the receiver. In this way, the data toggle bits stay synchronized until, for example, a packet with an incorrect identification is received. 11

Data Packets Data Toggle Bit An example where the data toggle is used is if an ACK is sent but not received. the sender updates the data toggle from 1 to 0 but the receiver does not. The receiver remains at 1. This causes the host and device to be out of sync on the next data stage, which indicates an error. White boxes represent the transaction is coming from the host and black boxes represent the transaction is coming from the device. 12

Handshake Packets Handshake packets conclude each transaction. Each handshake includes an 8-bit packet ID and is sent by the receiver of the transaction. ACK: Acknowledge successful completion NAK: Negative acknowledgment Stall: Error indication sent be a device NYET: Indicates the device is Not ready to receive another data packet (High Speed only) 13

CRC Background 1 Integer Division: Dividend (N) divider by divisor (D) N(629)/D(25) = Q (25) R(4) See, [N-R]/D= Q (25) R(0) Send N (629) and R(4) to a target Receiver, for data integrity, re-computes R and check against the received R 14

CRC in USB Polynomial Division: Dividend (N) divider by divisor (D) N(629)=6*10 2 +2*10 1 +9*10 0.=1*2 9 +.. D(25)=2*10 1 +5*10 0 = 1*2 4 +.. 4-bit PID (Packet ID) field Simple bitwise inversion of the PID is enough No CRC protection Token Packets Protected region is only 11 bits 5-bit CRC protection Data packets Up to 1023 bytes 16-bit CRC protection 15

USB Analyzer Output Example - A Packet #190 L/S: Low Speed Token Packet CRC5: 5 bit CRC EOP: End of Packet 16

USB Analyzer Output Example - B Packet #191 Data0: Data Token CRC16: Check for Data with 16 bit CRC Idle: Time between the current packet and the previous packet 17

USB Analyzer Output Example - C Packet #192 ACK: Successful indication of Data packet 18

Bus Analyzer Capture - 1 19

Bus Analyzer Capture - 2 20

Bus Analyzer Capture - 3 21

Bus Analyzer Capture - 4 22

Bus Analyzer Capture - 5 23

USB-Serial 24

USB-Serial ftdichip.com 25

USB-Serial 26

References and Acknowledgment Many screen shots of this lecture note are from USB 101: An Introduction to Universal Serial Bus 2.0 from AN57294 (written by Robert Murphy) from Cypress Semiconductor, San Jose, CA 27