CMT2380F17
Rev0.1 | 157/347
www.cmostek.com
16.3
Timer 3
Timer 3 is a 16-bit Timer/Counter which can operate either as a timer or an event counter, as selected by
C/T3 in T3CON register. Timer 3 has four operating modes: Capture, Auto-Reload (up or down counting) and
Programmable Clock-Out, which are selected by bits in the T3CON, T3MOD and T3MOD1 registers.
Timer 3 Pin configuration are as following:
T3/T3CKO
T3EX
P3.3
P3.4
16.3.1
Timer 3 Mode 0 (Auto-Reload and External Interrupt)
In this mode, Timer 3 provides a 16-bit auto-reload timer/counter. The TF3, Timer 3 overflow flag, is one
of the Timer 3 interrupt source which interrupt function can be blocked by TF3IG. EXEN3 enables a 1-to-0
transition at T3EXI to set the flag, EXF3, for an external input interrupt to share the Timer 3 interrupt with TF3.
T3EXI is the selection result of 8 Timer 3 external inputs. T3EXH performs the same function as EXEN3 but it
enables the detecting a 0-to-1 transition at T3EXI input.
The Timer 3 overflow event (T3OF) in this module will be output to other peripheral as clock input or
event source.
Figure 16-27. Timer 3 Mode 0 Structure (Auto-Reload and Exteranl Interrupt Mode)
16.3.2
Timer 3 Mode 1 (Auto-Reload with External Interrupt)
Figure 16
–28 shows Timer 3 Mode 1, which enables Timer 3 to count up automatically. In this mode there
are two options selected by bit EXEN3 in T3CON register. If EXEN2=0, then Timer 3 counts up to 0FFFFH
and sets the TF3 (Overflow Flag) bit upon overflow. This causes the Timer 3 registers to be reloaded with the
16-bit value in RCAP3L and RCAP3H. The values in RCAP3L and RCAP3H are preset by firmware. If
EXEN3=1, then a 16-bit reload can be triggered either by an overflow or by a 1-to-0 transition at input T3EX.
This transition also sets the EXF3 bit. The Timer 3 interrupt, if enabled, can be generated when either TF3 or
EXF3 are 1. T3EXH performs the same function as EXEN3 but it enables the detecting a 0-to-1 transition at
input T3EXI.
Summary of Contents for CMT2380F17
Page 27: ...CMT2380F17 Rev0 1 27 347 www cmostek com 1 25 Phase Noise...
Page 177: ...CMT2380F17 Rev0 1 177 347 www cmostek com Figure 17 3 PCA Interrupt System...
Page 246: ...CMT2380F17 Rev0 1 246 347 www cmostek com SnMIPS S0MI S1MI 1 P3 3 P4 7...