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

Interrupt priority in the PIC24 family?

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



Joined: 05 May 2011
Posts: 10

View user's profile Send private message

Interrupt priority in the PIC24 family?
PostPosted: Mon Aug 15, 2011 12:49 am     Reply with quote

Hi peeps,

I need to understand the interrupts priority in th pic24 families. I am giving the following scenario:
The RDA Interrupt is set with priority level 1 and the Timer0 overflow with priority level 2.
The program counter is standing in the Timer0 overflow interrupt procedure (is actually in Timer0 Interrupt). At this time happens the RDA event and the PIC gives it major priority. Now what happens, when the PIC is ready with the RDA Interrupt handling?
Goes the PC(Program counter) back to the Timer0 overflow interrupt procedure (in the interrupt) to finish it or goes it outside and wait for new event (interrupt event)?

Much 10x in advance for any help and support,

GR
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Mon Aug 15, 2011 3:34 am     Reply with quote

If nested interrupts are enabled (PCD doesn't by default) and a lower priority interrupt function has been interrupted by a higher priority one, then the lower priority function will be continued after the higher priority service is finished.

To make nested interrupts work in PCD without risking stack overflow, the stack frame should be considerably enlarged above the default assignment.
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