- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have some custom hardware buit around a CY8C5867AXI-LP024. I'm trying to sleep and wake up on a sustained button press, or a USB cable being plugged in. This is the loop.
CyPmSaveClocks();
CyPmSleep(PM_SLEEP_TIME_NONE,PM_SLEEP_SRC_ONE_PPS);
while(1)
{
CyPmRestoreClocks();
if((CHRG_Read() == 0) || (ACPR_Read() == 0))
{
return(start_up);
}
else if(PB_CENTER_Read() == 0)
{
wake_up_counter++;
if(wake_up_counter == 3)
{
return(start_up);
}
}
else
{
wake_up_counter = 0;
CyPmSaveClocks();
CyPmSleep(PM_SLEEP_TIME_NONE,PM_SLEEP_SRC_ONE_PPS);
}
}
It does exactly what I expect when I single step through it, but running at full speed, it's like the OPPS interrupt isn't firing. The RTC_Start() and RTC_Enable() functions are called in the initializtion. Usuaully things like this are something obvious. Anyone see my error? Thanks.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
When CTW or One PPS is used as a wakeup source, the CyPmReadStatus function must be called upon wakeup, with the corresponding parameter.Can you please use CyPmReadStatus(CY_PM_ONEPPS_INT).
Thanks,
Hima
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the reply, but that wasn't the magic bullet. I put CyPmReadStatus(CY_PM_ONEPPS_INT); right after the sleep function and put a break point on it. I can enter the sleep state, but it never hits the break point.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
It is not recommended to run the low power code in debug mode. Can you please test this in anyother way like blinking an LED or something.
Thanks,
Hima
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, I compiled for release, and it's still not waking up. I suspect the OPPS interrupt isn't actually firing. Global interrupts and the RTC are enabled. What am I missing here?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It wouldn't be too bad if you could post your complete project, so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.
Bob
- 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
Datasheet (System Reference Guide pg. 49) clearly states:
PSoC 5 devices will not go into low power modes while the debugger is running
That has nothing to do with Debug or Release build configuration.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It doesn't matter if it's running in debug or not, it gets to the sleep state, and can't get out of it.