Question about TMC2130 in HW SPI mode
Hello guys!
I'm currently merging my printer from Marlin to Klipper and I have a question about the TMC2130 drivers.
I connected 5+3 cables to the board:
- SDO (shared between all drivers)
- SDI (also shared)
- SCK (also shared)
- X CS
- Y CS
- Z CS
- E0 CS
- E1 CS (used as Z2)
The problem is that I don't find any pin configuration options in Klipper for the SDO/SDI/SCK pins.
Can you please explain it why? Are these not needed anymore or they have a default value?
Thanks!
I use an Arduino 2560 + RAMPS 1.4 and the SPI pins are hardwired. I think you can't reassign them.
Oh okey, I just checked the source code and I see them they use the same pins as Marlin, so they will work the same without rewiring them to another ones.
I just missed this from the documentation.
Thanks :)
You can reassign them. Check the "examples-extras.cfg" file. Search TMC2130 and a couple sections down from that check the LCD display example on the call out. The LCD shares all the same SPI pins but for each motors cs pin.
If I'm reading this correctly, you can only set the spi-clock pin on SPI, not the MOSI or MISO. Can you confirm?
The MOSI, MISO, and SCK pins are determined by the hardware (and thus can not be changed). The chip select line can be chosen freely.
-Kevin
Maybe by assigning SPI pins they mean the software SPI - using that you could assign the MOSI, MISO and CLK pins. Although I don't know why would one want to use the slow software SPI where you have the hardware one available.