1 Reply Latest reply on Jan 22, 2017 9:00 PM by hman

    Minimum time required for DISCON bit to register device disconnection

    pradeepa.senanayake

      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.

        • 1. Re: Minimum time required for DISCON bit to register device disconnection
          hman

          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