2014-12-15 06:03 AM
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.1IAR EW: 7.20.2.7431Discovery board: STM32F4-DiscoveryMCU: STM32F407VGOS: 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 M2015-01-15 02:38 AM
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¤tviews=251]post, it may help you.Regards,Heisenberg.2015-05-21 03:48 PM