Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > FX3 suspend wakeup flags?

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



FX3 suspend wakeup flags?
Moderator:
RSKV

Post Reply
Follow this topic



FX3 suspend wakeup flags?

Marcus10110 posted on 01 Nov 2012 4:31 PM PST
Member
4 Forum Posts

 Hi all,

I am starting to work on power state management. The FX3 API includes a function called CyU3PSysEnterSuspendMode

described on page 16 of the API guide. The first parameter is wakeupFlags.

"Bit mask representing the wakeup sources that are allowed to bring FX3 out of suspend mode."

The options mentioned are:

CY_U3P_SYS_PPORT_WAKEUP_SRC_EN

CY_U3P_SYS_USB_WAKEUP_SRC_EN

CY_U3P_SYS_UART_WAKEUP_SRC_EN

However, as far as I can tell, they aren't defined ANYWERE. they don't show up anywhere else in the API guide, and their only mention is in cyu3system.h, which simply has the same text as the API guide in the comments.

Does anyone know where these are defined, if at all, and if not, what should their values be?

Thanks,

Mark Garrison




Re: FX3 suspend wakeup flags?

Gayathri posted on 02 Nov 2012 06:15 AM PST
Cypress Employee
428 Forum Posts

 Hi,

 

Search for CY_U3P_SYS_PPORT_WAKEUP_SRC, CY_U3P_SYS_UART_WAKEUP_SRC, etc in cyu3system.h. You will find the values to be passed in for the wakeup sources in CyU3PSysEnterSuspendMode API. 

 

Regards,

Gayathri



Re: FX3 suspend wakeup flags?

Marcus10110 posted on 02 Nov 2012 12:30 PM PST
Member
4 Forum Posts

 Hi Gayathri,

Thanks a ton! It's right there at the top of the header file.

Thanks for the quick response time too.

-Mark



Re: FX3 suspend wakeup flags?

Marcus10110 posted on 02 Nov 2012 09:37 PM PST
Member
4 Forum Posts

 Hi,

I have another related question.

I'm trying to Suspend the CPU after a USB disconnect from my PC, using the same CyU3PSysEnterSuspendMode function.

Right now, they way I am testing this is setting an event flag in the CyFxBulkSrcSinkApplnUSBEventCB callback when the event type is CY_U3P_USB_EVENT_DISCONNECT. This event flag is then identified in the BulkSrcSinkAppThread_Entry loop using the CyU3PEventGet function. Then I call suspend with this:

status = CyU3PSysEnterSuspendMode(CY_U3P_SYS_USB_VBUS_WAKEUP_SRC, 1, &wakeup_source);

However, it seems that it will always return CY_U3P_ERROR_BAD_ARGUMENT when the device has been disconnected. I have since discovered that it will successfully sleep the device if called for a different reason when USB is still connected.

Any ideas why? I have been slowly stripping the application of all other functionality to make sure that nothing else is going on. I've been testing with other wakeup sources too - CY_U3P_SYS_USB_BUS_ACTVTY_WAKEUP_SRC has the same error.

I did notice that in the docs, it mentions that this error is thrown... "if the wakeup sources specified are invalid." The For some reason, when the USB is disconnected, the specified source is no longer valid.

I've already done a fair bit of testing to make sure that the event is called in at the right time only once. It definitely is only called on a physical disconnect event, and it's only getting called once per disconnect.

Your help is greatly appreciated!

Thanks,

Mark



Re: FX3 suspend wakeup flags?

Marcus10110 posted on 08 Nov 2012 11:40 AM PST
Member
4 Forum Posts

 Hi,

I have not made any progress on the above issue: getting the FX3 to go into suspend mode after USB disconnect.

 

In the mean time, I have started looking at standby mode.

 

Our application is self powered and always on. We want to put everything in the lowest power state possible while disconnected and power down most of the rail supplies.

 

I have been looking into the standby power state (L3) in the datasheet and the programmers manual.

The datasheet says that standby is entered through a register control in the CPU. It also says that it can be exited by the detection of VBUS, and that the program counter is reset.

The programmer's guide says something similar.

The API Guide says nothing. There is explanation of how to enter this mode. The programmers manual mentions a few registers related to device warm reset, but not enough to do anything.

 

I did notice a function in cyu3system.h called CyU3PSysEnterStandby. The description suggests that this is what I am looking for. I've added a call to my application, and now the application won't compile. It says 'undefined reference to CyU3PSysEnterStandby'. I'm guessing that's why it's not in the API guide. I'm using SDK 1.2. I've checked the release notes for 1.2.1, but there is no mention of standby.

 

Also, the h file mentions that the functions this: "This function does not return until the device has already resumed normal operation."

This implies that the function returns eventually. I find this unusual since the program counter is reset. 

 

My questions:
1. Is there any way to currently get the processor into standby, and how?

2. How can I make sure it powers back on from VBUS connection (or any other source)?

3. Can the function mentioned above actually return after power up, and if so, how does it store the stack, etc?

I'm meeting with Triton (FAE) tomorrow and I will ask him then too.

Thanks,

Mark



Re: FX3 suspend wakeup flags?

Gayathri posted on 09 Nov 2012 05:39 AM PST
Cypress Employee
428 Forum Posts

 Hi Mark,

 

Please create a tech support case at www.cypress.com -> support -> Technical Support. One of our engineers will look into your queries.

 

Regards,

Gayathri






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.

Spec No: None; Sunset Owner: GRAA; Secondary Owner: RAIK; Sunset Date: 01/01/20