From 0248622a151b5ec0660684a7ece75b124c01c4ce Mon Sep 17 00:00:00 2001 From: "robert.stein" Date: Thu, 30 Jan 2020 10:38:16 +0100 Subject: [PATCH 1/3] Update to use mutliply endstops on BTT_SKR_V1_4 and BTT_SKR_V1_4_TURBO Extra endstops configurable over defines in Configuration.h, Remap Filament runout to XMax, Filament runout 2 to YMax and Power loss/on pin to ZMax pin when define is set. --- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h | 25 +++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h index 8e2a0cec231a..9d533b6eba56 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h @@ -71,6 +71,31 @@ #define POWER_LOSS_PIN P1_00 #endif +// +// Extra Remaps for more limit switches +// Enable over "Configuration.h" after board definition +// (XMin and XMax, YMin and YMax and/or ZMin and ZMax) +// +#ifdef ENABLE_XMAX_PIN + #define X_MIN_PIN P1_29 + #define X_MAX_PIN P1_26 + #undef X_STOP_PIN + #undef FIL_RUNOUT_PIN +#endif +#ifdef ENABLE_YMAX_PIN + #define Y_MIN_PIN P1_28 + #define Y_MAX_PIN P1_25 + #undef Y_STOP_PIN + #undef FIL_RUNOUT2_PIN +#endif +#ifdef ENABLE_ZMAX_PIN + #define Z_MIN_PIN P1_27 + #define Z_MAX_PIN P1_00 + #undef Z_STOP_PIN + #undef PS_ON_PIN + #undef POWER_LOSS_PIN +#endif + // // Steppers // From 32656e16588fdfbba1e890b91d2e33952407db06 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 30 Jan 2020 12:37:48 -0600 Subject: [PATCH 2/3] Update pins_BTT_SKR_V1_4.h --- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h | 26 ++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h index 9d533b6eba56..0175377499c4 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h @@ -77,23 +77,23 @@ // (XMin and XMax, YMin and YMax and/or ZMin and ZMax) // #ifdef ENABLE_XMAX_PIN - #define X_MIN_PIN P1_29 - #define X_MAX_PIN P1_26 - #undef X_STOP_PIN - #undef FIL_RUNOUT_PIN + #define X_MIN_PIN P1_29 // X-Stop + #define X_MAX_PIN P1_26 // Runout 1 + #undef X_STOP_PIN + #undef FIL_RUNOUT_PIN #endif #ifdef ENABLE_YMAX_PIN - #define Y_MIN_PIN P1_28 - #define Y_MAX_PIN P1_25 - #undef Y_STOP_PIN - #undef FIL_RUNOUT2_PIN + #define Y_MIN_PIN P1_28 // Y-Stop + #define Y_MAX_PIN P1_25 // Runout 2 + #undef Y_STOP_PIN + #undef FIL_RUNOUT2_PIN #endif #ifdef ENABLE_ZMAX_PIN - #define Z_MIN_PIN P1_27 - #define Z_MAX_PIN P1_00 - #undef Z_STOP_PIN - #undef PS_ON_PIN - #undef POWER_LOSS_PIN + #define Z_MIN_PIN P1_27 // Z-Stop + #define Z_MAX_PIN P1_00 // PS-ON / Power-Loss + #undef Z_STOP_PIN + #undef PS_ON_PIN + #undef POWER_LOSS_PIN #endif // From 6b67458de6f73bdaecf62338e9be290e204af3ef Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 30 Jan 2020 13:00:31 -0600 Subject: [PATCH 3/3] Update pins_BTT_SKR_V1_4.h --- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h | 80 ++++++++++++--------- 1 file changed, 48 insertions(+), 32 deletions(-) diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h index 0175377499c4..90b5edca88a0 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h @@ -37,12 +37,53 @@ // #define SERVO0_PIN P2_00 +// +// TMC StallGuard DIAG pins +// +#define X_DIAG_PIN P1_29 // X-STOP +#define Y_DIAG_PIN P1_28 // Y-STOP +#define Z_DIAG_PIN P1_27 // Z-STOP +#define E0_DIAG_PIN P1_26 // E0DET +#define E1_DIAG_PIN P1_25 // E1DET + // // Limit Switches // -#define X_STOP_PIN P1_29 -#define Y_STOP_PIN P1_28 -#define Z_STOP_PIN P1_27 +#if X_STALL_SENSITIVITY + #if X_HOME_DIR < 0 + #define X_MIN_PIN X_DIAG_PIN + #define X_MAX_PIN P1_26 // E0DET + #else + #define X_MAX_PIN X_DIAG_PIN + #define X_MIN_PIN P1_26 // E0DET + #endif +#else + #define X_STOP_PIN P1_29 // X-STOP +#endif + +#if Y_STALL_SENSITIVITY + #if Y_HOME_DIR < 0 + #define Y_MIN_PIN Y_DIAG_PIN + #define Y_MAX_PIN P1_25 // E1DET + #else + #define Y_MAX_PIN Y_DIAG_PIN + #define Y_MIN_PIN P1_25 // E1DET + #endif +#else + #define Y_STOP_PIN P1_28 // Y-STOP +#endif + +#if Z_STALL_SENSITIVITY + #if Z_HOME_DIR < 0 + #define Z_MIN_PIN Z_DIAG_PIN + #define Z_MAX_PIN P1_24 // PWRDET + #else + #define Z_MAX_PIN Z_DIAG_PIN + #define Z_MIN_PIN P1_24 // PWRDET + #endif +#else + #define Z_STOP_PIN P1_27 // Z-STOP +#endif // // Z Probe (when not Z_MIN_PIN) @@ -54,46 +95,21 @@ // // Filament Runout Sensor // -#define FIL_RUNOUT_PIN P1_26 -#define FIL_RUNOUT2_PIN P1_25 +#define FIL_RUNOUT_PIN P1_26 // E0DET +#define FIL_RUNOUT2_PIN P1_25 // E1DET // // Power Supply Control // #ifndef PS_ON_PIN - #define PS_ON_PIN P1_00 + #define PS_ON_PIN P1_00 // PWRDET #endif // // Power Loss Detection // #ifndef POWER_LOSS_PIN - #define POWER_LOSS_PIN P1_00 -#endif - -// -// Extra Remaps for more limit switches -// Enable over "Configuration.h" after board definition -// (XMin and XMax, YMin and YMax and/or ZMin and ZMax) -// -#ifdef ENABLE_XMAX_PIN - #define X_MIN_PIN P1_29 // X-Stop - #define X_MAX_PIN P1_26 // Runout 1 - #undef X_STOP_PIN - #undef FIL_RUNOUT_PIN -#endif -#ifdef ENABLE_YMAX_PIN - #define Y_MIN_PIN P1_28 // Y-Stop - #define Y_MAX_PIN P1_25 // Runout 2 - #undef Y_STOP_PIN - #undef FIL_RUNOUT2_PIN -#endif -#ifdef ENABLE_ZMAX_PIN - #define Z_MIN_PIN P1_27 // Z-Stop - #define Z_MAX_PIN P1_00 // PS-ON / Power-Loss - #undef Z_STOP_PIN - #undef PS_ON_PIN - #undef POWER_LOSS_PIN + #define POWER_LOSS_PIN P1_00 // PWRDET #endif //