Clock Selection; Figure 68. Control Circuit In Normal Mode, Internal Clock Divided By 1; Figure 116. Ti2 External Clock Connection Example - ST STM32F102 Series Reference Manual

Hide thumbs Also See for STM32F102 Series:
Table of Contents

Advertisement

Advanced-control timers (TIM1&TIM8)
12.3.4

Clock selection

The counter clock can be provided by the following clock sources:
Internal clock (CK_INT)
External clock mode1: external input pin
External clock mode2: external trigger input ETR
Internal trigger inputs (ITRx): using one timer as prescaler for another timer, for
example, you can configure Timer 1 to act as a prescaler for Timer 2. Refer to
Using one timer as prescaler for another timer on page 308
Internal clock source (CK_INT)
If the slave mode controller is disabled (SMS=000), then the CEN, DIR (in the TIMx_CR1
register) and UG bits (in the TIMx_EGR register) are actual control bits and can be changed
only by software (except UG which remains cleared automatically). As soon as the CEN bit
is written to 1, the prescaler is clocked by the internal clock CK_INT.
Figure 68
without prescaler.

Figure 68. Control circuit in normal mode, internal clock divided by 1

External clock source mode 1
This mode is selected when SMS=111 in the TIMx_SMCR register. The counter can count
at each rising or falling edge on a selected input.
Figure 69. TI2 external clock connection example
220/690
shows the behavior of the control circuit and the upcounter in normal mode,
Internal clock
CEN=CNT_EN
CNT_INIT
Counter clock = CK_CNT = CK_PSC
Counter register
TI2F_Rising
Edge
TI2
Filter
Detector
TI2F_Falling
ICF[3:0]
TIMx_CCMR1
UG
31
32 33 34 35 36
TIMx_SMCR
TS[2:0]
TI2F
or
TI1F
ITRx
0xx
TI1_ED
100
TRGI
TI1FP1
101
0
TI2FP2
110
1
ETRF
111
CC2P
CK_INT
TIMx_CCER
(internal clock)
for more details.
00
01 02 03 04 05 06 07
or
or
encoder
mode
external clock
mode 1
CK_PSC
ETRF
external clock
mode 2
internal clock
mode
ECE
SMS[2:0]
TIMx_SMCR
RM0008
Section :

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

This manual is also suitable for:

Stm32f101 seriesStm32f103 series

Table of Contents