Minimum time required for DISCON bit to register device disconnection

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello,

   

I know that we can use the USBCS->DISCON bit to manually trigger a USB re-enumeration.

   

Is there a minimum time limit for USB host to detect a device disconnection?

   

 

   

USBCS|=bmDISCON;

   

What is the delay we should apply here?

   

USBCS &=~bmDISCON;

   

 

   

Thank you.

0 Likes
1 Solution
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hello Pradeepa,

   

For manually triggering the renumeration atleast 1mS delay is required. This can be given by EZUSB_Delay(1). As you might know, the number in the paranthesis is in terms of millisec.

   

However there is a function impleemnted in EZUSB library for renumeration to occur. That is EZUSB_Discon. The delay implemented in this function between connect and disconnect is 1500 millisec i.e EZUSB_Delay(1500). You can call this function directly or it is recommended to give that delay even though it works even for 1mS.

   

Regards,

   

hman

Hemanth

View solution in original post

0 Likes
1 Reply