
iiiPeriPheraLModuLes1(systeM):interruPtControLLer(itC)
s1C33L17teChniCaLManuaL
ePson
iii-2-3
III
ITC
Multiplexedinterrupts
The following vector numbers have two causes of interrupts assigned:
No. 84: Port input interrupt 8 and SPI interrupt
No. 85: Port input interrupt 9 and USB PDREQ interrupt
No. 86: Port input interrupt 10 and USB interrupt
At initial reset, these vector addresses are set for port interrupts. Each port interrupt allows selection of an input
port to be used for generating interrupts from four different ports and SPI or USB is included in this selection
as a port. Therefore, when using the SPI or USB interrupt, select it instead of an input port using the Port Input
Interrupt Select Register 3 (0x3003C4). Also this setting changes the interrupt control registers for the port
input interrupt to be used for controlling the SPI or USB interrupt. For details of the Port Input Interrupt Select
Register 3 (0x3003C4), see Section III.2.7, “Details of Control Registers.”
Maskableinterruptgeneratingconditions
A maskable interrupt to the CPU occurs when all of the conditions described below are met.
The interrupt enable register for the cause of interrupt that has occurred is set to 1.
The IE (Interrupt Enable) bit of the Processor Status Register (PSR) in the CPU is set to 1.
The cause of interrupt that has occurred has a higher priority level than the value that is set in the PSR's
Interrupt Level (IL). (The interrupt levels can be set using the interrupt priority register in each interrupt
system.)
No other cause of trap having higher priority, such as NMI, has occurred.
The cause of interrupt does not invoke IDMA (the IDMA request bit is set to 0).
When a cause of interrupt occurs, the corresponding cause-of-interrupt flag is set to 1 and the flag remains
set until it is reset in the software program. Therefore, in no cases can the generated cause of interrupt be
inadvertently cleared even if the above conditions are not met when the cause of interrupt has occurred. The
interrupt will occur when the above conditions are met.
However, when the cause of interrupt invokes IDMA, the cause of interrupt is reset if the following condition is
met.
The IDMA is in link mode.
The IDMA transfer counter is not 0 in none-link mode.
Interrupts are disabled in the IDMA control information even if the transfer counter is 0 in none-link mode.
If two or more maskable causes of interrupt occur simultaneously, the cause of interrupt that has the highest
priority is allowed to signal an interrupt request to the CPU. The other interrupts with lower priorities are kept
pending until the above conditions are met.
The PSR and interrupt control register will be detailed later.
For details about cause of interrupt generating conditions, refer to the description of each peripheral circuit in
this manual.
illegalinterruptexception(vectorno.11)
There is a time lag between latching the interrupt signal and latching the interrupt vector and level signals
caused by the interface specifications between the CPU and the ITC.
1. The CPU latches the interrupt signal sent from the ITC.
↓
2. The CPU latches the interrupt vector and level signals sent from the ITC.
↓
3. The CPU executes the interrupt handler.
An illegal interrupt exception (vector No. 11) occurs when a register related to the interrupt signal (ITC's
interrupt enable and cause-of-interrupt flag registers) is altered before the CPU latches the interrupt vector and
level signals (between Steps 1 and 2). Therefore, it is very rare but an illegal interrupt exception may occur
if an interrupt related register is altered when interrupts to the CPU are in enabled status (IE bit in PSR = 1).
However, the illegal interrupt exception that occurs does not affect the program execution if any processing is
not performed in the exception handler.
To avoid an illegal interrupt exception occurring, disable interrupts to the CPU (set IE bit in PSR = 0) before
altering an interrupt related register.