III PERIPHERAL BLOCK: 16-BIT PROGRAMMABLE TIMERS
B-III-4-10
EPSON
S1C33T01 FUNCTION PART
16-Bit Programmable Timer Interrupts and DMA
The 16-bit programmable timer has a function for generating an interrupt using the comparison match A and B
states.
The timing at which an interrupt is generated is shown in Figure 4.2 in the preceding section.
Control registers of the interrupt controller
Table 4.4 shows the control registers of the interrupt controller provided for each timer.
Table 4.4
Control Registers of Interrupt Controller
Interrupt factor
Interrupt factor flag
Interrupt enable register
Interrupt priority register
Timer 0 comparison A
F16TC0 (D3/0x40282)
E16TC0 (D3/0x40272)
P16T0[2:0] (D[2:0]/0x40266)
Timer 0 comparison B
F16TU0 (D2/0x40282)
E16TU0 (D2/0x40272)
Timer 1 comparison A
F16TC1 (D7/0x40282)
E16TC1 (D7/0x40272)
P16T1[2:0] (D[6:4]/0x40266)
Timer 1 comparison B
F16TU1 (D6/0x40282)
E16TU1 (D6/0x40272)
Timer 2 comparison A
F16TC2 (D3/0x40283)
E16TC2 (D3/0x40273)
P16T2[2:0] (D[2:0]/0x40267)
Timer 2 comparison B
F16TU2 (D2/0x40283)
E16TU2 (D2/0x40273)
Timer 3 comparison A
F16TC3 (D7/0x40283)
E16TC3 (D7/0x40273)
P16T3[2:0] (D[6:4]/0x40267)
Timer 3 comparison B
F16TU3 (D6/0x40283)
E16TU3 (D6/0x40273)
Timer 4 comparison A
F16TC4 (D3/0x40284)
E16TC4 (D3/0x40274)
P16T4[2:0] (D[2:0]/0x40268)
Timer 4 comparison B
F16TU4 (D2/0x40284)
E16TU4 (D2/0x40274)
Timer 5 comparison A
F16TC5 (D7/0x40284)
E16TC5 (D7/0x40274)
P16T5[2:0] (D[6:4]/0x40268)
Timer 5 comparison B
F16TU5 (D6/0x40284)
E16TU5 (D6/0x40274)
Timer 6 comparison A
F16TC6 (D3/0x402AA)
E16TC6 (D3/0x402A7)
P16T6[2:0] (D[2:0]/0x402A4)
Timer 6 comparison B
F16TU6 (D2/0x402AA)
E16TU6 (D2/0x402A7)
Timer 7 comparison A
F16TC7 (D7/0x402AA)
E16TC7 (D7/0x402A7)
P16T7[2:0] (D[6:4]/0x402A4)
Timer 7 comparison B
F16TU7 (D6/0x402AA)
E16TU7 (D6/0x402A7)
Timer 8 comparison A
F16TC8 (D3/0x402AB)
E16TC8 (D3/0x402A8)
P16T8[2:0] (D[2:0]/0x402A5)
Timer 8 comparison B
F16TU8 (D2/0x402AB)
E16TU8 (D2/0x402A8)
Timer 9 comparison A
F16TC9 (D7/0x402AB)
E16TC9 (D7/0x402A8)
P16T9[2:0] (D[6:4]/0x402A5)
Timer 9 comparison B
F16TU9 (D6/0x402AB)
E16TU9 (D6/0x402A8)
When a comparison match state occurs in the timer, the corresponding interrupt factor flag is set to "1".
If the interrupt enable register bit corresponding to that interrupt factor flag has been set to "1", an interrupt
request is generated.
An interrupt caused by a timer can be disabled by leaving the interrupt enable register bit for that timer set to
"0". The interrupt factor flag is always set to "1" by the timer's comparison match state, regardless of how the
interrupt enable register is set (even when set to "0").
The interrupt priority register sets an interrupt priority level (0 to 7) for each timer. Priorities within a timer
block are such that timers of smaller numbers have a higher priority. Priorities between interrupt types are such
that the comparison B interrupt has priority over the comparison A interrupt. An interrupt request to the CPU
is accepted only when no other interrupt request of a higher priority has been generated.
It is only when the PSR's IE bit = "1" (interrupts enabled) and the set value of the IL is smaller than the timer
interrupt level set by the interrupt priority register, that a timer interrupt request is actually accepted by the
CPU.
For details on these interrupt control registers, as well as the device operation when an interrupt has occurred,
refer to "ITC (Interrupt Controller)".