USB Sound Card with STMF4 Discovery

Home
DiscoveryUSB_Spot

Cheapest Sound Card ever

  • You are looking for a USD 15.00 USB Sound Card?
  • Yes, for USD 15.00 plus your Firmware (download below) - you get an USB Sound Card
  • You have an STMF4 Discovery [1] eval board and want to do more with it?
  • You want to convert USB Audio into I2S in order to feed a DAC?
  • Yes, there is: STMF4 Discovery board with USB Audio Firmware [2][3], connect to a PC as sound card.
  • Or use STMF4 Disco as USB Receiver on RPi-DAC

How does it work?

I was looking for a micro-controller based USB sound card with I2S out in order to connect to RPi-DAC.

The STMF4 Discovery board is a great solution and works fine.

  • The firmware is a Coocox [4] Cortex-M4 project.
  • The firmware will provide an USB Audio device enumeration so that it works as USB Audio 1.0 device.
  • 16bit samples, 48KHz, or 24bit sample formats work (select via compile flag).
  • The onboard headphone DAC + Class-D amplifier is used.
  • The I2S signals, e.g. for RPi-DAC, are available on the P1 and P2 headers (see datasheet).
  • Yes, it works also to feed the RPi-DAC.
  • The firmware uses DMA in order to transfer a received USB audio packet to the I2S peripheral device.
  • The DMA runs endless in a loop. If no data is available (not received after Pause) all samples are null.
  • Just compile the project with free Coocox [4] and put into flash (debug).

Please find the ZIP with the project below (for Coocox).

The project is not really cleaned, it has much more file as needed, commented code and small limitations.

Downloads

Please, if you want to try, download the Cooxox project here.

Download DiscoveryAudioUSB project (31 MB)

If you have STM32 ST-Link Utility installed - you can download and flash the BIN image file directly.

Download DiscoveryAudioUSB_BIN image (14 KB)

Trouble - do you want to order?

If you have trouble to build the project, not familiar with firmware build, to use Cooxox, to flash the board or you need a turn key solution - I can do it for you: if you agree to spend USD 30.00 plus tax plus shipment I will send you a working board.

Please, send me an email to tj[]tjaekel.com if you want to purchase a flashed STMF4 Discovery board.

Remarks

If you do not want to use an external 5V power supply then you have to plug in the CN1 USB cable (for debug), even you do not have the driver installed or want to use really.

The implementation is straight forward and not the best way: the sound could be messed up very seldom (DMA and USB are not always in sync) - please press reset (sorry 0.5 sec. sound lost).

Pictures

Discovery Audio USB Discovery Audio USB Discovery Audio USB Discovery Audio USB Discovery USB on RPi-DAC Discovery USB on RPi-DAC
 

References

[1] ST: STMF4 Discovery

[2] Order at Digikey

[3] other STMF4 Discovery stuff

[4] Coocox ARM compiler IDE