Returning From An Interrupt Routine; Interrupt Priority; Interrupt Priority Resolution Circuit - Renesas M16C FAMILY series Hardware Manual

16-bit single-chip microcomputer
Hide thumbs Also See for M16C FAMILY series:
Table of Contents

Advertisement

M
1
6
C
2 /
8
G
o r
u
p
(
M
1
6
C

9.4.4 Returning from an Interrupt Routine

The FLG register and PC in the state in which they were immediately before entering the interrupt se-
quence are restored from the stack by executing the REIT instruction at the end of the interrupt routine.
Thereafter the CPU returns to the program which was being executed before accepting the interrupt
request.
Return the other registers saved by a program within the interrupt routine using the POPM or similar
instruction before executing the REIT instruction.

9.5 Interrupt Priority

If two or more interrupt requests are generated while executing one instruction, the interrupt request that
has the highest priority is accepted.
For maskable interrupts (peripheral functions), any desired priority level can be selected using the ILVL2 to
ILVL0 bits. However, if two or more maskable interrupts have the same priority level, their interrupt priority
is resolved by hardware, with the highest priority interrupt accepted.
The watchdog timer and other special interrupts have their priority levels set in hardware. Figure 9.9 shows
the priorities of hardware interrupts.
Software interrupts are not affected by the interrupt priority. If an instruction is executed, control branches
invariably to the interrupt routine.
Figure 9.9 Hardware Interrupt Priority

9.5.1 Interrupt Priority Resolution Circuit

The interrupt priority resolution circuit is used to select the interrupt with the highest priority among those
requested.
Figure 9.10 shows the circuit that judges the interrupt priority level.
R
e
. v
2
0 .
0
J
a
. n
3
, 1
2
0
0
7
R
E
J
0
9
B
0
0
4
7
0 -
2
0
0
2 /
, 8
M
1
6
C
2 /
8
) B
Watchdog timer, oscillation stop
and re-oscillation detection,
low voltage detection
Peripheral function
Single step
Address match
page 80
f o
3
8
5
Reset
High
NMI
DBC
Low
9. Interrupts

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tiny seriesM16c series

Table of Contents