76
5.4
Interrupt Operation
5.4.1
Interrupt Sequence
The sequence of interrupt operations is described below. Figure 5.2 shows a flowchart of the
operations up to acceptance of the interrupt.
1. The interrupt request sources send interrupt request signals to the interrupt controller.
2. The interrupt controller selects the highest-priority interrupt among the interrupt requests sent,
following the priority order indicated in table 5.3 and the levels set in interrupt priority
registers A–E (IPRA–IPRE). Lower priority interrupts are ignored*. If two interrupts with the
same priority level are requested simultaneously, or if there are multiple interrupts occurring
within a single module, the interrupt with the highest default priority or priority within module
as indicated in table 5.3 is selected.
3. The interrupt controller compares the priority level of the selected interrupt request with the
interrupt mask level bits (I3–I0) in the CPU’s status register (SR). If the request priority level
is equal to or less than the interrupt mask level, the request is ignored. If the request priority
level is higher than the interrupt mask level, the interrupt controller accepts the request and
sends an interrupt request signal to the CPU.
4. When the interrupt controller accepts an interrupt request, it drives
IRQOUT
pin low.
5. The CPU detects the interrupt request sent from the interrupt controller when it decodes the
next instruction to be executed. Instead of executing that instruction, the CPU starts interrupt
exception handling. (See figure 5.4.)
6. In interrupt exception handling, first SR and PC are pushed onto the stack.
7. The priority level of the accepted interrupt is copied to the interrupt mask level bits (I3–I0) in
the status register (SR).
8. When the accepted interrupt is level-sensed or from an on-chip supporting module, the
IRQOUT
pin returns to the high level. If the accepted interrupt is edge-sensed, the
IRQOUT
pin returns to the high level when the instruction to be executed by the CPU in (5) is replaced
by the interrupt exception handling. If the interrupt controller has accepted another interrupt
(of a level higher than the current interrupt), however, the
IRQOUT
pin remains low.
9. The CPU accesses the exception vector table at the entry for the vector number of the accepted
interrupt, reads the start address of the exception handling routine, branches to that address,
and starts executing the program there. This branch is not delayed.
Note: * A request for an external interrupt (IRQ) designated as edge-detected is held pending once
only. An external interrupt designated as level-detected is held pending as long as the
interrupt request continues, but if the request is cleared before the CPU next accepts an
interrupt, the interrupt request is regarded as not having been made.
Interrupt requests from on-chip supporting modules are level requests. When the status
flag in a particular module is set, an interrupt is requested. For details, see the descriptions
of the individual modules. Note that the interrupt request will be continued unless an
operation described in "Clearing Conditions" is performed.
Содержание HD6417032
Страница 21: ......
Страница 35: ...xiv ...
Страница 85: ...50 ...
Страница 101: ...66 ...
Страница 129: ...94 ...
Страница 135: ...100 ...
Страница 343: ...308 ...
Страница 369: ...334 ...
Страница 383: ...348 ...
Страница 475: ...440 ...
Страница 525: ...490 CK RAS CAS TRp TRc TRcc tRASD1 tRASD2 tCASD3 tCASD2 TRr tCSR Figure 20 18 Self Refresh ...
Страница 578: ...543 CK RAS CAS TRp TRc TRcc tRASD1 tRASD2 tCASD3 tCASD2 TRr tCSR Figure 20 62 Self Refresh ...
Страница 689: ...654 ...