STM32 Timer Input Capture: PWM Frequency and Duty Cycle Measurement

Added:

Timer Intro
Driver Demo
Capture Basics
Mode Overview
Mode Difference

Timer Intro

0:00
Playing Section
  • 1

    Plans to focus on STM32 timer peripheral development.

  • 2

    Aims to demonstrate input capture mode for signal analysis.

  • 3

    Mentions using a 10 kHz square wave for testing.

Basic understanding of STM32 MCU architecture and register-level (bare-metal) C programming.
Fundamentals of hardware timers, including prescalers, auto-reload registers (ARR), and counter directions.
Core concepts of Pulse Width Modulation (PWM), including frequency, period, active-high/active-low polarities, and duty cycle.
Familiarity with microcontroller interrupt handling and writing basic Interrupt Service Routines (ISRs).
Implementing Direct Memory Access (DMA) with input capture to measure high-frequency signals without CPU overhead.
Utilizing STM32 Timer Encoder Mode to interface with rotary encoders for velocity and position tracking.
Decoding complex sensor protocols (such as DHT11/DHT22 temperature sensors or infrared remote controls) using input capture pulse width analysis.
Mastering advanced timer synchronization techniques, including master/slave modes and triggering external peripherals.
1.3K views19likes10:48@GettobyteOriginal Release: 2022-05-27

The STM32 timer peripheral input capture mode captures external signals by storing the counter value at the capture register when an edge detector detects a transition (rising or falling edge), while PWM input mode captures both rising and falling edges using two capture registers to calculate frequency, duty cycle, and time period of square wave signals.