Interrupt Controller (INTC)
MPC5510 Microcontroller Family Reference Manual, Rev. 1
Freescale Semiconductor
9-23
Preliminary
shows the order of execution of both ISRs with different priorities and the same
priority.
9.5.5
Priority Ceiling Protocol
9.5.5.1
Elevating Priority
The PRI field in INTC_CPR_PRC0 or INTC_CPR_PRC1 is elevated in the OSEK PCP to the ceiling of
all of the priorities of the ISRs that share a resource. This protocol allows coherent accesses of the ISRs to
that shared resource.
For example, ISR1 has a priority of 1, ISR2 has a priority of 2, and ISR3 has a priority of 3. They share
the same resource. Before ISR1 or ISR2 can access that resource, they must raise the PRI value in
INTC_CPR_PRC
n
to 3, the ceiling of all of the ISR priorities. After they release the resource, the PRI
Table 9-12. Order of ISR Execution Example
Step#
Step Description
Code Executing at End of Step
PRI in
INTC_CPR
at End of
Step
RTOS ISR108
1
1
ISR108 executes for peripheral interrupt request 100 because the first eight ISRs are for software settable interrupt
requests.
ISR208 ISR308 ISR408
Interrupt
Exception
Handler
1
RTOS at priority 0 is executing.
X
0
2
Peripheral interrupt request 100 at priority 1
asserts. Interrupt taken.
X
1
3
Peripheral interrupt request 400 at priority 4
is asserts. Interrupt taken.
X
4
4
Peripheral interrupt request 300 at priority 3
is asserts.
X
4
5
Peripheral interrupt request 200 at priority 3
is asserts.
X
4
6
ISR408 completes. Interrupt exception
handler writes to INTC_EOIR_PRCn.
X
1
7
Interrupt taken. ISR208 starts to execute,
even though peripheral interrupt request
300 asserted first.
X
3
8
ISR208 completes. Interrupt exception
handler writes to INTC_EOIR_PRCn.
X
1
9
Interrupt taken. ISR308 starts to execute.
X
3
10
ISR308 completes. Interrupt exception
handler writes to INTC_EOIR_PRCn.
X
1
11
ISR108 completes. Interrupt exception
handler writes to INTC_EOIR_PRCn.
X
0
12
RTOS continues execution.
X
0