ST10R272L - INTERRUPT AND TRAP FUNCTIONS
103/320
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 is generated.
Pin CAPIN differs 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 the
T5CON register is cleared to ’0’, signal transitions on pin CAPIN will only set the interrupt
request flag CRIR in the CRIC register, and the capture function of the CAPREL register is
not activated.
So, the CAPREL register can still be used as reload register for GPT2 timer T5, while pin
CAPIN serves as external interrupt input. Bit field CI in register T5CON selects the effective
transition of the external interrupt input signal. When CI is programmed to 01b, a positive
external transition will set the interrupt request flag. CI=10b selects a negative transition to
set the interrupt request flag, and with CI=11b, 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.
Note
The non-maskable interrupt input pin NMI and the reset input RSTIN provide
another possibility for the CPU to react on an external input signal. NMI and RSTIN
are dedicated input pins, which cause Hardware Traps.
6.8.1
Fast external interrupts
The input pins that may be used for external interrupts are sampled every 8 CPU clock
cycles, i.e. external events are scanned and detected in time-frames of 8 CPU clock cycles.
The ST10R272L provides 4 interrupt inputs that are sampled every CPU clock cycle, so
external events are captured faster than with standard interrupt inputs.
The pins of Port 2 (EX0IN-EX3IN on P2.8-P2.11) can individually be programmed to this fast
interrupt mode where the trigger transition (rising, falling or both) can be selected. The
External interrupt control register EXICON controls this feature for all 4 pins.
Port Pin
Original Function
Control Register
P3.7/T2IN
Auxiliary timer T2 input pin
T2CON
P3.5/T4IN
Auxiliary timer T4 input pin
T4CON
P3.2/CAPIN
GPT2 capture input pin
T5CON
Table 18 IO pins that can be used as external interrupt inputs