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.

CCS/CC2640R2F: The wathdog timeout happens much longer (~120secs) than actual programmed 5 secs value

Part Number: CC2640R2F

Tool/software: Code Composer Studio

We enabled watchdog with 5 secs. At the very first time of flashing the code via JTAG cable is connected, the watchdog timeout happens at 5 secs.

During the time-out RESET happens and JTAG communication with CCS is disabled.

When we remove JTAG and re-start the board with newly flashed binary, the watchdog timeout happens at every 120 secs instead of 5 secs.

What could be reason behind getting 120 secs timeout instead of 5 secs?.   

here, is my watchdog code implementation


and below is the WATCHDOG calback function

 

  • Hi Roopa,
    Where is the code that triggers the watchdog reset?
    Also, which SDK version are you using?
  • Hi Joakim,

    Our SDK version is 2_40_00_32

    The Watchdog_clear function is commented out to check the timeout.And this Watchdog_clear is kept inside a periodic clock handler. But this is commented out to check the watchdog timeout.

    Our problem is we are not getting watchdog timeout at 5 secs(as shown below) and instead getting at 120secs.so we are unable to get the reset at 5sec.

    Regards,

    Roopa 

  • Hi,
    Please ,Can anyone reply for the query I have attached?
    Regards,
    Roopa
  • Hi Roopa,

    I would hazard to guess that your application goes into power saving mode. In this state the watchdog timer does not run, unfortunately.

    You can confirm this by disabling power saving (see the #ifdef POWER_SAVING in main.c)
    Best regards,
    Aslak
  • Hi Aslak,

    In the main .c code we have already disabled the power saving.(as shown below)

    Then what could be the problem for getting  watchdog timeout at 120 sec?

    Regards,

    Roopa 

  • Hi Roopa,

    I can't see that you have disabled power saving in that screenshot.

    Add this to mian.c before BIOS_start() to check if the 120 second thing goes away:
    Power_setConstraint(PowerCC26XX_SB_DISALLOW);
    Power_setConstraint(PowerCC26XX_IDLE_PD_DISALLOW);

    Best regards,
    Aslak
  • Hi Aslak,

    I have  enabled the USE_FPGA in the main .c function(as shown below)

    but there is no improvement .still the Watchdog timeout is happening at 120 secs.

  • Hi Aslak,
    Can you give me the suggestions please?
    Regards,
    Roopa
  • Hi,

    I could not reproduce what you see. If I disable power saving then the watchdog works like it does when the debugger is attached. You can try calling Power_disablePolicy() too if you want, but it should be the same as adding those setConstraint calls.

    But regardless, if you want to have power saving enabled in your product, you will not have the WDT ticking while you are in standby.

    You should also keep in mind that if your application crashes then it will likely go into an exception handler instead of the power policy, and so the WDT will trigger more quickly.

    I'll close this thread now, there's nothing more I can say.

    Best regards,
    Aslak
  • Hi All,

    Just sharing my experience implementing watchdog. I encounter the same observation as roopa. I assume when the device goes to Standby State it lengthens the watchdog timeout. I just concluded that this is normal.

    Also it is not a good idea to clear the watchdog using a periodic clock. Doing so will increase device power consumption.

    -kel
  • Hi Aslak,

    We have added these to main.c before BIOS_start() and the 120 seconds timeout problem is solved. With these constraints, we get Watchdog timeout every 5 seconds as programmed.
    Power_setConstraint(PowerCC26XX_SB_DISALLOW);
    Power_setConstraint(PowerCC26XX_IDLE_PD_DISALLOW);

    These constraints give NO POWER SAVING to our application.

    We want to have POWER SAVING without these power constraints. In that case, we understood that we will not have the WDT ticking while app is in standby. We need to effectively plan WDT ticking and we will work on this further.

    Thanks for your support and help.

    Roopa