297
/
838
Nations Technologies Inc.
Tel
:
+86-755-86309900
:
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
TI1 input.
Figure 11-29 Control circuit in Gated mode
Slave mode: Trigger Mode + External Clock Mode 2
In reset mode, trigger mode and gate control mode, the counter clock can be selected as external clock mode 2, and
the ETR signal is used as the external clock source input. At this time, the trigger selection needs to select non-ETRF
(TIMx_SMCTRL.TSEL=111).
Here is an example:
1. Channel 1 is configured as input to detect the rising edge of TI1 (TIMx_CCMOD1.CC1SEL=01,
TIMx_CCEN.CC1P=0);
2. Enable external clock mode 2 (TIMx_SMCTRL.EXCEN=1), select rising edge for external trigger polarity
(TIMx_SMCTRL.EXTP=0), select slave mode as trigger mode (TIMx_SMCTRL.SMSEL=110), select TI1 for
trigger input (TIMx_SMCTRL.TSEL=101);
When TI1 detects a rising edge, the counter starts counting on the rising edge of ETR, and the trigger flag is set
(TIMx_STS.TITF=1);
TI1
Counter register
30 31 32 33
34
36 37 38
35
CNTEN
TITF
Counter clock=CK_CNT=CK_PSC
Clear TITF