Arm Community
Site
Search
User
Site
Search
User
Support forums
Architectures and Processors forum
help needed on arm7 timer interrupt
Jump...
Cancel
State
Accepted Answer
+1
person also asked this
people also asked this
Locked
Locked
Replies
5 replies
Subscribers
349 subscribers
Views
6461 views
Users
0 members are here
Arm7
Options
Share
More actions
Cancel
Related
How was your experience today?
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion
help needed on arm7 timer interrupt
duoduo duoduo
over 12 years ago
Note: This was originally posted on 15th January 2009 at
http://forums.arm.com
Dear all !
i am trying to use a timer interrupt to call a function in an ARM7 platform.i hope this timer interrupt can happen in a 320 microseconds interval.however,i found that when i make the interval less than 11 milliseconds exception happened.
11 milliseconds is too slow for me.why this happened?can somebody help?many thanks!
additional:i made a big mistake in my description, mixing up microseconds with milliseconds. really sorry.
Top replies
Jacob Bramley
over 12 years ago
+1
verified
Note: This was originally posted on 15th January 2009 at http://forums.arm.com I'm not sure, but I think you may have mixed up your units somewhere along the line. 11 microseconds is considerably smaller...
Parents
+1
Jacob Bramley
over 12 years ago
Note: This was originally posted on 15th January 2009 at
http://forums.arm.com
I'm not sure, but I think you may have mixed up your units somewhere along the line. 11 microseconds is considerably smaller than 320 milliseconds
Setting the timer interval to a value that is too small will not itself cause an exception (other than the interrupt itself). Usually, this would cause a timer event to occur before the previous event had completed, which would result in the interrupt handler appearing to run in a continuous loop; your non-interrupt code would never run. There are situations and configurations which could result in an exception, but I don't think you are seeing this.
For reference:
The typical ARM7 microcontroller clocks at about 60MHz. One cycle at this frequency is about 17 nanoseconds, so your 11 microseconds threshold is about 647 cycles. It is quite possible for an interrupt routine to take that long, so it's likely that you're seeing the infinite interrupt loop that I described. However, 320 milliseconds is much longer than that so you have plenty of head room :-)
I hope that helps,
Jacob
Cancel
Vote up
+1
Vote down
Cancel
Reply
+1
Jacob Bramley
over 12 years ago
Note: This was originally posted on 15th January 2009 at
http://forums.arm.com
I'm not sure, but I think you may have mixed up your units somewhere along the line. 11 microseconds is considerably smaller than 320 milliseconds
Setting the timer interval to a value that is too small will not itself cause an exception (other than the interrupt itself). Usually, this would cause a timer event to occur before the previous event had completed, which would result in the interrupt handler appearing to run in a continuous loop; your non-interrupt code would never run. There are situations and configurations which could result in an exception, but I don't think you are seeing this.
For reference:
The typical ARM7 microcontroller clocks at about 60MHz. One cycle at this frequency is about 17 nanoseconds, so your 11 microseconds threshold is about 647 cycles. It is quite possible for an interrupt routine to take that long, so it's likely that you're seeing the infinite interrupt loop that I described. However, 320 milliseconds is much longer than that so you have plenty of head room :-)
I hope that helps,
Jacob
Cancel
Vote up
+1
Vote down
Cancel
Children
No data