Allow for UART mode exclusively on TMC2209. pass -1 to STEP and DIR #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm using your driver with my TMC2209 chip. Works perfectly by the way! However, I'm using exclusively UART mode. As a result, I do not need the STEP or DIR pins connected, nor defined. the ESP-IDF library, does not allow for "invalid" pins to be defined when setting up the pads. Instead of picking unused, but valid pins on my esp32, I modifed your driver to allow for -1 STEP and DIR pins.
Use this code however you see fit. Merge it into your branch? Or, do it your own way. It's all good.
P.S. the 2209 has a few extra features compared to the 2208. One of which is the "stall" output pin (diag). Another is
Stallguard
andCoolstep
. Both features I'd like to use in my project. Time permitting, I might see if I can add the functionality to your TMC2208 code, extended with a 2209 driver variant. Alas, working with the TMC UART is pretty new to me.Cheers