From 62740aec7d36972a062b4606ea746171a1253e8f Mon Sep 17 00:00:00 2001 From: George Fu Date: Tue, 16 Aug 2022 13:48:42 +0800 Subject: [PATCH 1/3] Fix CHEETAH v2.0 Bltouch bug --- Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h | 14 ++++++++++---- .../variants/MARLIN_FYSETC_CHEETAH_V20/variant.h | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h b/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h index 32ec518bf849..083011cd0f44 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h @@ -48,17 +48,23 @@ // #if ENABLED(BLTOUCH) #error "You need to set jumper to 5v for Bltouch, then comment out this line to proceed." - #define SERVO0_PIN PA0 -#elif !defined(Z_MIN_PROBE_PIN) - #define Z_MIN_PROBE_PIN PA0 #endif +#define SERVO0_PIN PB1 // Z-MIN for BLTOUCH SIG // // Limit Switches // #define X_STOP_PIN PB4 #define Y_STOP_PIN PC8 -#define Z_STOP_PIN PB1 +#if NUM_SERVOS>0 + #define Z_STOP_PIN PA0 // PROBE pin for BLTOUCH Z-MIN +#else + #define Z_STOP_PIN PB1 // Z-MIN +#endif + +#ifndef Z_MIN_PROBE_PIN + #define Z_MIN_PROBE_PIN PA0 +#endif // // Filament runout diff --git a/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/variant.h index d4982113a010..cb50171d8c9a 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/variant.h @@ -95,7 +95,7 @@ extern "C" { // Timer Definitions #define TIMER_TONE TIM2 // TIMER_TONE must be defined in this file -#define TIMER_SERVO TIM5 // TIMER_SERVO must be defined in this file +#define TIMER_SERVO TIM3 // TIMER_SERVO must be defined in this file #define TIMER_SERIAL TIM11 // TIMER_SERIAL must be defined in this file // UART Definitions From 2c9111102bd183713954aa3bf58a1d77d7a7e920 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 3 Sep 2022 19:38:54 -0500 Subject: [PATCH 2/3] If PB1 is SERVO then it's not also Z-MIN --- .../src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h b/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h index 083011cd0f44..77d3ef183a44 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h @@ -49,21 +49,21 @@ #if ENABLED(BLTOUCH) #error "You need to set jumper to 5v for Bltouch, then comment out this line to proceed." #endif -#define SERVO0_PIN PB1 // Z-MIN for BLTOUCH SIG +#define SERVO0_PIN PB1 // BL-TOUCH/PWM // // Limit Switches // -#define X_STOP_PIN PB4 -#define Y_STOP_PIN PC8 -#if NUM_SERVOS>0 - #define Z_STOP_PIN PA0 // PROBE pin for BLTOUCH Z-MIN -#else - #define Z_STOP_PIN PB1 // Z-MIN -#endif +#define X_STOP_PIN PB4 // X-MIN +#define Y_STOP_PIN PC8 // Y-MIN +#define Z_STOP_PIN PA0 // Z-MIN #ifndef Z_MIN_PROBE_PIN - #define Z_MIN_PROBE_PIN PA0 + #if DISABLED(USE_PROBE_FOR_Z_HOMING) && NUM_SERVOS == 0 + #define Z_MIN_PROBE_PIN PB1 // BL-TOUCH/PWM repurposed as input + #endif + #define Z_MIN_PROBE_PIN PA0 // Z-MIN + #endif #endif // From cd158823c78d054c53250eb90f40439e7502828a Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 18 Mar 2023 04:08:01 -0500 Subject: [PATCH 3/3] followup --- .../src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h b/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h index 77d3ef183a44..031caa1ce174 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h @@ -43,12 +43,6 @@ #define FLASH_ADDRESS_START 0x8004000 #endif -// -// Z Probe -// -#if ENABLED(BLTOUCH) - #error "You need to set jumper to 5v for Bltouch, then comment out this line to proceed." -#endif #define SERVO0_PIN PB1 // BL-TOUCH/PWM // @@ -58,12 +52,14 @@ #define Y_STOP_PIN PC8 // Y-MIN #define Z_STOP_PIN PA0 // Z-MIN +// +// Z Probe +// +#if ENABLED(BLTOUCH) + #error "You need to set jumper to 5V for BLTouch, then comment out this line to proceed." +#endif #ifndef Z_MIN_PROBE_PIN - #if DISABLED(USE_PROBE_FOR_Z_HOMING) && NUM_SERVOS == 0 - #define Z_MIN_PROBE_PIN PB1 // BL-TOUCH/PWM repurposed as input - #endif - #define Z_MIN_PROBE_PIN PA0 // Z-MIN - #endif + #define Z_MIN_PROBE_PIN PB1 // BL-TOUCH/PWM repurposed #endif //