From d512456506b7cbebcd37181285f39a71355aa5b1 Mon Sep 17 00:00:00 2001 From: Robert Pelnar Date: Fri, 7 Jul 2017 07:33:38 +0200 Subject: [PATCH 1/2] SWSPI - different pinmapping for EINY03a and EINY04a. --- Firmware/swspi.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Firmware/swspi.h b/Firmware/swspi.h index 772c20c4..551d2283 100755 --- a/Firmware/swspi.h +++ b/Firmware/swspi.h @@ -14,10 +14,18 @@ #endif //SWSPI_RPI #ifdef SWSPI_AVR -#define SWSPI_MISO 16 -#define SWSPI_MOSI 16 -#define SWSPI_SCK 17 -#define SWSPI_CS 20 +#if (MOTHERBOARD == BOARD_EINY_0_3a) +#define SWSPI_MISO 16 //RX2 +#define SWSPI_MOSI 16 //RX2 +#define SWSPI_SCK 17 //TX2 +#define SWSPI_CS 20 //SDA +#endif //(MOTHERBOARD == BOARD_EINY_0_3a) +#if (MOTHERBOARD == BOARD_EINY_0_4a) +#define SWSPI_MISO 62 //PK0 +#define SWSPI_MOSI 62 //PK0 +#define SWSPI_SCK 21 //SCL +#define SWSPI_CS 20 //SDA +#endif //(MOTHERBOARD == BOARD_EINY_0_4a) #endif //SWSPI_AVR #define SWSPI_POL 1 //polarity From 21974ae07a60758ad019f25f15df2f95c6eb6b5e Mon Sep 17 00:00:00 2001 From: Robert Pelnar Date: Fri, 7 Jul 2017 07:45:36 +0200 Subject: [PATCH 2/2] SG homing - fixed bug - set sg_homing_delay to zero before move. --- Firmware/Marlin_main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 1046dbf9..5756e1b8 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -2005,6 +2005,7 @@ void homeaxis(int axis) { plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder); #ifdef HAVE_TMC2130_DRIVERS + sg_homing_delay = 0; tmc2130_axis_stalled[axis] = false; #endif st_synchronize(); @@ -2015,6 +2016,7 @@ void homeaxis(int axis) { plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder); #ifdef HAVE_TMC2130_DRIVERS + sg_homing_delay = 0; tmc2130_axis_stalled[axis] = false; #endif st_synchronize(); @@ -2029,6 +2031,7 @@ void homeaxis(int axis) { plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder); #ifdef HAVE_TMC2130_DRIVERS + sg_homing_delay = 0; tmc2130_axis_stalled[axis] = false; #endif st_synchronize();