English
Language : 

XC161 Datasheet, PDF (59/419 Pages) Infineon Technologies AG – 16-Bit Single-Chip Microcontroller with C166SV2 Core Volume 2 (of 2): Peripheral Units
XC161 Derivatives
Peripheral Units (Vol. 2 of 2)
The General Purpose Timer Units
14.2.5 GPT2 Register CAPREL Operating Modes
The Capture/Reload register CAPREL can be used to capture the contents of timer T5,
or to reload timer T6. A special mode facilitates the use of register CAPREL for both
functions at the same time. This mode allows frequency multiplication. The capture
function is triggered by the input pin CAPIN, or by GPT1 timer’s T3 input lines T3IN and
T3EUD. The reload function is triggered by an overflow or underflow of timer T6.
In addition to the capture function, the capture trigger signal can also be used to clear
the contents of timers T5 and T6 individually.
The functions of register CAPREL are controlled via several bit(field)s in the timer control
registers T5CON and T6CON.
GPT2 Capture/Reload Register CAPREL in Capture Mode
Capture mode for register CAPREL is selected by setting bit T5SC in control register
T5CON (set bitfield CI in register T5CON to a non-zero value to select a trigger signal).
In capture mode, the contents of the auxiliary timer T5 are latched into register CAPREL
in response to a signal transition at the selected external input pin(s). Bit CT3 selects the
external input line CAPIN or the input lines T3IN and/or T3EUD of GPT1 timer T3 as the
source for a capture trigger. Either a positive, a negative, or both a positive and a
negative transition at line CAPIN can be selected to trigger the capture function, or
transitions on input T3IN or input T3EUD or both inputs, T3IN and T3EUD. The active
edge is controlled by bitfield CI in register T5CON. Table 14-13 summarizes these
options.
Table 14-13 CAPREL Register Input Edge Selection
CT3 CI
Triggering Signal/Edge for Capture Mode
X
0 0 None. Capture Mode is disabled.
0
0 1 Positive transition (rising edge) on CAPIN.
0
1 0 Negative transition (falling edge) on CAPIN.
0
1 1 Any transition (rising or falling edge) on CAPIN.
1
0 1 Any transition (rising or falling edge) on T3IN.
1
1 0 Any transition (rising or falling edge) on T3EUD.
1
1 1 Any transition (rising or falling edge) on T3IN or T3EUD.
User’s Manual
GPT_X1, V2.0
14-45
V2.2, 2004-01