1 Reply Latest reply on Sep 20, 2018 10:55 PM by ShanmathiN_06

    Force deep sleep mode forever

    KlJe_3653291

      I tried to add a test that force the system into deep sleep mode forever, but not sure if CyGlobalIntDisable disable the different wakeup causes from deep sleep?
      The code is only for measurement purpose and would require a reset/power cycle.

       

       

              CySysWdtUnlock();

              CySysWdtDisable(CY_SYS_WDT_COUNTER0_MASK | CY_SYS_WDT_COUNTER1_MASK | CY_SYS_WDT_COUNTER2_MASK);

              CySysWdtLock();

       

              uint8_t isr_stat = CyEnterCriticalSection();

              CyGlobalIntDisable;

              CySysClkWriteHfclkDirect(CY_SYS_CLK_HFCLK_IMO);          

              CySysClkEcoStop();

       

              CySysPmDeepSleep();

              CyExitCriticalSection(isr_stat);