Parallel ports UM0404
148/564 DocID13284 Rev 2
switched to the line connected to the internal bus. The port output latch will receive the value
from the internal bus and the hardware triggered change will be lost.
As all other capture inputs, the capture input function of pins P2.7...P2.0 can also be used
as external interrupt inputs with a sample rate of eight CPU clock cycles.
For pins P2.15 to P2.8, the sampling rate is 8 CPU clock cycles when used as capture input,
and 1 CPU clock cycle if used as fast external input.
6.4.2 External interrupts
These interrupt inputs are provided to service external interrupts with high precision
requirements. These fast interrupt inputs feature programmable edge detection (rising edge,
falling edge or both edges).
Fast external interrupts may also have interrupt sources selected from other peripherals; for
example the CANx controller receive signal (CANx_RxD) can be used to interrupt the
system. This new function is controlled using the ‘External Interrupt Source Selection’
register EXISEL.
EXISEL (F1DAh / EDh) ESFR Reset Value: 0000h
The upper eight Port2 lines (P2.15...P2.8) also support Fast External Interrupt inputs
(EX7IN...EX0IN).
P2.15 in addition is the input for CAPCOM2 timer T7 (T7IN).
The Table 22 summarizes the alternate functions of Port2.
1514131211109876543210
EXI7SS EXI6SS EXI5SS EXI4SS EXI3SS
2
EXI2SS
3
EXI1SS EXI0SS
RW RW RW RW RW RW RW RW
Bit Function
EXIxSS
External Interrupt x Source Selection (x=7...0)
‘00’: Input from associated Port2 pin.
‘01’: Input from “alternate source”.
‘10’: Input from Port2 pin ORed with “alternate source”.
‘11’: Input from Port2 pin ANDed with “alternate source”.
EXIxSS Port2 pin Alternate source
0 P2.8 CAN1_RxD P4.5
1 P2.9 CAN2_RxD / SCL P4.4
2 P2.10 RTCSI (Second) Internal MUX
3 P2.11 RTCAI (Alarm) Internal MUX
4...7 P2.12...15 Not used (zero) -