29.01.2015 Views

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

RM0008<br />

Advanced-control timers (TIM1&TIM8)<br />

13 Advanced-control timers (TIM1&TIM8)<br />

Low-density devices are <strong>STM32F101xx</strong>, <strong>STM32F102xx</strong> <strong>and</strong> <strong>STM32F103xx</strong><br />

microcontrollers where the Flash memory density ranges between 16 <strong>and</strong> 32 Kbytes.<br />

Medium-density devices are <strong>STM32F101xx</strong>, <strong>STM32F102xx</strong> <strong>and</strong> <strong>STM32F103xx</strong><br />

microcontrollers where the Flash memory density ranges between 64 <strong>and</strong> 128 Kbytes.<br />

High-density devices are <strong>STM32F101xx</strong> <strong>and</strong> <strong>STM32F103xx</strong> microcontrollers where the<br />

Flash memory density ranges between 256 <strong>and</strong> 512 Kbytes.<br />

Connectivity line devices are <strong>STM32F105xx</strong> <strong>and</strong> STM32F107xx microcontrollers.<br />

Low- <strong>and</strong> medium-density <strong>STM32F103xx</strong> devices, <strong>and</strong> the <strong>STM32F105xx</strong>/STM32F107xx<br />

connectivity line devices, contain one advanced-control timer (TIM1) whereas high-density<br />

<strong>STM32F103xx</strong> devices feature two advance-control timers (TIM1 <strong>and</strong> TIM8).<br />

13.1 TIM1&TIM8 introduction<br />

The advanced-control timers (TIM1&TIM8) consist of a 16-bit auto-reload counter driven by<br />

a programmable prescaler.<br />

It may be used for a variety of purposes, including measuring the pulse lengths of input<br />

signals (input capture) or generating output waveforms (output compare, PWM,<br />

complementary PWM with dead-time insertion).<br />

Pulse lengths <strong>and</strong> waveform periods can be modulated from a few microseconds to several<br />

milliseconds using the timer prescaler <strong>and</strong> the RCC clock controller prescalers.<br />

The advanced-control (TIM1&TIM8) <strong>and</strong> general-purpose (TIMx) timers are completely<br />

independent, <strong>and</strong> do not share any resources. They can be synchronized together as<br />

described in Section 13.3.20.<br />

13.2 TIM1&TIM8 main features<br />

TIM1&TIM8 timer features include:<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

16-bit up, down, up/down auto-reload counter.<br />

16-bit programmable prescaler allowing dividing (also “on the fly”) the counter clock<br />

frequency either by any factor between 1 <strong>and</strong> 65535.<br />

Up to 4 independent channels for:<br />

– Input Capture<br />

– Output Compare<br />

– PWM generation (Edge <strong>and</strong> Center-aligned Mode)<br />

– One-pulse mode output<br />

Complementary outputs with programmable dead-time<br />

Synchronization circuit to control the timer with external signals <strong>and</strong> to interconnect<br />

several timers together.<br />

Repetition counter to update the timer registers only after a given number of cycles of<br />

the counter.<br />

Break input to put the timer’s output signals in reset state or in a known state.<br />

Doc ID 13902 Rev 9 253/995

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

Saved successfully!

Ooh no, something went wrong!