Tool/software:
Hallo everyone,
I am encountering a peculiar behavior in my code when I adjust the period of the Watchdog Timer.
I have a for-loop that is executed 100,000 times, and after completion, an LED is toggled. The duration for which the LED remains on and off changes when I alter the period of the Watchdog timer. When I set the Watchdog timer period to 250 ms, it takes 243 ms to execute the 100,000 iterations. A Watchdog period of 750 ms results in the execution time for 100,000 iterations being 493 ms. For a Watchdog period of 625 ms, the 100,000 iterations take 371 ms.
Can anyone explain why this is happening? I am using Keil µVision5 as an IDE.
Best regards,
Ali