AnsweredAssumed Answered

USB Audio issues with STM32CubeMX and STM32F4-Discovery

Question asked by monkhouse.thomas on Dec 15, 2014
Latest reply on May 22, 2015 by vora.anuja
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

Attachments

Outcomes