From d0e61d82c0b0e71ad5602508f37e29eed47ee4e0 Mon Sep 17 00:00:00 2001 From: Bob-the-Kuhn Date: Thu, 18 Jan 2018 22:59:09 -0600 Subject: [PATCH] TMC2208 sanity check --- Marlin/SanityCheck.h | 18 ++++++++++++++++++ Marlin/pins_RAMPS.h | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/Marlin/SanityCheck.h b/Marlin/SanityCheck.h index acbfe9560..a4c366507 100644 --- a/Marlin/SanityCheck.h +++ b/Marlin/SanityCheck.h @@ -1480,6 +1480,24 @@ static_assert(1 >= 0 #error "HAVE_TMC2208 requires at least one TMC2208 stepper to be set." #endif +/** + * TMC2208 software UART and ENDSTOP_INTERRUPTS both use pin change interrupts (PCI) + */ +#if ENABLED(HAVE_TMC2208) && ENABLED(ENDSTOP_INTERRUPTS_FEATURE) && !( \ + ENABLED( X_HARDWARE_SERIAL ) \ + || ENABLED( X2_HARDWARE_SERIAL ) \ + || ENABLED( Y_HARDWARE_SERIAL ) \ + || ENABLED( Y2_HARDWARE_SERIAL ) \ + || ENABLED( Z_HARDWARE_SERIAL ) \ + || ENABLED( Z2_HARDWARE_SERIAL ) \ + || ENABLED( E0_HARDWARE_SERIAL ) \ + || ENABLED( E1_HARDWARE_SERIAL ) \ + || ENABLED( E2_HARDWARE_SERIAL ) \ + || ENABLED( E3_HARDWARE_SERIAL ) \ + || ENABLED( E4_HARDWARE_SERIAL ) ) + #error "select hardware UART for TMC2208 to use both TMC2208 and ENDSTOP_INTERRUPTS_FEATURE." +#endif + #if ENABLED(HYBRID_THRESHOLD) && DISABLED(STEALTHCHOP) #error "Enable STEALTHCHOP to use HYBRID_THRESHOLD." #endif diff --git a/Marlin/pins_RAMPS.h b/Marlin/pins_RAMPS.h index 9b10751e5..ff23a1964 100644 --- a/Marlin/pins_RAMPS.h +++ b/Marlin/pins_RAMPS.h @@ -131,7 +131,7 @@ //#define E1_HARDWARE_SERIAL Serial1 //#define E2_HARDWARE_SERIAL Serial1 //#define E3_HARDWARE_SERIAL Serial1 - //#define E3_HARDWARE_SERIAL Serial1 + //#define E4_HARDWARE_SERIAL Serial1 /** * Software serial