This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Timer operation

I checked the Timer0 with 1 s period for 1 min, which was correct with respect to the computer time but Timer0 with 5 ms period exceeded 3-4 s. Is timer reloaded after executing the timer interrupt service? What is taking time?

1) timer counter reaches 0, and timer reloaded immediately, timer continues to run

2) timer counter reaches 0, timer interrupt service routine is executed and returns, timer is reloaded and continues to run

3) timer counter reaches 0, timer interrupt service routine is executed, required register bits are reset (Timer interrupt flags, timer aggregate register), timer is reloaded and continues to run

?

Sukru