/* Setup the clock for the watchdog timer. The default setting is 250kHz.  */
static void wdtClockSetup(void)
/* Setup the clock for the watchdog timer. The default setting is 250kHz.  */
static void wdtClockSetup(void)
{
  SCB_WDTOSCCTRL = SCB_WDTOSCCTRL_FREQSEL_0_5MHZ | 
                   SCB_WDTOSCCTRL_DIVSEL_DIV2;
  SCB_WDTCLKSEL = SCB_WDTCLKSEL_SOURCE_WATCHDOGOSC;
  SCB_WDTCLKUEN = SCB_WDTCLKUEN_UPDATE;
  SCB_WDTCLKUEN = SCB_WDTCLKUEN_DISABLE;
  SCB_WDTCLKUEN = SCB_WDTCLKUEN_UPDATE;
  while (!(SCB_WDTCLKUEN & SCB_WDTCLKUEN_UPDATE));
  SCB_WDTCLKDIV = SCB_WDTCLKDIV_DIV1;
  SCB_PDRUNCFG &= ~(SCB_PDRUNCFG_WDTOSC);
}