Hello,
Just a simple question, how can I calculate the timer value for the watchdog in K22?
From the API, I can see that by default uses the LPO clock, which is rated as 1KHz. The timeout value from the wdog_config_t struct is uint32_t so it can hold up to 0xFFFFFFFFU, or 4294967295 cycles. The reference manual does not seem to limit the value to something lower than that.
Does that mean that the maximum possible value for the watchdog is 4294967 seconds?
If so, from the API documentation, the default value is 0xFFFFU, meaning a default watchdog value of 65 seconds. Is that correct?
Thanks.
Solved! Go to Solution.
Hi Thiago,
There is a 3-bit prescaler(WDOG_PRESC) for the watchdog clock source. So you need take it into account.
Best Regards,
Robin
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Thiago,
There is a 3-bit prescaler(WDOG_PRESC) for the watchdog clock source. So you need take it into account.
Best Regards,
Robin
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Ok, so considering a prescaler of 1, putting 3000 into the timeout value, will give me a 3 second watchdog.
Thanks