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
Posted: Mon Aug 15, 2011 3:34 am
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.
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