In Mass storage host, yet times when we remove the device enumeration starts

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

In Mass storage host, yet times when we remove the device enumeration starts

660 Views
ssudhir
Contributor II

Hi,

Our system has LPC4357, and we are using USB1 as mass storage host. We are using your mass storage host driver. Yet times when we remove the USB disk , USB_Host_Enumerate (in host.c) gets kicked off from the interrupt handler. Any idea?

Thanks

0 Kudos
4 Replies

520 Views
FelipeGarcia
NXP Employee
NXP Employee

Hello,

 

I recommend you to check the following thread. Our drivers were implemented to detect the device only the first time it is attached, in the below community post it is shown a way to prevent this.

LPC43XX USB HOST Mass storage class - drive fails the second time it is plugged in 

Hope it helps!

 

Best regards,

Felipe

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

520 Views
ssudhir
Contributor II

Thanks Felipe,

We had fixed that problem a while ago. Right now the problem seems to in

pipe . Yet times after removing once and inserting, it seems to get stuck

or spend a lot of time in forever loop in Pipe_WaitUntilReady - pipe.c Any

idea?

0 Kudos

520 Views
FelipeGarcia
NXP Employee
NXP Employee

Hi,

 

From the same post I mentioned in my previous reply it is mentioned to call Stat = STA_NOINIT; in EVENT_USB_Host_DeviceUnattached. You need to do this because the disk is never sent back to Not Initialize when unattaching the device.

 

I tested this myself in LPCXpresso4367 and I was able to plug and unplugged the device more than once.

 

I hope if helps!

 

Best regards,

Felipe

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

520 Views
ssudhir
Contributor II

Thanks Felipe. We had similar logic, but now changed to the exact logic as

you mentioned. We can reinsert. However at times, when we remove the disk

we get attacked interrupt. and yet times the system gets stuck in the

forever loop in Pipe_WaitUntilReady - pipe.c or PipehandleParse in EHCI.c.

Any insight would be great.

Thanks

0 Kudos