cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F429 Audio USB with CubeMX

axel2
Associate II
Posted on May 06, 2015 at 13:02

Hello, 

I have a quick question, and I cannot find answer anywhere on the web (including Reference Manual for MCU). I'm preparing for a new project, picking master unit, where one of most important feature is USB audio input (and if possible output). I already know that M3 based devices have too small buffers to run 96 khz / 24 bit so I went for STM32F429 (yeah, I know go big or go home, but I need extra SDRAM) with external PHY for max speed avaliable. 

However when I try to configure middleware with CubeMX for Audio Class with 96000 Sa/s i tells me that maximum frequency is limited to 48 ksa/s. Is it cubemx bug or usb core is really incapable of 24bit/96Khz mono input?

/edit: I suppose it is CubeMX bug, therefore I posted in this forum.

#audio #stm32f4 #usb #usb #cubemx #audio #microphone
4 REPLIES 4
axel2
Associate II
Posted on May 06, 2015 at 16:52

But wait there is more. I've been digging in files, I got deep into USB Cube files and I got this:

''Audio Configuration USBD_AUDIO_FREQ 8 to 48 KHz.''

and this

''Supported audio sampling rates range from 96 kHz to 24 kHz (non-multiple of 1 kHzvalues like 11.025 kHz, 22.05 kHz or 44.1 kHz are not supported by this driver). Forfrequencies multiple of 1000 Hz, the Host will send integer number of bytes each frame(1 ms). When the frequency is not multiple of 1000Hz, the Host should send noninteger number of bytes per frame. This is in fact managed by sending frames withdifferent sizes (i.e. for 22.05 kHz, the Host will send 19 frames of 22 bytes and oneframe of 23 bytes). This difference of sizes is not managed by the Audio core and theextra byte will always be ignored. It is advised to set a high and standard sampling ratein order to get best audio quality (i.e. 96 kHz or 48 kHz). Note that maximum allowedaudio frequency is 96 kHz (this limitation is due to the Codec used on the Evaluationboard. The STM32 I2S cell enables reaching 192 kHz).''

OK, now I'm confused, can anyone explain?
axel2
Associate II
Posted on May 13, 2015 at 23:31

I'd love to thank ST for their support, yet again You've proven that in need one can count only on himself...

dodotronic
Associate II
Posted on March 24, 2016 at 11:42

Hi Krefta

let's try to use the last st cube package, there are microphone usb example, bypass the bsp and use the hal functions, I could reach 384 khz 16 bit mono. The limit is due to the full speed of the usb so probably you can reach 192 khz 24 bit mono or 96 khz 24 bit stereo

Ivano

tsuneo
Senior
Posted on March 24, 2016 at 23:57

Hi Dodotronic,

> let's try to use the last st cube package, there are microphone usb example

Umm... I can't find ''microphone usb example'' on the cube firmware libraries..

I've searched on ''Projects'' folders of these libraries, but in vein.

- STM32Cube_FW_F4_V1.11.0

- STM32Cube_FW_L4_V1.4.0

Can you give us the library version and the exact folder path of the ''microphone usb example'', please?

And then, I'll answer to your question on [DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Java/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Java/USB%20audio%20microphone%20issue&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000F9A0E3A95BA69146A17C2E80209ADC21&currentviews=7]your another post, examining ST's implementation.

Tsuneo