Interrupt Controller (INTC)
MPC5565 Microcontroller Reference Manual, Rev. 1.0
Freescale Semiconductor
10-33
OSEK uses the GetResource and ReleaseResource system services to manage access to a shared resource.
To prevent this corruption of a coherent data block, modifications to PRI in INTC_CPR can be made by
those system services with the following code sequences.
GetResource:
raise PRI
mbar
isync
ReleaseResource:
mbar
lower PRI
10.5.6
Selecting Priorities According to Request Rates
and Deadlines
The selection of the priorities for the ISRs can be made using rate monotonic scheduling (RMS) or a
superset of it, deadline monotonic scheduling (DMS). In RMS, the ISRs which have higher request rates
have higher priorities. In DMS, if the deadline is before the next time the ISR is requested, then the ISR is
assigned a priority according to the time from the request for the ISR to the deadline, not from the time of
the request for the ISR to the next request for it.
For example, ISR1 executes every 100
μ
s, ISR2 executes every 200
μ
s, and ISR3 executes every 300
μ
s.
ISR1 has a higher priority than ISR2 which has a higher priority than ISR3. However, if ISR3 has a
deadline of 150
μ
s, then it has a higher priority than ISR2.
The INTC has 16 priorities, which could be much less than the number of ISRs. In this case, group the
ISRs with other ISRs that have similar deadlines. For example, a priority could be allocated for every time
the request rate doubles. ISRs with request rates around 1 ms would share a priority, ISRs with request
rates around 500
μ
s would share a priority, ISRs with request rates around 250
μ
s would share a priority,
etc. With this approach, a range of ISR request rates of 2
16
could be covered, regardless of the number of
ISRs.
Reducing the number of priorities does reduce the processor's ability to meet its deadlines. However, it
also allows easier management of ISRs with similar deadlines that share a resource. They do not need to
use the PCP to access the shared resource.
10.5.7
Software Settable Interrupt Requests
The software settable interrupt requests can be used in two ways. They can be used to schedule a lower
priority portion of an ISR and for processors to interrupt other processors in a multiple processor system.
10.5.7.1
Scheduling a Lower Priority Portion of an ISR
A portion of an ISR needs to be executed at the PRI
n
value in INTC priority select registers
(INTC_PSR0–INTC_PSR231), which becomes the PRI value in INTC current priority register
(INTC_CPR) with the interrupt acknowledgement. The ISR, however, can have a portion of it which does
not need to be executed at this higher priority. Therefore, executing this later portion which does not need
to be executed at this higher priority can prevent the execution of ISRs which do not have a higher priority
Содержание MPC5565
Страница 18: ...MPC5565 Microcontroller Reference Manual Devices Supported MPC5565 MPC5565 RM Rev 1 0 09 2007...
Страница 34: ...MPC5565 Reference Manual Rev 1 0 Freescale Semiconductor 15...
Страница 35: ...MPC5565 Reference Manual Rev 1 0 16 Freescale Semiconductor...
Страница 325: ...Error Correction Status Module ECSM MPC5565 Microcontroller Reference Manual Rev 1 0 8 16 Freescale Semiconductor...
Страница 515: ...External Bus Interface EBI MPC5565 Microcontroller Reference Manual Rev 1 0 12 70 Freescale Semiconductor...
Страница 553: ...Flash Memory MPC5565 Microcontroller Reference Manual Rev 1 0 13 38 Freescale Semiconductor...
Страница 559: ...SRAM MPC5565 Microcontroller Reference Manual Rev 1 0 14 6 Freescale Semiconductor...
Страница 577: ...Boot Assist Module BAM MPC5565 Microcontroller Reference Manual Rev 1 0 15 18 Freescale Semiconductor...
Страница 895: ...Deserial Serial Peripheral Interface DSPI MPC5565 Microcontroller Reference Manual Rev 1 0 19 72 Freescale Semiconductor...
Страница 973: ...Preface MPC5565 Microcontroller Reference Manual Rev 1 0 21 36 Freescale Semiconductor...
Страница 1145: ...MPC5565 Register Map MPC5565 Microcontroller Reference Manual Rev 1 0 A 60 Freescale Semiconductor...
Страница 1153: ...Calibration MPC5565 Microcontroller Reference Manual Rev 1 0 B 8 Freescale Semiconductor...