Content originally posted in LPCWare by agemoz on Sat Jan 16 10:48:55 MST 2016
Well, no luck--even with a huge amount of work, I have not been able to troubleshoot this USB problem over the last month. I was successful in updating my environment to version 1.8, the configuration had to be modified, I found all the issues, and now can run my non-USB code successfully in the latest LPCXpress. But running the int USB API call hangs. When I try to debug it, I can run fine up to the line
/* USB Initialization */
ret = USBD_API->hw->Init(&g_hUsb, &desc, &usb_param);
I checked that the descriptors are pointing correctly and have valid data, but when I run this instruction, the emulator (the Keil cortex M debugger) disconnects. There are no warnings or errors. If I load this code into flash and reset (without the emulator) it just hangs.
How do I debug this? As long as I don't try to init USB, all my code works fine. How do I determine why the USB ROM code is dying? I've exhausted all the ideas I have why this doesnt work.
It seems like it is a fatal showstopper for using this part that the USB ROM code cannot be traced--is there any way to find out why the processor locks up in here.
Bob