Download presentation
Presentation is loading. Please wait.
Published byGeorgia Ursula Atkinson Modified over 6 years ago
1
USB PHYISICAL LAYER PROTOCOL ENGINE LAYER APPLICATION LAYER
USB RECAP USB COMMUNICATION ELEMENTS USB COMMUNICATION LAYERS PHYISICAL LAYER PROTOCOL ENGINE LAYER APPLICATION LAYER USB PROTOCOL TRANSFER TYPE PACKET FORMAT
2
RECAP…. USB – automatic attachment, configuration and detachment
Speed – low, high and full speed Transfer type Isochronous – Bandwidth guaranteed Asynchronous – Bulk Transfer USB protocol Error detection and Recovery mechanism (low BER)
3
USB communication elements
Host – controls all activities in the bus HUB – star topology Attachment.detachment Power management Derror detection and correction Full- low speed device connection Device - not HOST!
4
USB communication layers
5
USB communication layers contd..
Physical layer 4 wire cable (+d, -D, +v, GND) Signalling – Little Endian RESET SUSPEND RESUME EOP NRZ I Coding and Bit stuffing
6
Phsical layer contd. Serial Interface Engine (SIE)
Part of both Host and device Encoding (NRZ I), bit stuffing and vice versa CRC Detects PID, SOP, EOP, RESET and RESUME
7
Host Controller Frame generation
Data Processing (request and response) Protocol engine (HOST USB protocol interface) Error handling
8
2.The protocol engine layer
Translates data between the application layer and function on device using USB transaction protocol USB HOST – USB System software USB device – USB logical device USB system software: Host software: bandwidth allocation, bus enable, power mangaement
9
USB software system Host control driver (HCD) USB driver (USBD)
Interface to the Host controller USB driver (USBD) Send the IPRs to the Host software Send the device description to the client software Enumeration
10
USB Logical Device Collection of End points
Each endpoint have unique address Each device unique address after enumeration End point Unidirectional USB logical device address + End point number + direction IN/OUT = unique Endpoint Enumeration default pipe + endpoint ‘0’ Control type
11
3. Application Layer Client Software Function
Transfer data from buffer to endpoint associated with appropriate interface Function collection of interfaces
12
USB Protocol USB Transaction USB - polling Protocol
Token Phase – future transaction type Data Phase – data transmission as indicated in the previous token Handshake Phase – send Handshake packet – success or failure of the transaction USB - polling Protocol Handshake Mechanism , timeout rules ,CRC – low BER (10 -10)
13
Transfer types Isochronous – Bandwidth gauranteed
Bulk – Bandwidth varies with the system resource Interrupt – short term – interupts Control – Enumeration Process
14
Packet field Formats SYNC field
Start of each packet Idle followed “KJKJKJKK” – NRZ I Encoding K - ‘0’ / ‘1’ > 20 ms (Full speed/ High speed) J – ‘1’ – one bit time Synchronize the internal clock in the Device
15
PID (Packet Identifier)
Actual PID – 4 bits I’s complement - 4 bits – error detection PID groups Token – IN, OUT, SOF SETUP Data - data0 or data1 Handshake – ACK, NAK, STALL
16
Address field 7 bits 127 device address 0 reserved address
17
Frame, Data fields Frame field Data field 11 bits only in SOF token
Indicates the number of the current frame Data field up to 1024 bytes
18
CRC field Protect all fields Absent in the PID Token – 5 bits
Data – 16 bits
19
Packet formats Token Packet Start Of Frame Packet
20
Packet Formats Contd.. Data Packets Handshake Packets
21
Transaction Format Control Transfer
SET_ADDRESS : setting a permanent address to a function. GET_DEVICE_DESCRIPTOR: the host wishes to get the device descriptor, which contains details concerning the device - how many configurations, interfaces it has, is the device is self/ bus powered etc. GET_CONFIGURATION_DESCRIPTOR: the host wishes to learn about a specific configuration of a device. GET_CONFIGURATION: the host detects which configuration is active at the moment in the device. SET_CONFIGURATION: the host sets a specific configuration on the device.
22
Control Transfer
23
Bulk Transfer IN transfer - in which the host asks for data from the device - data flow direction is from the device into the host. OUT transfer - in which the host whishes to send data to the device - data flows from the host out to the device.
24
Bulk Transfer - OUT
25
Bulk IN transfer
26
Interrupt Transfer
27
Isochronous Transfer
28
Reference USB Explained by Steven McDowell & Martin D.Seyer 1999.
Universal Serial Bus Specification Revision 1.1 Sep 1998 (Compac, Intel, Microsoft, NEC)
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.