- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
I would like to know if the source of a "wakeup" from deepsleep is stored somewhere. I'm using the CY8CKIT-042-BLE-A. I'm placing my system into deepsleep. I configured the system to wakeup using a GPIO and then sleep after X amount of time. The system then goes back to sleep after a WDT expires and triggers an interrupt. This works fine except that I experience a single early wakeup event after going to sleep. The system will go back to sleep and then stay asleep until the GPIO triggers a wake up.
in Summary, if I knew what caused the early wakeup it would help me solve the issue.
Solved! Go to Solution.
- Labels:
-
ispn:39612:1:0
-
l1:314:1:0
- 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
shge,
Usually the source of the wakeup is a HW interrupt source. In this case, you can output a different framing pulse through GPIO pin from each ISR supported. This is a visual way of determining what woke you up.
Another way is to use the debugger with breakpoints in the ISRs.
Consider this: Before you go to sleep do you force a clearing of all wakeup interrupts?
"Engineering is an Art. The Art of Compromise."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks I got it working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
shge,
Superb! Can you share what you found with the forum? This will potentially help others with a similar problem.
"Engineering is an Art. The Art of Compromise."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The below code is my main loop. I removed the "Else if()" leaving the all other statements in place. Then the wakeup disappeared. I cannot explain it really.
for(;;)
{
CyBle_ProcessEvents();
if (CyBle_GetState() == CYBLE_STATE_CONNECTED)
{
/*My application. Run if connected*/
load();
}
else if ( timer_expired)
{
ManageLowPower();
/* Start Advertisement and enter Discoverable mode*/
CyBle_GappStartAdvertisement(CYBLE_ADVERTISING_FAST);
}
}