Using PWM to step a stepper driver #16
Description
Thank you for making your RP2040_PWM library available. It was super easy to use. Yesterday I tried using it to drive a single stepper motor with it using a STEP/DIR style stepper driver. A TMC2209 in my case. It worked perfectly at first try.
I discussed the details with the author of arduinocontinuousstepper to hear his take on it and he thinks it has merit.
However, looking ahead there might be an issue when multiple motors are used. From what I understand from your RP2040_PWM project is that we can have 8 independent PWM frequencies but will they all run in sync.
So my question is: Are all these frequencies derived from a common clock or is there a way to achieve synchronization between PWM channels?
[edit]
Since I posted this I came across a video explaining the pico pwm in laymans terms. From it I understand that each PWM channel is basically a hardware based counter counting pulses from a common125MHz clock using their own setpoint and wrappoint. That confirms to me that yes there is a common clock and my motors will be perfectly in sync.
But please correct me if I am wrong :-)