![NXP Semiconductors SAFE ASSURE Qorivva MPC5601P Reference Manual Download Page 227](http://html.mh-extra.com/html/nxp-semiconductors/safe-assure-qorivva-mpc5601p/safe-assure-qorivva-mpc5601p_reference-manual_1721898227.webp)
Chapter 9 Interrupt Controller (INTC)
MPC5602P Microcontroller Reference Manual, Rev. 4
Freescale Semiconductor
227
acknowledge. The ISR, however, can have a portion that does not need to be executed at this higher
priority. Therefore, executing the later portion that does not need to be executed at this higher priority can
prevent the execution of ISRs that do not have a higher priority than the earlier portion of the ISR but do
have a higher priority than what the later portion of the ISR needs. This preemptive scheduling inefficiency
reduces the processor’s ability to meet its deadlines.
One option is for the ISR to complete the earlier higher priority portion, but then schedule through the
RTOS a task to execute the later lower priority portion. However, some RTOSs can require a large amount
of time for an ISR to schedule a task. Therefore, a second option is for the ISR, after completing the higher
priority portion, to set a SET
x
bit in INTC_SSCIR0_3–INTC_SSCIR4_7. Writing a ‘1’ to SET
x
causes a
software configurable interrupt request. This software configurable interrupt request will usually have a
lower PRI
x
value in the INTC_PSR
x
_
x
and will not cause preemptive scheduling inefficiencies. After
generating a software settable interrupt request, the higher priority ISR completes. The lower priority ISR
is scheduled according to its priority. Execution of the higher priority ISR is not resumed after the
completion of the lower priority ISR.
9.7.7.2
Scheduling an ISR on another processor
Because the SET
x
bits in the INTC_SSCIR
x
_
x
are memory mapped, processors in multiple-processor
systems can schedule ISRs on the other processors. One application is that one processor wants to
command another processor to perform a piece of work and the initiating processor does not need to use
the results of that work. If the initiating processor is concerned that the processor executing the software
configurable ISR has not completed the work before asking it to again execute the ISR, it can check if the
corresponding CLR
x
bit in INTC_SSCIR
x
_
x
is asserted before again writing a ‘1’ to the SET
x
bit.
Another application is the sharing of a block of data. For example, a first processor has completed
accessing a block of data and wants a second processor to then access it. Furthermore, after the second
processor has completed accessing the block of data, the first processor again wants to access it. The
accesses to the block of data must be done coherently. To do this, the first processor writes a ‘1’ to a SET
x
bit on the second processor. After accessing the block of data, the second processor clears the
corresponding CLR
x
bit and then writes 1 to a SET
x
bit on the first processor, informing it that it can now
access the block of data.
9.7.8
Lowering priority within an ISR
A common method for avoiding preemptive scheduling inefficiencies with an ISR whose work spans
multiple priorities (see
Section 9.7.7.1, “Scheduling a lower priority portion of an ISR
) is to lower the
current priority. However, the INTC has a LIFO whose depth is determined by the number of priorities.
NOTE
Lowering the PRI value in INTC_CPR within an ISR to below the ISR’s
corresponding PRI value in INTC Priority Select Registers
(INTC_PSR0_3–INTC_PSR220_221) allows more preemptions than the
LIFO depth can support.
Therefore, the INTC does not support lowering the current priority within an ISR as a way to avoid
preemptive scheduling inefficiencies.