I am developing an USB 3 device. However it is not detected. Here is a log of the communication. Please explicitely check every descriptor and make a guess what could be wrong.
Okay, let's break down this USB communication log step by step. The pattern shows the host requesting the Device Descriptor, then the Configuration Descriptor, and repeating this. This is standard enumeration.
bcdUSB (2 bytes): 0x0001 (0.01) - MAJOR PROBLEM. For a USB 3.0 device, this must be 0x0300 or higher (e.g., 0x0300, 0x0310). Reporting 0x0001 means the device claims to be USB 1.00, which is fundamentally wrong for a USB 3.0 device and likely causes the host to fail enumeration or treat it incorrectly.
bDeviceClass (1 byte): 0x00 (Un-assigned class) - Okay if class is defined by interface.
bDeviceSubClass (1 byte): 0x00 - Okay.
bDeviceProtocol (1 byte): 0x00 - Okay.
bMaxPacketSize0 (1 byte): 0x09 - POTENTIAL PROBLEM. The maximum packet size for the control endpoint (Endpoint 0) is usually 8, 16, 32, 64 (for High Speed) or 512 (for SuperSpeed). A value of 9 is highly unusual and likely incorrect. It might indicate a problem in how packet sizes are handled or reported.
This is a standard request for the first Configuration Descriptor.
Response:09 02 39 00 01 01 00 80 FA ... [rest of data]
Descriptor Breakdown (Partial):
Configuration Descriptor:
bLength: 0x09 - Correct.
bDescriptorType: 0x02 (Configuration) - Correct.
wTotalLength: 0x0039 (57 bytes) - The total length of the configuration descriptor and all following descriptors (interface, endpoint, etc.). This seems a bit short for a USB 3.0 device which often includes SS descriptors, but not impossible.
iConfiguration: 0x00 - No String Descriptor for configuration.
bmAttributes: 0x80 (Bit 7=1: Self-powered, Bit 6,5=00: Bus-powered) - Seems okay (though inconsistent, usually self/bus powered is specified by bits 6,5, bit 7 means Remote Wakeup). Let's assume it means Bus Powered (0x40 or 0xC0) or Self Powered (0x80 or 0x40). The 0x80 might be intended as self-powered.
bMaxPower: 0xFA (250 * 2mA = 500mA) - Okay for bus or self-powered.
EP 1: 07 05 01 02 00 02 00 - Standard OUT endpoint, Bulk, Max Packet Size 512 bytes. This could be interpreted as a USB 3.0 endpoint if the hardware supports it, but the descriptor type is standard (0x05), not SS (0x30 companion).
EP 2: 07 05 82 03 08 00 04 - Standard IN endpoint, Interrupt, Max Packet Size 8 bytes. POTENTIAL PROBLEM. Interrupt endpoints are typically used for low-bandwidth, latency-sensitive data, less common for general USB 3.0 data transfer which prefers Bulk or Isochronous. The max packet size field wMaxPacketSize (0x0008) for this descriptor type usually refers to High Speed capability.
EP 10 (0xA): 07 05 0A 02 00 02 00 - Standard OUT endpoint, Bulk, Max Packet Size 512 bytes. Address 0xA (10) is unusual; typically endpoints go up to 15 (0xF) in total for a device, and often only use lower numbers like 1, 2, etc.
Summary of Issues:
bcdUSB Incorrect: The most critical issue is the Device Descriptor reporting bcdUSB = 0x0001. This prevents the host from recognizing the device as USB 1.00, let alone USB 3.0. This is almost certainly why it's not detected or enumerated correctly.
bMaxPacketSize0 Incorrect: The value 9 is highly suspect for EP0's max packet size.
Lack of USB 3.0 SuperSpeed Descriptors: The provided log doesn't show any USB 3.0 SuperSpeed (SS) related descriptors (like the SS Endpoint Companion Descriptor type 0x30). All endpoint descriptors shown are standard type 0x05, suggesting the device might be failing to present its USB 3.0 capabilities or is perhaps only implementing USB 2.0 High Speed functionality.
Endpoint Type: The use of an Interrupt endpoint (bDescriptorType=0x03) might be questionable depending on the device's function, especially if it's intended as a high-throughput USB 3.0 device.
Likely Cause:
The primary reason the device is not detected is the incorrect bcdUSB value (0x0001) in the Device Descriptor. This single field fundamentally misrepresents the device's capabilities to the host, likely causing the enumeration process to fail very early. The other issues (EP0 packet size, lack of SS descriptors, endpoint types) further support the idea that the USB 3.0 functionality is either not implemented correctly in the firmware or not being advertised properly.
Recommendations:
Fix Device Descriptor: Immediately correct the firmware to report bcdUSB = 0x0300 (or a later revision like 0x0310 if applicable) in the Device Descriptor.
Fix bMaxPacketSize0: Ensure bMaxPacketSize0 is set to a valid value (e.g., 64 or 512 bytes).
Implement USB 3.0 Descriptors: If your device is intended to operate at SuperSpeed, ensure your firmware can provide the necessary SS Endpoint Companion Descriptors when requested by the host. Check the USB 3.0 specification for how to structure these.
Review Endpoint Configuration: Verify that the selected endpoint types (Bulk, Interrupt, etc.) and their configurations (especially Max Packet Size) are correct for your device's function and the intended USB speed.