This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Periodic Wakeup by Watchdog Interrupt from Standby Mode

Hi, 

I got a problem when I was using watchdog interrupt to periodically wake up (every 1 second) from Standby mode. After 6 cycles of wake-up and sleep, it won't go back to sleep for another 6 cycles and then get into the right wake-up and sleep cycle again, this phenomenon continues. 

I tried to track the watchdog SCSR and WDCR registers inside the Wakeup_ISR right after wake-up. It seems that after 6 cycles, the SCSR is 7 instead of 3, which indicates than the WDINTS bit is 1.

I already tried to reset the watchdog counter as more as possible and wait for the WDINTS  = 1 before getting into sleep again.

Part of the code:

while(sleep_ind)
{
      KickDog();

      gotoSleep();

      wakeUp();

      delayTime(1); // delay for 1 seconds kickdog inside

}

interrupt void WAKE_ISR(void)
{
      KickDog();
      WakeCount++;
      PieCtrlRegs.PIEACK.bit.ACK1 = 1;

}

void wakeUp(void)
{
       // Wait for SCSR.WDINTS = 1
       while(!(SysCtrlRegs.SCSR & BIT(2))){
             KickDog();
        }

      powerFlash();

      KickDog();

}

Thank you very much!

  • Hi, I am still trying to debug the problem. It turned out that if I use delay time to be 0.5s instead of 1s, it became 10 cycles then could not enter sleep mode, i.e. after every 5 seconds, the device could not enter sleep mode.

    I am wondering under what condition when the device could not enter sleep mode when IDLE was executed, while it could sleep before. Is it because some other interrupts in the code disturbed the watchdog interrupt?

    *Edit*

    I found out the GPIO pin should be muxed to GPIO. Previously, it is muxed to PWM to make the LED blinking. But I still could not figure out how PWM would affect entering low power mode.


    Thanks in advance.