umairmukati
Junior Member level 1
- Joined
- Feb 1, 2012
- Messages
- 18
- Helped
- 1
- Reputation
- 2
- Reaction score
- 1
- Trophy points
- 1,283
- Activity points
- 1,411
Hello,
I am trying to make a timer interrupt routine, which executes every 0.25us. The problem I am facing is that, the code length in the routine changes the duration. For example running an instruction at 72MHz, the next time the routine execute is 0.35us. It seems the the timer starts counting after returning from the TIMER2_IRQ routine, instead of counting just after overflow. I am using Auto-Reload register with value 18. Tell me what I am missing.
I am using KEIL uVision, and using ST-LINK Debugger for time observation.
Regards.
I am trying to make a timer interrupt routine, which executes every 0.25us. The problem I am facing is that, the code length in the routine changes the duration. For example running an instruction at 72MHz, the next time the routine execute is 0.35us. It seems the the timer starts counting after returning from the TIMER2_IRQ routine, instead of counting just after overflow. I am using Auto-Reload register with value 18. Tell me what I am missing.
I am using KEIL uVision, and using ST-LINK Debugger for time observation.
Regards.