3 Replies Latest reply on Dec 14, 2011 1:52 AM by christian.richter

    How to detect USB unconfigured state

    user_6806705

      Hello all,

         

      I'm working with a fx2lp and i've to detect the "USB unconfigured" state in order to reduce to <100mA the power requirement (as for USB-IF compliance).

         

      I believed that the solution was to look at configuration index = 0 after SetConfiguration but it doesn't work...

         

      Any idea?

         

       

         

      Thanks a lot!

         

      DaX

        • 1. Re: How to detect USB unconfigured state
          christian.richter

          In my FX2 firmware I activate the high power hardware on SetConfiguration event and in TD_Resume() function. And switch off the hardware on firmware start and on USB Sleep command. It works fine.

          • 2. Re: How to detect USB unconfigured state
            user_6806705
            Chris R. posted on 13 Dec 2011 06:20 AM PST
            Top Contributor
            57 Forum Posts
             
             
               

            In my FX2 firmware I activate the high power hardware on SetConfiguration event and in TD_Resume() function. And switch off the hardware on firmware start and on USB Sleep command. It works fine.

               

             

               

            Hi Chris, thanks for your reply.

               

            But you, in SetConfiguration event, explicitly check for condition index != (not equal) 0 to enable power?

               

            Because, as far as understand, if host set configuration 0 means "unconfigure device" so power must be <100mA.

               

             

               

            Regards,

               

            DaX

            • 3. Re: How to detect USB unconfigured state
              christian.richter

              No, I don´t check this explicitely. Connecting the device on a bus-powered hub the set configuration event don´t appear and so I don´t switch on the high power part. Also on Windows boot the set configuration and sleep states are altered some times, and while installing the driver also the set configuration will appear only after complet install and enough power from hub/host. i think this is OK, but I did not perform compliance tests. Maybe the spec is not completely covered by our firmware.