WDOG timeout value

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

WDOG timeout value

1,143 Views
Shruthi_C
Contributor II

HI,

In S32K146 MIcrocontroller, WDOG timer module: 
How to calculate the timeout value to be loaded in the register for 500milli sec

Is this calculation holds good?

Timeout_count = Time_in_ms * (10^(-3)) * (Clock in Hz/ Prescalar value)


For Timeout period of 500milli sec I have loaded 250 in the register with prescalar as true and LPO clock configuration.

But I am not geeting 500 ms completelly its resetting at 480ms only

I have used OS and in each 1ms task I am testing it

 

 

Please support

 

0 Kudos
Reply
3 Replies

1,118 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Shruthi_C

I think there is no problem with the calculation formula. The possible reason for this result is the accuracy of LPO. The typical value of LPO is 128KHz, but its actual range is 113KHz~139KHz.

Senlent_0-1684746476624.png

 

0 Kudos
Reply

1,110 Views
Shruthi_C
Contributor II

HI Senlent

 

But how do I exaclty configure for 500ms?

I should write test cases like:

I have to serve the WDOG exaclty at 499ms and if I serve at 501ms it should reset

0 Kudos
Reply

1,096 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Shruthi_C

This is not a right way to use the watchdog, because I cannot guarantee that the watchdog must be set at 500ms accurately, which is not only affected by the clock accuracy, but also related to the execution efficiency of your application, which will affect unpredictable hidden risks to your application.

But you can use SOSC as the clock source of the watchdog, which will be more accurate.

0 Kudos
Reply