NXP 4357 USB undocumented error writing 0 to the ENDPTNAKEN register

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

NXP 4357 USB undocumented error writing 0 to the ENDPTNAKEN register

597 Views
lpcware
NXP Employee
NXP Employee
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.
Labels (1)
0 Kudos
1 Reply

575 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by agemoz on Sat Jan 16 17:02:14 MST 2016
The issue is closed, I found the problem.  The USB PHY wasn't getting powered up before the call to the USB init routine.
0 Kudos