Issue with low power Deep Sleep

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

cross mob
DaHu_285096
Level 5
Level 5
10 likes received 250 replies posted 100 replies posted

I have a project running on PSCO 4200 that goes into deep sleep and is woken by change in GPIO pin.

   

When I run the code , it appears to sleep for a while and then wakes up (but not by GPIO pin change).

   

The code starts a timer, and then stops the time when done and puts the device back in deep sleep mode.

   

However, once the device is woken it appears the timer never stops and it keeps getting continuously woken by the time (I put a break point at the ISR and it is going directly to it).

   

I have a Global Signal - System Power Interrupt placed in the design but do not use the watchdog.

   

Firstly, is there a register that indicates what caused the wake from deep sleep ?(I am sure I saw this in a document for hibernate but not sure about deep sleep).

   

What would cause the timer interrupt to not be cleared.

   

CY_ISR(TimerINT){

   

    Timer_ReadStatusRegister();

   

    Timer_Flag = 1;

   

}

   

void StartTimer(uint32 tdelay){  //used in "processLF()" routine when woken

   

    uint32 period = tdelay;

   

    Timer_WritePeriod(period);

   

    Timer_WriteCounter(period);

   

    Timer_Enable(); 

   

}

   

void StopTimer(void){  //called just before deep sleep when leaving "processLF()"

   

   Timer_Stop();

   

   Timer_Flag = 0;   

   

}

   

 

   

main loop

   

for(;;){

   

          CySysPmDeepSleep();

   

          processLF();

   

    }

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

PSoC4 Low Power Technics state that any interrupt will wake from deep-sleep. No isr-component needed, just an enabled interrupt.

   

Can make it difficult to find a wakeup cause, looks as if you'll have to read some ICU-registers to get the cause.

   

Keep in mind that debugging and deep-sleep may not go together!

   

 

   

Bob

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

This ap note should help -

   

 

       

http://www.cypress.com/?rID=95069     AN90799 - PSoC® 4 Interrupts

   

 

   

    

   

         

   

http://www.cypress.com/?rID=78797     AN86233 - PSoC® 4 Low-Power Modes and Power Reduction Techniques

   

 

   

and GPIO issues in sleep -

   

 

   

    

   

          

   

http://www.cypress.com/?rID=93401     AN86439 - PSoC® 4 - Using GPIO Pins

   

 

   

 

   

 

   

Regards, Dana.

0 Likes