This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to implement code to support an HID device on the Discovery biard

I would like to implement on the STM32F4 Discovery board the support for an USB device that simulates a sound card, using the same HID protocol that Windows uses.
Specifically, I would like to be able to connect that device to the Discovery board, and to read the stereo stream coming from it at a sampling rate of 192 kHz. The M4F has ample processing power for this, as I do that already with an I2S interface. Now I would like to use the USB port for this new device.

Is there anywhere an example on how to simulate the Windows HID protocol on the STM32M4F Discovery board ?

Thanks.

Parents
  • ST’s STM32CubeF4 library supports USB host for audio Sink(speaker)/Source(microphone)
    www.st.com/.../PF259243
    Also, it has a USB headphone(speaker) host example for STM324xG_EVAL board.
    \STM32Cube_FW_F4_V1.1.0\Projects\STM324xG_EVAL\Applications\USB_Host\AUDIO_Standalone\

    Starting on this example, you may customize it, so that it fits to your F4 Discovery board and your target audio device.

    - F4 Discovery has just a full-speed port. Your target may require high-speed
    - ST’s library supports just Synchronous. Your target may require other synchronization.
    - You should increase FIFO size for 192kHz sampling (USB_HostInit(), stm32f4xx_ll_usb.c)

    > an USB device that simulates a sound card, using the same HID protocol that Windows uses.

    I’m not sure, if you could make above source code modification with such poor USB experience. You have to learn on USB more, before starting this play.

    Tsuneo

Reply
  • ST’s STM32CubeF4 library supports USB host for audio Sink(speaker)/Source(microphone)
    www.st.com/.../PF259243
    Also, it has a USB headphone(speaker) host example for STM324xG_EVAL board.
    \STM32Cube_FW_F4_V1.1.0\Projects\STM324xG_EVAL\Applications\USB_Host\AUDIO_Standalone\

    Starting on this example, you may customize it, so that it fits to your F4 Discovery board and your target audio device.

    - F4 Discovery has just a full-speed port. Your target may require high-speed
    - ST’s library supports just Synchronous. Your target may require other synchronization.
    - You should increase FIFO size for 192kHz sampling (USB_HostInit(), stm32f4xx_ll_usb.c)

    > an USB device that simulates a sound card, using the same HID protocol that Windows uses.

    I’m not sure, if you could make above source code modification with such poor USB experience. You have to learn on USB more, before starting this play.

    Tsuneo

Children
No data