Skip to content
0:00 / 0:00

#stm32#pwm#timers

STM32 Guide #3: PWM + Timers

Mitch Davis

53K subscribers • 7 videos on Hallway

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • Presented by Mitch Davis

Beginner. No background in the topic needed.

219K views5 years ago2 recommendations

Systems programmingHardwareEmbedded systems

Mitch Davis explains the fundamentals of PWM, duty cycles, and timers, demonstrating how to implement them on STM32.

This video covers the basics of PWM, and how to implement it with STM32. STM32 gives you a bit more control than Arduino, but all these extra parameters might be a bit overwhelming at first. This video describes Duty Cycle, Resolution, Frequency, and other things that will help you get started with PWM. Part 2 will be released eventually. Review Essential Functionality for Microcontrollers Analog Write (Arduino) PWM vs DAC PWM Duty Cycle Counters (Timers) PWM Resolution Review + Math Problem Blue Pill PWM implementation Cat

Why it's here

2 people recommend this

What people say. Recommended for understanding PWM duty cycles, frequencies, and resolutions on STM32 microcontrollers.

u/ProfessionalDig8060in r/embedded • Recommends

On “PWM signal with different frequencies”

Like others have said, PWM frequency is determined by the ARR value. All the channels (I believe this is what you mean by port) of a timer share a common ARR. Each channel has a unique CCR which let's you change their duty cycles but PWM frequency will be the same. Use different timers. I suggest you watch this video to understand the terms PWM duty cycle, PWM frequency, PWM resolution etc. It will help you select the ARR, CCR, PSC values for your application. In addition, this book by Dr. Yifeng Zhu will help you get comfortable with the registers involved. You'll be able to read datasheets far easier than before. He's used STM32 as an example but it'll all work out as the registers ar…

u/hobbesdccin r/embedded • Recommends

On “Made the jump! Looking forward to improving!”

This might be **close** to what you want, the "part 4" vid here shows a bit of doing PWM on bare metal, but not a ton, but he walks you through how to figure it out a little. (ps I'm not an expert, just learned this yesterday) link to this video (part 3) link to this video (part 4)