CHAPTER 12 PORT FUNCTIONS
586
User’s Manual U15195EJ5V0UD
(1) Timer 2 input filter mode registers 0 to 5 (FEM0 to FEM5)
The FEMn registers are used to specify timer 2 input pin filtering and to set the clock source of noise
elimination time and the input valid edge.
It can be read or written in 8-bit or 1-bit units.
Cautions 1. Be sure to clear (0) the STFTE bit of timer 2 clock stop register 0 (STOPTE0) even when
using the TI2/INTP20, TO21/INTP21, TO22/INTP22, TO23/INTP23, TO24/INTP24, and
TCLR2/INTP25 pins as INTP20, INTP21, INTP22, INTP23, INTP24, and INTP25,
respectively, and not using timer 2.
2. Setting the trigger mode of the INTP2n pin should be performed after setting the PMC2
register.
If the PMC2 register is set after setting the FEMn register, an invalid interrupt may occur
when the PMC2 register is set (n = 0 to 5).
3. The noise elimination function starts operating by setting the CEEn bit of the TCRE0
register to 1 (enabling count operations).
(1/2)
7
DFEN00
FEM0
6
0
5
0
4
0
3
EDGE010
2
EDGE000
1
TMS010
0
TMS000
Address
FFFFF630H
After reset
00H
Address
FFFFF631H
After reset
00H
Address
FFFFF632H
After reset
00H
Address
FFFFF633H
After reset
00H
Address
FFFFF634H
After reset
00H
Address
FFFFF635H
After reset
00H
INTP20
7
DFEN01
6
0
5
0
4
0
3
EDGE011
2
EDGE001
1
TMS011
0
TMS001
INTP21
7
DFEN02
6
0
5
0
4
0
3
EDGE012
2
EDGE002
1
TMS012
0
TMS002
INTP22
7
DFEN03
6
0
5
0
4
0
3
EDGE013
2
EDGE003
1
TMS013
0
TMS003
INTP23
7
DFEN04
6
0
5
0
4
0
3
EDGE014
2
EDGE004
1
TMS014
0
TMS004
INTP24
7
DFEN05
6
0
5
0
4
0
3
EDGE015
2
EDGE005
1
TMS015
0
TMS005
INTP25
FEM1
FEM2
FEM3
FEM4
FEM5
Bit position
Bit name
Function
7
DFEN0n
Specifies the INTP2n pin filter.
0: Analog filter
1: Digital filter
Caution When the DFEN0n bit = 1, the sampling clock of the digital filter is f
XXTM2
(clock selected by the PRM02 register).
Remark
n = 0 to 5