Content originally posted in LPCWare by marshall on Thu Oct 18 15:34:53 MST 2012
Sorry it took me so long to get back, I was going ahead with just making the software work on M4 and ram, now I am trying to get the M0 to run usb code in ram. We setup the M0 based on one of the dual core examples ( I am not the one who set it up). The M0 runs code fine up until doing the USB setup it hangs, if you break then single step then you can move past the hang. I have checked that the scatter file copies the code correctly, and there is no M4 conflict, and even copied it again with a setupcopy routine.
The board is a Hitex 4350
It is hanging in this code:
USB_REG(USBPortNum)->ENDPTFLUSH = 0xFFFFFFFF;
while (USB_REG(USBPortNum)->ENDPTFLUSH); /* Wait until all bits are 0 */
Is there some magic setup that needs to be done so that the M0 can access the USB ports reliably? I do get the interrupts for USB0 sometimes.
Next is there some CPU speed past which you can't run USB code on M0. We have it setup for 204MHz CGU_SetPLL1(17)
I am not the one who initially set up the board, I am just trying to make it work, so there is still the learning curve thing.
Most boards that I have worked with just worked, no strange behavior accessing I/O ports, so I am at a loss.