LPCUSBLIB Stuck in infinite loop inside Pipe_WaitUntilReady

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

LPCUSBLIB Stuck in infinite loop inside Pipe_WaitUntilReady

543 Views
lpcware
NXP Employee
NXP Employee
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? 
Labels (1)
0 Kudos
3 Replies

377 Views
lpcware
NXP Employee
NXP Employee
bump
0 Kudos

377 Views
lpcware
NXP Employee
NXP Employee
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.
0 Kudos

377 Views
lpcware
NXP Employee
NXP Employee
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.

I've been unable to work on it again until now.

here is a link to my original post: https://www.lpcware.com/content/forum/lpc43xx-usb-host-mass-storage-class-drive-fails-second-time-it...
0 Kudos