www.geehy.com Page 148
Field
Name
R/W
Description
111: Comparison mode 4; OC4REF is used to trigger TRGO
7
TI1SEL
R/W
Timer Input 1 Select
0: TMRx_CH1 pin is connected to TI1 input
1: TMRx_CH1, TMRx_CH2 and TMRx_CH3 pins are connected to TI1
input after exclusive
15:8
Reserved
Slave mode control register (TMRx_SMCTRL)
Offset address: 0x08
Reset value: 0x0000
Field
Name
R/W
Description
2:0
SMFSEL
R/W
Slave Mode Function Select
000: Disable the slave mode, the timer can be used as master mode timer
to affect the work of slave mode timer; if CTRL1_CNTEN=1, the
prescaler is directly driven by the internal clock.
001: Encoder mode 1; according to the level of TI1FP1, the counter
counts at the edge of TI2FP2.
010: Encoder mode 2; according to the level of TI2FP2, the counter
counts at the edge of TI1FP1.
011: Encoder mode 3; according to the input level of another signal, the
counter counts at the edge of TI1FP1 and TI2FP2.
100: Reset mode; the slave mode timer resets the counter after receiving
the rising edge signal of TRGI and generates the signal to update
the register.
101: Gated mode; the slave mode timer starts the counter to work after
receiving the TRGI high level signal; it stops the counter when
receiving TRGI low level; when receiving TRGI high level signal
again, the timer will continue to work; the counter is not reset during
the whole period.
110: Trigger mode, the slave mode timer starts the counter to work after
receiving the rising edge signal of TRGI.
111: External clock mode 1; select the rising edge signal of TRGI as the
clock source to drive the counter to work.
3
OCCSEL
R/W
OCREF Clear Source Select
This bit is used to select OCREF clear source
0
:
OCREF_CLR
1
:
ETRF
6:4
TRGSEL
R/W
Select the trigger input signal (Trigger Input Signal Select)
In order to avoid false edge detection when changing the bit value, it must
be changed when SMFSEL=0.
000: Internal trigger ITR0
001: Internal trigger ITR1
010: Internal trigger ITR2
011: Internal trigger ITR3
100: Channel 1 input edge detector TIF_ED
101: Channel 1 post-filtering timer input TI1FP1
110: Channel 2 post-filtering timer input TI2FP2
111: External trigger input (ETRF)
7
MSMEN
R/W
Master/slave Mode Enable
0: Invalid
1: Enable the master/slave mode