NOTICE: This website will be shut down in the near future. Product content has moved to nxp.com. Forum content and FAQs have been moved to community.nxp.com. We encourage you to create a user account on nxp.com to use the new community forums and access NXP microcontroller content. We greatly appreciate your contributions and look forward to seeing you at our new web location.

 

NXP 4357 USB undocumented error writing 0 to the ENDPTNAKEN register

1 reply [Last post]
agemoz
Offline
Joined: 2014-08-05
Posts: 18

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.

0
Your rating: None

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
agemoz
Offline
Joined: 2014-08-05
Posts: 18

The issue is closed, I found the problem. The USB PHY wasn't getting powered up before the call to the USB init routine.

feedback