ESP32-S3 RMT-based PWM sweep causes glitches; not as seamless as Timer1 on Arduino Uno #11529
Murugesh-Hobbyist
started this conversation in
General
Replies: 1 comment 2 replies
-
first to point out that you are using ESP-IDF APIs and not Arduino. Also you destroy the RMT channel on each change, instead of just modifying it. Last but not least, we have LEDC for PWM generation. While it's possible with RMT, LEDC is geared more towards PWM |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Board
ESP32-S3
Device Description
ESP32-S3 module on custom board. Only one GPIO (GPIO10) is used for PWM output via RMT.
Hardware Configuration
Only GPIO10 is used as output to measure PWM via oscilloscope. No other components attached.
Version
latest stable Release (if not listed below)
IDE Name
Arduino IDE
Operating System
Windows 11
Flash frequency
80 MHz
PSRAM enabled
no
Upload speed
921600
Description
When sweeping PWM frequency and Ton dynamically using RMT on ESP32-S3, the output is not smooth. There's a noticeable glitch or "bang" at each frequency step. The same logic works perfectly and seamlessly on Arduino Uno using Timer1 hardware PWM with Phase Correct mode.
Expected: clean frequency and Ton sweep with no break in output
Observed: visible discontinuity or glitch at each step due to teardown/reinit of RMT channel
Sketch
Debug Message
Other Steps to Reproduce
Output is connected to oscilloscope
Observe the waveform during frequency sweep
Clear gaps and interruptions are visible in ESP32-S3 output
Arduino Uno waveform is smooth and uninterrupted
I have checked existing issues, online documentation and the Troubleshooting Guide
Beta Was this translation helpful? Give feedback.
All reactions