
Interrupts
7-20
CPU interrupts (including NMI) are only acknowledged (responded to by the
CPU) on instruction fetch boundaries. If instruction fetches are halted because
of pipeline conflicts or when an RPTS loop is executing, CPU interrupts are not
acknowledged until the next instruction fetch.
The interrupt acknowledge (IACK) instruction can be used to signal externally
that an interrupt has been serviced. If external memory is specified in the oper-
and, IACK drives the IACK pin and performs a dummy read. The read is per-
formed from the address specified by the IACK instruction operand. IACK is
typically placed in the early portion of an interrupt service routine. However,
depending on your application, it may be better suited at the end of the interrupt
service routine or at another location. You are not required to use the IACK
instruction in interrupt service routines.
Note the following situations:
Interrupts are disabled during a RPTS and during a delayed branch (until
the 3 instructions following a delayed branch are completed). Interrupts
are held until after the branch.
When an interrupt occurs, instructions currently in the decode and read
phases continue regular execution. This is not the case for an instruction
in the fetch phase:
If the interrupt occurs in the first cycle of the fetch of an instruction, the
fetched instruction is discarded (not executed), and the address of
that instruction is pushed to the top of the system stack.
If the interrupt occurs after the first cycle of the fetch (in the case of a
multicycle fetch due to wait states), that instruction is executed, and
the address of the next instruction to be fetched is pushed to the top of
the system stack.
If no program fetch is occurring, then no new fetch is performed.
7.4.4
CPU Interrupt Latency
CPU interrupt latency, defined as the time from the acknowledgement of the
interrupt to the execution of the first instruction of the interrupt service routine
(ISR), is at least 8 cycles. This is explained in Table 7–2 where the interrupt
is treated as an instruction, assuming that all the instructions are single-cycle
instructions.