bigtreetech / BIGTREETECH-SKR-V1.3

32bit board with LPC1768, support marlin2.0 and smoothieware, support lcd2004/12864, On-board TMC2130 SPI interface and TMC2208 UART interface no additional wiring is required
999 stars 1.15k forks source link

SKRV1.3 TMC5160 ALL LOW #514

Open tca72 opened 3 years ago

tca72 commented 3 years ago

Hello

I configure from the BTT SKRV1.3 a single X stepper motor with TMC5160.

So I applied the fix I found in TMC_plaforms.h : Fix support for BIGTECHTREE SKR 1.3 board teemuatlut/TMCStepper#63

elif defined(TARGET_LPC1768)

//typedef volatile LPC_GPIO_TypeDef fastio_reg; //typedef uint32_t fastio_bm; / ERROR TMC51650 detected as ALL LOW

define writeMOSI_H LPC176x::gpio_set(mosi_pin)

define writeMOSI_L LPC176x::gpio_clear(mosi_pin)

define writeSCK_H LPC176x::delay_ns(240); LPC176x::gpio_set(sck_pin)

define writeSCK_L LPC176x::delay_ns(240); LPC176x::gpio_clear(sck_pin)

define readMISO LPC176x::gpio_get(miso_pin)

*/

define writeMOSI_H digitalWrite(mosi_pin, HIGH)

define writeMOSI_L digitalWrite(mosi_pin, LOW)

define writeSCK_H digitalWrite(sck_pin, HIGH)

define writeSCK_L digitalWrite(sck_pin, LOW)

define readMISO digitalRead(miso_pin)

When powered to USB : no change When powered to external power : TMC driver is seen as OK, but it is impossible to move the stepper motor.

TMC5160 SKRV1.3 ALL LOW.zip