RM0090
15.4.3
TIMx slave mode control register (TIMx_SMCR)
Address offset: 0x08
Reset value: 0x0000
15
14
13
ETP
ECE
ETPS[1:0]
rw
rw
rw
Bit 15 ETP: External trigger polarity
Bit 14 ECE: External clock enable
Bits 13:12 ETPS: External trigger prescaler
Bits 11:8 ETF[3:0]: External trigger filter
12
11
10
9
ETF[3:0]
rw
rw
rw
rw
This bit selects whether ETR or ETR is used for trigger operations
0: ETR is noninverted, active at high level or rising edge
1: ETR is inverted, active at low level or falling edge
This bit enables External clock mode 2.
0: External clock mode 2 disabled
1: External clock mode 2 enabled. The counter is clocked by any active edge on the ETRF
signal.
1: Setting the ECE bit has the same effect as selecting external clock mode 1 with TRGI
connected to ETRF (SMS=111 and TS=111).
2: It is possible to simultaneously use external clock mode 2 with the following slave modes:
reset mode, gated mode and trigger mode. Nevertheless, TRGI must not be connected to
ETRF in this case (TS bits must not be 111).
3: If external clock mode 1 and external clock mode 2 are enabled at the same time, the
external clock input is ETRF.
External trigger signal ETRP frequency must be at most 1/4 of CK_INT frequency. A
prescaler can be enabled to reduce ETRP frequency. It is useful when inputting fast external
clocks.
00: Prescaler OFF
01: ETRP frequency divided by 2
10: ETRP frequency divided by 4
11: ETRP frequency divided by 8
This bit-field then defines the frequency used to sample ETRP signal and the length of the
digital filter applied to ETRP. The digital filter is made of an event counter in which N events
are needed to validate a transition on the output:
0000: No filter, sampling is done at f
0001: f
=f
SAMPLING
CK_INT
0010: f
=f
SAMPLING
CK_INT
0011: f
=f
SAMPLING
CK_INT
0100: f
=f
/2, N=6
SAMPLING
DTS
0101: f
=f
/2, N=8
SAMPLING
DTS
0110: f
=f
/4, N=6
SAMPLING
DTS
0111: f
=f
/4, N=8
SAMPLING
DTS
1000: f
=f
/8, N=6
SAMPLING
DTS
1001: f
=f
/8, N=8
SAMPLING
DTS
1010: f
=f
/16, N=5
SAMPLING
DTS
1011: f
=f
/16, N=6
SAMPLING
DTS
1100: f
=f
/16, N=8
SAMPLING
DTS
1101: f
=f
/32, N=5
SAMPLING
DTS
1110: f
=f
/32, N=6
SAMPLING
DTS
1111: f
=f
/32, N=8
SAMPLING
DTS
Doc ID 018909 Rev 4
General-purpose timers (TIM2 to TIM5)
8
7
6
MSM
TS[2:0]
rw
rw
rw
DTS
, N=2
, N=4
, N=8
5
4
3
2
Res.
rw
rw
rw
1
0
SMS[2:0]
rw
rw
462/1422
Need help?
Do you have a question about the STM32F40 Series and is the answer not in the manual?
Questions and answers