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.

TM4C123BH6PM: Watchdog with limited No. of resets

Part Number: TM4C123BH6PM

Hey,

I am using the watchdog on a TM4C123BH6PM with ti rtos (2.16.1.14) initialzed by following code:

Watchdog_Params params;

Watchdog_Params_init(&params);

params.debugStallMode = Watchdog_DEBUG_STALL_ON ;

params.resetMode = Watchdog_RESET_ON;

WatchdogIntEnable(WATCHDOG0_BASE);
WatchdogIntClear(WATCHDOG0_BASE);
WatchdogIntTypeSet(WATCHDOG0_BASE, WATCHDOG_INT_TYPE_INT);
watchdog = Watchdog_open(Board_WATCHDOG0, &params);

Watchdog_setReload(watchdog, 80000000 *1 );

Watchdog_clear(watchdog);

within my Task I only use Watchdog_clear(watchdog); to reset the watchdog, when all of the the events of all Tasks are beeing received.

Now, when I stop clearing the watchdog, the device restarts after 2 seconds, as expected (interrupt call is present, but empty). Unfortunately the resetting stops after 5 to 7 times of resetting. Has anyone an idea, why this happens? I would expect the controller, to continue resetting endelssly.

Best regards, Simon

  • Hi Simon,

    After the target stops resetting, do you stop receiving interrupts when the watchdog expires? Would you also be able to provide the application code so we can debug more? If you're uncomfortable providing it here, we can send it over private forum's channels.

    Best,

    Megan

  • Hi Megan,

    it seems I used a API witch is not supported within TM4C123 devices: "SysCtlResetBehaviorSet()" and maybe the registers were not set correctly.

    It isstill hard for me to understand why the controller still performed and reseted for several times then. I also thought of problems with the external clock, so I started to uses watchdog1 as well.

    I now used the APIs "WatchdogResetEnable()" and as well the lock registers using "WatchdogLock()" and even check back with "WatchdogRunning()", oderwise I instantly reset the microcontroller.

    I now use both watchdogs, and checked their correct function with "SysCtlResetCauseGet()". I can clearly see that both watchdogs work as expected (so no clock problems here). I kept both running for over an hour each, resetting the device. No more problems so far.

    Best regards, Simon