16-Bit Programmable Timer Interrupts And Dma - Epson S1C33210 Technical Manual

Cmos 32-bit single chip microcomputer
Table of Contents

Advertisement

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.
Interrupt factor
Timer 0 comparison A
Timer 0 comparison B
Timer 1 comparison A
Timer 1 comparison B
Timer 2 comparison A
Timer 2 comparison B
Timer 3 comparison A
Timer 3 comparison B
Timer 4 comparison A
Timer 4 comparison B
Timer 5 comparison A
Timer 5 comparison B
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)".
Intelligent DMA
The interrupt factor of each timer can also invoke intelligent DMA (IDMA). This allows memory-to-memory
DMA transfers to be performed cyclically.
The following shows the IDMA channel numbers set for each interrupt factor of timer:
Timer 0 comparison B:
Timer 1 comparison B:
Timer 2 comparison B: 0x0B
Timer 3 comparison B: 0x0D
Timer 4 comparison B:
Timer 5 comparison B:
S1C33210 FUNCTION PART
III PERIPHERAL BLOCK: 16-BIT PROGRAMMABLE TIMERS
Table 4.4 Control Registers of Interrupt Controller
Interrupt factor flag
F16TC0 (D3/0x40282)
F16TU0 (D2/0x40282)
F16TC1 (D7/0x40282)
F16TU1 (D6/0x40282)
F16TC2 (D3/0x40283)
F16TU2 (D2/0x40283)
F16TC3 (D7/0x40283)
F16TU3 (D6/0x40283)
F16TC4 (D3/0x40284)
F16TU4 (D2/0x40284)
F16TC5 (D7/0x40284)
F16TU5 (D6/0x40284)
IDMA Ch.
0x07
Timer 0 comparison A: 0x08
0x09
Timer 1 comparison A: 0x0A
Timer 2 comparison A: 0x0C
Timer 3 comparison A: 0x0E
0x0F
Timer 4 comparison A: 0x10
0x11
Timer 5 comparison A: 0x12
Interrupt enable register
E16TC0 (D3/0x40272)
E16TU0 (D2/0x40272)
E16TC1 (D7/0x40272)
E16TU1 (D6/0x40272)
E16TC2 (D3/0x40273)
E16TU2 (D2/0x40273)
E16TC3 (D7/0x40273)
E16TU3 (D6/0x40273)
E16TC4 (D3/0x40274)
E16TU4 (D2/0x40274)
E16TC5 (D7/0x40274)
E16TU5 (D6/0x40274)
IDMA Ch.
EPSON
Interrupt priority register
P16T0[2:0] (D[2:0]/0x40266)
P16T1[2:0] (D[6:4]/0x40266)
P16T2[2:0] (D[2:0]/0x40267)
P16T3[2:0] (D[6:4]/0x40267)
P16T4[2:0] (D[2:0]/0x40268)
P16T5[2:0] (D[6:4]/0x40268)
B-III-4-9

Advertisement

Table of Contents
loading

Table of Contents