Skip to main content
Visitor II
April 11, 2024
Question

USB I/O devices with STM32F4 MCU / STM324xG-EVAL Boards

  • April 11, 2024
  • 2 replies
  • 1624 views

I was wondering if it is possible to connect a USB microphone using USB-OTG to an STM324xG-EVAL board and then read the data coming in from that microphone? I looked through the examples that STM has for the USB-HOST class and it seems like most of the projects/examples done in the past are catered towards output devices so I was wondering if it is possible to read data from an input device and if so how that is possible?

 

Appreciate the help!

    This topic has been closed for replies.

    2 replies

    Super User
    April 11, 2024

    Yes, as you've seen, it can act as host and you can connect a device to it and read data. The examples demonstrate how this is possible. There is also some documentation on the USBH library, not much though.

    Visitor II
    April 11, 2024

    I did see the examples in the STM firmware that shows how to use the board with audio host as an audio standalone. But that has to do with outputting data to the speakers from the board. I did not see any examples on using a microphone or something else to read data into the board. If you know where these examples you mention are could you please link it. It would be very helpful! Thank you!

    Super User
    April 11, 2024

    Would you like to use MEMS microphones instead of USB? ST makes them and has eval. boards and examples.

     

    Visitor II
    April 13, 2024

    Unfortunately I am required to use a USB microphone for the application that I am trying to build 

    Super User
    April 13, 2024

    So you picked the most difficult USB host - audio host - with only one example by STM , that only can enumerate a headphone set. (almost useless...)

    https://github.com/STMicroelectronics/STM32CubeH7/tree/master/Projects/STM32H743I-EVAL/Applications/USB_Host/AUDIO_Standalone

    The only audio host, i found and could get running (on H743 and H563-nucleo) is with Azure rtos , see :

    https://github.com/STMicroelectronics/x-cube-azrtos-h7/tree/dev/usbx/Projects/STM32H747I-DISCO/Applications/USBX/Ux_Host_Audio20

    I needed about 2 weeks, to get it running . So - good luck !