cancel
Showing results for 
Search instead for 
Did you mean: 

USB Audio issues with STM32CubeMX and STM32F4-Discovery

t239955_stm1
Associate
Posted on December 15, 2014 at 15:03

Hi there,

I'm having trouble implementing the Audio Device Class example from the STM32CubeMX tool on a STM32F4-Discovery board. The attached project is the most basic deviation from the template project for the Discovery - just enabling the USB_OTG_FS and selecting Audio Class Device. No changes were made to the generated code.

When run, the USB appears to enumerate properly, installs the default drivers (Windows 7, btw) and shows up properly as a playback device. However, attempting to use a test tone or play through the device in any way reports a failure (no further information forthcoming).

Debugging, I can see that the USB interrupt is being triggered very often, with the flags INCOMPISOOUT (every time) and RXFLVL (rarely). The HAL PCD callback for the former is just an empty function, and the latter seems to be a Status Update, but it only ever copies the first two values into the Setup field of the HPCD object, and doesn't do anything with it.

Has anyone else had this issue? Is there something obvious I'm missing, like setting up buffers or something?

Versions are as follows:

STM32CubeMX: 4.3.1

IAR EW: 7.20.2.7431

Discovery board: STM32F4-Discovery

MCU: STM32F407VG

OS: Windows 7 Professional SP1 (64-bit)

The eventual goal will be to implement a composite device with HID and Audio, but I'd like to get them working individually first. Everything else with Cube and Discovery has been a joy.

Cheers,

Tom M
2 REPLIES 2
Posted on January 15, 2015 at 11:38

Hi Tom,

Take a look to this [DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/STM32F4Discovery%20Cube-based%20USB%20Speaker%20application%20not%20working&currentviews=251]post, it may help you.

Regards,

Heisenberg.

anuja
Associate II
Posted on May 22, 2015 at 00:48

Hi,

I'm having the same problem with an STM32l152, and i dont get any interrupt when i try playing audio. Any help will be appreciated.

Thanks,

Anuja