3.2 USB Descriptors Relevant to CDC

USB Descriptors can tell the host computer what the USB device is and how to communicate.

Device Descriptors

At the top level, the Device Descriptor contains the base information of the USB device including but not limited to:
  • USB Version
  • Device level class, subclass and protocol
  • Vendor and Product ID (VID and PID)
  • Manufacturer, product and serial number
  • The number of different configurations the device has

Configuration Descriptors

The Configuration Descriptor contains the setup for a specific configuration containing:
  • Size of the configuration
  • Number of interfaces
  • Power attributes
A USB device can contain multiple configurations and switch between them, for example, a configuration for the bootloader and another for the actual application.

Interface Descriptors

USB interface descriptors define a specific interface within a USB configuration, detailing its purpose and functionality, including:
  • Alternative settings
  • Number of Endpoints
  • Interface class, subclass and protocol

Endpoint Descriptors

USB endpoint descriptors specify the attributes of a particular endpoint within an interface, such as:
  • Endpoint address
  • Direction (IN/OUT)
  • Type (control, isochronous, bulk or interrupt)
  • Packet size
  • Polling interval

USB Descriptor Tree

The figure below shows how the different descriptors (described above) combined into a working device can be visualized in the USB descriptor tree.

Functional Descriptors

Unlike standard descriptors that convey basic device information, functional descriptors can define additional attributes related to specific device classes or functionality. For the CDC, this is done for the communication interface and can contain information on interface grouping or what parts of a model defined in the Subclass field are implemented on the device.