Hi,
I set the watchdog timeout to 20 ms with the followings:
-No IRQ
Prescaler: enabled
-TOVAL: 10
-Clock: LPO_Clock
And we wanted to measure that this is true, we pulled a GPIO high after the last watchdog trigger and watched this pin and the reset pin and measured the time from the rising edge of the GPIO to the falling edge of the reset pin, and the result was ~30 ms.
We took other measurements:
Presc | TOVAL | Calculated timeout | Real timeout |
FALSE | 2560 | 20 ms | 22.6 ms |
FALSE | 5120 | 40 ms | 45.1 ms |
FALSE | 7680 | 60 ms | 67.7 ms |
TRUE | 10 | 20 ms | 29.3 ms |
TRUE | 20 | 40 ms | 51.9 ms |
TRUE | 30 | 60 ms | 74.4 ms |
It seems that if the prescaler is used then a strange 6.4 ms offset will be added to the timeout.
Could you please help us what could cause this strange behavior?
Thank you!
Thank you!
Hi @bbenib
Thank you for reporting it.
The issue is currently being investigating.
Based on my tests, the WDOG_CNT is held at 0 for 3 WDOG clock cycles thus the offset.
I will update the thread once I have more information.
Best regards,
Daniel