From b033da1782579d27ed05d9acbf0b2ccb433bdbb8 Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Mon, 1 Nov 2021 22:43:40 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Endstop=20/=20DIAG=20homing=20co?= =?UTF-8?q?nflict=20warning=20(#23050)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/gcode.h | 2 +- Marlin/src/inc/Warnings.cpp | 9 +++++++++ Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h | 4 +++- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h | 2 ++ Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h | 2 ++ Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h | 2 ++ Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h | 2 ++ Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h | 2 ++ Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h | 5 +++-- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h | 1 + Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h | 8 +++++--- Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h | 2 ++ Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h | 9 ++++----- Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h | 6 +++--- Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h | 5 +++-- Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h | 3 +-- Marlin/src/pins/stm32f4/pins_LERDGE_K.h | 3 +-- Marlin/src/pins/stm32f4/pins_LERDGE_S.h | 3 +-- Marlin/src/pins/stm32f4/pins_LERDGE_X.h | 3 +-- Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h | 4 ++-- Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h | 6 ++---- Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h | 3 +-- Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h | 3 +-- Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX.h | 3 +-- 24 files changed, 55 insertions(+), 37 deletions(-) diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index 09dd53d6f6..d7bacaef32 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -1130,7 +1130,7 @@ private: static void M913(); static void M913_report(const bool forReplay=true); #endif - #if ENABLED(USE_SENSORLESS) + #if USE_SENSORLESS static void M914(); static void M914_report(const bool forReplay=true); #endif diff --git a/Marlin/src/inc/Warnings.cpp b/Marlin/src/inc/Warnings.cpp index d258aefd82..2510949010 100644 --- a/Marlin/src/inc/Warnings.cpp +++ b/Marlin/src/inc/Warnings.cpp @@ -488,3 +488,12 @@ #if HOMING_Z_WITH_PROBE && IS_CARTESIAN && DISABLED(Z_SAFE_HOMING) #error "Z_SAFE_HOMING is recommended when homing with a probe. Enable Z_SAFE_HOMING or comment out this line to continue." #endif + +// +// Warn users of potential endstop/DIAG pin conflicts to prevent homing issues when not using sensorless homing +// +#if !USE_SENSORLESS && ENABLED(USES_DIAG_JUMPERS) + #warning "Motherboard DIAG jumpers must be removed when SENSORLESS_HOMING is disabled." +#elif !USE_SENSORLESS && ENABLED(USES_DIAG_PINS) + #warning "Driver DIAG pins must be physically removed unless SENSORLESS_HOMING is enabled. (See https://bit.ly/2ZPRlt0)" +#endif 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 dc52a7c36d..749f6b8bdf 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h @@ -26,7 +26,9 @@ */ #define BOARD_INFO_NAME "BTT SKR V1.3" -#define LPC1768_IS_SKRV1_3 1 + +#define LPC1768_IS_SKRV1_3 +#define USES_DIAG_JUMPERS // // Trinamic Stallguard pins 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 5de875cafa..442360f594 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h @@ -35,6 +35,8 @@ #define BOARD_CUSTOM_BUILD_FLAGS -DLPC_PINCFG_UART3_P4_28 #endif +#define USES_DIAG_PINS + // // EEPROM // diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h index d6b1eeab46..15afe7e238 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h @@ -30,6 +30,8 @@ #define BOARD_INFO_NAME "MKS SGen-L" #define BOARD_WEBSITE_URL "github.com/makerbase-mks/MKS-SGEN_L" +#define USES_DIAG_JUMPERS + // // Servos // diff --git a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h index 9c514f8ca3..bdc49fc236 100644 --- a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h +++ b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h @@ -31,6 +31,8 @@ #define BOARD_INFO_NAME "BTT SKR E3 Turbo" #endif +#define USES_DIAG_JUMPERS + // Onboard I2C EEPROM #define I2C_EEPROM #define MARLIN_EEPROM_SIZE 0x1000 // 4KB (AT24C32) diff --git a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h index bb39009f09..8107f11937 100644 --- a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h +++ b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h @@ -30,6 +30,8 @@ #define BOARD_INFO_NAME "MKS SGEN_L V2" #define BOARD_WEBSITE_URL "github.com/makerbase-mks" +#define USES_DIAG_JUMPERS + // // EEPROM, MKS SGEN_L V2.0 hardware has 4K EEPROM on the board // diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h index 48d38e2213..c132691c20 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h @@ -26,6 +26,8 @@ // Release PB3/PB4 (E0 STP/DIR) from JTAG pins #define DISABLE_JTAG +#define USES_DIAG_JUMPERS + // Ignore temp readings during development. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h index 89742b6d5a..d8f143247c 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h @@ -27,10 +27,11 @@ #include "env_validate.h" -#define BOARD_NO_NATIVE_USB - #define BOARD_WEBSITE_URL "github.com/makerbase-mks" +#define BOARD_NO_NATIVE_USB +#define USES_DIAG_JUMPERS + //#define DISABLE_DEBUG #define DISABLE_JTAG diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h index d19343386e..bd24dad155 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h @@ -36,6 +36,7 @@ #define BOARD_INFO_NAME "MKS Robin nano V2.0" #define BOARD_NO_NATIVE_USB +#define USES_DIAG_PINS // Avoid conflict with TIMER_SERVO when using the STM32 HAL #define TEMP_TIMER 5 diff --git a/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h b/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h index da53266b7d..86e04b9999 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h @@ -29,6 +29,11 @@ #define BOARD_INFO_NAME "BTT BTT002 V1.0" +#define USES_DIAG_PINS + +// Ignore temp readings during development. +//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 + // Use one of these or SDCard-based Emulation will be used #if NO_EEPROM_SELECTED //#define SRAM_EEPROM_EMULATION // Use BackSRAM-based EEPROM emulation @@ -41,9 +46,6 @@ #define FLASH_EEPROM_LEVELING #endif -// Ignore temp readings during development. -//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 - // // Limit Switches // diff --git a/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h b/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h index eb0c3bdbb9..2da79119e9 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h @@ -29,6 +29,8 @@ #define BOARD_INFO_NAME "BTT E3 RRF" #endif +#define USES_DIAG_JUMPERS + // Add-on board for IDEX conversion //#define BTT_E3_RRF_IDEX_BOARD diff --git a/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h b/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h index 95f74efe84..dfa9d8a7b9 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h @@ -31,15 +31,14 @@ #define BOARD_INFO_NAME "BTT GTR V1.0" +#define USES_DIAG_JUMPERS +#define HAS_OTG_USB_HOST_SUPPORT // USB Flash Drive support +#define M5_EXTENDER // The M5 extender is attached + // Onboard I2C EEPROM #define I2C_EEPROM #define MARLIN_EEPROM_SIZE 0x2000 // 8KB (24C64 ... 64Kb = 8KB) -// USB Flash Drive support -#define HAS_OTG_USB_HOST_SUPPORT - -#define M5_EXTENDER // The M5 extender is attached - // // Servos // diff --git a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h index 943dda7345..cc9c88c10b 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h @@ -23,15 +23,15 @@ #include "env_validate.h" +#define HAS_OTG_USB_HOST_SUPPORT // USB Flash Drive support +#define USES_DIAG_JUMPERS + // Onboard I2C EEPROM #define I2C_EEPROM #define MARLIN_EEPROM_SIZE 0x8000 // 32KB (24C32A) #define I2C_SCL_PIN PB8 #define I2C_SDA_PIN PB9 -// USB Flash Drive support -#define HAS_OTG_USB_HOST_SUPPORT - // Avoid conflict with TIMER_TONE #define STEP_TIMER 10 diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h index 72154be2ee..565eba41f7 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h @@ -23,6 +23,8 @@ #include "env_validate.h" +#define USES_DIAG_JUMPERS + // If you have the BigTreeTech driver expansion module, enable BTT_MOTOR_EXPANSION // https://github.com/bigtreetech/BTT-Expansion-module/tree/master/BTT%20EXP-MOT //#define BTT_MOTOR_EXPANSION @@ -47,8 +49,7 @@ #define FLASH_EEPROM_LEVELING #endif -// USB Flash Drive support -#define HAS_OTG_USB_HOST_SUPPORT +#define HAS_OTG_USB_HOST_SUPPORT // USB Flash Drive support // // Servos diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h index 90c1de3cb3..4180fb8414 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h @@ -47,8 +47,7 @@ #define FLASH_EEPROM_LEVELING #endif -// USB Flash Drive support -#define HAS_OTG_USB_HOST_SUPPORT +#define HAS_OTG_USB_HOST_SUPPORT // USB Flash Drive support // Avoid conflict with TIMER_TONE #define STEP_TIMER 10 diff --git a/Marlin/src/pins/stm32f4/pins_LERDGE_K.h b/Marlin/src/pins/stm32f4/pins_LERDGE_K.h index 6ad3849d11..099b3b79a4 100644 --- a/Marlin/src/pins/stm32f4/pins_LERDGE_K.h +++ b/Marlin/src/pins/stm32f4/pins_LERDGE_K.h @@ -40,8 +40,7 @@ #define MARLIN_EEPROM_SIZE 0x10000 #endif -// USB Flash Drive support -#define HAS_OTG_USB_HOST_SUPPORT +#define HAS_OTG_USB_HOST_SUPPORT // USB Flash Drive support // // Servos diff --git a/Marlin/src/pins/stm32f4/pins_LERDGE_S.h b/Marlin/src/pins/stm32f4/pins_LERDGE_S.h index 68e5636955..c686e19ccb 100644 --- a/Marlin/src/pins/stm32f4/pins_LERDGE_S.h +++ b/Marlin/src/pins/stm32f4/pins_LERDGE_S.h @@ -34,8 +34,7 @@ #define STEP_TIMER 4 #define TEMP_TIMER 2 -// USB Flash Drive support -#define HAS_OTG_USB_HOST_SUPPORT +#define HAS_OTG_USB_HOST_SUPPORT // USB Flash Drive support // // Servos diff --git a/Marlin/src/pins/stm32f4/pins_LERDGE_X.h b/Marlin/src/pins/stm32f4/pins_LERDGE_X.h index 7f35c0f5dd..93526db442 100644 --- a/Marlin/src/pins/stm32f4/pins_LERDGE_X.h +++ b/Marlin/src/pins/stm32f4/pins_LERDGE_X.h @@ -39,8 +39,7 @@ #define I2C_SDA_PIN PB9 #define MARLIN_EEPROM_SIZE 0x10000 // FM24CL64 F-RAM 64K (8Kx8) -// USB Flash Drive support -#define HAS_OTG_USB_HOST_SUPPORT +#define HAS_OTG_USB_HOST_SUPPORT // USB Flash Drive support // // Servos diff --git a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h index 8fa211dc95..a7f853185e 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h @@ -32,8 +32,8 @@ #define BOARD_INFO_NAME "MKS Monster8 V1.x" -// USB Flash Drive support -#define HAS_OTG_USB_HOST_SUPPORT +#define HAS_OTG_USB_HOST_SUPPORT // USB Flash Drive support +#define USES_DIAG_JUMPERS //#define DISABLE_DEBUG diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h index 4dc73e0312..02140865f9 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h @@ -32,22 +32,20 @@ #define BOARD_INFO_NAME "MKS Robin Nano V3" +#define USES_DIAG_JUMPERS + #ifndef X_CS_PIN #define X_CS_PIN PD5 #endif - #ifndef Y_CS_PIN #define Y_CS_PIN PD7 #endif - #ifndef Z_CS_PIN #define Z_CS_PIN PD4 #endif - #ifndef E0_CS_PIN #define E0_CS_PIN PD9 #endif - #ifndef E1_CS_PIN #define E1_CS_PIN PD8 #endif diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h index c3e3963b55..256439e654 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h @@ -26,8 +26,7 @@ // MKS Robin Nano V3, MKS Eagle pinmap // -// USB Flash Drive support -#define HAS_OTG_USB_HOST_SUPPORT +#define HAS_OTG_USB_HOST_SUPPORT // USB Flash Drive support // Avoid conflict with TIMER_TONE #define STEP_TIMER 10 diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h index 46dec71c11..68b2385254 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h @@ -39,8 +39,7 @@ #define I2C_EEPROM #define MARLIN_EEPROM_SIZE 0x1000 // 4KB -// USB Flash Drive support -#define HAS_OTG_USB_HOST_SUPPORT +#define HAS_OTG_USB_HOST_SUPPORT // USB Flash Drive support // // Release PB4 (Y_ENABLE_PIN) from JTAG NRST role diff --git a/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX.h b/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX.h index 991c611a89..9eb0acf144 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX.h @@ -32,8 +32,7 @@ #define I2C_EEPROM #define MARLIN_EEPROM_SIZE 0x1000 // 4KB (24C32 ... 32Kb = 4KB) -// USB Flash Drive support -#define HAS_OTG_USB_HOST_SUPPORT +#define HAS_OTG_USB_HOST_SUPPORT // USB Flash Drive support // // Limit Switches