teemuatlut / TMC2130Stepper

Arduino library for Trinamic TMC2130 Stepper driver
MIT License
159 stars 50 forks source link

Calibrate_spreadCycle - DRV_STATUS() returning 0xFFFFFF #93

Closed changedsoul closed 4 years ago

changedsoul commented 4 years ago

Can someone help me figure out why DRV_STATUS is always returning FFFFFF? The code says to check loose connections, but nothing is loose. Its failing on the "Testing Connection" section. I looked at the source for driver.test_connection, and its getting its response from "DRV_STATUS()" and I dont know where that is. Is there another reason it would be returning FFFFFF? Thanks.

EDIT: Well it seems maybe it is a wiring issue. It looks lie this is using SPI but I dont see where to configure the SPI pins?

include

define EN_PIN 3 // Nano v3: 16 Mega: 38 //enable (CFG6)

define DIR_PIN 4 // 19 55 //direction

define STEP_PIN 5 // 18 54 //step

define CS_PIN 6 // 17 64 //chip select

define STEP_PORT PORTD // Register to match with STEP_PIN

define STEP_BIT 4 // Bit in register to match STEP_PIN

Perhaps this is my issue. I am using an ATMega 328. How can I find the pin assignment for the SPI wires?

changedsoul commented 4 years ago

Sorry for my lack fo patience and troubleshooting. I didn't know the SPI pins were a specific pin on the arduinos. I found the info here: https://www.arduino.cc/en/Main/arduinoBoardDuemilanove for anyone else who got stuck on this.