AnsweredAssumed Answered

USB on custom BF524

Question asked by WallWart on Dec 12, 2011
Latest reply on Jan 24, 2012 by MartinK



I am running into an issue with the USB on a custom PCB running a BF524.  The original code was taken from the bulk_loopback_app for BF526,

The flags used in the ClientCallback() function were replaced with semaphores.  Similarly, the while loop that is used to wait for usb configuration is replaced with a call to VDK_PendSemaphore().  When I plug in the USB cable I see a message on my PC that reads "One of the USB devices attached to this computer has malfunctioned, and Windows does not recognize it."  The error message displays a list of devices one of which is called "Unknown USB Device."  If I place a breakpoint within ClientCallback() it is never hit.


Several issues that I am aware of:


1. The custom board uses a 12MHz external crystal and it appears that the USB is hard coded to operate with a 24MHz crystal. i.e. in adi_usb_hdrc line 534 the pll is set with *pUSB_PLLOSC_CTRL = 0x30a8;  Is there any way to resolve this without modifying the driver code? 


2. In the original demo code the product ID is selected with the following preprocessor defines:


/* customize the device descriptor for this device */
pDevDesc->wIdVendor = USB_VID_ADI_TOOLS;
#if defined(__ADSPBF527__)
pDevDesc->wIdProduct = USB_PID_BF527KIT_BULK;
#elif defined(__ADSPBF548__)
pDevDesc->wIdProduct = USB_PID_BF548KIT_BULK;
#elif defined(__ADSPBF526__)
pDevDesc->wIdProduct = USB_PID_BF526KIT_BULK;
#error *** Processor not supported ***
but since I'm running a BF524 I just used the USB_PID_BF526KIT_BULK;  Is this a valid approach?
As far as hardware is concerned the schematic is very similar to the ADSP-BF526 EZ-Board that the demo was originally written for.  The code worked on the EZ-Board.
Any ideas?
Thank You.