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: