![Infineon Technologies XC2200 User Manual Download Page 250](http://html1.mh-extra.com/html/infineon-technologies/xc2200/xc2200_user-manual_2055439250.webp)
XC2200 Derivatives
System Units (Vol. 1 of 2)
Interrupt and Trap Functions
User’s Manual
5-38
V2.1, 2008-08
ICU_X2K, V2.2
Pins T2IN or T4IN can be used as external interrupt input pins when the associated
auxiliary timer T2 or T4 in block GPT1 is configured for capture mode. This mode is
selected by programming the mode control fields T2M or T4M in control registers
T2CON or T4CON to 101
B
. The active edge of the external input signal is determined by
bitfields T2I or T4I. When these fields are programmed to X01
B
, interrupt request flags
T2IR or T4IR in registers T2IC or T4IC will be set on a positive external transition at pins
T2IN or T4IN, respectively. When T2I or T4I is programmed to X10
B
, then a negative
external transition will set the corresponding request flag. When T2I or T4I is
programmed to X11
B
, both a positive and a negative transition will set the request flag.
In all three cases, the contents of the core timer T3 will be captured into the auxiliary
timer registers T2 or T4 based on the transition at pins T2IN or T4IN. When the interrupt
enable bits T2IE or T4IE are set, a PEC request or an interrupt request for vector T2INT
or T4INT will be generated.
Pin CAPIN differs slightly from the timer input pins as it can be used as external interrupt
input pin without affecting peripheral functions. When the capture mode enable bit T5SC
in register T5CON is cleared to ‘0’, signal transitions on pin CAPIN will only set the
interrupt request flag CRIR in register CRIC, and the capture function of register
CAPREL is not activated.
So register CAPREL can still be used as reload register for GPT2 timer T5, while pin
CAPIN serves as external interrupt input. Bitfield CI in register T5CON selects the
effective transition of the external interrupt input signal. When CI is programmed to 01
B
,
a positive external transition will set the interrupt request flag. CI = 10
B
selects a negative
transition to set the interrupt request flag, and with CI = 11
B
, both a positive and a
negative transition will set the request flag. When the interrupt enable bit CRIE is set, an
interrupt request for vector CRINT or a PEC request will be generated.