Introduction to USB Agenda Introduction to USB LPC23xx Block - - PowerPoint PPT Presentation
Introduction to USB Agenda Introduction to USB LPC23xx Block - - PowerPoint PPT Presentation
Introduction to USB Agenda Introduction to USB LPC23xx Block diagram MCB2300 demo 2 Introduction to USB Plugging the USB cable Communication flow Lets talk about USB applications 3 USB- A Brief History USB 1.1 USB 2.0 OTG Approved on
2
Agenda
Introduction to USB LPC23xx Block diagram MCB2300 demo
3
Introduction to USB
Plugging the USB cable
Communication flow Lets talk about USB applications
4
USB- A Brief History
USB 1.1 USB 2.0 OTG
Approved on 11/23/99 by the USB Core team 12 Mbps bus Full-speed (12 Mbps) Low-speed (1.5 Mbps) Standard A connector and standard B connector Interrupt (OUT) Transfer was added Original USB 2.0 specification released
- n April 27, 2000
480 Mbps bus High-speed (480 Mbps) Full-speed (12 Mbps) Low-speed (1.5 Mbps) Backward compatible with USB 1.1 New mini-B connector Supplements the 2.0 specification Connects peripherals directly to each
- ther (peer to peer)
New mini-A connector and mini- AB receptacle
5
Plugging the USB Cable
Bus enumeration
– The process of identifying and configuring USB devices
During enumeration:
– Assigning an address – Reading “Descriptors” from device – Assigning and loading a device driver
Host software responsibility
6
Descriptors
Data Structure with a defined format that enables a host to learn about a device and its capabilities. Device Descriptor Configuration Descriptor Interface Descriptor Interface Descriptor
Endpoint Descriptor Endpoint Descriptor Endpoint Descriptor Endpoint Descriptor
7
Introduction to USB
Plugging the USB cable
Communication flow
Lets talk about USB applications
8
IN and OUT Transactions
Data flows IN and OUT with respect to the host “IN Transaction” “OUT Transaction”
IN OUT HOST
9
Endpoint Explained
An endpoint is a buffer used to transmit or receive data Each endpoint has a direction and an address Up to 32 (16 pairs) endpoints can reside within a device Although a host has buffers, it does not have endpoints
10
Introduction to USB
Plugging the USB cable Communication flow
Lets talk about USB applications
11
USB Applications
Control Transfer (Bus Enumeration) Interrupt Transfer Bulk Transfer Isochronous Transfer
12
Interrupt Transfer (1)
Device never interrupts the host. Host polls the device Only way low speed devices can transfer data Also used by the host to send data to the device on a scheduled basis Maximum packet size: 1-64
13
Interrupt Transfer (2)
DATA STAGE
14
Bulk Transfer (1)
Used for large amount of data Only full and high-speed devices Host controller ensures that bulk transfer are eventually completed but it does not guarantee bandwidth Fastest transfer type on an otherwise idle bus Maximum packet size: 8,16,32,64,512
15
Bulk Transfer (2)
DATA STAGE
16
Isochronous Transfer (1)
Fixed number of bytes per frame. Bandwidth is guaranteed No error correction – No ACK field Used for continuous communication of time- relevant information (streaming data) Full and high-speed devices only Maximum Packet size: 1-1023
17
Isochronous Transfer (2)
DATA STAGE No ACK field
18
Control Transfer (1)
Enables the host to read information about the device (enumeration) All devices must support Control Transfers at Endpoint 0 Control transfers require both an IN and OUT Endpoint Talks to the device through Address 0 while enumeration Maximum Packet Size: 8,16,32,64
19
Control Transfer (2)
SETUP STAGE DATA STAGE STATUS STAGE
20
USB Communication Blocks (1)
Transfer
Transfer Types
- Control
- Interrupt
- Bulk
- Isochronous
Handshake Packet Data Packet Token Packet
Transaction Types
- OUT
- IN
- SOF (Start of Frame)
- SETUP
Transaction Transaction
21
USB Communication Blocks (2)
22
LPC23xx
23
LPC2300 Family
24
LPC2378 (1)
25
LPC2378 (2)
26
Dual AHB
Concurrent operations become possible:
– Ethernet packet reception and transfer to SRAM – CPU Instruction Fetch – USB packet reception and transfer to SRAM – GP DMA
Dedicating AHB Bus to Ethernet is required to guarantee 100 Mbits/sec Ethernet throughput without contention with other peripherals
27
USB 2.0
Fully Compliant with USB 2.0 Spec Supports Control, Bulk, Interrupt and Isochronous endpoints Scalable realization of Endpoints at Run time Double buffering supported for Bulk and Isochronous Endpoints Supports DMA transfer on all non-control endpoints
28
Available USB Device Stacks for LPC2300/2400/214x
(list does not claim to be complete…) Keil RL-USB:
– http://www.keil.com/arm/rl-arm/rl-usb.asp
Micrium µC/USB Device
– http://www.micrium.com/products/usb/usb-device/overview.html
Micro Digital smxUSBD
– http://www.smxrtos.com/rtos/usb/smxusbd.htm
HCC Embedded USB (EUSB) Device Stack
– http://www.hcc-embedded.com/site.php?mid=120
CMX-USB
– http://www.cmx.com/cmx_usb.pdf
Express Logic USBX
– http://www.rtos.com/page/product.php?id=6
29
Available USB Host Stacks for LPC2400/ LPC3180
(list does not claim to be complete…)
Micrium µC/USB Host
– http://www.micrium.com/products/usb/usb-host/usb-host.html
Micro Digital smxUSBH
– http://www.smxrtos.com/rtos/usb/smxusbh.htm
HCC Embedded USB (EUSB) HostLite Stack
– http://www.hcc-embedded.com/site.php?mid=180
Express Logic USBX
– http://www.rtos.com/
OnChip Technology
– http://www.onchiptech.com/wb/pages/products/otusb.php
30