Open deladriere opened 3 years ago
Hi,
Your problem is that you are using Pins 0 and 1, for MOSI and for SCK. And those pin are used for serial communication (Which you are using to print out the messages).
Cheers,
Enrique.
Thanks Enrique On the SAMD21 Pins 0 & 1 are not used with the Serial I found the problem 1) pins must be declared by : (at first I thought your library would do it for us)
pinMode(SW_MOSI, OUTPUT);
pinMode(SW_MISO, INPUT_PULLUP);
pinMode(SW_SCK, OUTPUT);
2) my mistake : declaring the pins after the driver.begin() doesn't work
Hardware SPI works fine using :
TMC2660Stepper driver = TMC2660Stepper(CS_PIN, R_SENSE);
using :TMC2660Stepper driver = TMC2660Stepper(CS_PIN, R_SENSE, SW_MOSI, SW_MISO, SW_SCK);
doesn't workSerial.println(driver.DRV_STATUS(), BIN);
reports 11111111110011111111 when the main power is off reports .... 10100001010000000000 10100001100000000000 10100001110000000000 10100010000000000000 10100010010000000000 10100010100000000000when power is ON
What am I doing wrong? Thanks!
here is my code