Looking for an STM32 dev board with audio codec

Hi all,

I want to play around with STM32 Cube IDE and embedded C for some audio projects. The goal is really just to learn a bit about embedded C, STM32, DSP and to have a bit of fun.

For example, let’s say I just want to apply at FIR to an audio signal from line-in or onboard microphone.

Any recommendations for development board would be appropriate?
 
  • Like
Reactions: YashN
Yes, it is also the only board with HS USB so I used it when developing my STM32F7 UAC2 USBI2S bridge. However the audio codec is only good for UAC1.
I’ve read in another thread you were working on such a thing, great !, is it working well ?
I currently have a uac2 usb to i2s working on my F412 Disco board. No glory, I use tinyUSB. This is a test, target is a stm32f303 (this thing : https://www.diyaudio.com/community/...gital-preamp-for-neatamp.373698/#post-6699923 ), but ST use two different IP for their usb peripheral, the one in F303 is different the one from F412 and for now uac2 compatibility not confirmed.
Regarding F7 series, I think some parts doesn’t have a HS PHY, it shouldn’t be the case of your 723. uac2 for f7 is supported with TinyUSB.
Do you plan to publish your solution ?
 
Last edited:
I’ve read in another thread you were working on such a thing, great !, is it working well ?
...
Do you plan to publish your solution ?

Yes, it's working very well. It has some features not available in commercial offerings. Also I haven't found any major faults in the MCU or it's firmware regarding UAC2. The only problem is that the MCU is out-of-stock everywhere without any info on availability so not much sense in publishing the solution at the moment.
 
Hi all,

I want to play around with STM32 Cube IDE and embedded C for some audio projects. The goal is really just to learn a bit about embedded C, STM32, DSP and to have a bit of fun.
Today I was considering the I2S bus for fast transfer of audio to a PC. Here is a good example which shows microphone waveforms with the ArduinoSound library. https://learn.adafruit.com/adafruit-i2s-mems-microphone-breakout/arduino-wiring-and-test
Well, it's not STM32 but I find it inspiring.
 
  • Like
Reactions: exlabs
I thought I would add to this as I'm also looking for a i2s->USB HS OTG with UAC2. I need over 12.5Mbit/sec which means FS is out and the max only likes UAC2 on USB2.0 HS.

My thought here is to get the STM32F7 discovery board and develop with that for the time being. Possibly using the UAC2 driver on the linux tree and creating stubs for into the CUBE framework. I'm unsure at the moment on the hackability of the USB code within the CUBE framework and if I can hack this in. I have heard of people trying to use HS and then finding the DMA isn't working, so I assume that's a missed configuration on their part?

I've tried both RPi with linux and with barebones the issue is that unless you take the linux driver you will find that the USB information is missing for Broadcom (or behind NDA). So your only option is using the dwc2 overlay for the OTG support and the g_audio gadget. I've done this and it seems to only identify USB FS UAC1 so perhaps there's additional configuration - looking at the linux kernel sources for g_audio it certainly appears there's some additional config that may not have been added.

The STM32F7 seems to be the ideal chip for this with both OTG HS and i2s with support for UAC1 and i2s examples of DMA work being in the CUBE repo, the obvious point here is that HS and UAC2 needs adding.
 
As I said earlier on this thread STM32F723E-DISCO is well suited for UAC2 development as the MCU has built-in USB HS support. However the audio codec on that board is only good for UAC1 rates. Another issue is that some essential GPIO pins are already used up by other hw on board (e.g. external audio clock input).

My approach to developing UAC2 FW was to start with existing STM32 UAC1 sample code but not much of that remains. My implementation builds on the existing MCU built-in FW for USB and SAI. The USB implementation of STM32F7 (or F2-H7) is based on Synopsys OTG controller. Don't know where the SAI implementation comes from. Both USB and SAI built-in implementations seem to work very well. USB HS DMA works for USB->I2S (DAC) but for some reason not for I2S->USB (ADC). That is not a problem as DMA can be used with SAI. My STM32F723 based USB-I2S board is capable of 768k/32bit simultaneous play&record on 2-channels so performance is more than adequate. No issues controlling UI and HID (encoder) with the same MCU along with UAC2. I'm using freeRTOS.
 
As I said earlier on this thread STM32F723E-DISCO is well suited for UAC2 development as the MCU has built-in USB HS support. However the audio codec on that board is only good for UAC1 rates. Another issue is that some essential GPIO pins are already used up by other hw on board (e.g. external audio clock input).

My approach to developing UAC2 FW was to start with existing STM32 UAC1 sample code but not much of that remains. My implementation builds on the existing MCU built-in FW for USB and SAI. The USB implementation of STM32F7 (or F2-H7) is based on Synopsys OTG controller. Don't know where the SAI implementation comes from. Both USB and SAI built-in implementations seem to work very well. USB HS DMA works for USB->I2S (DAC) but for some reason not for I2S->USB (ADC). That is not a problem as DMA can be used with SAI. My STM32F723 based USB-I2S board is capable of 768k/32bit simultaneous play&record on 2-channels so performance is more than adequate. No issues controlling UI and HID (encoder) with the same MCU along with UAC2. I'm using freeRTOS.
FreeRTOS - i looked at on the RPi however the broadcom support was the issue.

I was looking at the STM32F7508 dev board, it supports HS on the board. It also has a screen for debugging trace output but just looking at the board it has a direct connection to the WM8994ECS codec/amp. That includes a non jumpered MCLK and data lines so those would have to be hacked in physically. Possibly simply desoldering the codec may be the way forward.
I have a AK5572 adc doing straight through transfers so, in theory, it’a not going to be needed.
 
– USB 2.0 full-speed device/host/OTG
controller with on-chip PHY
– USB 2.0 high-speed/full-speed device/host/OTG controller with dedicated DMA, on-chip full-speed PHY and ULPI
– 10/100 Ethernet MAC with dedicated DMA: supports IEEE 1588v2 hardware, MII/RMII

Hmm so USB2.0 HS but then seems to state on chip FS .. so it looks like the onchip OTG is FS but can be expanced to HS with external help. If I read that right.

However the diagram shows PHY FS:
44DEBA78-34CF-4C40-A6DE-C2C2353E9138.png
 
Last edited: