SDAA062 September 2025 TMS320F28P559SJ-Q1
The device descriptor is the first descriptor queried by the host during enumeration. This is to communicate to the host what specification of USB the device complies with and how many possible configurations are available on the device. Upon successful processing of the device descriptor, the host reads all the configuration descriptors.
In the TI USB composite device project, the device descriptor structure is defined in usblib.h. The instance of the structure is defined in tCompositeInstance structure in usbdcomp.h called by the USBDCompositeInit function. The variable values are initialized by the BuildCompositeDescriptor function in usbcomp.c. The key elements of the device descriptor are shown in Table 2-1.
typedef struct
{
uint8_t bLength;
uint8_t bDescriptorType;
uint16_t bcdUSB;
uint8_t bDeviceClass;
uint8_t bDeviceSubClass;
uint8_t bDeviceProtocol;
uint8_t bMaxPacketSize0;
uint16_t idVendor;
uint16_t idProduct;
uint16_t bcdDevice;
uint8_t iManufacturer;
uint8_t iProduct;
uint8_t iSerialNumber;
uint8_t bNumConfigurations;
}
PACKED tDeviceDescriptor;
| Key Elements | Description |
|---|---|
| bcdUSB | Informs the host of what version of USB the device supports |
| bDeviceClass | 00 - The device class is defined in the Interface Descriptor FF - the device class is Vendor class any other number is the specification for the class of this device |
| idVendor | 16-bit number assigned by USB.org to the manufacturer of the product |
| idProduct | 16-bit product model ID assigned by the vendor to this product |
| bNumConfigurations | How many different configurations are available for this device |