cancel
Showing results for 
Search instead for 
Did you mean: 

USB Audio Device Class (speaker + mic) on STM32F4-Discovery

gaurav2
Associate II
Posted on June 28, 2016 at 20:52

I have looked around on ST website and the forums for getting playback and record working on STM32F4-Discovery board. I only found the playback and record example that uses the FatFs and the USB storage device.

However, I want to get the USB Audio class working where I want to use the Discovery board for both uplink and downlink, i.e., the board should like a speaker and mic to a Windows Host PC via USB. Does anyone have this working and wouldn't mind sharing some pointers? I saw a post from maggie.roxas who got the speaker portion working but I don't see anyone with Microphone working over USB.

Any pointers greatly appreciated. Thanks much.
1 REPLY 1
Walid FTITI_O
Senior II
Posted on June 29, 2016 at 13:24

Hi gaurav_stm,

I recommend you check the ''Audio_Speaker'' example in ''

http://www.st.com/en/embedded-software/stsw-stm32html

'' at this path STM32_USB-FS-Device_Lib_V4.0.0\Projects\Audio_Speaker.

The USB-FS-Device Audio Speaker demo gives examples of how to use the USB-FS-Device peripheral to communicate with the PC host in the isochronous transfer mode.

It provides a demonstration of the correct method for configuring an isochronous

endpoint, receiving or transmitting data from/to the host.

Otherwise, you can search for code example from forum users like this

https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Discovery/Audio%20Class%20USB%20-%20no%20data%20-%20STM32F4Discovery&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0...

, or in github community like this

https://github.com/LonelyWolf/stm32/tree/master/usb-mic

which would be helful for you.

-Hannibal-