User’s Manual
7-14
05.99
Interrupt System
C513AO
Figure 7-3
External Interrupt Detection
7.5
Interrupt Response Time
If an external interrupt is recognized, its corresponding request flag is set at S5P2 in every machine
cycle. The value is not polled by the circuitry until the next machine cycle. If the request is active
and conditions are right for it to be acknowledged, a hardware subroutine call to the requested
service routine will be the next instruction to be executed. The call itself takes two cycles. Thus, a
minimum of three complete machine cycles will elapse between activation of the external interrupt
request and the execution of the first instruction of the service routine.
A longer response time would occur if the request is blocked by one of the three conditions
previously listed. If an interrupt of equal or higher priority is already in progress, the additional wait
time is determined by the nature of the other interrupt’s service routine. If the instruction in progress
is not in its final cycle, the additional wait time cannot be more than three cycles since the longest
instructions (MUL and DIV) are only four cycles long. If the instruction in progress is RETI or a write
access to the registers IEN or IP, the additional wait time cannot be more than five cycles (a
maximum of one more cycle to complete the instruction in progress, plus four cycles to complete
the next instruction, if the instruction is MUL or DIV). Thus, in a single interrupt system, the response
time is always more than three cycles and fewer than nine cycles.
MCD01860
P3.x/INTx
e.g. P3.x/INTx
> 1 Machine Cycle
Low-Level Threshold
> 1 Machine Cycle
> 1 Machine Cycle
Transition to
be detected
High-Level Threshold
Low-Level Threshold
b) Transition-Activated Interrupt
a) Level-Activated Interrupt