3 Replies Latest reply on Oct 25, 2018 3:14 AM by SananyaM_56

    How to suspend and wakeup FX2LP

    docs_3756686

      Hy

      I try to suspend the FX2LP. I set SUSPEND to any value (e.g. 0x10) but it doesn not go to suspend (I check it by TD_Suspend ran or not. or It does not run in that case?)

      If a set Sleep = TRUE, TD_Suspend ran and go to sleep. How should I exaclty suspend the FX2LP? An how can I check it?

       

      If FX2LP is suspended, is it enough to send a intterupt/bulk/or any msg from the host to FX2LP to wake up? Because in that case TD_Resume funciton didnot run.

      How should I exactly wake up FX2LP?

       

      Thanks,

      domi

        • 1. Re: How to suspend and wakeup FX2LP
          SananyaM_56

          Hello Domi,

           

          The call to TD_Suspend is for USB bus suspend due to inactivity. If you would like to suspend the FX2LP unconditionally, you can use the SUSPEND register.

          To wake up the device from suspend state, you can either use the WAKEUP pins or send any request from host. Could you explain how you are checking for the call to TD_Resume?

           

          Best Regards,

          Sananya

          • 2. Re: How to suspend and wakeup FX2LP
            docs_3756686

            Hello Sananya,

            thanks for your answer. So that means if a use SUSPEND register, TD_Suspend will not run. what do you think about set Sleep to TRUE?

             

            you said  any request, does it contain bulk/interrupt transfer, doesn it?

            In TD_Resume, I set a GPIO high, I could check with this that it is ran or not. I turned out ia had a bug in the code and now TD_Resume runs.

             

            Thanks for you help.

             

            Domi

            • 3. Re: How to suspend and wakeup FX2LP
              SananyaM_56

              Hello Domi,

               

              Yes, using SUSPEND register will not cause TD_Suspend() to run as we will not get the Suspend Interrupt. Setting Sleep as TRUE will call TD_Suspend().

              Yes any request sent from the host will resume the device and you should see your GPIO as high.

               

              Best Regards,

              Sananya