AnsweredAssumed Answered

Can't enable Watchdog

Question asked by Mattia Berton on May 5, 2016
Latest reply on May 5, 2016 by jeremyzhou

Hello,

I'm using a Kinetis KM33Z128A5 serie Microcontroller, Codewarrior 10.6 and Baremetal drivers.

However, I can't enable in proper way the watchdog.

I just copied the example, in the baremetal drivers:

 

/* enable clocks to all on chip peripherals                             */
   SIM_Init (SIM_MODULE_ALL_PERIPH_ON_CONFIG);
// Watchdog Init
   /* Watchdog timeout is of 1.5 sec approximately                         */
   WDOG_Init(WDOG_MODULE_NORMAL_STOP_DI_DBG_DI_CONFIG(WDOG_LPO_CLK,WDOG_DIV1,1500));

 

But the watchdog doesn't start, neither in debug mode, nor in normal mode. I can see that it is working only if I put a breakpoint on the WDOG_Init instruction, when I see that the successive instruction is a reset.

I tried to watch the register, and what I see is that the WDOG_STCTRLH is kept at the value of 0x0152 no matter what I put in the WDOG_Init arguments. Also, after the reset this value is 0x0153.

 

Any ideas?

Outcomes