cancel
Showing results for 
Search instead for 
Did you mean: 

USBH_AUDIO_InputStream() missing — how to stream USB microphone data on STM32?

SR1218
Associate

Hello,

I'm working on a project using the STM32F401RE board to perform real-time fault diagnosis on machinery.
The board receives vibration data in real-time via a USB-type accelerometer (Digiducer 333D01), and a lightweight deep learning model running on the MCU determines whether the signal indicates a normal or faulty condition.
All of this is running under FreeRTOS and must meet real-time constraints.

The accelerometer is connected through a USB breakout board (YwRobot ELB050209), and the STM32 board is configured to operate as a USB Host with Audio Class support.
The USB connection and device enumeration process (including descriptor parsing) have been completed successfully.

Interestingly, the Digidecer 333D01 is recognized as a USB Audio Class device, specifically as a microphone-type interface.
The device presents itself with an Audio Control interface and an Audio Streaming interface (Isochronous IN), similar to a standard USB microphone.
Although the data represents vibration (acceleration) rather than audio, it is transmitted as 24-bit PCM over isochronous transfers, just like microphone audio data.

The problem I'm facing is in the next step: receiving streaming data from the device.
I found that the function USBH_AUDIO_InputStream() is declared in the STM32CubeMX-generated code, but it is not actually implemented.
Therefore, I’m looking for any example code, application notes, or sample projects that demonstrate how to receive data from a USB microphone (or any isochronous IN Audio Class device) using STM32 as a USB Host.

Any references or advice would be greatly appreciated.
If more information is needed, I’d be happy to provide it.

Note: This message was written using a translation tool, so I apologize in advance if any part sounds unnatural or unclear.

Thank you!

0 REPLIES 0