![NXP Semiconductors MC9S08PA4 Reference Manual Download Page 104](http://html1.mh-extra.com/html/nxp-semiconductors/mc9s08pa4/mc9s08pa4_reference-manual_1721838104.webp)
5.1.3.1 Interrupt priority level register
This set of registers is associated with the interrupt sources to the HCS08 CPU. Each
interrupt priority level is a 2-bit value such that a user can program the interrupt priority
level of each source to priority 0, 1, 2, or 3. Level 3 has the highest priority while level 0
has the lowest. Software can read or write to these registers at any time. The interrupt
priority level comparator set, interrupt mask register update, and restore mechanism use
this information.
5.1.3.2 Interrupt priority level comparator set
When the module is enabled, an active interrupt request forces a comparison between the
corresponding ILR and the 2-bit interrupt mask IPM[1:0]. In stop3 mode, the IPM[1:0] is
substituted by value 00b. If the ILR value is greater than or equal to the value of the
interrupt priority mask (IPM bits in IPCSC), the corresponding interrupt out (INTOUT)
signal will be asserted and signals an interrupt request to the HCS08 CPU.
When the module is disabled, the interrupt request signal from the source is directly
passed to the CPU.
The interrupt priority level programmed in the interrupt priority register will not affect
the inherent interrupt priority arbitration as defined by the HCS08 CPU because the IPC
is an external module. Therefore, if two (or more) interrupts are present in the HCS08
CPU at the same time, the inherent priority in HCS08 CPU will perform arbitration by
the inherent interrupt priority.
5.1.3.3 Interrupt priority mask update and restore mechanism
The interrupt priority mask (IPM) is two bits located in the least significant end of IPCSC
register. These two bits control which interrupt is allowed to be presented to the HCS08
CPU. During vector fetch, the interrupt priority mask is updated automatically with the
value of the ILR corresponding to that interrupt source. The original value of the IPM
will be saved onto IPMPS for restoration after the interrupt service routine completes
execution. When the interrupt service routine completes execution, the user restore the
original value of IPM by writing 1 to the IPCSC[PULIPM] bit. In both cases, the IPMPS
is a shift register functioning as a pseudo stack register for storing the IPM. When the
IPM is updated, the original value is shifted into IPMPS. The IPMPS can store four levels
of IPM. If the last position of IPMPS is written, the PSF flag indicates that the IPMPS is
full. If all the values in the IPMPS were read, the PSE flag indicates that the IPMPS is
empty.
Interrupts
MC9S08PA4 Reference Manual, Rev. 5, 08/2017
104
NXP Semiconductors
Summary of Contents for MC9S08PA4
Page 1: ...MC9S08PA4 Reference Manual Supports MC9S08PA4 Document Number MC9S08PA4RM Rev 5 08 2017 ...
Page 2: ...MC9S08PA4 Reference Manual Rev 5 08 2017 2 NXP Semiconductors ...
Page 22: ...MC9S08PA4 Reference Manual Rev 5 08 2017 22 NXP Semiconductors ...
Page 28: ...System clock distribution MC9S08PA4 Reference Manual Rev 5 08 2017 28 NXP Semiconductors ...
Page 150: ...Port data registers MC9S08PA4 Reference Manual Rev 5 08 2017 150 NXP Semiconductors ...
Page 196: ...Human machine interfaces HMI MC9S08PA4 Reference Manual Rev 5 08 2017 196 NXP Semiconductors ...
Page 224: ...Instruction Set Summary MC9S08PA4 Reference Manual Rev 5 08 2017 224 NXP Semiconductors ...
Page 232: ...Functional Description MC9S08PA4 Reference Manual Rev 5 08 2017 232 NXP Semiconductors ...
Page 258: ...FTM Interrupts MC9S08PA4 Reference Manual Rev 5 08 2017 258 NXP Semiconductors ...
Page 294: ...Functional description MC9S08PA4 Reference Manual Rev 5 08 2017 294 NXP Semiconductors ...
Page 398: ...Resets MC9S08PA4 Reference Manual Rev 5 08 2017 398 NXP Semiconductors ...
Page 400: ...MC9S08PA4 Reference Manual Rev 5 08 2017 400 NXP Semiconductors ...