29.01.2015 Views

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

RM0008<br />

General-purpose timer (TIMx)<br />

Figure 118. Counter timing diagram, Update event with ARPE=1 (counter overflow)<br />

CK_INT<br />

CNT_EN<br />

Timer clock = CK_CNT<br />

Counter register<br />

F7<br />

F8 F9 FA FB FC 36 35 34 33 32 31 30 2F<br />

Counter overflow<br />

Update event (UEV)<br />

Update interrupt flag (UIF)<br />

Auto-reload preload register FD 36<br />

Write a new value in TIMx_ARR<br />

Auto-reload active register FD 36<br />

14.3.3 Clock selection<br />

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

●<br />

●<br />

●<br />

●<br />

Internal clock (CK_INT)<br />

External clock mode1: external input pin (TIx)<br />

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

Internal trigger inputs (ITRx) : using one timer as prescaler for another timer, for<br />

example, you can configure Timer 1 to act as a prescaler for Timer 2. Refer to : Using<br />

one timer as prescaler for the another on page 350 for more details.<br />

Internal clock source (CK_INT)<br />

If the slave mode controller is disabled (SMS=000 in the TIMx_SMCR register), then the<br />

CEN, DIR (in the TIMx_CR1 register) <strong>and</strong> UG bits (in the TIMx_EGR register) are actual<br />

control bits <strong>and</strong> can be changed only by software (except UG which remains cleared<br />

automatically). As soon as the CEN bit is written to 1, the prescaler is clocked by the internal<br />

clock CK_INT.<br />

Figure 119 shows the behavior of the control circuit <strong>and</strong> the upcounter in normal mode,<br />

without prescaler.<br />

Doc ID 13902 Rev 9 331/995

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

Saved successfully!

Ooh no, something went wrong!