STM32Timer + basic timer

1. Basic overview of timers 1. Principle of software timer It turns out that when we use the 51 microcontroller, we use a __nop()__ to delay The delay function we use through software is inaccurate and subject to many uncertain factors. 2. Timer principle: ratio between counts Because the use of software delay is affected, […]

FreeRTOS_Software timer (Timer)

Directory title 1. Software timer characteristics 2. Guarding tasks 3. Software timer API 3.1. Create software timer 3.2. Callback function 3.3. Delete timer 3.4. Start/stop timer 3.5. Modify the timer period 3.6. Reset timer (Reset) 3.7. Timer ID 1. Software timer features Using a timer requires configuring timer period, callback function, and type (one-time, automatic […]

[Java] Timing tasks – Timer/TimerTask source code principle analysis

1. Background and usage When implementing various server-side systems on a daily basis, we will definitely have the need for some scheduled tasks. For example, automatic reminders for meetings half an hour in advance, scheduled/periodic execution of asynchronous tasks, etc. So how to implement such a scheduled task system? The Timer class provided by Java […]

Homework for Weeks 8~9 – Timer & PWM Application Programming

1. Introduction to STM32 timing function The timer function of STM32 is a powerful tool that can be used to implement timing operation and control in embedded systems. STM32 microcontrollers typically have multiple timers, each with multiple different configurations and functions. The following is some basic introduction to STM32 timer functions: Timer types: STM32 microcontrollers […]

STM32 timer & PWM application programming

Preface Preface to the experiment: This experiment aims to gain an in-depth understanding of the working principle of the STM32 timer and master the method of using the timer to generate pulse width modulation (PWM) signals. The STM32 timer is a very important peripheral that can be used to implement functions such as timing, counting, […]

Based on stm32f103c8t6, HAL library timer control light on and off &&PWM to realize breathing light

1. Basic knowledge of timers Timer classification 1. Basic timer The basic timer is a simple timer that is usually used to generate precise time delays. It has a single 16-bit counter that can achieve different counting speeds by setting the prescaler coefficient. Basic timers are usually used for simple scheduled tasks. 2. Universal timer […]

STM32 timer application

STM32 timer application 1. Principle of timer Timer of STM32F103 series: Timer functions: timing, input comparison, output capture, complementary output; Timer classification: basic timer, general timer, advanced timer; Timer resources: advanced timers (2 pcs) TIM1 and TIM8; general timers (4 pcs) TIM2/3/4/5; basic timers (2 pcs) TIM6 and TIM7; Basic timer classification: 5. Timer structure […]

Homework for Weeks 8-9–Timer & PWM Application Programming

1. The timer serial port lights up the LED light regularly Create a project using HAL library Open STM32CubeMX and click on the main interface: ACCESS TO MCU SELECTOR: Select the microcontroller model and click to start the project (this article uses STM32103C8T6) Configure RCC Configure SYS Configure IO port output Here, PA0 is selected […]

High-quality 51 microcontroller timer/counter explanation

Understand the timer/counter of 51 microcontroller in one article Foreword: Timer/Counter 1. Goals: 2. 51 microcontroller timer/counter 2.1. The essence of timer/counter 2.2. 51-core microcontroller fixed/counter design ideas 2.3 Working principle (compare the following text with the picture above to understand) Foreword: Most of the explanations about timers on the Internet start with an introduction […]

Homework for Weeks 8-9–Timer & PWM Application Programming

Experimental tasks: Have an in-depth understanding of the STM32 timer principle and master the pulse width modulation pwm generation method. 1. Use Tim2~Tim5 of STM32F103 to connect a certain channel pin of the timer (multiplexed with the GPIOx pin, see the figure below), and use the timer counting mode to control the LED to light […]