Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > LMP Management in Cypress Example USBBulkSourceSink

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



LMP Management in Cypress Example USBBulkSourceSink
Moderator:
RSKV

Post Reply
Follow this topic



LMP Management in Cypress Example USBBulkSourceSink

Lumpi6 posted on 02 Aug 2012 7:28 AM PST
Top Contributor
183 Forum Posts

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




Re: LMP Management in Cypress Example USBBulkSourceSink

RSKV posted on 06 Aug 2012 12:46 AM PST
Cypress Employee
655 Forum Posts

Hi Lumpi,

What is the version of the SDK that you are using. I could not find it in my projects.

Regards,

sai krishna.



Re: LMP Management in Cypress Example USBBulkSourceSink

Lumpi6 posted on 06 Aug 2012 01:26 AM PST
Top Contributor
183 Forum Posts

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



Re: LMP Management in Cypress Example USBBulkSourceSink

Lumpi6 posted on 06 Aug 2012 01:28 AM PST
Top Contributor
183 Forum Posts

Hi,

here the file again as a zip archiv.

regards,

lumpi



Re: LMP Management in Cypress Example USBBulkSourceSink

RSKV posted on 08 Aug 2012 05:40 AM PST
Cypress Employee
655 Forum Posts

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.






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.