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?
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
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.
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
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.