112
Chapter 3
CPU System Functions
Preliminary User’s Manual U17566EE1V2UM00
(5)
ECR - Interrupt/exception source register
The 32-bit ECR register displays the exception codes if an exception or an
interrupt has occurred. With the exception code, the interrupt/exception source
can be identified.
For a list of interrupts/exceptions and corresponding exception codes, see
Table 3-9 on page 112
.
Initial Value
0000 0000
H
. This register is cleared by any reset.
The following table lists the exception codes.
If an interrupt (maskable or non-maskable) is acknowlegded during instruction
execution, generally, the address of the instruction
following
the one being
executed is saved to the saving registers, except when an interrupt is
acknowledged during execution of one of the following instructions:
• load instructions (SLD.B, SLD.BU, SLD.H, SLD.HU, SLD.W)
• divide instructions (DIV, DIVH, DIVU, DIVHU)
31
26 25
0
FECC
EICC
Table 3-8
ECR register contents
Bit
position
Bit name
Function
31 to 16
FECC
Exception code of non-maskable interrupt (NMI)
15 to 0
EICC
Exception code of exception or maskable interrupts
Table 3-9
Interrupt/execution codes
Interrupt/Exception Source
Classification
Exception
Code
Handler
Address
Value
restored to
EIPC/FEPC
Name
Trigger
Non-maskable interrupts
(NMI)
NMI0
input
Interrupt 0010
H
0000 0010
H
next PC
(see Note)
NMI1
input
Interrupt 0020
H
0000 0020
H
next PC
(see Note)
NMI2
input
Interrupt 0030
H
0000 0030
H
next PC
(see Note)
Maskable interrupt
refer to
“Interrupt
Controller
(INTC)“
on
page 187
Interrupt
refer to
“Interrupt
Controller
(INTC)“ on
page 187
•
higher 16 bits:
0000
H
•
lower 16 bits:
exception code
next PC
(see Note)
Software
exception
TRAP0n
(n = 0 to F
H
)
TRAP
instruction
Exception
004n
H
0000 0040
H
next PC
TRAP1n
(n = 0 to F
H
)
TRAP
instruction
Exception
005n
H
0000 0050
H
next PC
Exception trap (ILGOP)
Illegal
instruction
code
Exception
0060
H
0000 0060
H
next PC
Debug trap
DBTRAP
instruction
Exception
0060
H
0000 0060
H
next PC
electronic components distributor