Figure 158. Control Circuit In External Clock Mode 2 - STMicroelectronics RM0365 Reference Manual

Advanced arm-based 32-bit mcus
Table of Contents

Advertisement

Advanced-control timers (TIM1)
1.
As no filter is needed in this example, write ETF[3:0]=0000 in the TIMx_SMCR register.
2.
Set the prescaler by writing ETPS[1:0]=01 in the TIMx_SMCR register
3.
Select rising edge detection on the ETR pin by writing ETP=0 in the TIMx_SMCR
register
4.
Enable external clock mode 2 by writing ECE=1 in the TIMx_SMCR register.
5.
Enable the counter by writing CEN=1 in the TIMx_CR1 register.
The counter counts once each 2 ETR rising edges.
The delay between the rising edge on ETR and the actual clock of the counter is due to the
resynchronization circuit on the ETRP signal.
477/1080

Figure 158. Control circuit in external clock mode 2

DocID025202 Rev 7
RM0365

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the RM0365 and is the answer not in the manual?

Questions and answers

Table of Contents