CHAPTER 7 INTERRUPT AND TEST FUNCTIONS
200 Users Manual U10676EJ3V0UM
7.6 Servicing of Interrupts Sharing Vector Address
Because interrupt sources INTT1 and INTT2 share vector tables, you should select one or both of the interrupt
sources in the following way.
(1) To use one interrupt
Of the two interrupt sources sharing a vector table, set the interrupt enable flag of the necessary interrupt
source to 1, and clear the interrupt enable flag of the other interrupt source to 0. In this case, an interrupt
request is generated by the interrupt source that is enabled (IE××× = 1). When the interrupt is acknowledged,
the interrupt request flag is reset.
(2) To use both interrupts
Set the interrupt enable flags of both the interrupt sources to 1. In this case, the interrupt request flags of
the two interrupt sources are ORed.
In this case, if an interrupt request is acknowledged when one or both the interrupt flags are set, the interrupt
request flags of both the interrupt sources are not reset. This is in order to ascertain which interrupt was
generated during interrupt servicing.
Therefore, it is necessary to identify which interrupt source has generated the interrupt by using an interrupt
service routine. This can be done by checking the interrupt request flags by executing the SKTCLR instruction
at the beginning of the interrupt service routine.
If both the request flags are set when this request flag is tested or cleared, the interrupt request remains even
if one of the request flags is cleared. If this interrupt is selected as having the higher priority, nesting servicing
is started by the remaining interrupt request.
Consequently, the interrupt request not tested is serviced first. If the selected interrupt has a lower priority,
the remaining interrupt is held pending and therefore, the interrupt request tested is serviced first. Therefore,
an interrupt sharing a vector address with the other interrupt is identified differently, depending whether it has
a higher priority, as shown in Table 7-4.
Table 7-4. Identifying Interrupt Sharing Vector Address
With higher priority Interrupt is disabled and interrupt request
flag of interrupt that takes precedence is
tested
With lower priority Interrupt request flag of interrupt that takes
precedence is tested