cancel
Showing results for 
Search instead for 
Did you mean: 

USBD middleware not responding to Windows 10/11 PnP messages

Ray, KF6GPE
Associate II

Howdy!

I'm in the process of building a product with a USB class compliant audio building from of the sample at https://www.st.com/en/embedded-software/x-cube-usb-audio.html (thanks!).

I've got the audio_10 class driver integrated with my application and starting to debug. Right now, when the target is connected to a Windows PC on the USB device port, USB handshaking begins, the PC assigns an address and interrogates for capabilities, and then sends a `IRP_MN_QUERY_DEVICE_RELATIONS` request for a `RemovalRelations` property. It looks like the library doesn't support this; my trace from USB Analyzer (Eltima Software) is reporting that the device is returning a `NOT_SUPPORTED` error.

Immediately after returning `NOT_SUPPORTED`, the PC sends an `IRP_MN_SURPRISE_REMOVAL` to unmount the device, followed by a `IRP_MN_REMOVE_DEVICE`.

I've got a STM32F769I-Discovery board on order to test this the sample unmodified, but I'd love to know if folks have any ideas while I'm waiting for delivery on the board.

Thanks!

1 REPLY 1
KDJEM.1
ST Employee

Hello @Ray, KF6GPE​ ,

The USB device audio streaming Expansion Package for STM32Cube applies to Audio Class specification 1.0, natively supported by the current versions of Windows® (7, 8, and 10) and macOS®(a).

For more more explanation please refer to UM2195.

In order to make the program work, you must do the following :

 1- Open your preferred toolchain

 2- Choose your configuration :

   a- STM32F769I-DISCO_UAC10-PLAY : to use STM32 board as USB speaker

   b- STM32F769I-DISCO_UAC10-REC : to use STM32 board as USB microphone

   c- STM32F769I-DISCO_UAC10-ADV : : to use STM32 board as USB speaker and USB microphone

   d- STM32F769I-DISCO_UAC10-DUM : to use STM32 board as USB microphone , that returns only zero padded packets. however it supports wide range of frequencies(96KHZ).

 3- Set options in usb_audio_user_cfg.h, not mandotary as pre-set option will work for you

 4- Rebuild all files and load your image into target memory

 5- Run the application

 6- Open an audio player application (Audacity for example) and play music or record speech (switch of chosen config).

Note that, when you connect the USB two times or more with different configurations to the Windows 7 host , windows may have conflict with device role.

As solution , you may change hard-coded PID after changing config.

I hope this help you!

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.