From cae2b7bf4e9995f26e919a6a1534c0bd3473a717 Mon Sep 17 00:00:00 2001 From: Alexander Amelkin Date: Wed, 15 Apr 2020 03:03:59 +0300 Subject: [PATCH] SKR Pro V1.1 StallGuard pins (#17550) Co-authored-by: Scott Lahteine --- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h | 12 ++--- .../src/pins/stm32f4/pins_BTT_SKR_PRO_V1_1.h | 52 ++++++++++++++++--- 2 files changed, 50 insertions(+), 14 deletions(-) diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h index c4226001e6..94d90c30d1 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h @@ -31,18 +31,18 @@ //#define SDCARD_EEPROM_EMULATION #endif -/** - * Trinamic Stallguard pins - */ +// +// Trinamic Stallguard pins +// #define X_DIAG_PIN P1_29 // X- #define Y_DIAG_PIN P1_27 // Y- #define Z_DIAG_PIN P1_25 // Z- #define E0_DIAG_PIN P1_28 // X+ #define E1_DIAG_PIN P1_26 // Y+ -/** - * Limit Switches - */ +// +// Limit Switches +// #if X_STALL_SENSITIVITY #define X_STOP_PIN X_DIAG_PIN #if X_HOME_DIR < 0 diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_V1_1.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_V1_1.h index 4dbdf0e77f..2755771030 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_V1_1.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_V1_1.h @@ -39,17 +39,53 @@ #define SERVO0_PIN PA1 // -// Limit Switches +// Trinamic Stallguard pins // -#define X_MIN_PIN PB10 -#define X_MAX_PIN PE15 -#define Y_MIN_PIN PE12 -#define Y_MAX_PIN PE10 -#define Z_MIN_PIN PG8 -#define Z_MAX_PIN PG5 +#define X_DIAG_PIN PB10 // X- +#define Y_DIAG_PIN PE12 // Y- +#define Z_DIAG_PIN PG8 // Z- // -// Z Probe must be this pins +// Limit Switches +// +#if X_STALL_SENSITIVITY + #define X_STOP_PIN X_DIAG_PIN + #if X_HOME_DIR < 0 + #define X_MAX_PIN PE15 // E0 + #else + #define X_MIN_PIN PE15 // E0 + #endif +#else + #define X_MIN_PIN PB10 // X- + #define X_MAX_PIN PE15 // E0 +#endif + +#if Y_STALL_SENSITIVITY + #define Y_STOP_PIN Y_DIAG_PIN + #if Y_HOME_DIR < 0 + #define Y_MAX_PIN PE10 // E1 + #else + #define Y_MIN_PIN PE10 // E1 + #endif +#else + #define Y_MIN_PIN PE12 // Y- + #define Y_MAX_PIN PE10 // E1 +#endif + +#if Z_STALL_SENSITIVITY + #define Z_STOP_PIN Z_DIAG_PIN + #if Z_HOME_DIR < 0 + #define Z_MAX_PIN PG5 // E2 + #else + #define Z_MIN_PIN PG5 // E2 + #endif +#else + #define Z_MIN_PIN PG8 // Z- + #define Z_MAX_PIN PG5 // E2 +#endif + +// +// Z Probe must be this pin // #ifndef Z_MIN_PROBE_PIN #define Z_MIN_PROBE_PIN PA2