I am getting an ERROR 15, Target error from register access Ee(FF) Undocumented Error. I am running version LPCXpresso v8.0.0 [Build 526] [2015-11-23] and have the latest LPCOpen software. I am using an LPC4357 (version LPC4357JBD208,PNS994.00 02,ESD14020-) in a target board that works fine except for when I try to initialize USB. This board uses a 25Mhz crystal and the M4 clock is set for 200Mhz, the PLL0 USB PLL is set for 480Mhz.
It happens in the USB ROM code location 0x104026c2, which is deep in the USB0 init routine.
The failure was pinpointed to when the processor attempts to write a 0 to the USB0 ENDPTNAKEN register 0x40006140 + offset 0x3c. As soon as this instruction is executed, the emulator disconnects, the processor appears to shut down, and I have to power cycle the board. This failure is 100% repeatable.
Here is the call in my code that causes the processor to hang and the emulator to disconnect:
ret = USBD_API->hw->Init(&g_hUsb, &desc, &usb_param);
The memory location for the descriptors is in CPU RAM 0x10000000 and looks valid.
Any help would be appreciated.