Please can someone with experience with watchdog1(using PIOSC) assist me?
I am using watchdog0 and watchdog1 with a NMI in my application for added safety. I can easily get watchdog0 to run, but watchdog1 hangs the micro during the initialisation code. The odd thing is that when I run this code with the debugger connected, both watchdogs are initialised and run correctly, without the debugger the code gets stuck (and neither watchdog causes a reset). I have tested and know for sure that watchdog1 is being the bad dog here.
Below is my initialisation code for watchdog1. What have I missed here, do I need to do anything else special with PIOSC clock settings?
LM4F232H5QC @50MHz (system clock)
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_WDOG1);
ROM_SysCtlDelay(5);
ROM_WatchdogEnable(WATCHDOG1_BASE);
while(!HWREGBITW(&WATCHDOG1_CTL_R, 31)); //wait for WRC to clear
ROM_WatchdogIntTypeSet(WATCHDOG1_BASE, WATCHDOG_INT_TYPE_NMI);
while(!HWREGBITW(&WATCHDOG1_CTL_R, 31));
ROM_WatchdogReloadSet(WATCHDOG1_BASE, ROM_SysCtlClockGet());
while(!HWREGBITW(&WATCHDOG1_CTL_R, 31));
ROM_WatchdogResetEnable(WATCHDOG1_BASE);
while(!HWREGBITW(&WATCHDOG1_CTL_R, 31));
ROM_WatchdogStallEnable (WATCHDOG1_BASE);
while(!HWREGBITW(&WATCHDOG1_CTL_R, 31));
ROM_WatchdogLock(WATCHDOG1_BASE);
ROM_IntEnable(INT_WATCHDOG);