Usb

  • Uploaded by: ram
  • 0
  • 0
  • April 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Usb as PDF for free.

More details

  • Words: 1,006
  • Pages: 30
UNIVERSAL SERIAL BUS

1

Overview  Introduction  Components  Protocol  Icons  Developments  USB

OTG 2

What Is USB? 1.    5. 6.

Invented & standardized – 1995 U – universal S – serial B – bus 127 Devices ? Data transmission using packets.

3

Why Use USB?      6. 7. 8. 

Single port for many devices. Plug and play. Automatic detection of device. No need to restart the system. Speed flexibility. Low speed Full speed High speed Robust – error detection capability. 4

COMPONENTS  Host

controller (m) and device controller (s)  Hub is optional  Five “basic” components Cables

and Connectors

Power Electrical

Signaling

Protocol Device

Framework

Standard

commands Standard descriptions 5

Connectors 3

“standard” plugs (not including OTG mini-A) ‘A’

plug leads upstream to host ‘B’ or ‘mini-B’ plug goes to device “captive”cable -- device end of cable uses a “vendor-specific connect method”: hard-wired or special plug

6

7

Standard Cables 5

m maximum length (shorter for low-speed) 26

ns maximum delay between ‘A’ plug and ‘B’ plug 125 mV maximum voltage drop 4 conductors plus shield D+

and D- (twisted) data pair VBUS (power) Ground

8

Electrical Signaling (1)  Three

Signaling rates

High-Speed

== 480 Mbps Full-Speed == 12 Mbps Low-Speed == 1.5 Mbps  Basic

signals

Idle Reset

(only full- and low-speed; long enough SE0) Suspend (more than 3 ms of continuous idle) Resume

9

Electrical Signaling (2)  Data

moved via ~Differential Signaling  Full- and Low-Speed – USB 1 specification  High-Speed - USB 2 specification  NRZI with bit-stuffing baseband transmission

10

Protocol - Transactions  Packets

always part of a transaction  Transactions always target a Device Endpoint (source or sink)  Transit via a Pipe that connects Host & Device  Transactions have 1 to 3 components Host

“talks”, Device “answers” Token packet (always present and from host) Data packet (direction as specified by Token) 

11

Endpoint  Endpoint

: source or sink of data  Also a interface between hardware and software.  Every device will many pairs of buffer  One

is used for IN transaction  Other is used for OUT transaction  All

devices should have ENDP = 0  Each buffer is of 8 bit length. 12

Pipes  Logical

connection b/t host & endpoints  Parameters  Bandwidth  Type

of transfer  Packet size  Buffer size etc

13

Packet Id  Basically

4 bits  But a byte is used for PID  Every packet should have PID field Pid Pid P P P P P P 0 id2 id3 id4 id5 id6 id7 1 nibble is complement of lower  Higher nibble  Advantage 

Self check (i.e., CRC is not used to check the PID) 14

Token packets Setup , IN, OUT , SOF SYNC

PID

ADDR

ENDP

CRC5

EOP

SYNC – START OF PACKET (8) PID – PACKET ID (8) ADDR – ADDRESS(7) ENDP – ENDPOINT(4) CRC5 – CHECKSUM(5) X^5 + X^2 + 1 EOP – END OF PACKET(D+ , D- both zero) 15

Token packets  Setup  Device

configuration  Device descriptors etc  In  Host

ready to receive data

 Out  Host

ready to send data

 SOF  Start

of frame 16

Data packets  Data

0 , Data 1 ?  3 to 1026 bytes – High speed USB  11 bytes – Low speed USB PID

DATA

EOP

SYNC CRC1  DATA – PAYLOAD 6  CRC16 – CHECKSUM (16) X^16 + X^15 + X^2 + 1. 17

CRC o

o

WHY CRC5 – Token packets , CRC16 – Data packets ?  size of packets Polynomial 16 ? All 4 errors can be detected Single bit error Two bit error Odd error Burst error 18

Handshake packets  ACK



, NAK , STALL  ACK – Positive acknowledgement  NAK – Negative acknowledgement  STALL – The device finds its in a state that it requires intervention from the host. Transmission is in opposite direction of that of data packets. SYNC PID EOP

19

Descriptors  Information

to the host about device  Type of device , Manufacturer , Version , number of endpoints and configuration example:  Device descriptor: Vendor id ,USB  

compatibility Configuration descriptor: Power , interface type Endpoint descriptor: To determine bandwidth for the 20 bus

Working

21

SERIAL INTERFACE ENGINE  Part

of both the host's and the device's physical layer FUNCTIONS  SERIALIZATION

AND DESERIALIZATION  NRZI ENCODING AND DECODING  BITSTUFFING AND DESTUFFING  CHECKSUM GENERATION AND ERROR CHECKING  PID , EOP , SOP DETECTOR 22

IN TRANSACTION  ORIGINAL DATA + CHECKSUM  PARALLEL TO SERIAL  BIT STUFFING  NRZI ENCODING OUT TRANSACTION  NRZI DECODING  BIT DESTUFFING  SERIAL TO PARALLEL  CRC CHECK 23

ICONS

24

USB OTG

25

What is USB OTG ?  Supplement

to USB 2 specification  Gives dual role capability to increasingly intelligent platforms , on the same port  Result is “point-point” USB from users perspective.  Supports 12 Mbps , 1.5 Mbps 480 Mbps (optional) 26

What changes does USB OTG require?  Reduced

connector size.  Power consumption is less.  Adds protocol for dynamic switching between host and device (HNP).  Session request protocol 

USB power can switched on/off on discretion of device A

27

OTG Dual-Role Device  has

a single mini-AB receptacle

Is

A-device (host) when mini-A plug inserted Is B-device (device) when mini-B plug inserted  operates

at Full-speed  may operate at High-Speed  may support one or more hubs (as an A-device) 28

COMPARISON USB OTG product -Must source 8mA

Vbus min on Vbus -May or may not be able to which has load more drivers mechanism to drivers. -PCI not present

USB Host in PC -Sources 500mA on

-Supports device drivers. -Always has load more 29

-Standardized PCI

For more information  Visit  www.usb.org  www.usb.org/developers/onthego  http://www.howstuffworks.com/

 http://www.trenz-electronic.de/down/dwdten.ht

30

Related Documents

Usb
April 2020 22
Usb
May 2020 17
Usb
July 2020 20
Usb
June 2020 18
Usb
May 2020 20
Usb
May 2020 9

More Documents from ""

14
May 2020 21
Solar Sails
April 2020 21
Cupid
November 2019 30
07
May 2020 22