Skip to main content
eldarsabanovic
Visitor II
April 20, 2012
Question

STM32F4-Discovery Audio playback and record example USB problem

  • April 20, 2012
  • 22 replies
  • 4589 views
Posted on April 20, 2012 at 16:43

Hello,

I am beginner with STM32F4-Discovery. I loaded some examples to flash, all worked, but can't play ''audio.wav'' wave audio file from USB key nor record ''rec.wav'' with ''audio player and recorder example''. Program goes over USBH_Process(&USB_OTG_Core, &USB_Host) in main.c, and cycles here forever, no blue led ligths up, no sound, no switch to recording mode. It seems like something wrong with usb flash connection initialization, because USBH_Process function in usbh_core.c repeats at ''volatile USBH_Status status = USBH_FAIL'' after ''case HOST_ERROR_STATE:''. How I can fix this, or what I did wrong?
    This topic has been closed for replies.

    22 replies

    Tesla DeLorean
    Guru
    August 27, 2014
    Posted on August 27, 2014 at 14:22

    I think this is a common issue in Eclipse.

    The commonality I'm observing is individuals picking tools they don't understand sufficiently, trying to port code into those tools without a good grasp of how the project is constructed in any other tool. I suppose one solution is to bang heads together until it works, but I'd usually do logical analysis. Do you have MEDIA_USB_KEY defined and passed to the compiler command line? This would be required for USB_OTG_Core to defined in main.c

    #if defined MEDIA_USB_KEY
    USB_OTG_CORE_HANDLE USB_OTG_Core;
    USBH_HOST USB_Host;
    #endif

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    rajrahulonline
    Visitor II
    August 28, 2014
    Posted on August 28, 2014 at 08:48

    Thanks Clive1

    My Code is Working now..:):)