lpcware

LPCUSBLIB Stuck in infinite loop inside Pipe_WaitUntilReady

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 18, 2016 by lpcware
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? 

Outcomes