Part Number: TM4C123GH6PM
Other Parts Discussed in Thread: EK-TM4C123GXL
Tool/software: Code Composer Studio
Hi all,
I am working on TM4C123GH6PM board. In watchdog timer , the processor reset the board with particulator time value . At the same time , need to kick the dog ( restart the watchdog timer) from processor.
I am using below highlighted API for restart the watchdog . Is this correct ??
void watchdog(void)
{
/* Enable the peripherals used by this example. */
SysCtlPeripheralEnable(SYSCTL_PERIPH_WDOG0);
/* Set the period of the watchdog timer. */
WatchdogReloadSet(WATCHDOG0_BASE, SysCtlClockGet());
/* Enable reset generation from the watchdog timer. */
WatchdogResetEnable(WATCHDOG0_BASE);
/* Enable the watchdog timer. */
WatchdogEnable(WATCHDOG0_BASE);
}
int main(void)
{
watchdog();
while(1)
{
WatchdogReloadSet(WATCHDOG0_BASE, load value); /* Restart watchdog from processor */
/* Another task in general */
WatchdogIntClear(WATCHDOG0_BASE);
}
Thanks in advance,
sankari.