cancel
Showing results for 
Search instead for 
Did you mean: 

USB Audio Device with I2S microphone

island1985
Associate II
Posted on February 27, 2013 at 12:03

Hi

Is there a example project or somethin similar I can use as a foundation to use the stm32f4 discovery as a usb audio device? I want to stream the data of the on-board or an external mems microphone using the i2s (with dma) interface via usb to a host pc. I'm new to STM32 devices and all the specifics, although I already have good experiences with TI devices.

#i2s #usb
17 REPLIES 17
Posted on February 27, 2013 at 15:51

Have you waded through the fw examples for the DISCOVERY and EVAL boards? Not sure there something that does everything you want, but there are probably some usable parts in them.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
island1985
Associate II
Posted on February 27, 2013 at 16:43

Thanks for your reply. Of course I found the ''Audio_playback_and_record'' example project but I guess there is not explained how to configure the eval board as an usb audio device. I know how to configure the usb descriptors but I need to know how to configure the stm32 usb device stack to get the data from the I2S (with DMA) to the host.

Posted on February 27, 2013 at 17:02

For USB audio

STM32_USB-Host-Device_Lib_V2.1.0\Project\USB_Device_Examples\AUDIO\src\stm324xg_usb_audio_codec.c
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
island1985
Associate II
Posted on February 27, 2013 at 17:59

This sounds interesting but the st side is somewhat confusing. Where can I get this piece of software?

M0NKA
Senior
Posted on February 27, 2013 at 19:18

Hi,

Probably

http://www.qnktc.com/usb.php

is your best bet, together with the I2S driver provided by ST.

Regards, Chris

island1985
Associate II
Posted on February 27, 2013 at 19:38

Thanks for your reply. This looks interesting but meanwhile I found the file clive1 had suggested. Unfortunately both of your suggestions are for usb audio speakers. But I need usb audio microphone and from my own experiences I know that it is a little bit complicated to rewrite a speaker example into a microphone one.

So I am

still

grateful for any help

.

EDIT: I found this very interesting thing but unfortunately there is no firmware for download http://www.st.com/web/catalog/tools/FM116/SC1116/PF253583

M0NKA
Senior
Posted on February 28, 2013 at 11:06

Hi,

I understand what you need, but the chance to find complete project with source code for

this via Google are almost zero. Maybe something for Linux, but no way to find this with

working Windows driver and source code for it.

The ST example for the microphone is basically an I2S driver that stores the data to a

USB flash disk, then it can play this data. There is no emulation of USB audio device that will show as USB microphone when plugged to a computer, or at least i haven't seen this

one in the examples.

The project link seems to fit what you need, but will require some work:

SDR-Widget is an interface based on the Atmel AT32UC3A3 microcontroller that provides the following functionality to SDR circuits such as the SoftRock. A branch of the project called audio-widget provides a USB-I2S module and various Analog Boards (AB) for audiophile USB-DAC playback.

sdr-widget:

  1. High quality audio using the USB Audio Class standard (UAC1 and UAC2)
  2. Capture and Playback at 48/96/192khz 24 bit under uac2 for OSX, Linux and Windows
  3. (For Windows, a uac2 ASIO driver is available)
....

Good luck!

island1985
Associate II
Posted on February 28, 2013 at 16:29

I think it's not that complicated to realize what I need but I would need a starting point. For using my stm32 board as an usb audio microphone, I need the following chain

MEMS mic -> I2S -> DMA -> USB stack -> USB peripheral -> host pc

I've implemented exactly that with an TI stellaris lm3s9b92. But I needed to fit the TI usb stack and that was some work. Now I want to migrate my project to the stm32f4 because of the fpu und more performance. The USB microphone is actually only there to verify the correct functionality of the the whole chain.

medhayo
Associate II
Posted on March 22, 2013 at 19:07

Have you been able to get good audio quality from the built-in MEMS mic? I find the audio quality very disappointing using the ST example program, not sure if this due to the program or the board. Do you have any idea where the problem lies?