|
|
View previous topic :: View next topic |
Author |
Message |
rascal Guest
|
runtime interrupt priority change |
Posted: Sun Apr 05, 2009 12:53 pm |
|
|
Is it possible to change the interrupt priority during runtime? effectively doing this:
#int_timer3 high
to:
#int_timer3
during runtime?
Also, if i disable the timer3 interrupt will any compute cycles still be used ? |
|
|
Ttelmah Guest
|
|
Posted: Sun Apr 05, 2009 2:25 pm |
|
|
Not easy.
It'd depend a bit on whether you have another interrupt flagged as 'high' already.
You would have to include code in _both_ global interrupt handlers to run the correct routine. If you have no interrupts flagged as 'high', there won't be the two handlers present. If there is another interrupt flagged as 'high', a high priority handler will then be present, and you would have to add the code to this.
Remember at this point, that if any handler is set to high priority, then INT_RB will always be flagged as 'high'.
You would then have to program the priority flag yourself.
There are easier ways of getting a similar result. You could (for instance), have a single bit flag, and if set to 'low priority' mode, disable the affected interrupt in the start of the low priority global handler, and re-enable it at the end of this. Ths way it'll only et called after the 'low priority' tasks have been checked. In high prioity mode, leave it enabled.
Best Wishes |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|