01.06.2014 Views

STM32W108C8

STM32W108C8

STM32W108C8

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>STM32W108C8</strong><br />

General-purpose timers<br />

10.1.3 Clock selection<br />

The counter clock can be provided by the following clock sources:<br />

●<br />

●<br />

●<br />

●<br />

Internal clock (PCLK)<br />

External clock mode 1: external input pin (TIy)<br />

External clock mode 2: external trigger input (ETR)<br />

Internal trigger input (ITR0): using the other timer as prescaler. Refer to the Using one<br />

timer as prescaler for the other timer for more details.<br />

Internal clock source (CK_INT)<br />

The internal clock is selected when the slave mode controller is disabled (TIM_SMS = 000 in<br />

the TIMx_SMCR register). In this mode, the TIM_CEN, TIM_DIR (in the TIMx_CR1<br />

register), and TIM_UG bits (in the TIMx_EGR register) are actual control bits and can be<br />

changed only by software, except for TIM_UG, which remains cleared automatically. As<br />

soon as the TIM_CEN bit is written to 1, the prescaler is clocked by the internal clock<br />

CK_INT.<br />

Figure 24 shows the behavior of the control circuit and the up-counter in normal mode,<br />

without prescaling.<br />

Figure 24. Control circuit in Normal mode, internal clock divided by 1<br />

External clock source mode 1<br />

This mode is selected when TIM_SMS = 111 in the TIMx_SMCR register. The counter can<br />

count at each rising or falling edge on a selected input.<br />

Doc ID 018587 Rev 2 118/215

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!