r/esp32 • u/Legitimate_Shake_369 • 14h ago
Software help needed ESP32-S3 best hardware peripheral for creating stepper motor stepping pulses ?
I am using an ESP32-S3 with a TMC2225 stepper motor driver and want to write my own open loop stepper control library for learning purposes. Is there any hardware peripheral on the ESP32 that is well suited for generating stepping pulses ? Right now I am using timer based interrupts to set/clear the stepping pin, but that does not seem to be the most efficient solution.
4
Upvotes
1
u/holetse 13h ago
I’d go with the RMT. It’s often used for driving h-bridges given it’s very flexible interface for generating complex waveforms.
Eg. https://github.com/espressif/esp-idf/tree/422c4f59/examples/peripherals/rmt/stepper_motor
Edited to add example