Watchdog timer in K22FN

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Watchdog timer in K22FN

ソリューションへジャンプ
962件の閲覧回数
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.

ラベル(1)
タグ(3)
0 件の賞賛
1 解決策
758件の閲覧回数
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!
-----------------------------------------------------------------------------------------------------------------------

元の投稿で解決策を見る

2 返答(返信)
759件の閲覧回数
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!
-----------------------------------------------------------------------------------------------------------------------

758件の閲覧回数
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 件の賞賛