WDT - How to configure the Watchdog timer

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Hi all,

I trying to configure a Watchdog timer on my XMC4400 board. So far, I was able to successfully write the code that would service the WDT from CCU ISR. The way I would test it is by configuring the timer that triggers the ISR to run continuously unless I apply a signal to a GPIO pin. Applying a signal would stop the timer and ISR would not trigger - as a result, the WDT would not get serviced and the reset would occur. So far so good.

However, there are a couple of problems that I ran into. They are as follows.

(a) The reset never actually restarts my code. It enters the `Reset_Handler` routine of `startup_XMC4400.S` file, however, it seems to get stuck in `Reset_Handler` forever.

(b) I chose OFI to be the clock source for the Watchdog timer. I assumed that OFI is running by default at 32768 Hz and no additional steps are needed to enable it. Following this logic, if I were to program the WDT window upper bound with a value that is 16 times greater than 32768, then it would take 16 seconds for the WDT to expire and trigger a reset. However, the WDT does not take 16 seconds to trigger a reset - did I make a mistake somewhere or forgot to initialize something?

Best regards,

Andrey
0 Likes
0 Replies