Content originally posted in LPCWare by briching on Tue Mar 15 12:41:10 MST 2016 After porting the example contained in "lpcusblib_MassStorageHost" in lpcopen, with debug macro "LPCUSBlib_DEBUG" turned on, my processor gets stuck in an infinite loop inside of Pipe_WaitUntilReady.
My Setup: Chip: LPC4357 USB Mass Storage on USB1 C++ project (directly compiling in lpcusblib, NO static library dependencies -- issues have been raised in the forums about how the IDE reports syntax errors in the LPCUSBLIB source code, but still compiles)
Debug console output:
Device Attached on port 1
Mass Storage Device Enumerated.
HcdDataTransfer
.../lpcusblib/Drivers/USB/Core/HCD/EHCI/EHCI.c: 336
Evaluated HCD_STATUS = 31
HcdGetPipeStatus
.../lpcusblib/Drivers/USB/Core/HCD/EHCI/EHCI.c: 379
Evaluated HCD_STATUS = 31
HcdGetPipeStatus... (repeated infinitely)
The HCD_STATUS of value 31 decodes to "HCD_STATUS_PIPEHANDLE_INVALID"
I have absolutely no idea why the pipe handle comes back as invalid. I am using RAM5 as my USBRAM_SECTION which aliases to RamAHB32, and nothing else in my project is using this bank. Has anyone run into a situation like this before and can offer some help?
Content originally posted in LPCWare by briching on Thu Apr 28 10:43:15 MST 2016 Thanks for the info iemc. I'll update this thread if I find a solution.
Content originally posted in LPCWare by iemc on Thu Apr 28 07:20:18 MST 2016 I ran into the same problem with the LPCUSBlib_MassStorageHost example on a LPC4357 as well. I have not yet found a solution sadly.
In my case I could insert a flash drive into USB1 and read/write files on it. My problem was when I unplugged the flash drive and then re-inserted it. The code would get stuck in an infinite loop as you say.