How to calculate the watchdog timeout

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

How to calculate the watchdog timeout

4,237 Views
建宽高
Contributor III
  • As the title suggests ,How to calculate the watchdog timeout?  or What api are available to provide timeout?

Labels (1)
Tags (1)
0 Kudos
Reply
6 Replies

3,798 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

I have difficulties to understand, can you please elaborate?

Thanks,

Daniel

0 Kudos
Reply

3,798 Views
建宽高
Contributor III

sorry , I didn't express my meaning

In the S32k144 environment, how does the watchdog timeout calculate, 

Can provide the relevant calculation formula about watchdog time out

0 Kudos
Reply

3,798 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello,

The timeout depends on the

  • WDOG clock source (WDOG_CS_CLK),
  • on the prescaler if enabled (WDOG_CS_PRES),
  • and on the value in Timeout Value Register (WDOG_TOVAL).

pastedImage_3.png

You can use the SDK WDOG driver:

pastedImage_4.png

Please refer to wdog_interrupt_s32k144 SDK example in S32 Design Studio:

pastedImage_5.png

Regards,

Daniel

0 Kudos
Reply

3,798 Views
建宽高
Contributor III

yes, i know about your reply

i know  watch timeout about  clock,prescaler and timeout value

can you provide calculation formula about wdg timeout?

such as

timeout = (1/(clk/(prescaler+1)) ) * timeout_value      (ms)  ?

 

is ths right?

thank you for your reply!   ☺

0 Kudos
Reply

3,798 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

timeout (s) = (1 / clk) * TOVAL 

or

timeout (s) = 256 * (1 / clk) * TOVAL

pastedImage_1.png

Regards,

Daniel

0 Kudos
Reply

3,798 Views
bjrajendra
Senior Contributor I

Hi Daniel,

I would like to know for a TOVAL of 2 with PRESCALAR Enable what exactly will be the watchdog timeout period.

Also can you kindly elaborate when the two formulae will be used you mentioned above?

Thanks in advance,

Raju

0 Kudos
Reply