- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Attached is an image of Table 5. Power Modes System Status from the CYBL10X6X Family Datasheet.
Do I take this to mean that I can not wake up from Deep Sleep every 25ms by the ISR of a timer driven by an LFCLK clock whose source is WCO clk because no code is running in deep sleep?
Here is my code attempt:
CY_ISR(Timer25ms){
Timer_25ms_ReadStatusRegister(); //clears interrupt, found this in component datasheet
if (flop % 128==0)RED_Write(!RED_Read());
godeepsleep=1;
flop++;
}
Main loop is:
while(1){
if (godeepsleep==1){
CySysClkEcoStop();
CySysPmDeepSleep();
CySysClkEcoStart(0);
godeepsleep=0;
}
}
The code executes and flashes LED fine in debug mode (probably can't go to deep sleep in debug or something) but the device goes to deep sleep and never wakes up on its own powered by battery (shows current of 1ua so I know it goes to deep sleep).
Dale
- Labels:
-
BLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The part is woken up by the ISR and code execution then occurs.
These may be of some help -
http://www.cypress.com/?rID=78797 AN86233 - PSoC® 4 Low-Power Modes and Power Reduction Techniques
http://www.cypress.com/?rID=96072 AN90114 - PSoC® 4000 Family Low-Power System Design Techniques
http://www.cypress.com/?rID=110007 AN92584 - Designing for Low Power and Estimating Battery Life for BLE Applications
http://video.cypress.com/video-library/search/psoc+4+low+power/
http://www.cypress.com/?id=4&rID=94607 PSOC 4 SysTick
http://www.cypress.com/?id=5509 100 Projects in 100 Days with Bluetooth
Regards, Dana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is only the watchdog timer running in deep-sleep, no normal timer. Use that as your interrupt source and you will be woken up as expected.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Bob,
That was it! Just set WDT1 to 25ms with interrupt and then I only need code in main loop for WakeUp, Do Something, Go back to sleep for another 25ms:
while(1){
CySysClkEcoStop();
CySysPmDeepSleep();
CySysClkEcoStart(0);
RED_Write(0);
RED_Write(1);
}
Not sure why direct into deep sleep and then empty main loop shows correct 1ua current and my code ups that to 11ua though.
1ua of that is the LED blip and the rest must be 12mhz PRoC active average over 25ms.
Thanks!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
🙂 too much info, most I have seen.
So, if it is woken by the ISR, shouldn't my code work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Project 27, 38, 41 may help, see attached.
http://www.cypress.com/?id=5509 100 Projects in 100 Days with Bluetooth
Regards, Dana.
- 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
Much better than the table I posted but I still would not have guessed only the WDT's were available in deep sleep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That's why they call it Deep Sleep. 😉
Bob