Download presentation
Presentation is loading. Please wait.
Published byElmer Morris Modified over 7 years ago
1
Embedding USB technology Limitations, challenges and compliance
USB Host USB Compliance November Christian Légaré
2
USB Device stack Application USB Class API Class Drivers
Kernel USB Class API Class Drivers Kernel Abstraction HID Mass storage CDC Custom drivers USB Device core stack Device Controller Driver Device Controller Hardware
3
USB Host stack Application USB Class API Class Drivers
Kernel USB Class API Class Drivers Kernel Abstraction HID Mass storage CDC Hub Custom drivers USB Host core stack Bandwidth allocation & Power management Host Controller Driver OHCI-EHCI-xHCI or Custom Host Controller Hardware
4
Device Driver Select device driver The host loads the appropriate driver using a PID/VID (Product ID/Vendor ID) combination used during the enumeration. [Windows] Abstract from a .inf file: [DeviceList] %USB\VID_8765&PID_1234.DeviceDesc%=USBBulkInstall, USB\VID_8765&PID_1234 The VID is supplied by the USB Implementor's forum at a cost and this is seen as another sticking point for USB. The latest info on fees can be found on the USB Implementor’s Website Other standards organizations provide a extra VID for non-commercial activities such as teaching, research or fiddling (The Hobbyist). The USB Implementors forum has yet to provide this service. In these cases, the developper may wish to use one assigned to the development system's manufacturer. For example most chip manufacturers will have a VID/PID combination the developper can use for the chips which is known not to exist as a commercial device. Other chip manufacturers can even sell a PID to use with their VID for the commercial device. 4
5
General Purpose OS USB drivers
With a USB Device based product, using HID or MSD allows for the use of generic drivers in the General Purpose OS (Windows, Linux, Android, MacOS)..a definite advantage for product acceptance and deployment Other classes may require custom drivers for these Operating Systems
6
USB On-The-Go Supplement to USB 2.0
Allows for devices to be host and peripheral New features: Smaller connectors with an added pin (ID) Tighter power constraints for devices Protocol enhancement for dynamic switching (HNP) Definition of session request protocols (SRP)
7
USB On-The-Go Allows two USB devices to talk without a PC as host.
DRD (Dual Role Devices). Unique mini-AB receptacle. OTG High Speed and Full Speed. Low power requirements on battery powered devices.
8
USB On-The-Go Application OTG stack Host stack Device stack
OTG Controller Driver Host driver Device driver Host Controller Hardware Device Controller Hardware
9
Wireless USB Certified Wireless USB is the new wireless extension to USB that combines the speed and security of wired technology with the ease-of-use of wireless technology Certified Wireless USB is the first high-speed wireless personal interconnect technology to meet the needs of multimedia consumer electronics, PC peripherals, and mobile devices. Certified Wireless USB will preserve the functionality of wired USB while also unwiring the cable connection and providing enhanced support for streaming media CE devices and peripherals. Certified Wireless USB performance is targeted at 480Mbps at 3 meters and 110Mbps at 10 meters.
10
Compliance Usage of the USB logo requires a product to be compliant
The USB organization has created a compliance program Two main criteria are: checklists and compliance testing Checklists contain questions relating to a product and its behavior USB-IF provide a Compliance Program for a small membership fee There are a set of registered USB logos which are not interchangeable
11
Tests Mechanical Electrical Interoperability Device Software
OK when using an approved connector vendor Electrical OK when using a silicon vendor reference design Interoperability The USB Gold Tree Device Software OK with Command Verifier Host Software Proprietary and expensive
12
USB Electrical Analysis Tool
USBET20 is a stand-alone electrical signal analysis tool for USB Compliance testing. USBET20 is the official compliance electrical analysis tool that performs pass/fail assessments on signal quality and inrush current data captured from an oscilloscope. USBET20 is downloadable from
13
USB Device and the USB Command Verifier
USB20CV is the compliance test tool which evaluates High, Full and Low-speed USB devices for conformance to the USB Device Framework (Chapter 9), Hub device class (Chapter 11), HID class, and OTG specifications. Also included are mass storage class, USB video class and PDHC specification tests. All USB 2.0 and 3.0 peripherals are required to pass the Device Framework tests in order to gain certification. USB20CV USB30CV
14
If your product is a USB Host How do you test a Host?
There is only one Host on a bus and the Host is the Master on the bus. So, how do you test a Host? Protocol Analyzer and Generator (build test cases) Custom tools
15
Interoperability : USB Gold Tree
A Host PC with different USB controllers 5 HS self powered hubs 1 FS self powered hub EHCI 1 FS keyboard/hub OHCI 5 5 meter USB cables UHCI 1 mouse xHCI (USB 3.0) 2 mass storage devices 1 video camera
16
Memory footprint Device-Bulk
Detail Description CPU Philips LPC2148 Toolchain IAR Embedded Workbench v4.30a ARM/Thumb mode Thumb mode Compile options Size optimization (Low) Memory requirements The following table shows the memory requirement of the project: The USB receive buffer is listed separately because this buffer can be reduced to a trivial size if optimal performance is not required. Detail ROM [bytes] RAM USB code and const data 6309 -- USB data 32 USB receive buffer 512 Total 544
17
Memory footprint Device-MSD
System Detail Description CPU Philips LPC2148 Toolchain IAR Embedded Workbench v4.30a ARM/Thumb mode Thumb mode Compile options Size optimization (Low) Memory requirements (RAMDisk) ROM and RAM will vary depending on the storage device used. RAM space beyond that which is reflected by the table will also be needed, of course, if RAM is chosen as the application's storage medium. The sector buffer's size corresponds to the sector size utilized by the actual storage device, more than 512 bytes may be necessary. Detail ROM [bytes] RAM USB code and const data 6736 -- USB data 32 USB receive buffer 512 MSD sector buffer Total 1056 The USB receive buffer is listed separately because this buffer can be reduced to a trivial size if optimal performance is not required. 17
18
Memory footprint Host-HID
System The following table shows the hardware and the toolchain details of the project: Detail Description CPU ARM9 Toolchain IAR Embedded Workbench v4.30a ARM/Thumb mode ARM mode Compile options None Memory requirements The following table shows the memory requirement of the project: 64k of the RAM data is a memory pool in the usbh_lib module. Depending on your application it may not be required. Detail ROM [bytes] RAM Host driver 11572 440 HID Class driver 6864 36 Mouse and keyboard demo code 2392 8036 USB core 18837 66121 Total 39665 74633 18
19
Memory footprint Host-MSD
System The following table shows the hardware and the toolchain details of the project: Detail Description CPU ARM9 Toolchain IAR Embedded Workbench v4.30a ARM/Thumb mode ARM mode Compile options None Memory requirements The following table shows the memory requirement of the project: Detail ROM [bytes] RAM Host driver 11572 440 MSD Class driver 7842 548 Mouse and keyboard demo code 2392 8036 USB core 18837 2121 Total 40643 11145 19
20
Final review Embedding USB
21
USB features or limitations
USB works great for well defined classes Typical usage like HID or MSC If you want to leverage the technology, then think about: Maximum data rates Actual data throughput Cable length and total length Power 127 devices per controller Host driven protocol
22
Have Reasonable Expectations
Typical MCU can not keep up with High speed USB controllers. USB device controllers are sometimes troublesome to port. This is partly because a USB device controller port deals more closely with more complicated hardware than, say, a TCP/IP NIC port. Partly, this is because USB device controllers are much more various than NICs. The Device can never initiate a communication with USB 2.0. If using MSD (Host or Device) & a file system on the embedded system, either the MSD or the file system (but not both) can access the storage media at any time.
23
Embedding USB Average microcontroller clock is between 100Mhz and 200Mhz. USB 2.0 High Speed can deliver 480 Mbps…not on a microcontroller! Semiconductor vendors advertise their parts as being USB 2.0 compliant! Not all USB controllers are created equal For Host, many don’t follow the OHCI, EHCI or UHCI specs. Some hardware functions moved to software reducing even more the expected performance Number of endpoints may be lower than the specification, limiting the product capabilities
24
USB markets The USB key has changed the rule Consumer Medical
USB Host stack integrated to take advantage of USB MSD and the Flash drives. Consumer Mouse, Keyboard, Printers, Digital cameras, etc… Medical New market for Personal Medical Devices USB Decorations
25
Summary Appealing features:
Ease of use Bus power Auto-detection and self configuration Expandability Reasonable speed Large number of predefined functions and customizable function Availability of peripherals Flexibility and reliability The tradeoff is complex implementation and cost 25
26
Thank you 26
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.