Universal timer Tim for stm32

Source: Internet
Author: User

The stm32 series CPU has up to 8 timers;

1. Among them, tmi1 and tim8 are advanced timers that can generate three pairs of PWM complementary outputs, which are commonly used in the drive of Three-Phase Motors. Their clock is generated by apb2 output;

2. The other six are common timers, and the clock is generated by the apb1 output;

Timer function:

1. Timing function 2. Counting Function 3. Input capture 4. Matching output 5. PWM pulse wave output

Overview:

A universal timer is a 16-bit automatic loading counter driven by a programmable predivider. It is suitable for various scenarios, including measuring the pulse length of an input signal (input collection) or generating an output waveform (output comparison and pwm ).

The timer is completely independent and does not share any resources with each other. They can be synchronized together;

Note: As long as the default database configuration method is used to configure the clock to 72 m, whether tim1 or timx, their counting frequency is 72 m;

Main features

Common timx timer features include:
?? The counter is automatically loaded up, down, and up/down in 16 bits.
?? 16-bit programmable pre-divider. The frequency division coefficient of the counter clock frequency is 1 ~ Any value between 65535
?? Four independent channels:
-Input capture
-Output comparison
-PWM generation (edge or intermediate alignment Mode)
-Single pulse mode output
?? Use an external signal to control the Synchronization Circuit of the timer and the timer.
?? The following events may interrupt/DMA:
-Update: the counter overflows up/down, and the counter is initialized (triggered by software or internal/external)
-Trigger event (counter start, stop, initialization, or internal/external trigger count)
-Input capture
-Output comparison

// To be continued .....

Universal timer Tim for stm32

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.