8 Replies Latest reply on Aug 13, 2015 1:41 PM by user_1377889

    Deep sleep cycling

    dale.kramer

      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