
III PERIPHERAL MODULES 1 (SYSTEM): INTERRUPT CONTROLLER (ITC)
III-2-78
EPSON
S1C33E07 TECHNICAL MANUAL
III.2.8 Precautions
In SLEEP mode, there is a time lag between input of an interrupt signal for wakeup and the start of the clock
supply to the ITC, so a delay will occur until the ITC sets the cause-of-interrupt flag. Therefore, no interrupt will
occur if the interrupt signal is deasserted before the clock is supplied to the ITC, as the cause-of-interrupt flag in
the ITC is not set.
Furthermore, additional time is needed for the CPU to accept the interrupt request from the ITC, the CPU may
execute a few instructions that follow the slp instruction before it starts the interrupt processing.
The same problem may occur when the CPU wakes up from SLEEP mode by NMI. No interrupt will occur if the
#NMI signal is deasserted before the clock is supplied, as the NMI flag is not set.
If the cause of interrupt used to restart from the standby mode has been set to invoke the IDMA, the IDMA is
started up by that interrupt.
If an interrupt to be generated upon completion of IDMA is disabled at the setting of the IDMA side, no interrupt
request is signaled to the CPU. Therefore, the CPU remains idle until the next interrupt request is generated.
As the C33 PE Core function, the IL allows interrupt levels to be set in the range of 0 to 15. However, since the
interrupt priority register in the ITC consists of three bits, interrupt levels in each interrupt system can only be set
for up to 8.
When the reset-only method is used to reset the cause-of-interrupt flag (by writing 1), if a read-modify-write
instruction (e.g., bset, bclr, or bnot) is executed, the other cause-of-interrupt flags at the same address that have
been set to 1 are reset by a write. This requires caution. In cases when the read/write method is used to reset the
cause-of-interrupt flag (by writing 0), all cause-of-interrupt flags for which 0 has been written are reset. When a
read-modify-write operation is performed, a cause of interrupt may occur between reads and writes, so be careful
when using this method.
The same applies to the set-only method and read/write method for the IDMA request and IDMA enable
registers.
After an initial reset, the cause-of-interrupt flags and interrupt priority registers all become indeterminate. To
prevent unwanted interrupts or IDMA requests from being generated inadvertently, be sure to reset these flags
and registers in the software application.
To prevent another interrupt from being generated for the same cause again after generation of an interrupt, be
sure to reset the cause-of-interrupt flag before enabling interrupts and setting the PSR again or executing the reti
instruction.
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.