2012-04-20 07:43 AM
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?2014-08-27 04:22 AM
Hi ,
I think this is a common issue in Eclipse.
I got the following errors.../src/main.c:85:43: error:
'USBH_MSC_cb'
undeclared (first use in this function)../src/main.c:85:57: error:
'USR_Callbacks'
undeclared (first use in this function)I searched in all the files related to USB to find the definition of those variable.
They are declared as extern in usbh_core.h.
USB_OTG_CORE_HANDLE
was also undeclared i suppressed warning by definingstruct USB_OTG_CORE_HANDLE USB_OTG_Core;
Anyone know where are these things defined.
2014-08-27 05:22 AM
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
2014-08-27 11:48 PM
Thanks Clive1
My Code is Working now..:):)