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.

CC2538 Watchdog Use and Control

Other Parts Discussed in Thread: CC2538

Hello Team Zigbee,

According to the CC2538 Users Guide (swru319), once the Watchdog has been enabled, it cannot be disabled (see snip below).  Is this really the case?

"14.1 Watchdog Timer

The WDT is disabled after a system reset. To start the WDT in watchdog mode, set the EN bit in the

SMWDTHROSC_WDCTL register to 1, and the MODE bit in the SMWDTHROSC_WDCTL register to 0.

The watchdog timer counter then starts incrementing from 0. When the timer is enabled in watchdog

mode, it is not possible to disable the timer. Therefore, setting the EN bit in the SMWDTHROSC_WDCTL

register to 0 has no effect if the WDT is already operating in watchdog mode."

One thing that is not clear to me is whether (or not), the watchdog could possibly be switched to an “interval” mode to prevent resetting the device.. thereby "~disabling" the watchdog. 

The Users Guide states "14.1 Watchdog Timer- The WDT is disabled after a system reset. To start the WDT in watchdog mode, set the EN bit in the SMWDTHROSC_WDCTL register to 1, and the MODE bit in the SMWDTHROSC_WDCTL register to 0."..

But it seems that there is no "MODE" bit defined in the SMWDTHROSC_WDCTL register.. just bits called "RESERVED, CLEAR, EN & INT".  Can this ~hidden MODE bit be used to put the watchdog into an interval (and not watchdog) timing mode?

Thanks, Merril

 

14.1 Watchdog Timer

The WDT is disabled after a system reset. To start the WDT in watchdog mode, set the EN bit in the

SMWDTHROSC_WDCTL register to 1, and the MODE bit in the SMWDTHROSC_WDCTL register to 0.

 

But seems that there is no MODE bit defined in this register..(See register snip bleow)

  • Merrill,

    It looks like you have found a documentation issue, I will have someone in my team look into this.

    Regards,
    /TA
  • Bit 2 is the Mode bit which will be updated in the next release.

    Following it the description:

    Mode select Type RW Reset 0
    This bit selects the watchdog timer mode as follows:
    0: Watchdog mode
    1: Timer mode
    Writing this bit is only valid when enabling the timer or the timer is
    enabled in timer mode. When watchdog mode is selected and EN =
    1, writing to this bit has no effect.

    Thanks,

  • Hi FI,

    Thanks.  What I'm really looking for is a ~workaround to effectively disable the watchdog after it has been setup and it is enabled/running.

    I thought maybe we could do this by switching the timer from watchdog to interval mode.  If the timer can be switched from "watchdog" mode to “interval” mode hopefully this will prevent resetting the device.. thereby effectively ~disabling the watchdog. 

    So.. once I have the timer set to watchdog mode and it is enabled/running, how can I switch it to interval mode?

    Thanks, Merril