u/Ashamed_Piccolo_9846

Smoothing out a PWM-driven passive buzzer (Rust / STM32) without external hardware?

Hi everyone, I'm doing some embedded development in Rust on an STM32 (for the first time ever and I'm not very good at it) and I'm using a passive buzzer for audio output via PWM. I want to change it out for a better module, but I am currently having some trouble sourcing components... so because it's a raw square wave, the sound is very sharp and robotic. Is there a way to round off the sound or make it more pleasant purely through software adjustments (like timer manipulation or duty cycle modulation)? Thanks!

reddit.com
u/Ashamed_Piccolo_9846 — 6 days ago