CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

runtime interrupt priority change

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
rascal
Guest







runtime interrupt priority change
PostPosted: Sun Apr 05, 2009 12:53 pm     Reply with quote

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







PostPosted: Sun Apr 05, 2009 2:25 pm     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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