External Interrupt (Ei) - Renesas M32R/ECU Series User Manual

Mitsubishi 32-bit risc single-chip microcomputers
Table of Contents

Advertisement

4

4.9.3 External Interrupt (EI)

An external interrupt is generated upon an interrupt request which is output by the microcomputer's internal
interrupt controller. The interrupt controller manages interrupt requests by assigning each one of seven priority
levels. For details, see Chapter 5, "Interrupt Controller." For details about the interrupt request sources, see each
section in which the relevant internal peripheral I/O is described.
[Occurrence Conditions]
External interrupts are managed based on interrupt requests from each internal peripheral I/O by the
microcomputer's internal interrupt controller, and are sent to the CPU via the interrupt controller. The CPU checks
these interrupt requests at a break in instructions residing on word boundaries, and when an interrupt request is
detected and the PSW register IE flag = "1", accepts it as an external interrupt.
In no case will an external interrupt be activated immediately after executing a 16-bit instruction that starts from
a word boundary. (For 16-bit branch instructions, however, the interrupt is accepted immediately after branching.)
Interrupt may
be accepted
Figure 4.9.2 Timing at Which External Interrupt (EI) is Accepted
[EIT Processing]
(1) Saving SM, IE and C bits
The PSW register's SM, IE and C bits are saved to the respective backup bits: BSM, BIE and BC.
BSM ←
BIE
BC
(2) Updating SM, IE and C bits
The PSW register's SM, IE and C bits are updated as shown below.
SM
IE
C
(3) Saving the PC
The content of the PC register (always on word boundary) is saved to the BPC register.
(4) Branching to the EIT vector entry
The CPU branches to the address H'0000 0080 in the user space. However, when operating in flash E/W enable
mode, the CPU goes to the beginning of the internal RAM (address H'0080 4000). (For details, see Section 6.5,
"Programming the Internal Flash Memory.") This is the last operation performed in hardware preprocessing.
(5) Jumping from the EIT vector entry to the user-created handler
The CPU executes the BRA instruction written by the user at the address H'0000 0080 of the EIT vector
entry to jump to the start address of the user-created handler. At the beginning of the user-created EIT
handler, first save the BPC and PSW registers and the necessary general-purpose registers to the stack.
Also, save the accumulator and FPSR register as necessary.
Address 1000
Address 1002
16-bit instruction
16-bit instruction
×
Interrupt cannot
Interrupt may
be accepted
SM
IE
C
0
0
0
Order in which instructions are executed
Address 1004
32-bit instruction
be accepted
4-17
4.9 Interrupt Processing
Address 1008
Interrupt may
be accepted
32180 Group User's Manual (Rev.1.0)
EIT

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents