Deep sleep cycling

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

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

0 Likes
8 Replies
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

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

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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

0 Likes
Anonymous
Not applicable

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!!!

0 Likes
Anonymous
Not applicable

🙂 too much info, most I have seen.

   

So, if it is woken by the ISR, shouldn't my code work?

0 Likes
lock attach
Attachments are accessible only for community members.
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Project 27, 38, 41 may help, see attached.

   

 

   

http://www.cypress.com/?id=5509 100 Projects in 100 Days with Bluetooth

   

 

   

Regards, Dana.

0 Likes
lock attach
Attachments are accessible only for community members.
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Here is a table from PSOC 4 Ap Note that shows generally speaking what is "alive" in

   

what modes, attached.

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

Much better than the table I posted but I still would not have guessed only the WDT's were available in deep sleep

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

That's why they call it Deep Sleep.   😉

   

 

   

Bob

0 Likes