teemuatlut / TMCStepper

MIT License
479 stars 188 forks source link

TMC5160 won't rotate stepper via SPI #273

Closed n4bft closed 1 year ago

n4bft commented 1 year ago

I'm using a TMC5160 SilentStepStick v1.5 with an Ardunio Nano Every. I've enabled the internal motion controller by breaking the SD_MODE jumper. SPI_MODE is attached to VCC still. Here's the v1.5 scematics - https://github.com/watterott/SilentStepStick/blob/master/hardware/SilentStepStick-TMC5160_v15.pdf

I'm using the example code from here: https://github.com/teemuatlut/TMCStepper/issues/225#issuecomment-992633347 with the release_v1 branch as instructed, the CS pin is obviously correct since it's able to communicate with the driver... so, im relatively stumped.

The output I get is this on the Serial line. However, it's not rotating the motor. The motor is holding in place (so it's active). I have enabled the motion controller on the 5160.

My desire is to control this entirely via SPI which I should be able to do...

(I added the xtarget output)

Compiled May 27 2023 19:09:16
Start...
Driver firmware version: 48
ioin=0          xactual=  12288 xtarget=      0
ioin=0          xactual=  12288 xtarget=      0
ioin=0          xactual=  12288 xtarget=      0
ioin=0          xactual=  12288 xtarget=      0
ioin=0          xactual=  12288 xtarget=      0
ioin=0          xactual=  12288 xtarget=      0
n4bft commented 1 year ago

Oops. Would help if i was resetting the chip between initializations, apparently resetting via SPI doesn't clear everything.