tommag / TMC5160_Arduino

Arduino library for Trinamic TMC5160 stepper motor driver
MIT License
66 stars 24 forks source link

Using wrong default SPI mode #16

Closed DeanIsMe closed 1 year ago

DeanIsMe commented 1 year ago

This library uses SPI_MODE_0 by default, but Trinamic SPI interfaces use SPI_MODE_3.

I'm amazed that this library works so well when using the wrong SPI clock polarity and phase.

tommag commented 1 year ago

Thanks, looks like you're correct ! I've never really used SPI but mostly the UART connection and I think this code comes from the TMC5130 lib I forked in the beginning, maybe it explains why I've missed it all this time :) Would you mind submitting a PR ? Thanks

DeanIsMe commented 1 year ago

Done! See PR #20