STM32 Timer Application Notes

Publisher:cxd88988Latest update time:2017-02-19 Source: eefocusKeywords:STM32 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

As we all know, the timer functions of STM32 are very large and complex, and their applications are also very common. Currently, the STM32 family has 10 product lines, all of which have multiple built-in timer peripherals. Although the timers of each STM32 series may differ slightly in number and characteristics, they still have some common features and the same operating mode as a whole.

 

ST has an official application note for STM32 general-purpose timers, numbered AN4776, which is quite detailed and rich in content. This note mainly describes the basic characteristics, operation modes and related applications of STM32 general-purpose timers in detail and clearly. It not only explains the basic concepts in detail, but also introduces the principles of related practical applications, and also comes with reference engineering codes for related applications. This note is worth reading.

 

Here is a brief introduction to the basic content framework of the AN4776 application note.

This note is mainly divided into two parts. The first part mainly describes and explains the basic composition and characteristics of the STM32 timer. The second part specifically describes some specific applications of the STM32 timer, including the introduction of the basic working principle and related application code.

 

The first part includes the following contents:

1.1 Basic components of STM32 timer

Master-slave control unit

Time base unit

Timer channel unit

Brake unit

1.2 Basic working mode of STM32 timer

Timer basic function configuration

Channel configuration for input mode

Channel configuration for output mode

1.3 STM32 timer clock and timing

Synchronous function module

External clock source mode 1

External clock source mode 2

Comparison between external clock source mode 1 and mode 2

 

The second part of the specific application introduction includes the following contents:

2.1 Use single pulse mode to achieve the output of a specified number of pulses

twenty one
2.2 Using brake input to achieve cycle-by-cycle adjustment function

twenty two

2.3 Using the timer's DMA burst transfer to output arbitrary waveforms

twenty three
 

2.4 Using the synchronization characteristics of the timer to periodically output a specified number of pulses

twenty four

For more details about the above content, click "Read original text" in the lower left corner to download AN4776 and read it. For reference firmware code of related applications, you can go to www.st.com/stm32 and search for the keyword X-CUBE-TIMCOOKER to download it. The basic project directory is as follows:

25


Keywords:STM32 Reference address:STM32 Timer Application Notes

Previous article:stm32 notes: light up an LED (simplified version)
Next article:Several common problems based on STM32Cube USB device library application

Recommended ReadingLatest update time:2024-11-16 13:33

STM32 key control
 1 /*  2: Button control  3 PA8 connects to LED, PE2 connects to button  4 */  5 #include"stm32f10x.h"  6 void RCC_Configuration(void);  7 void GPIO_Config(void);  8 void Delay(__IO uint32_t nCount);  9  10 int main() 11 { 12 RCC_Configuration(); //System clock configuration | Enable GPIO port 13 GPIO_Config(); //LED
[Microcontroller]
STM32 learning: the three main parts of STM32F4XX
Three major modules: power supply, IO port and clock. 1. First, let's take a look at the power supply. Here is the power supply block diagram From the above we can see that the power supply provides power to three key parts inside. The first is to power the ADC, which needs no further explanation. The second is the ba
[Microcontroller]
STM32 medical rehabilitation robot arm control system
Abstract: Medical rehabilitation robot is a new type of robot that has appeared in recent years. Its main function is to help patients complete various motor function recovery training. To this end, it is proposed to control the operation of the robot arm by controlling the brushless DC motor through the STM32 micro
[Medical Electronics]
STM32 medical rehabilitation robot arm control system
STM32 Series Part 8 - Serial Port Configuration Steps
//Initialize serial port 1 void My_USART1_Init(void) { GPIO_InitTypeDef GPIO_InitStrue; USART_InitTypeDef USART_InitStrue; NVIC_InitTypeDef NVIC_InitStrue; //Serial port clock enable, GPIO clock enable RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA,ENABLE); RCC_APB2PeriphClockCmd(RCC_APB2Periph_USART1,ENABLE); //GPIO por
[Microcontroller]
STM32 study notes 5: general timer PWM output
1. Basic concepts of TIMER output PWM   Pulse Width Modulation (PWM), short for "Pulse Width Modulation", is a very effective technology that uses the digital output of a microprocessor to control analog circuits. To put it simply, it is the control of pulse width. It is generally used to control the speed of a ste
[Microcontroller]
STM32 interrupt priority setting
The STM32 manual does not mention the setting of interrupt priority, but only lists the interrupt vector table. Based on the vector table, an enumeration data of the interrupt number can be created to facilitate the use of setting priority and enabling. Let me first talk about how to set priorities. The priority s
[Microcontroller]
STM32 interrupt priority setting
STM32 - Hardware IIC slave communication
Preface:   According to the information on the Internet, most netizens said that there is a bug in the hardware IIC of STM32, which is easy to get stuck when reading and writing. I also got stuck when debugging, but I finally debugged it bit by bit and it worked. This article will record some of my experience in debug
[Microcontroller]
STM32 - Hardware IIC slave communication
STM32 functional pin remapping and multiplexing functions
Stm32 pin general application: ANALOGINPUT_AIN -- Apply ADC analog input, or save power in low power mode. Floating input_IN_FLOATING——Can be used for KEY recognition, RX1 Open drain output_Out_OD——applied to I2C bus; (STM32 open drain output can only output 0 if no external pull-up resistor is connected) Many
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号