Watchdog timer in K22FN

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Watchdog timer in K22FN

Jump to solution
1,155 Views
thiagopalmieri
Contributor III

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.

Labels (1)
Tags (3)
0 Kudos
Reply
1 Solution
951 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Thiago,

There is a 3-bit prescaler(WDOG_PRESC) for the watchdog clock source. So you need take it into account.

WDOG_PRESC.png

Best Regards,

Robin

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

2 Replies
952 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Thiago,

There is a 3-bit prescaler(WDOG_PRESC) for the watchdog clock source. So you need take it into account.

WDOG_PRESC.png

Best Regards,

Robin

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

951 Views
thiagopalmieri
Contributor III

Ok, so considering a prescaler of 1, putting 3000 into the timeout value, will give me a 3 second watchdog.

Thanks 

0 Kudos
Reply