Hi,
I'm using S32K144 internal watchdog timer to reset controller.
I'm using internal oscillator and Watchdog Clock source is WDOG_LPO_CLOCK = 128 KHz.
I'm using formula: timeout (s) = 256 * (1 / clk) * TOVAL
If Timeout = 1 sec then TOVAL = 500 but controller is resetting after 2 sec.
If Timeout = 3 sec then TOVAL = 1500 but controller is resetting after 4 sec.
If Timeout = 5 sec then TOVAL = 2500 but controller is resetting after 6 sec.
I'm getting difference of 1 sec always.
Clock settings:
Watch Dog settings for 5 sec:
Please help me with this.
Hi @emb02,
The LPO clock is very imprecise, it is expected that 1s configured will not be exactly 1s.
But in this case there is 1s offset regardless of the WDOG TOVAL.
The reset can be delayed by the WDOG interrupt (128 BUS_CLK cycles) and by the RCM interrupt (up to 512 LPO clock cycles).
https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K144-WDOG-RCM-interrupt/ta-p/1107039
I would say it must be an error of measurement, how exactly do you measure the timeout?
Regards,
Daniel