2025-06-18 12:03 AM
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)”
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_OTG_FS: set to Device Only
USB_DEVICE middleware enabled
Class: Audio Device Class
Audio sample rate: 48000 samples/s
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"
Max interfaces = 1
Max configuration = 1
Max string descriptor size = 512
Self powered = Enabled
Debug level = 0
In main.c, after HAL and peripheral initializations, I have:
No other changes were made manually to the USB stack.
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.
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();
Can anyone guide me on:
What could cause the descriptor fetch to fail at the very first stage?
How to confirm whether EP0 and descriptors are returned correctly?
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!
USB descriptor settings
USB parameters tab
Screenshot from Windows Device Manager showing descriptor error