INTERRUPTS
6.1 Overview
6.1 Overview
The M37906 provides 27 (including the reset) interrupt sources to generate interrupt requests.
Figure 6.1.1 shows the interrupt processing sequence.
When an interrupt request is accepted, a branch is made to the start address of the interrupt routine set
in the interrupt vector table (addresses FFB416 to FFFF16). Set the start address of each interrupt routine to
the corresponding interrupt vector address in the interrupt vector table.
Routine in progress
Interrupt routine
Interrupt processing
Interrupt request is accepted.
Processing is suspended.
Returns to original routine.
Processing is resumed.
RTI instruction
Fig. 6.1.1 Interrupt processing sequence
When an interrupt request is accepted, the following
registers’ contents just before acceptance of an
Stack area
interrupt request are automatically pushed onto the
stack area in ascending sequence from ➀ to ➀.
For other registers of which contents are necessary,
be sure to push and pop them by software.
Address
[S] – 5
Processor status register’s low-order byte (PSL)
[S] – 4
[S] – 3
➀ Program bank register (PG)
Processor status register’s high-order byte (PS
Program counter’s low-order byte (PC
H)
➀ Program counter (PC
L
, PC
H
)
L)
➀ Processor status register (PS
L
, PS )
H
[S] – 2
[S] – 1
Program counter’s high-order byte (PCH)
Figure 6.1.2 shows the state of the stack area just
before entering an interrupt routine.
➀
Program bank register (PG)
[S]
Execute the RTI instruction at the end of this interrupt
routine in order to return to the routine that the
microcomputer was executing just before the interrupt
request was accepted. By executing the RTI instruction,
the register contents pushed onto the stack area are
pulled in descending sequence from ➀ to ➀. Then,
the suspended processing is resumed from where it
left off.
[S] is an initial address that the stack pointer (S) indicates
when an interrupt request is accepted. The S’s contents
become “[S] – 5” after all of the above registers are pushed.
➀
Fig. 6.1.2 State of stack area just before entering
interrupt routine
7906 Group User’s Manual Rev.2.0
6-2