lpcware

LPC1347 USB ROM - Wrong buffer address passed to HID_SetReport when using USBRAM

Discussion created by lpcware Employee on Jun 15, 2016
Content originally posted in LPCWare by mathseng on Mon Sep 09 23:04:21 MST 2013
The LPC1347 USB ROM appears to pass incorrect buffer addresses to application code for HID_SetReport() when using USBRAM.

I was attempting to use the USB HID Report system on the LPC1347 platform. I was able to get simple report data from the LPC1347, but the HID_SetReport data was incorrect. I had set the mem_base to the USBRAM location. Setting the mem_base back to the value originally in the sample code resulted in HID_SetReport correctly getting data from the host.

The specific error is that the parameter pBuffer points to 0x200041ac in USBRAM, but the report data is actually at 0x20004200 (consistent with the ep1 buffer location as described in "LPCUSBLib Generic HID ROM Driver Bugs" below)

Trawling the forum gave no clues to resolving this issue - the closest possibly relevant, but not useful items are listed below.

Attached is the simplest process I could generate to replicate this issue. The code base I am using is " LPCXpresso Example Projects and CMSIS library for LPC1315_16_17_45_46_47".
Has anyone else experienced this problem, and can they help me resolve this issue?
Bill.

Forum items studied:
LPC11U24 control endpoint communication with linux host machine
http://www.lpcware.com/content/forum/lpc11u24-control-endpoint-communication-with-linux-host-machine
Not applicable - HID_SetReport parameter pBuffer contains valid data when mem_base is 0x10001000, but not when mem_base is 0x20004000
hw->Init and hw->GetMemSize return seemingly incorrect values
http://www.lpcware.com/content/forum/hw-init-and-hw-getmemsize-return-seemingly-incorrect-values
Adding in the one line workaround did not appear to make any difference to the operation of the application when mem_base was either 0x10001000 or 0x20004000
LPCUSBLib Generic HID ROM Driver Bugs
http://www.lpcware.com/content/forum/lpcusblib-generic-hid-rom-driver-bugs
Only EP0, EP1 defined, so tables aren't the same.

Outcomes