cancel
Showing results for 
Search instead for 
Did you mean: 

USB Low-Full-High Speed Peripherals

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

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
Hemanth
Moderator
Moderator

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