Timer interrupt issue stm32f303

Status
Not open for further replies.

umairmukati

Junior Member level 1
Joined
Feb 1, 2012
Messages
18
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Visit site
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.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…