Presentation is loading. Please wait.

Presentation is loading. Please wait.

Copyright 2003 Ryan Rangel. All rights reserved. Got USB? The questions to ask when adding USB Host to your Embedded System. By Ryan Rangel

Similar presentations


Presentation on theme: "Copyright 2003 Ryan Rangel. All rights reserved. Got USB? The questions to ask when adding USB Host to your Embedded System. By Ryan Rangel"— Presentation transcript:

1 Copyright 2003 Ryan Rangel. All rights reserved. Got USB? The questions to ask when adding USB Host to your Embedded System. By Ryan Rangel ryan@rrrangel.com

2 Copyright 2003 Ryan Rangel. All rights reserved. Introduction What do you need to add USB Host to your Embedded system? Quick USB Overview USB Host Issues Even Quicker USB On-The-Go Overview When listing products offered by various manufactures, the lists are not meant to be complete. Also, I’m neither endorsing or discouraging the use of these products. Additional research will need to be done to find the best solution for you.

3 Copyright 2003 Ryan Rangel. All rights reserved. Intended to fix PC problems. One Universal connector for all devices. Devices may be hot plugged. Supply power to device. 127 devices per bus. 1 interrupt per bus. Different speeds. Self-identifying devices.

4 Copyright 2003 Ryan Rangel. All rights reserved. Bus Architecture Master Slave Peer Broadcast (Ethernet) Peer to Peer (IEEE1394, RS232) Master – Slave (USB) Slave

5 Copyright 2003 Ryan Rangel. All rights reserved. Transport Types: Control – get/set device state Bulk – reliable transport / unknown latency Interrupt – Poll for device event Isochronous – unknown transport / reliable latency

