SAMV71 Xplained Ultra Software Package 1.4

USB Composite Basics

This page gives generic details on the USB Composite Devices.

Purpose

The Universal Serial Bus (USB) offers an easy way to connect PC with portable devices and to expand external peripherals. Usually a USB device provides a single function to the host, such as a storage disk, serial RS-232 port, digital microphone, or speakers, so one function occupies one USB port. Nevertheless, to allow several functions through a single physical port, the USB specification mentions two kinds of devices:

Composite devices are an efficient solution to reduce the number of hub and USB cables. To set an example a device being in the same time modem and audio speaker requires only a single USB cable.

Architecture

USB Composite Composition

Shows different communication flows between composite clients (host side) and functions (device side).

UsbCompositeComposition.png

USB composite composition

USB Composite Interfaces

Interfaces descriptors for composite devices includes all functions' interfaces.

Following is architecture of interface for single/multi interface functions.

UsbCompositeSingleIF.png

USB Composite Device with SINGLE-interface-functions

UsbCompositeMultiIF.png

USB Composite Device with MULTI-interface-functions

Interface Association Descriptor

The Interface Association Descriptor (IAD) is a new standard descriptor defined in USB Engineering Change Notice, to allow a device to describe which interfaces are associated with the same device function. This allows the Operation System to bind all of the appropriate interfaces to the same driver instance for the function. Please see USB ENGINEERING CHANGE NOTICE (Title: Interface Association Descriptor) for detailed information.

The IAD is used to describe that two or more interfaces are associated to the same function. The 'association' includes two or more interfaces and all of their alternative setting interfaces. A device must use an IAD for each multi- interfaced device function. An IAD is always returned as part of the configuration information returned by a GetConfigurationDescriptor request. It must be located before the interface descriptors (including all alternate settings) for the interfaces it associates with. All of the interface numbers in a particular set of associated interfaces must be contiguous. Following shows the standard interface association descriptor includes function class, subclass and protocol fields. The values in these fields can be the same as the values from interface class, subclass and protocol from any one of the associated interfaces.

Offset Field Size Value Description
0 bLength 1 Number Size of descriptor in bytes
1 bDescriptorType 1 Constant INTERFACE ASSOCIATION Descriptor
2 bFirstInterface 1 Number Interface Number of the first interface that is associated with this function.
3 bInterfaceCount 1 Number Number of contiguous interfaces that are associated with this function.
4 bFunctionClass 1 Class Class code (assigned by USB-IF).
A value of zero is not allowed in this descriptor. If this field is FFH, the function class is vendor- specific.
All Other values are reserved for assignment by the USB-IF.
5 bFunctionSubClass 1 SubClass Subclass code (assigned by USB-IF).
If the bFunctionClass field is not set to FFH all values are reserved for assignment by the USB-IF.
6 bFunctionProtocol 1 Protocol Protocol code (assigned by USB-IF).
These codes are qualified by the values of the bFunctionClass and bFunctionSubClass fields.
7 iFunction 1 Index Index of string descriptor which describes this function.

Since this particular feature was not included in earlier versions of the USB specification, there is issue about how existing USB OS implementations will support devices that use this descriptor. It is strongly recommended that the device implementation utilizing the interface association descriptor use the Multi-interface Function Class code in the device descriptor. The Multi-Interface Function Class code is documented on the http://www.usb.org/developers/docs web site.

Requests

No special request is used for a composite device, all requests are defined by the device function that is integrated.

Host Drivers

See Composite Host Drivers

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines