cancel
Showing results for 
Search instead for 
Did you mean: 

USB Audio Device Not Recognized – STM32F401RB – Device Descriptor Request Failed

omkarprayag
Associate III

Hello,

I'm working on a custom board using the STM32F401RB MCU, aiming to implement a USB Audio Device. I'm using STM32CubeIDE with STM32CubeMX. My goal is to receive audio over USB from a PC and later play it via I2S.

However, I'm currently stuck at the very first step: Windows 11 fails to enumerate the device, giving the dreaded:
“Unknown USB Device (Device Descriptor Request Failed)”


My Configuration:

Clock:

  • External crystal: 25 MHz HSE

  • PLL config:

    • PLL_M = 15

    • PLL_N = 144

    • PLL_Q = 5 → ✔ USB Clock = 48 MHz (confirmed)

    • SYSCLK = 60 MHz

USB Peripheral:

  • USB_OTG_FS: set to Device Only

Middleware:

  • USB_DEVICE middleware enabled

  • Class: Audio Device Class

  • Audio sample rate: 48000 samples/s

Device Descriptors (auto-generated):

  • VID = 1155 (0x0483)

  • PID_FS = 22336 (0x5730)

  • LANGID_STRING = English (1033)

  • MANUFACTURER_STRING = "STMicroelectronics"

  • PRODUCT_STRING_FS = "STM32 Audio Class"

  • CONFIGURATION_STRING_FS = "AUDIO Config"

  • INTERFACE_STRING_FS = "AUDIO Interface"

USB Parameters:

  • Max interfaces = 1

  • Max configuration = 1

  • Max string descriptor size = 512

  • Self powered = Enabled

  • Debug level = 0


Code Setup

In main.c, after HAL and peripheral initializations, I have:

MX_USB_DEVICE_Init();

No other changes were made manually to the USB stack.


Problem

After flashing and connecting the device to Windows 11, the following happens:

  • Device Manager shows:
    “Unknown USB Device (Device Descriptor Request Failed)”

  • No audio interface appears

You can see the error and descriptor config screenshots in the attachments.


Debug Tried:

  • PLL clock output for USB confirmed at 48 MHz

  • Using a known-good USB data cable

  • Tried both USB 2.0 and 3.0 ports

  • VID/PID are valid and match ST’s default

  • Disabled VBUS sensing

  • Forced USBD_Start(&hUsbDeviceFS); after MX_USB_DEVICE_Init();


Request

Can anyone guide me on:

  1. What could cause the descriptor fetch to fail at the very first stage?

  2. How to confirm whether EP0 and descriptors are returned correctly?

  3. Whether the USB Audio Class middleware is unstable or missing something?

I would also love a minimal working project (.ioc + main.c) for USB Audio on STM32F401RB if available.


Thanks in advance!


Attachments:

  • USB descriptor settings

  • USB parameters tab

  • Screenshot from Windows Device Manager showing descriptor error

0 REPLIES 0