- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
can somebody explain why the main thread in the sourcesink example is trying each 2 seconds to get the LPM back to U0?
With that code snippet:
/* Try to get the USB 3.0 link back to U0. */
{
CyU3PUsbLinkPowerMode curState;
if (CyU3PUsbGetSpeed () == CY_U3P_SUPER_SPEED)
{
/* If the link is in U1/U2 states, try to get back to U0. */
stat = CyU3PUsbGetLinkPowerState (&curState);
while ((stat == CY_U3P_SUCCESS) && (curState >= CyU3PUsbLPM_U1) && (curState <= CyU3PUsbLPM_U3))
{
CyU3PUsbSetLinkPowerState (CyU3PUsbLPM_U0);
CyU3PThreadSleep (1);
stat = CyU3PUsbGetLinkPowerState (&curState);
}
}
}
For what use is this?
Why polling each two seconds?
Why not doing this in the LPM callback function if the LPM state changes to other than U0?
Thanks,
lumpi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Lumpi,
What is the version of the SDK that you are using. I could not find it in my projects.
Regards,
sai krishna.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sai Krishna,
it is FX3 SDK version 1.1.1 release B818. I append you the .c file of the USBBulkSourceSink example.
regards
Lumpi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Lumpi,
This part of code is not compulsory to have in your projects.
It is just that we intended to show a piece of code to come back into U0 mode incase if you get stuck in any low power mode.
Thanks,
sai krishna.