6 Copyright 2003 Ryan Rangel. All rights reserved. Endpoints and Pipes Building blocks of a USB function. Must have default control endpoint (#0) up to 15 input and 15 output endpoints. Each endpoint may be any transport type Pipe – Logical channel representing an association between a function endpoint and host software.

7 Copyright 2003 Ryan Rangel. All rights reserved. I want USB? USB

8 Copyright 2003 Ryan Rangel. All rights reserved. What is you application? Do you need Host, Slave or both???? USB HostUSB Function

9 Copyright 2003 Ryan Rangel. All rights reserved. USB Host What is my application? What are my requirements? What host controller best fits my system? What devices will be connected to my system? What other software support do I need? What solutions are available?

10 Copyright 2003 Ryan Rangel. All rights reserved. Some questions for choosing a USB host Controller. Standard vs. Proprietary Register Interface. System Bus, DMA vs. non-DMA Software vs. Hardware Scheduling Interrupts Project hardware cost requirements are your problem……

11 Copyright 2003 Ryan Rangel. All rights reserved. Standard vs. Proprietary Register Interface Standard register interface have public specifications. Wider Operating System and USB Host stack support. Proprietary register interface has non- public specification. Must get Host Controller driver from HC vendor. Sometime must purchase.

12 Copyright 2003 Ryan Rangel. All rights reserved. Standard Register Interfaces UHCI – USB 1.1. Intel originally developed. On every motherboard. OHCI – USB 1.1. Developed by Compaq, Microsoft, National Semi. EHCI – USB 2.0. NEC, Microsoft, Comaq, Lucent, Intel.

13 Copyright 2003 Ryan Rangel. All rights reserved. Some Proprietary Interfaces TransDimension UHC124, OTG243 Phillips ISP1161, ISP1362 ScanLogic / Cypress SL811HS New controllers coming out! New IP for SOC and OTG.

14 Copyright 2003 Ryan Rangel. All rights reserved. DMA vs. Non-DMA Host Controllers. All standard controllers use DMA. Standard HCI need PCI or onboard SOC. Proprietary controllers usually have no or limited DMA capability Proprietary controllers do not require PCI! If your I/O bus is slow, DMA won’t help!

15 Copyright 2003 Ryan Rangel. All rights reserved. Buffer Management Standard HCI – If your system has memory cache then having DMA controller requires management of cached and non-cached memory buffers. Proprietary HCI – Buffers to be transferred must be copied to chip memory. Chip buffer management can be difficult due to limited space.

16 Copyright 2003 Ryan Rangel. All rights reserved. Scheduling Standard HCI - all transfer scheduling done by HC silicon Proprietary HCI - all or part of transfer scheduling done by software. – Transfer Scheduling – Batch Scheduling – Transaction Based

17 Copyright 2003 Ryan Rangel. All rights reserved. Standard HCI Scheduling CPUMemoryHC ED TD

18 Copyright 2003 Ryan Rangel. All rights reserved. Proprietary HCI Scheduling CPUMemoryHC ED TD Transfer Buffer

19 Copyright 2003 Ryan Rangel. All rights reserved. Interrupts Standard HCI – Only interrupts IF event has occurred that requires software processing. Transfer Based HCI – One interrupt per USB transfer! Batch Based HCI – One interrupt per frame. Transaction HCI – Same as Standard HCI but number of outstanding transactions is limited.

20 Copyright 2003 Ryan Rangel. All rights reserved. OHCIEHCI So, what host controller best fits my system???? USB Host

21 Copyright 2003 Ryan Rangel. All rights reserved. Some questions for choosing USB host device support. What class of devices do you need to support? Standard vs. Non-Standard devices What other software support will I need? Issues with classes after device ships. Don’t forget your application requirements. It will take an infinite amount of time to add infinite amount of functionality.

22 Copyright 2003 Ryan Rangel. All rights reserved. What is a class driver? A combination of pipes, with different transport types. Data Interpretation. Application or driver subsystem interface. A compound device exports multiple classes.

23 Copyright 2003 Ryan Rangel. All rights reserved. Standard vs. Proprietary classes Standard class specifications are public. Standard class software support is common in most protocol stacks available. Proprietary class specifications must be gotten from the device vendor. Proprietary class software support is commonly non-existent.

24 Copyright 2003 Ryan Rangel. All rights reserved. Available Standard Classes Audio Communications Humand Interface Device (HID) Still Image Capture, PIMA 15740, PTP Mass Storage Printer Hub Bluetooth Smart Card (CCID) Firmware Upgrade Content Security IrDA Physical

25 Copyright 2003 Ryan Rangel. All rights reserved. Some Available Proprietary Classes USB to Ethernet USB to Serial MP3 Players Video Cameras Wireless (802.11, etc.) Random-Wildcard Vendor Device!!! Scanners Host to Host Cable Storage Devices Digital Cameras

26 Copyright 2003 Ryan Rangel. All rights reserved. Other needed software…. HID = event/messaging subsystem Mass Storage = File System, Storage protocol stack USB to Ethernet = TCP/IP stack Printers = What printer control language Bluetooth = Bluetooth protocol stack Does your operating system have all the needed support?

27 Copyright 2003 Ryan Rangel. All rights reserved. Typical issues. Do you have enough ROM space for all class drivers and protocol subsystems? How do I add a class driver after ship? What happens after ship if my class driver has a bug or was not fully implemented? What if a new device comes out that needs a different protocol subsystem? How will I handle users plugging random devices into my system?

28 Copyright 2003 Ryan Rangel. All rights reserved. UHCI So, what devices will be connected to my system? OHCIEHCI USB Protocol HID Mass Storage Printer

29 Copyright 2003 Ryan Rangel. All rights reserved. How will my applications interface with the class driver? Character Block (file system?) Socket (networking stack) Other In theory, USB just the transport and applications should not be USB specific in any way.

30 Copyright 2003 Ryan Rangel. All rights reserved. Sometimes you will be able to interface directly with the class driver…. USB Protocol Host to Host Still Image MP3 Player OS Character API

31 Copyright 2003 Ryan Rangel. All rights reserved. Interfacing with USB Keyboard, Mice and other HID. HID is a standard class. You will most likely send events to a user input subsystem. Will you have support for all HID devices? Do you only want to support Boot HID? USB Protocol HID User Input system

32 Copyright 2003 Ryan Rangel. All rights reserved. Interfacing with USB Mass Storage. Mass Storage is a standard class. Which only helps if the device is compliant. What files systems do you have support for (FAT, NTFS, EXT2, ISO9660, other)? Does your file system support removable media or removable devices? When a device is plugged into your system, what file system was it formatted with?

33 Copyright 2003 Ryan Rangel. All rights reserved. Some available file systems. Each PC OS has one (Windows, Mac). Most embedded OS has one (VxWorks, Nucleus, ThreadX, Linux). There are third party solutions (EBS). Some devices format media for you (digital cameras).

34 Copyright 2003 Ryan Rangel. All rights reserved. Mass Storage Solution. USB Protocol Bulk OnlyCB/I SCSIATA FATISO 9660 Proprietary EXT3 OS Block API

35 Copyright 2003 Ryan Rangel. All rights reserved. Interfacing with USB to Ethernet. Most USB to Ethernet chips have proprietary protocols. The standard communications class has Ethernet Networking control model (ENCM). USB Protocol ProprietaryENCM IP TCPUDP FTPHTTP

36 Copyright 2003 Ryan Rangel. All rights reserved. Interfacing with USB printer. Printer is a standard class. Only the transport of raw data is defined. You will need a printer control stack from each printer manufacturer. Some are easier to get than others. USB Protocol Printer Class Driver HPCanonEpson

37 Copyright 2003 Ryan Rangel. All rights reserved. Interfacing with the Bluetooth class. Bluetooth is a standard class but you can only get the protocol from the Bluetooth spec. USB Protocol Bluetooth class driver Bluetooth Stack

38 Copyright 2003 Ryan Rangel. All rights reserved. Some available solutions to get your research started… Protocol Analyzers: CATC, Catalyst, Ellisys… OS with USB Host stack: VxWorks, QNX, Linux, BSD… Third party USB Host stacks: SoftConnex, Intoto, Grape… Chip HCD: See vendor… IP HCD: See Vendor…

39 Copyright 2003 Ryan Rangel. All rights reserved. OHCIUHCIEHCISL811HUHC124ISP1362ISP1161 USB Protocol Printer CanonHP Proprietary ENCM IP TCP FTP UDP HTTP Proprietary FAT Bulk Only ATA ISO 9660 CB/I SCSI EXT3 OS Block API What have we learned about USB Host software….

40 Copyright 2003 Ryan Rangel. All rights reserved. USB Host Conclusion What is your application? What are my requirements? What host controller fits your system? What devices do you need to support? What other software support do I need? What solutions are available?

41 Copyright 2003 Ryan Rangel. All rights reserved. USB On-The-Go (OTG) The future of embedded USB Host? Do you need the power savings? – Are you running off a battery? Do you need the physical space savings of having only one mini connector? – Do you have the form factor of a cell phone or PDA? Bleeding edge technology. – Were you originally a slave device that does not want to depend on a PC?

42 Copyright 2003 Ryan Rangel. All rights reserved. Thank You! Standard USB specifications at: www.usb.org. See vendors for all other specifications. If you have any questions, feel free to email me at: ryan@rrrangel.com


Download ppt "Copyright 2003 Ryan Rangel. All rights reserved. Got USB? The questions to ask when adding USB Host to your Embedded System. By Ryan Rangel"

Similar presentations


Ads by Google