lpcware

NXP 4357 USB undocumented error writing 0 to the ENDPTNAKEN register

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by agemoz on Sat Jan 16 16:04:06 MST 2016
Hi,
   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.

Outcomes