Other Parts Discussed in Thread: CONTROLSUITE
Hi,
I have been following the example provided in the control suite for the watchdog timer. My understanding of how the API works don't match the actual execution sequence which I would like to confirm with you.
I have attached a video of my debugging session that clearly elaborates the following.
watchdog_init()
{
// Enable the peripheral.
SysCtlPeripheralEnable(SYSCTL_PERIPH_WDOG0);
// Enable the watchdog interrupt.
IntEnable(INT_WATCHDOG);
// Unlock writes to watchdog configuration.
WatchdogUnlock(WATCHDOG0_BASE);
// Set the period of the watchdog timer.
WatchdogReloadSet(WATCHDOG0_BASE, loadValue);
// Enable reset generation from the watchdog timer.
WatchdogResetEnable(WATCHDOG0_BASE);
// Enable the watchdog timer.
WatchdogEnable(WATCHDOG0_BASE);
// Lock subsequent writes to watchdog configuration.
WatchdogLock(WATCHDOG0_BASE);
}
Problem: Even before the Watchdog LOCK function is executed, a watchdog interrupt is triggered. Can someone explain why this is happening?
Am I missing something?
Anoja
