5 INTERRUPT CONTROLLER (ITC)
S1C17F13 TeChniCal Manual
Seiko epson Corporation
5-3
(Rev. 1.0)
Vector number/
Software interrupt
number
Vector address Hardware interrupt name
Hardware interrupt flag
Priority
21 (0x15)
TTBR + 0x54 R/F Ch.1 converter interrupt
•
Reference oscillation completion
•
Sensor A oscillation completion
•
Sensor B oscillation completion
•
Measurement counter overflow error
•
Time base counter overflow error
22 (0x16)
TTBR + 0x58 EPD timing controller
interrupt
Display refresh completion
23 (0x17)
TTBR + 0x5c Temperature detection circuit
interrupt
Conversion completion
24 (0x18)
TTBR + 0x60
reserved
–
:
:
:
:
↓
31 (0x1f)
TTBR + 0x7c
reserved
–
Low
*
1
*
1 When the same interrupt level is set
*
2 Either reset or NMI can be selected as the watchdog timer interrupt with software.
Vector Table Base Address (TTBR)
5.2.1
The MSCTTBRL and MSCTTBRH registers are provided to set the base (start) address of the vector table in which
interrupt vectors are programmed. “TTBR” described in Table 5.2.1 means the value set to these registers. After an
initial reset, the MSCTTBRL and MSCTTBRH registers are set to address 0x8000. Therefore, even when the vec-
tor table location is changed, it is necessary that at least the reset vector be written to the above address. Bits 7 to 0
in the MSCTTBRL register are fixed at 0, so the vector table always begins from a 256-byte boundary address.
Initialization
5.3
The following shows an example of the initial setting procedure related to interrupts:
1. Execute the di instruction to set the CPU into interrupt disabled state.
2. If the vector table start address is different from the default address, set it to the MSCTTBRL and MSCTTBRH
registers after removing system protection by writing 0x0096 to the MSCPROT.PROT[15:0] bits. Then, write a
value other than 0x0096 to the MSCPROT.PROT[15:0] bits to set system protection.
3. Set the interrupt enable bit of the peripheral circuit to 0 (interrupt disabled).
4. Set the interrupt level for the peripheral circuit using the ITCLV
x
.ILV
x
[2:0] bits in the ITC.
5. Configure the peripheral circuit and start its operation.
6. Clear the interrupt factor flag of the peripheral circuit.
7. Set the interrupt enable bit of the peripheral circuit to 1 (interrupt enabled).
8. Execute the ei instruction to set the CPU into interrupt enabled state.
Maskable Interrupt Control and Operations
5.4
Peripheral Circuit Interrupt Control
5.4.1
The peripheral circuit that generates interrupts includes an interrupt enable bit and an interrupt flag for each inter-
rupt cause.
Interrupt flag:
The flag is set to 1 when the interrupt cause occurs. The clear condition depends on the periph-
eral circuit.
Interrupt enable bit: By setting this bit to 1 (interrupt enabled), an interrupt request will be sent to the ITC when the
interrupt flag is set to 1. When this bit is set to 0 (interrupt disabled), no interrupt request will
be sent to the ITC even if the interrupt flag is set to 1. An interrupt request is also sent to the
ITC if the status is changed to interrupt enabled when the interrupt flag is 1.
For specific information on causes of interrupts, interrupt flags, and interrupt enable bits, refer to the respective pe-
ripheral circuit descriptions.