12 INTERRUPT CONTROLLER (ITC)
S1C33L26 TECHNICAL MANUAL
Seiko Epson Corporation
12-5
The C33 PE Core samples interrupt requests for each cycle. On accepting an interrupt request, the C33 PE Core
switches to interrupt processing immediately after execution of the current instruction has been completed.
Interrupt processing involves the following steps:
(1) The PSR and current program counter (PC) values are saved to the stack.
(2) The PSR IE bit is reset to 0 (disabling subsequent maskable interrupts).
(3) The PSR IL bits are set to the received interrupt level. (The NMI does not affect the IL bits.)
(4) The vector for the interrupt occurred is loaded to the PC to execute the interrupt handler routine.
When an interrupt is received, (2) prevents subsequent maskable interrupts. Setting the IE bit to 1 in the interrupt
handler routine allows handling of multiple interrupts. In this case, since IL is changed by (3), only an interrupt
with a higher level than that of the currently processed interrupt will be accepted. Ending interrupt handler routines
using the reti instruction returns the PSR to the state before the interrupt has occurred. The program resumes pro-
cessing following the instruction being executed at the time the interrupt occurred.
NMI
12.4
In the S1C33L26, a low level input to the #NMI pin or the watchdog timer can generate a non-maskable interrupt
(NMI). The vector number for NMI is 7, with the vector address set to the vector table's starting a 28 bytes.
This interrupt takes precedence over other interrupts and is unconditionally accepted by the C33 PE Core.
For detailed information on generating NMI by the watchdog timer, see the “Watchdog Timer (WDT)” chapter.
Software Exception
12.5
A software exception can be generated by use of “int imm2” instruction of the C33 PE Core. A software exception
number (0 to 3) is specified with imm2 of the operand.
HALT and SLEEP Mode Cancellation
12.6
HALT mode is cleared by the following signals, which start the CPU.
• Interrupt request signal sent to the CPU from the ITC
• NMI signal output by the watchdog timer or input to the #NMI pin
• Debug interrupt signal
• Reset signal output by the watchdog timer or input to the #RESET pin
SLEEP mode is cleared by the following signals, which start the CPU.
• Port input interrupt or RTC interrupt request signal sent from the GPIO or RTC
• NMI signal input to the #NMI pin
• Reset signal input to the #RESET pin
Notes: • If the CPU is able to receive interrupts when HALT or SLEEP mode has been cleared by an
interrupt request for the CPU from the ITC, processing branches to the interrupt handler rou-
tine immediately after cancellation. In all other cases, the program is executed following the
halt or slp instruction.
• HALT or SLEEP mode clearing due to interrupt requests cannot be masked (prohibited) using
ITC interrupt level settings. When using a cause of interrupt to clear HALT or SLEEP mode, the
interrupt enable bit corresponding to the cause of interrupt must be set to 1 (interrupt enabled).
For more information, see the “Power Saving” section in Appendix.