I am using S9KEAZN64AMLC MCU (custom board). I configured Watchdog in window mode using an internal oscillator (32KHz).
Configured watchdog timeout value is 500 msec.
when 256 clock Prescaler is enabled then the watchdog timer will reset at 534 msec and when 256 clock Prescaler is disabled then the watchdog timer will reset at 518 msec.
why it is taking more time to reset?
when I use an External oscillator with 16Mhz, it resets at 508msec. With an external oscillator, I am getting correct results but the internal oscillator and LPO creating problems (Not resetting at the exact timeout).
I checked with different timeout values and both oscillators, Please see the below table.
Internal Oscillator (32Khz) | | External Oscillator (16Mhz) |
Msec | Actual reset time (In msec) | Difference (In Msec) | | Timeout value (in msec) | Actual reset time (In msec) | Difference (In Msec) |
100 | 108 | 8 | | 100 | 106 | 6 |
200 | 211 | 11 | | 200 | 206 | 6 |
300 | 313 | 13 | | 300 | 306 | 6 |
400 | 415 | 15 | | 400 | 406 | 6 |
500 | 517 | 17 | | 500 | 506 | 6 |
600 | 619 | 19 | | 600 | 605 | 5 |
700 | 722 | 22 | | 700 | 706 | 6 |
800 | 824 | 24 | | 800 | 806 | 6 |
900 | 927 | 27 | | 900 | 906 | 6 |
1000 | 1.028 | 0.028 | | 1000 | 1.006 | 0.006 |
2000 | 2.05 | 0.05 | | | | |
How I can get the exact watchdog reset time with the internal oscillator?
NOTE: Observed the Same result with normal watchdog and Window watchdog.