Hi,
I used the example from driverlib to test the watchdog and now the system is resetting too quickly to reprogram the device. How do we recover from this?
Here's the example code. It's resetting somewhere around every 250ms which I find odd based on the load value. The CPU is running at 120MHz.
//
// Enable the Watchdog 0 peripheral
//
SysCtlPeripheralEnable(SYSCTL_PERIPH_WDOG0);
//
// Wait for the Watchdog 0 module to be ready.
//
while(!SysCtlPeripheralReady(SYSCTL_PERIPH_WDOG0))
{
}
//
// Check to see if the registers are locked, and if so, unlock them.
//
if(WatchdogLockState(WATCHDOG0_BASE) == true)
{
WatchdogUnlock(WATCHDOG0_BASE);
}
//
// Initialize the watchdog timer.
//
WatchdogReloadSet(WATCHDOG0_BASE, 0xFEEFEE);
//
// Enable the reset.
//
WatchdogResetEnable(WATCHDOG0_BASE);
//
// Enable the watchdog timer.
//
WatchdogEnable(WATCHDOG0_BASE);
//
// Wait for the reset to occur.
//
while(1)
{
}
Regards,
-Mike