AnsweredAssumed Answered

STM8S discovery board - Watchdog timer not working?

Question asked by pham.thai on Feb 27, 2014

I am playing around with the STM8S discovery board using STM8S003K3 MCU. I have done with GPIO, timer, ADC, UART, and now I am trying to work with Independent watchdog timer.

In the init() function, I have:
IWDG->KR = 0xCC; // enable IWDG

After init(), the program just has a while (1) loop.
I put a break point at the init() function to see if the watchdog resets the MCU and returns to init() again or not, and the program just stays at while(1) loop forever.

What am I missing? I read the datasheet several times, but I found no clues.
The compiler I am using is Ride7.

Thank you.