I'm having trouble getting the Watchdog 1 peripheral to become Ready after Enable when clocked by the RTCOSC.
Watchdog 0 has a maximum timeout before Reset of about 72 seconds. Some of our functions take longer than that. Thus the desired for Watchdog 1.
Watchdog 1 is clocked from ALTCLK, which can select between the 16 MHz Precision Internal Oscillator, Hibernation Module 32.768 kHz Real-Time Clock Oscillator, or the Low-Frequency Internal Oscillator (also 33 kHz).
Testing with ALTCLK pointed to the PIOSC works fine, but the maximum timeout before Reset is 8.9 minutes, and that's a little shy of our 10-minute goal. It seems like the 32.768 kHz ALTCLK source would be best. However, enabling RTCOSC before starting Watchdog 1 results in that peripheral never starting! The code hangs on SysCtlPeripheralReady(SYSCTL_PERIPH_WDOG1).
I'm wondering what steps I might be missing to enable the RTC to drive WDOG1. I have confirmed that the Hibernate example runs, which seems to indicate that the crystal on my LaunchPad is working.
Here's the startup code:
SysCtlPeripheralEnable(SYSCTL_PERIPH_HIBERNATE); while (!SysCtlPeripheralReady(SYSCTL_PERIPH_HIBERNATE)) ; HibernateEnableExpClk(32768); // parameter value is not used // allow time for the crystal to stabilize HibernateClockConfig(HIBERNATE_OSC_LOWDRIVE); HibernateRTCEnable(); HibernateCounterMode(HIBERNATE_COUNTER_RTC); UARTprintf("Hibernation module is%s active\n", HibernateIsActive() ? "" : " not"); SysCtlAltClkConfig(SYSCTL_ALTCLK_RTCOSC); SysCtlResetBehaviorSet(SYSCTL_ONRST_WDOG1_POR); SysCtlPeripheralEnable(SYSCTL_PERIPH_WDOG1); while (!SysCtlPeripheralReady(SYSCTL_PERIPH_WDOG1)) ;