janelia-arduino / TMC2130

Trinamic TMC2130 bipolar stepper motor driver Arduino library with Step/Dir Interface and SPI.
Other
6 stars 6 forks source link

Teensy 4.1 SPI pins #1

Closed Mark-FS closed 2 years ago

Mark-FS commented 2 years ago

I have connected up a TMC2130 to a Teensy 4.1 and I get "SPI not communicating with stepper driver".

I have the following connections on the Teensy:

Pin 11 (MOSI) is to SDI Pin 12 (MISO) is to SDO Pin 13 (CLK) is to SCK Pin 14 (CS) is to CSN

I have also tried Pin 10 to CSN (const int CHIP_SELECT_PIN = 10;) but this made no difference.

Should this library work with a Teensy? Can I manually define the MOSI, MISO and CLK pins?

I do not have a motor or a VM connected but I do not believe this is needed to test comms.

Thanks.

peterpolidoro commented 2 years ago

I have used this library many times with both a Teensy 3.2 and a Teensy 3.5.

I have not yet tried it with a Teensy 4, but I cannot think of any reason why it would not work.

VM may be necessary for it to communicate properly, I have never tried talking to it without that connected.

Here are some example circuit boards that I designed and use with the Teensy 3.2 and a TMC2130 SilentStepStick board:

stepper_controller_3x2

Mark-FS commented 2 years ago

Problem solved, VM is required for comms.

Thank you.