Other Parts Discussed in Thread: CODECOMPOSER
Hi TI:
I have a few questions about WatchDog Timer Driver.
I do not think I have a clear understanding of how this works.
I am running TI-RTOS 1.10.0.23 & CodeComposer 5.5.0.
I wrote a pretty simple program trying to emulate the WatchDog example that currently exists.
Watchdog_Params_init(&Params_WatchDog);
Params_WatchDog.callbackFxn = WatchDog_CallBack; (2)
Params_WatchDog.resetMode = Watchdog_RESET_ON;
Params_WatchDog.debugStallMode = Watchdog_DEBUG_STALL_ON;
Handle_Watchdog = Watchdog_open(Board_WATCHDOG, &Params_WatchDog);
/* Watchdog objects in EK_TM4C123GXL.c */
WatchdogTiva_Object watchdogTivaObjects[EK_TM4C123GXL_WATCHDOGCOUNT];
/* Watchdog configuration structure */
const WatchdogTiva_HWAttrs watchdogTivaHWAttrs[EK_TM4C123GXL_WATCHDOGCOUNT] = {
/* EK_TM4C123GXL_WATCHDOG0 with 1 sec period at default CPU clock freq */
{WATCHDOG0_BASE, INT_WATCHDOG, 80000000},}; (1)
I am stuck in a few places.
(1), It looks like the WatchDog Timer is set to 80 million or 1 Second before something happens. Correct? Essentially, this is the CPU frequency of the Clock.
(2), I really do not understand what is supposed to happen.
Under what Circumstance does WatchDog_CallBack get called?
Can it be called multiple times?
It seems that I have to have .resetMode set to WatchDog_RESET_ON in order for that to happen. Correct?
(3). What I'm trying to accomplish seems pretty simple; but, I am just not getting it.
If the code state is healthy, I could periodically "feed the dog" and make the WDT start counting down again before it hits 0.
Of course, if the code state was hung, the dog could not be fed and a recovery function would be invoked (when the counter hit 0) so that I could gain control again. (reboot if possible)
If this is how it can work, I am not seeing it. Any help would be great.
Thanks
Rick