Host Connect Detect f() for: USBD_API->hw->Connect(g_hUsb, 1);

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

Host Connect Detect f() for: USBD_API->hw->Connect(g_hUsb, 1);

1,284 Views
mattferrari
Contributor III

I'm building a USB MSC subsystem.  To initiate the enumeration, I call:    USBD_API->hw->Connect(g_hUsb, 1);

If the Host is present, I enumerate and all is well.

But what if the Host is not present / not connected?

Does the USB Library (LPC11U68) provide a complementary function I can call, or perhaps just a flag I can check to confirm that a connection has been established with the Host?

I need to cover the condition when USBD_API->hw->Connect(g_hUsb, 1) has been called, but the USB cable has not been connected to the Host (user error).  

Right now, my code implementation waits forever and I'd like to be able to check for positive confirmation that a Host on the other end has responded - to see if a Host is even there.

Can anyone point me to such a function or a flag provided by the LPCOpen USB Library for the LPC11U68?

Thanks,

Matt

Labels (2)
0 Kudos
3 Replies

1,009 Views
soledad
NXP Employee
NXP Employee

Hello Matt,

Please check the below thread and let me know if this helps!!

Detect USB connect/disconnect using USBD ROM Stack? | www.LPCware.com 


Have a great day,
Sol

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

0 Kudos

935 Views
andarm
Contributor II

I can not open link, because of company policy. Could you send it here. Thanks. 

Tags (1)
0 Kudos

1,009 Views
mattferrari
Contributor III

Thank you for the link.  This thread actually discusses USB Host, not End Point, so it didn't address my concern.  I have just decided to use a timeout and not worry about immediate confirmation of an attached Host, although I think the the USB Host Read Callback function could probably suffice for Host Present verification.  The Host will query the End Point to get information from it and that transaction could be used to do the "Host Present" confirmation I would think, although I don't know if there might be additional considerations with using this approach...

0 Kudos