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?
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.
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.