Vector Table Base Address (Ttbr); Initialization; Maskable Interrupt Control And Operations; Peripheral Circuit Interrupt Control - Epson S1C17W14 Technical Manual

Cmos 16-bit single chip microcontroller
Table of Contents

Advertisement

Vector number/
Software interrupt
Vector address
number
23 (0x17)
TTBR + 0x5c
24 (0x18)
TTBR + 0x60
25 (0x19)
TTBR + 0x64
26 (0x1a)
TTBR + 0x68
27 (0x1b)
TTBR + 0x6c
28 (0x1c)
TTBR + 0x70
:
:
31 (0x1f)
TTBR + 0x7c
*1 When the same interrupt level is set

5.2.1 Vector Table Base Address (TTBR)

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.

5.3 Initialization

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 ITCLVx.ILVx[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.

5.4 Maskable Interrupt Control and Operations

5.4.1 Peripheral Circuit Interrupt Control

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.
S1C17W14/W16 TECHNICAL MANUAL
(Rev. 1.2)
Hardware interrupt name
Synchronous serial interface
• End of transmission
Ch.1 interrupt
• Receive buffer full
• Transmit buffer empty
• Overrun error
16-bit timer Ch.3 interrupt
Underflow
(S1C17W16 only)
12-bit A/D converter interrupt
• Analog input signal m A/D conversion completion
(S1C17W16 only)
• Analog input signal m A/D conversion result overwrite
16-bit timer Ch.4 interrupt
Underflow
(S1C17W16 only)
Synchronous serial interface
• End of transmission
Ch.2 interrupt
• Receive buffer full
(S1C17W16 only)
• Transmit buffer empty
• Overrun error
reserved
:
reserved
Seiko Epson Corporation
5 INTERRUPT CONTROLLER (ITC)
Hardware interrupt flag
error
:
Priority
Low
*1
5-3

Advertisement

Table of Contents
loading

This manual is also suitable for:

S1c17w16

Table of Contents