From e60a2c16e920a28401e2f0244619a8a56d44152a Mon Sep 17 00:00:00 2001 From: GMagician Date: Wed, 27 Jun 2018 22:20:03 +0200 Subject: [PATCH] Simplify specifying stepper drivers, per-axis - Specify stepper drivers for each axis - Automatically apply timings based on (worst-case) driver type --- Marlin/Configuration.h | 21 ++ Marlin/Configuration_adv.h | 88 ++----- Marlin/src/HAL/HAL_AVR/SanityCheck.h | 2 +- Marlin/src/HAL/HAL_DUE/SanityCheck.h | 2 +- Marlin/src/HAL/HAL_LPC1768/SanityCheck.h | 2 +- Marlin/src/Marlin.cpp | 4 +- Marlin/src/config/default/Configuration.h | 21 ++ Marlin/src/config/default/Configuration_adv.h | 88 ++----- .../AlephObjects/TAZ4/Configuration.h | 21 ++ .../AlephObjects/TAZ4/Configuration_adv.h | 88 ++----- .../AliExpress/CL-260/Configuration.h | 21 ++ .../config/examples/Anet/A6/Configuration.h | 21 ++ .../examples/Anet/A6/Configuration_adv.h | 88 ++----- .../config/examples/Anet/A8/Configuration.h | 21 ++ .../examples/Anet/A8/Configuration_adv.h | 88 ++----- .../examples/Azteeg/X5GT/Configuration.h | 21 ++ .../examples/Azteeg/X5GT/Configuration_adv.h | 88 ++----- .../BIBO/TouchX/cyclops/Configuration.h | 21 ++ .../BIBO/TouchX/cyclops/Configuration_adv.h | 88 ++----- .../BIBO/TouchX/default/Configuration.h | 21 ++ .../BIBO/TouchX/default/Configuration_adv.h | 88 ++----- .../examples/BQ/Hephestos/Configuration.h | 21 ++ .../examples/BQ/Hephestos/Configuration_adv.h | 88 ++----- .../examples/BQ/Hephestos_2/Configuration.h | 21 ++ .../BQ/Hephestos_2/Configuration_adv.h | 88 ++----- .../config/examples/BQ/WITBOX/Configuration.h | 21 ++ .../examples/BQ/WITBOX/Configuration_adv.h | 88 ++----- .../config/examples/Cartesio/Configuration.h | 21 ++ .../examples/Cartesio/Configuration_adv.h | 88 ++----- .../examples/Creality/CR-10/Configuration.h | 21 ++ .../Creality/CR-10/Configuration_adv.h | 88 ++----- .../examples/Creality/CR-10S/Configuration.h | 21 ++ .../Creality/CR-10S/Configuration_adv.h | 88 ++----- .../Creality/CR-10mini/Configuration.h | 21 ++ .../Creality/CR-10mini/Configuration_adv.h | 88 ++----- .../examples/Creality/CR-8/Configuration.h | 21 ++ .../Creality/CR-8/Configuration_adv.h | 88 ++----- .../examples/Creality/Ender-2/Configuration.h | 21 ++ .../Creality/Ender-2/Configuration_adv.h | 88 ++----- .../examples/Creality/Ender-3/Configuration.h | 21 ++ .../Creality/Ender-3/Configuration_adv.h | 88 ++----- .../examples/Creality/Ender-4/Configuration.h | 21 ++ .../Creality/Ender-4/Configuration_adv.h | 88 ++----- .../src/config/examples/Felix/Configuration.h | 21 ++ .../config/examples/Felix/Configuration_adv.h | 88 ++----- .../examples/Felix/DUAL/Configuration.h | 21 ++ .../FolgerTech/i3-2020/Configuration.h | 21 ++ .../FolgerTech/i3-2020/Configuration_adv.h | 88 ++----- .../examples/Geeetech/GT2560/Configuration.h | 21 ++ .../Geeetech/I3_Pro_X-GT2560/Configuration.h | 21 ++ .../Prusa i3 Pro B/bltouch/Configuration.h | 21 ++ .../Prusa i3 Pro B/noprobe/Configuration.h | 21 ++ .../Geeetech/Prusa i3 Pro C/Configuration.h | 21 ++ .../Prusa i3 Pro C/Configuration_adv.h | 88 ++----- .../Geeetech/Prusa i3 Pro W/Configuration.h | 21 ++ .../Prusa i3 Pro W/Configuration_adv.h | 88 ++----- .../examples/Infitary/i3-M508/Configuration.h | 21 ++ .../Infitary/i3-M508/Configuration_adv.h | 88 ++----- .../examples/JGAurora/A5/Configuration.h | 21 ++ .../examples/JGAurora/A5/Configuration_adv.h | 88 ++----- .../examples/MakerParts/Configuration.h | 21 ++ .../examples/MakerParts/Configuration_adv.h | 88 ++----- .../examples/Malyan/M150/Configuration.h | 21 ++ .../examples/Malyan/M150/Configuration_adv.h | 88 ++----- .../examples/Malyan/M200/Configuration.h | 21 ++ .../examples/Malyan/M200/Configuration_adv.h | 88 ++----- .../Micromake/C1/basic/Configuration.h | 21 ++ .../Micromake/C1/enhanced/Configuration.h | 21 ++ .../Micromake/C1/enhanced/Configuration_adv.h | 88 ++----- .../config/examples/Mks/Sbase/Configuration.h | 21 ++ .../examples/Mks/Sbase/Configuration_adv.h | 86 ++----- .../examples/RepRapPro/Huxley/Configuration.h | 21 ++ .../RepRapWorld/Megatronics/Configuration.h | 21 ++ .../config/examples/RigidBot/Configuration.h | 21 ++ .../examples/RigidBot/Configuration_adv.h | 88 ++----- .../src/config/examples/SCARA/Configuration.h | 21 ++ .../config/examples/SCARA/Configuration_adv.h | 88 ++----- .../config/examples/STM32F10/Configuration.h | 21 ++ .../config/examples/STM32F4/Configuration.h | 21 ++ .../examples/Sanguinololu/Configuration.h | 21 ++ .../examples/Sanguinololu/Configuration_adv.h | 88 ++----- .../config/examples/TheBorg/Configuration.h | 21 ++ .../examples/TheBorg/Configuration_adv.h | 88 ++----- .../config/examples/TinyBoy2/Configuration.h | 21 ++ .../examples/TinyBoy2/Configuration_adv.h | 88 ++----- .../config/examples/Tronxy/X1/Configuration.h | 21 ++ .../examples/Tronxy/X5S/Configuration.h | 21 ++ .../examples/Tronxy/XY100/Configuration.h | 21 ++ .../UltiMachine/Archim2/Configuration.h | 21 ++ .../UltiMachine/Archim2/Configuration_adv.h | 88 ++----- .../examples/Velleman/K8200/Configuration.h | 21 ++ .../Velleman/K8200/Configuration_adv.h | 88 ++----- .../examples/Velleman/K8400/Configuration.h | 21 ++ .../Velleman/K8400/Configuration_adv.h | 88 ++----- .../Velleman/K8400/Dual-head/Configuration.h | 21 ++ .../Wanhao/Duplicator 6/Configuration.h | 21 ++ .../Wanhao/Duplicator 6/Configuration_adv.h | 88 ++----- .../examples/adafruit/ST7565/Configuration.h | 21 ++ .../FLSUN/auto_calibrate/Configuration.h | 21 ++ .../FLSUN/auto_calibrate/Configuration_adv.h | 88 ++----- .../delta/FLSUN/kossel/Configuration.h | 21 ++ .../delta/FLSUN/kossel/Configuration_adv.h | 88 ++----- .../delta/FLSUN/kossel_mini/Configuration.h | 21 ++ .../FLSUN/kossel_mini/Configuration_adv.h | 88 ++----- .../delta/Hatchbox_Alpha/Configuration.h | 21 ++ .../examples/delta/generic/Configuration.h | 21 ++ .../delta/generic/Configuration_adv.h | 88 ++----- .../delta/kossel_mini/Configuration.h | 21 ++ .../delta/kossel_mini/Configuration_adv.h | 88 ++----- .../examples/delta/kossel_pro/Configuration.h | 21 ++ .../delta/kossel_pro/Configuration_adv.h | 88 ++----- .../examples/delta/kossel_xl/Configuration.h | 21 ++ .../delta/kossel_xl/Configuration_adv.h | 88 ++----- .../examples/gCreate/gMax1.5+/Configuration.h | 21 ++ .../gCreate/gMax1.5+/Configuration_adv.h | 88 ++----- .../config/examples/makibox/Configuration.h | 21 ++ .../examples/makibox/Configuration_adv.h | 88 ++----- .../examples/stm32f103ret6/Configuration.h | 21 ++ .../examples/tvrrug/Round2/Configuration.h | 21 ++ .../tvrrug/Round2/Configuration_adv.h | 82 +----- .../src/config/examples/wt150/Configuration.h | 21 ++ .../config/examples/wt150/Configuration_adv.h | 88 ++----- Marlin/src/core/drivers.h | 57 +++++ Marlin/src/core/macros.h | 4 +- Marlin/src/feature/tmc_util.cpp | 40 +-- Marlin/src/feature/tmc_util.h | 6 +- .../src/gcode/feature/trinamic/M911-M915.cpp | 26 +- Marlin/src/gcode/gcode.h | 8 +- Marlin/src/inc/Conditionals_post.h | 87 +++++-- Marlin/src/inc/SanityCheck.h | 219 ++++------------ Marlin/src/module/configuration_store.cpp | 30 +-- Marlin/src/module/stepper_indirection.cpp | 234 +++++++++--------- Marlin/src/module/stepper_indirection.h | 96 +++---- Marlin/src/pins/pins_EINSY_RAMBO.h | 6 +- Marlin/src/pins/pins_EINSY_RETRO.h | 6 +- Marlin/src/pins/pins_RAMPS.h | 2 +- Marlin/src/pins/pins_RAMPS_FD_V1.h | 2 +- 137 files changed, 2629 insertions(+), 4024 deletions(-) create mode 100644 Marlin/src/core/drivers.h diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 8586c4e54fa4..d796518dec15 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -550,6 +550,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index cd58c6e10d34..987bbf6eef58 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -841,7 +841,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -852,7 +852,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -864,7 +864,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,19 +1036,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1094,39 +1083,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1134,22 +1105,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,20 +1266,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1368,7 +1312,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/HAL/HAL_AVR/SanityCheck.h b/Marlin/src/HAL/HAL_AVR/SanityCheck.h index f2907205d7c1..f30db8426796 100644 --- a/Marlin/src/HAL/HAL_AVR/SanityCheck.h +++ b/Marlin/src/HAL/HAL_AVR/SanityCheck.h @@ -99,7 +99,7 @@ /** * TMC2208 software UART and ENDSTOP_INTERRUPTS both use pin change interrupts (PCI) */ -#if ENABLED(HAVE_TMC2208) && ENABLED(ENDSTOP_INTERRUPTS_FEATURE) && !( \ +#if HAVE_SPIDRIVER(TMC2208) && ENABLED(ENDSTOP_INTERRUPTS_FEATURE) && !( \ defined(X_HARDWARE_SERIAL ) \ || defined(X2_HARDWARE_SERIAL) \ || defined(Y_HARDWARE_SERIAL ) \ diff --git a/Marlin/src/HAL/HAL_DUE/SanityCheck.h b/Marlin/src/HAL/HAL_DUE/SanityCheck.h index 16e07bd3b44f..5398a01720cc 100644 --- a/Marlin/src/HAL/HAL_DUE/SanityCheck.h +++ b/Marlin/src/HAL/HAL_DUE/SanityCheck.h @@ -41,7 +41,7 @@ */ #define _IS_HW_SPI(P) (defined(TMC_SW_##P) && (TMC_SW_##P == MOSI_PIN || TMC_SW_##P == MISO_PIN || TMC_SW_##P == SCK_PIN)) -#if ENABLED(SDSUPPORT) && ENABLED(HAVE_TMC2130) +#if ENABLED(SDSUPPORT) && HAVE_SPIDRIVER(TMC2130) #if ENABLED(TMC_USE_SW_SPI) #if DISABLED(DUE_SOFTWARE_SPI) && (_IS_HW_SPI(MOSI) || _IS_HW_SPI(MISO) || _IS_HW_SPI(SCK)) #error "DUE hardware SPI is required but is incompatible with TMC2130 software SPI. Either disable TMC_USE_SW_SPI or use separate pins for the two SPIs." diff --git a/Marlin/src/HAL/HAL_LPC1768/SanityCheck.h b/Marlin/src/HAL/HAL_LPC1768/SanityCheck.h index a408a6c5877e..15cdaba4e3bf 100644 --- a/Marlin/src/HAL/HAL_LPC1768/SanityCheck.h +++ b/Marlin/src/HAL/HAL_LPC1768/SanityCheck.h @@ -66,7 +66,7 @@ #endif #endif // SPINDLE_LASER_ENABLE -#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) && ENABLED(HAVE_TMC2130) && DISABLED(TMC_USE_SW_SPI) \ +#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) && HAVE_SPIDRIVER(TMC2130) && DISABLED(TMC_USE_SW_SPI) \ && (MB(RAMPS_14_RE_ARM_EFB) \ || MB(RAMPS_14_RE_ARM_EEB) \ || MB(RAMPS_14_RE_ARM_EFF) \ diff --git a/Marlin/src/Marlin.cpp b/Marlin/src/Marlin.cpp index 38e5302ea810..fdc6beb38373 100644 --- a/Marlin/src/Marlin.cpp +++ b/Marlin/src/Marlin.cpp @@ -712,10 +712,10 @@ void setup() { SERIAL_PROTOCOLLNPGM("start"); SERIAL_ECHO_START(); - #if ENABLED(HAVE_TMC2130) + #if HAVE_SPIDRIVER(TMC2130) tmc_init_cs_pins(); #endif - #if ENABLED(HAVE_TMC2208) + #if HAVE_SPIDRIVER(TMC2208) tmc2208_serial_begin(); #endif diff --git a/Marlin/src/config/default/Configuration.h b/Marlin/src/config/default/Configuration.h index 8586c4e54fa4..d796518dec15 100644 --- a/Marlin/src/config/default/Configuration.h +++ b/Marlin/src/config/default/Configuration.h @@ -550,6 +550,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/default/Configuration_adv.h b/Marlin/src/config/default/Configuration_adv.h index cd58c6e10d34..987bbf6eef58 100644 --- a/Marlin/src/config/default/Configuration_adv.h +++ b/Marlin/src/config/default/Configuration_adv.h @@ -841,7 +841,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -852,7 +852,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -864,7 +864,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,19 +1036,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1094,39 +1083,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1134,22 +1105,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,20 +1266,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1368,7 +1312,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h index 7c7eb94125e1..f853122c2397 100644 --- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h +++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h @@ -570,6 +570,27 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h index 074edfca3a48..f6bf43aeb534 100644 --- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h +++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h @@ -841,7 +841,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -852,7 +852,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -864,7 +864,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,19 +1036,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1094,39 +1083,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1134,22 +1105,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,20 +1266,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1368,7 +1312,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h index b679fc6652ae..47d4cee973ec 100644 --- a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h +++ b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h @@ -550,6 +550,27 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/Anet/A6/Configuration.h b/Marlin/src/config/examples/Anet/A6/Configuration.h index c8651aa1227e..b6223eaf07f0 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration.h @@ -570,6 +570,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. #define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h index ae63fb9df16f..30a787b354d5 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h @@ -841,7 +841,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -852,7 +852,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -864,7 +864,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,19 +1036,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1094,39 +1083,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1134,22 +1105,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,20 +1266,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1368,7 +1312,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/Anet/A8/Configuration.h b/Marlin/src/config/examples/Anet/A8/Configuration.h index 841a22600344..1374e0c0c028 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration.h @@ -557,6 +557,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. #define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h index f0b93b9cce55..d853b9151205 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h @@ -841,7 +841,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -852,7 +852,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -864,7 +864,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,19 +1036,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1094,39 +1083,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1134,22 +1105,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,20 +1266,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1368,7 +1312,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h b/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h index 18847e905dbb..583167141543 100644 --- a/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h +++ b/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h @@ -550,6 +550,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h b/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h index cd58c6e10d34..987bbf6eef58 100644 --- a/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h +++ b/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h @@ -841,7 +841,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -852,7 +852,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -864,7 +864,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,19 +1036,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1094,39 +1083,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1134,22 +1105,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,20 +1266,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1368,7 +1312,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h index 78a8241588cb..06df8fa168b7 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h +++ b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h @@ -550,6 +550,27 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h index ce1787d707b4..dc5916c6f20b 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h +++ b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h @@ -841,7 +841,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -852,7 +852,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -864,7 +864,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,19 +1036,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1094,39 +1083,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1134,22 +1105,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,20 +1266,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1368,7 +1312,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h index 7b7d42c0a102..04e14d573d42 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h +++ b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h @@ -550,6 +550,27 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h index f1b1cad8ab68..686ab87dc77b 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h +++ b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h @@ -841,7 +841,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -852,7 +852,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -864,7 +864,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,19 +1036,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1094,39 +1083,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1134,22 +1105,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,20 +1266,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1368,7 +1312,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration.h index 782f8bb2a49b..ed8a0127d73f 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration.h +++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration.h @@ -538,6 +538,27 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h index cce42c75e336..7a08bca10156 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h @@ -841,7 +841,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -852,7 +852,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -864,7 +864,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,19 +1036,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1094,39 +1083,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1134,22 +1105,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,20 +1266,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1368,7 +1312,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h index bc198d460f3c..66701a448e71 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h @@ -551,6 +551,27 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. #define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h index b3e08e277508..e7e718a22350 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h @@ -849,7 +849,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -860,7 +860,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -872,7 +872,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1044,19 +1044,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1102,39 +1091,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1142,22 +1113,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1317,20 +1274,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1376,7 +1320,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration.h index 3536e0772760..b68a39ad46c3 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration.h +++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration.h @@ -538,6 +538,27 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h index cce42c75e336..7a08bca10156 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h @@ -841,7 +841,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -852,7 +852,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -864,7 +864,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,19 +1036,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1094,39 +1083,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1134,22 +1105,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,20 +1266,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1368,7 +1312,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/Cartesio/Configuration.h b/Marlin/src/config/examples/Cartesio/Configuration.h index 6421333b46c6..cbbbe864262b 100644 --- a/Marlin/src/config/examples/Cartesio/Configuration.h +++ b/Marlin/src/config/examples/Cartesio/Configuration.h @@ -549,6 +549,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/Cartesio/Configuration_adv.h b/Marlin/src/config/examples/Cartesio/Configuration_adv.h index 5c0b1690bfef..e420f3403f1f 100644 --- a/Marlin/src/config/examples/Cartesio/Configuration_adv.h +++ b/Marlin/src/config/examples/Cartesio/Configuration_adv.h @@ -841,7 +841,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -852,7 +852,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -864,7 +864,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,19 +1036,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1094,39 +1083,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1134,22 +1105,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,20 +1266,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1368,7 +1312,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/Creality/CR-10/Configuration.h b/Marlin/src/config/examples/Creality/CR-10/Configuration.h index fa5e1ebff584..da2eec8b30e4 100755 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration.h +++ b/Marlin/src/config/examples/Creality/CR-10/Configuration.h @@ -560,6 +560,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h index f4db5dbeafd4..fd7216652892 100755 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h @@ -841,7 +841,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -852,7 +852,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -864,7 +864,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,20 +1036,9 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAVE_SPIDRIVER(TMC26X) + #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms #define X_MICROSTEPS 16 // number of microsteps @@ -1094,39 +1083,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1134,22 +1105,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,20 +1266,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1368,7 +1312,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/Creality/CR-10S/Configuration.h b/Marlin/src/config/examples/Creality/CR-10S/Configuration.h index dcfb9db98462..6f78d4b56779 100644 --- a/Marlin/src/config/examples/Creality/CR-10S/Configuration.h +++ b/Marlin/src/config/examples/Creality/CR-10S/Configuration.h @@ -550,6 +550,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h index 5a45bc2c4964..902787b017ee 100644 --- a/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h @@ -841,7 +841,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -852,7 +852,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -864,7 +864,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,19 +1036,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1094,39 +1083,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1134,22 +1105,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,20 +1266,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1368,7 +1312,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/Creality/CR-10mini/Configuration.h b/Marlin/src/config/examples/Creality/CR-10mini/Configuration.h index 43ca4c35da2c..6a81450691e0 100644 --- a/Marlin/src/config/examples/Creality/CR-10mini/Configuration.h +++ b/Marlin/src/config/examples/Creality/CR-10mini/Configuration.h @@ -569,6 +569,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h index 6f89cf635ac4..edbd4388f47c 100644 --- a/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h @@ -841,7 +841,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -852,7 +852,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -864,7 +864,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,19 +1036,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1094,39 +1083,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1134,22 +1105,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,20 +1266,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1368,7 +1312,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/Creality/CR-8/Configuration.h b/Marlin/src/config/examples/Creality/CR-8/Configuration.h index 6454a826d16c..bff8b1b3658c 100644 --- a/Marlin/src/config/examples/Creality/CR-8/Configuration.h +++ b/Marlin/src/config/examples/Creality/CR-8/Configuration.h @@ -560,6 +560,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h index 4458376d7c40..4e341ca2be05 100644 --- a/Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h @@ -841,7 +841,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -852,7 +852,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -864,7 +864,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,19 +1036,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1094,39 +1083,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1134,22 +1105,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,20 +1266,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1368,7 +1312,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/Creality/Ender-2/Configuration.h b/Marlin/src/config/examples/Creality/Ender-2/Configuration.h index 3c13a766096d..5fac8b767b56 100644 --- a/Marlin/src/config/examples/Creality/Ender-2/Configuration.h +++ b/Marlin/src/config/examples/Creality/Ender-2/Configuration.h @@ -554,6 +554,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h b/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h index d1ef61dae4b3..9b4aa2def8dd 100644 --- a/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h @@ -841,7 +841,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -852,7 +852,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -864,7 +864,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,19 +1036,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1094,39 +1083,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1134,22 +1105,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,20 +1266,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1368,7 +1312,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/Creality/Ender-3/Configuration.h b/Marlin/src/config/examples/Creality/Ender-3/Configuration.h index c2f9ac6df1cb..d4be6edcc09b 100644 --- a/Marlin/src/config/examples/Creality/Ender-3/Configuration.h +++ b/Marlin/src/config/examples/Creality/Ender-3/Configuration.h @@ -554,6 +554,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h b/Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h index 1243b2d5ee5e..dd9fb628e882 100644 --- a/Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h @@ -841,7 +841,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -852,7 +852,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -864,7 +864,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,19 +1036,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1094,39 +1083,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1134,22 +1105,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,20 +1266,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1368,7 +1312,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/Creality/Ender-4/Configuration.h b/Marlin/src/config/examples/Creality/Ender-4/Configuration.h index 5d22e744da87..ba71d9abeec9 100644 --- a/Marlin/src/config/examples/Creality/Ender-4/Configuration.h +++ b/Marlin/src/config/examples/Creality/Ender-4/Configuration.h @@ -560,6 +560,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h b/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h index 4458376d7c40..4e341ca2be05 100644 --- a/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h @@ -841,7 +841,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -852,7 +852,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -864,7 +864,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,19 +1036,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1094,39 +1083,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1134,22 +1105,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,20 +1266,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1368,7 +1312,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/Felix/Configuration.h b/Marlin/src/config/examples/Felix/Configuration.h index b79398bf355f..3480f40303d4 100644 --- a/Marlin/src/config/examples/Felix/Configuration.h +++ b/Marlin/src/config/examples/Felix/Configuration.h @@ -531,6 +531,27 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/Felix/Configuration_adv.h b/Marlin/src/config/examples/Felix/Configuration_adv.h index e5bde478b6a8..0981e3c25e11 100644 --- a/Marlin/src/config/examples/Felix/Configuration_adv.h +++ b/Marlin/src/config/examples/Felix/Configuration_adv.h @@ -841,7 +841,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -852,7 +852,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -864,7 +864,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,19 +1036,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1094,39 +1083,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1134,22 +1105,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,20 +1266,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1368,7 +1312,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/Felix/DUAL/Configuration.h b/Marlin/src/config/examples/Felix/DUAL/Configuration.h index ba5f1e55b079..7924b0524cdf 100644 --- a/Marlin/src/config/examples/Felix/DUAL/Configuration.h +++ b/Marlin/src/config/examples/Felix/DUAL/Configuration.h @@ -531,6 +531,27 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h index 361f185a7e53..64aa0537ece6 100644 --- a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h +++ b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h @@ -555,6 +555,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h index 086507c806ca..195ada2c9775 100644 --- a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h +++ b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h @@ -841,7 +841,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -852,7 +852,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -864,7 +864,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,19 +1036,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1094,39 +1083,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1134,22 +1105,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,20 +1266,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1368,7 +1312,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h b/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h index c9fc21aa99f5..81f86a5f3236 100644 --- a/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h @@ -565,6 +565,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h b/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h index 858b125506a3..c2c615c78549 100644 --- a/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h @@ -550,6 +550,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h index 1177e3cad355..b15830fa53be 100644 --- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h @@ -565,6 +565,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h index 94821804a11e..02da06cc9970 100644 --- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h @@ -565,6 +565,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h index 1d6a8c19eec9..4c5d11476860 100644 --- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h @@ -550,6 +550,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h index 7ea6d77256e2..dc8cbee5404a 100644 --- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h +++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h @@ -841,7 +841,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -852,7 +852,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -864,7 +864,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,19 +1036,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1094,39 +1083,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1134,22 +1105,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,20 +1266,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1368,7 +1312,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h index ae2d47433b65..efbed815fc1d 100644 --- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h @@ -550,6 +550,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h index 7ea6d77256e2..dc8cbee5404a 100644 --- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h +++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h @@ -841,7 +841,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -852,7 +852,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -864,7 +864,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,19 +1036,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1094,39 +1083,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1134,22 +1105,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,20 +1266,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1368,7 +1312,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h b/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h index 20ff78d9d0d6..e4e83255ca24 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h @@ -554,6 +554,27 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h index 5e81709af827..65cb1e97b089 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h @@ -841,7 +841,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -852,7 +852,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -864,7 +864,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,19 +1036,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1094,39 +1083,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1134,22 +1105,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,20 +1266,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1368,7 +1312,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/JGAurora/A5/Configuration.h b/Marlin/src/config/examples/JGAurora/A5/Configuration.h index a0b97c6aabdc..f243c6ff86ff 100644 --- a/Marlin/src/config/examples/JGAurora/A5/Configuration.h +++ b/Marlin/src/config/examples/JGAurora/A5/Configuration.h @@ -562,6 +562,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h b/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h index e37cae980d78..b521a3911523 100644 --- a/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h +++ b/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h @@ -841,7 +841,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -852,7 +852,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -864,7 +864,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,19 +1036,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1094,39 +1083,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1134,22 +1105,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,20 +1266,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1368,7 +1312,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/MakerParts/Configuration.h b/Marlin/src/config/examples/MakerParts/Configuration.h index e9fed6c7e91e..0a9f7d0daa8f 100644 --- a/Marlin/src/config/examples/MakerParts/Configuration.h +++ b/Marlin/src/config/examples/MakerParts/Configuration.h @@ -570,6 +570,27 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/MakerParts/Configuration_adv.h b/Marlin/src/config/examples/MakerParts/Configuration_adv.h index 5d95bdf785c0..0c9a522ee817 100644 --- a/Marlin/src/config/examples/MakerParts/Configuration_adv.h +++ b/Marlin/src/config/examples/MakerParts/Configuration_adv.h @@ -841,7 +841,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -852,7 +852,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -864,7 +864,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,19 +1036,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1094,39 +1083,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1134,22 +1105,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,20 +1266,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1368,7 +1312,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration.h b/Marlin/src/config/examples/Malyan/M150/Configuration.h index 792f512dba56..b2594c0afb16 100644 --- a/Marlin/src/config/examples/Malyan/M150/Configuration.h +++ b/Marlin/src/config/examples/Malyan/M150/Configuration.h @@ -559,6 +559,27 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h index 0ad6b45c4e44..25462d247430 100644 --- a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h @@ -841,7 +841,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -852,7 +852,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -864,7 +864,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,19 +1036,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1094,39 +1083,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1134,22 +1105,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,20 +1266,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1368,7 +1312,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/Malyan/M200/Configuration.h b/Marlin/src/config/examples/Malyan/M200/Configuration.h index fb98febcabff..5289f083e5be 100644 --- a/Marlin/src/config/examples/Malyan/M200/Configuration.h +++ b/Marlin/src/config/examples/Malyan/M200/Configuration.h @@ -549,6 +549,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h index ed0323981fc5..3726b87076c6 100644 --- a/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h @@ -841,7 +841,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -852,7 +852,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -864,7 +864,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,19 +1036,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1094,39 +1083,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1134,22 +1105,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,20 +1266,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1368,7 +1312,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h b/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h index 4ddb93c90db0..f527a8c98bf6 100644 --- a/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h +++ b/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h @@ -550,6 +550,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h index 4335127a2102..152ea18fd53f 100644 --- a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h +++ b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h @@ -550,6 +550,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h index faef3301bf02..d4d65dfdf562 100644 --- a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h +++ b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h @@ -841,7 +841,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -852,7 +852,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -864,7 +864,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,19 +1036,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1094,39 +1083,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1134,22 +1105,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,20 +1266,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1368,7 +1312,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration.h b/Marlin/src/config/examples/Mks/Sbase/Configuration.h index 72c5f624a815..05621a4e0536 100644 --- a/Marlin/src/config/examples/Mks/Sbase/Configuration.h +++ b/Marlin/src/config/examples/Mks/Sbase/Configuration.h @@ -550,6 +550,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h index 1cf7c56ed3b7..f756b09475b5 100644 --- a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h +++ b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h @@ -849,7 +849,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -872,7 +872,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1044,19 +1044,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1102,39 +1091,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1142,22 +1113,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1317,20 +1274,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1376,7 +1320,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h b/Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h index 2f3764d99e83..88d3de5004f5 100644 --- a/Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h +++ b/Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h @@ -550,6 +550,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h b/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h index 4a337333d8c8..4b3e82c363c3 100644 --- a/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h @@ -550,6 +550,27 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/RigidBot/Configuration.h b/Marlin/src/config/examples/RigidBot/Configuration.h index 96203ea78a26..487ac19efdaf 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration.h +++ b/Marlin/src/config/examples/RigidBot/Configuration.h @@ -546,6 +546,27 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/RigidBot/Configuration_adv.h b/Marlin/src/config/examples/RigidBot/Configuration_adv.h index 88cf7dd465a4..62fca446dad2 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration_adv.h +++ b/Marlin/src/config/examples/RigidBot/Configuration_adv.h @@ -841,7 +841,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -852,7 +852,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -864,7 +864,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,19 +1036,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1094,39 +1083,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1134,22 +1105,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,20 +1266,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1368,7 +1312,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/SCARA/Configuration.h b/Marlin/src/config/examples/SCARA/Configuration.h index 956df12e33af..dc3502646084 100644 --- a/Marlin/src/config/examples/SCARA/Configuration.h +++ b/Marlin/src/config/examples/SCARA/Configuration.h @@ -563,6 +563,27 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/SCARA/Configuration_adv.h b/Marlin/src/config/examples/SCARA/Configuration_adv.h index d6b99235f711..c3bf7f29d3d0 100644 --- a/Marlin/src/config/examples/SCARA/Configuration_adv.h +++ b/Marlin/src/config/examples/SCARA/Configuration_adv.h @@ -841,7 +841,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -852,7 +852,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -864,7 +864,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,19 +1036,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1094,39 +1083,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1134,22 +1105,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,20 +1266,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1368,7 +1312,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/STM32F10/Configuration.h b/Marlin/src/config/examples/STM32F10/Configuration.h index f96e34dc3036..0fcd772bc076 100644 --- a/Marlin/src/config/examples/STM32F10/Configuration.h +++ b/Marlin/src/config/examples/STM32F10/Configuration.h @@ -552,6 +552,27 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/STM32F4/Configuration.h b/Marlin/src/config/examples/STM32F4/Configuration.h index b6971ab744ec..0d8b2627ca6a 100644 --- a/Marlin/src/config/examples/STM32F4/Configuration.h +++ b/Marlin/src/config/examples/STM32F4/Configuration.h @@ -550,6 +550,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration.h b/Marlin/src/config/examples/Sanguinololu/Configuration.h index 791aae3f8693..a10d26a35dd8 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration.h @@ -550,6 +550,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h index daf7359e3376..408d3f1d1ac2 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h @@ -841,7 +841,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -852,7 +852,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -864,7 +864,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,19 +1036,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1094,39 +1083,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1134,22 +1105,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,20 +1266,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1368,7 +1312,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/TheBorg/Configuration.h b/Marlin/src/config/examples/TheBorg/Configuration.h index 93dfeb0c6e76..71a9d8c9bfcc 100644 --- a/Marlin/src/config/examples/TheBorg/Configuration.h +++ b/Marlin/src/config/examples/TheBorg/Configuration.h @@ -550,6 +550,27 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +#define X_DRIVER_TYPE TMC26X + SPI_STEPPER +//#define X2_DRIVER_TYPE DRV8825 +#define Y_DRIVER_TYPE TMC26X + SPI_STEPPER +//#define Y2_DRIVER_TYPE DRV8825 +#define Z_DRIVER_TYPE TMC26X + SPI_STEPPER +#define Z2_DRIVER_TYPE TMC26X + SPI_STEPPER +#define E0_DRIVER_TYPE TMC26X + SPI_STEPPER +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/TheBorg/Configuration_adv.h b/Marlin/src/config/examples/TheBorg/Configuration_adv.h index 60c8f4270d0d..e74280b393df 100644 --- a/Marlin/src/config/examples/TheBorg/Configuration_adv.h +++ b/Marlin/src/config/examples/TheBorg/Configuration_adv.h @@ -841,7 +841,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -852,7 +852,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -864,7 +864,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,20 +1036,7 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -#define HAVE_TMC26X - -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - #define X_IS_TMC26X - //#define X2_IS_TMC26X - #define Y_IS_TMC26X - //#define Y2_IS_TMC26X - #define Z_IS_TMC26X - #define Z2_IS_TMC26X - #define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1200 // in mA #define X_SENSE_RESISTOR 50 // in mOhms @@ -1095,39 +1082,21 @@ #define E4_SENSE_RESISTOR 50 #define E4_MICROSTEPS 32 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1135,22 +1104,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1310,20 +1265,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1369,7 +1311,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration.h b/Marlin/src/config/examples/TinyBoy2/Configuration.h index bb937c67b7e8..b7249b693524 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration.h +++ b/Marlin/src/config/examples/TinyBoy2/Configuration.h @@ -601,6 +601,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. #define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h index c44ae7e9b2e9..abcaf61cbee4 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h +++ b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h @@ -841,7 +841,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -852,7 +852,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -864,7 +864,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,19 +1036,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1094,39 +1083,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1134,22 +1105,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,20 +1266,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1368,7 +1312,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/Tronxy/X1/Configuration.h b/Marlin/src/config/examples/Tronxy/X1/Configuration.h index cafc48dbe96b..3d760208a195 100644 --- a/Marlin/src/config/examples/Tronxy/X1/Configuration.h +++ b/Marlin/src/config/examples/Tronxy/X1/Configuration.h @@ -550,6 +550,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/Tronxy/X5S/Configuration.h b/Marlin/src/config/examples/Tronxy/X5S/Configuration.h index 44ba23936070..7082841450af 100644 --- a/Marlin/src/config/examples/Tronxy/X5S/Configuration.h +++ b/Marlin/src/config/examples/Tronxy/X5S/Configuration.h @@ -550,6 +550,27 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/Tronxy/XY100/Configuration.h b/Marlin/src/config/examples/Tronxy/XY100/Configuration.h index 0fa57cd306c0..d1f3f6136eb4 100644 --- a/Marlin/src/config/examples/Tronxy/XY100/Configuration.h +++ b/Marlin/src/config/examples/Tronxy/XY100/Configuration.h @@ -561,6 +561,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h index 09d6bbd453df..d25cf4e26250 100644 --- a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h +++ b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h @@ -550,6 +550,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h index 807b926d436f..10dd8813c3ee 100644 --- a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h +++ b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h @@ -841,7 +841,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -852,7 +852,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -864,7 +864,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,19 +1036,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1094,39 +1083,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1134,22 +1105,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,20 +1266,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1368,7 +1312,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration.h b/Marlin/src/config/examples/Velleman/K8200/Configuration.h index 745733b1dc90..5c388bb9fba6 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration.h @@ -580,6 +580,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h index 2dac78cea2a3..5b4931eba780 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h @@ -844,7 +844,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -855,7 +855,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -867,7 +867,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1039,19 +1039,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1097,39 +1086,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1137,22 +1108,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1312,20 +1269,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1371,7 +1315,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration.h b/Marlin/src/config/examples/Velleman/K8400/Configuration.h index 794d215a7ade..ac7d051cc4d8 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8400/Configuration.h @@ -550,6 +550,27 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h index f8fb9dd2e0fe..81fd774f0232 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h @@ -841,7 +841,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -852,7 +852,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -864,7 +864,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,19 +1036,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1094,39 +1083,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1134,22 +1105,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,20 +1266,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1368,7 +1312,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h b/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h index 5eaffedfe973..c75cdc8cd2ff 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h @@ -550,6 +550,27 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h index ed48e0d00b7e..225b29660773 100644 --- a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h +++ b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h @@ -560,6 +560,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h index 8c2fd913a46d..f4a8bf20c24d 100644 --- a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h +++ b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h @@ -843,7 +843,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -854,7 +854,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -866,7 +866,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1038,19 +1038,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1096,39 +1085,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1136,22 +1107,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1311,20 +1268,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1370,7 +1314,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/adafruit/ST7565/Configuration.h b/Marlin/src/config/examples/adafruit/ST7565/Configuration.h index 63bb6fbf856c..e9c4ed89da94 100644 --- a/Marlin/src/config/examples/adafruit/ST7565/Configuration.h +++ b/Marlin/src/config/examples/adafruit/ST7565/Configuration.h @@ -550,6 +550,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h index 60ae2d46afa2..f53949b62fe4 100644 --- a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h +++ b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h @@ -626,6 +626,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h index 02af9293f2fc..3a31c95d34f7 100644 --- a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h @@ -843,7 +843,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -854,7 +854,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -866,7 +866,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1038,19 +1038,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1096,39 +1085,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1136,22 +1107,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1311,20 +1268,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1370,7 +1314,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h index 5ee4b81c9070..77ce3f535686 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h @@ -626,6 +626,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h index 68ec1a6755ff..899f3c4f2f4f 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h @@ -843,7 +843,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -854,7 +854,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -866,7 +866,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1038,19 +1038,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1096,39 +1085,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1136,22 +1107,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1311,20 +1268,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1370,7 +1314,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h index d1e4654d29bf..d161e3f51188 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h @@ -626,6 +626,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h index 86651be99dab..3079f7600636 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h @@ -843,7 +843,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -854,7 +854,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -866,7 +866,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1038,19 +1038,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1096,39 +1085,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1136,22 +1107,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1311,20 +1268,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1370,7 +1314,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h b/Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h index 5955b14dad4d..768fae3d2cc9 100644 --- a/Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h +++ b/Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h @@ -631,6 +631,27 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/delta/generic/Configuration.h b/Marlin/src/config/examples/delta/generic/Configuration.h index b844f4a038b8..5f121617f41c 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration.h +++ b/Marlin/src/config/examples/delta/generic/Configuration.h @@ -616,6 +616,27 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/delta/generic/Configuration_adv.h b/Marlin/src/config/examples/delta/generic/Configuration_adv.h index 86651be99dab..3079f7600636 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/generic/Configuration_adv.h @@ -843,7 +843,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -854,7 +854,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -866,7 +866,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1038,19 +1038,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1096,39 +1085,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1136,22 +1107,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1311,20 +1268,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1370,7 +1314,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h index 0cfa45c122f1..73e52dd869ab 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h @@ -616,6 +616,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h index 86651be99dab..3079f7600636 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h @@ -843,7 +843,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -854,7 +854,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -866,7 +866,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1038,19 +1038,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1096,39 +1085,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1136,22 +1107,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1311,20 +1268,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1370,7 +1314,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/delta/kossel_pro/Configuration.h b/Marlin/src/config/examples/delta/kossel_pro/Configuration.h index d897f8ef890b..600f6a8368fb 100644 --- a/Marlin/src/config/examples/delta/kossel_pro/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration.h @@ -602,6 +602,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h index 6585badbe2d1..6c39fa0cc535 100644 --- a/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h @@ -848,7 +848,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -859,7 +859,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -871,7 +871,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1043,19 +1043,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1101,39 +1090,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1141,22 +1112,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1316,20 +1273,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1375,7 +1319,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/delta/kossel_xl/Configuration.h b/Marlin/src/config/examples/delta/kossel_xl/Configuration.h index f909345e01b8..0d80a6003b1b 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration.h @@ -620,6 +620,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h index c294ee710e03..08d1f1a9dcca 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h @@ -843,7 +843,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -854,7 +854,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -866,7 +866,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1038,19 +1038,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1096,39 +1085,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1136,22 +1107,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1311,20 +1268,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1370,7 +1314,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h index 2617c6f754cb..5760845edade 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h @@ -563,6 +563,27 @@ #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. #define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h index e6432d98ab0e..50a388b0928a 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h @@ -841,7 +841,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -852,7 +852,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -864,7 +864,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,19 +1036,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1094,39 +1083,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1134,22 +1105,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,20 +1266,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1368,7 +1312,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/makibox/Configuration.h b/Marlin/src/config/examples/makibox/Configuration.h index 5f1e4d8e864b..22005cf4e319 100644 --- a/Marlin/src/config/examples/makibox/Configuration.h +++ b/Marlin/src/config/examples/makibox/Configuration.h @@ -553,6 +553,27 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/makibox/Configuration_adv.h b/Marlin/src/config/examples/makibox/Configuration_adv.h index a945585fae32..4d2c9350e676 100644 --- a/Marlin/src/config/examples/makibox/Configuration_adv.h +++ b/Marlin/src/config/examples/makibox/Configuration_adv.h @@ -841,7 +841,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -852,7 +852,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -864,7 +864,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,19 +1036,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1094,39 +1083,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1134,22 +1105,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,20 +1266,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1368,7 +1312,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/stm32f103ret6/Configuration.h b/Marlin/src/config/examples/stm32f103ret6/Configuration.h index a50e53b03d47..93ae7e6438c2 100644 --- a/Marlin/src/config/examples/stm32f103ret6/Configuration.h +++ b/Marlin/src/config/examples/stm32f103ret6/Configuration.h @@ -552,6 +552,27 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration.h index 5b202d729daa..16600dfb088b 100644 --- a/Marlin/src/config/examples/tvrrug/Round2/Configuration.h +++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration.h @@ -539,6 +539,27 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h index f74a81506f2e..cdae3c48736a 100644 --- a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h @@ -1036,19 +1036,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1094,39 +1083,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1134,22 +1105,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,20 +1266,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1368,7 +1312,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/wt150/Configuration.h b/Marlin/src/config/examples/wt150/Configuration.h index c3f1878b266c..aa6182fc46c6 100644 --- a/Marlin/src/config/examples/wt150/Configuration.h +++ b/Marlin/src/config/examples/wt150/Configuration.h @@ -555,6 +555,27 @@ #define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. +/** + * Stepper Drivers for all axes + * + * Options: A4988, DRV8825, LV8729, TB6560, TB6600, TMC2100, TMC2130, TMC2208, TMC26X, TMC2660, TMC5130 + * Append |SPI_STEPPER for drivers with SPI (e.g., TMC2130|SPI_STEPPER) + * For unspecified drivers, DRV8825 is assumed. + * + * :['A4988', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130|SPI_STEPPER', 'TMC2208', 'TMC2208|SPI_STEPPER', 'TMC26X', 'TMC26X|SPI_STEPPER', 'TMC2660', 'TMC2660|SPI_STEPPER', 'TMC5130', 'TMC5130|SPI_STEPPER'] + */ +//#define X_DRIVER_TYPE DRV8825 +//#define X2_DRIVER_TYPE DRV8825 +//#define Y_DRIVER_TYPE DRV8825 +//#define Y2_DRIVER_TYPE DRV8825 +//#define Z_DRIVER_TYPE DRV8825 +//#define Z2_DRIVER_TYPE DRV8825 +//#define E0_DRIVER_TYPE DRV8825 +//#define E1_DRIVER_TYPE DRV8825 +//#define E2_DRIVER_TYPE DRV8825 +//#define E3_DRIVER_TYPE DRV8825 +//#define E4_DRIVER_TYPE DRV8825 + // Enable this feature if all enabled endstop pins are interrupt-capable. // This will remove the need to poll the interrupt pins, saving many CPU cycles. //#define ENDSTOP_INTERRUPTS_FEATURE diff --git a/Marlin/src/config/examples/wt150/Configuration_adv.h b/Marlin/src/config/examples/wt150/Configuration_adv.h index 03b0efcae333..c0f6e30723b2 100644 --- a/Marlin/src/config/examples/wt150/Configuration_adv.h +++ b/Marlin/src/config/examples/wt150/Configuration_adv.h @@ -842,7 +842,7 @@ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -853,7 +853,7 @@ * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -865,7 +865,7 @@ * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1037,19 +1037,8 @@ * You will need to import the TMC26XStepper library into the Arduino IDE for this * (https://github.com/trinamic/TMC26XStepper.git) */ -//#define HAVE_TMC26X -#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory! - //#define X_IS_TMC26X - //#define X2_IS_TMC26X - //#define Y_IS_TMC26X - //#define Y2_IS_TMC26X - //#define Z_IS_TMC26X - //#define Z2_IS_TMC26X - //#define E0_IS_TMC26X - //#define E1_IS_TMC26X - //#define E2_IS_TMC26X - //#define E3_IS_TMC26X - //#define E4_IS_TMC26X + +#if HAVE_SPIDRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1095,39 +1084,21 @@ #define E4_SENSE_RESISTOR 91 #define E4_MICROSTEPS 16 -#endif +#endif // TMC26X // @section tmc_smart -/** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * +/* * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * You'll also need the TMC2130Stepper Arduino library + * (https://github.com/teemuatlut/TMC2130Stepper). + * + * To use TMC2208 stepper UART-configurable stepper drivers + * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. @@ -1135,22 +1106,8 @@ * You'll also need the TMC2208Stepper Arduino library * (https://github.com/teemuatlut/TMC2208Stepper). */ -//#define HAVE_TMC2208 -#if ENABLED(HAVE_TMC2208) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2208 - //#define X2_IS_TMC2208 - //#define Y_IS_TMC2208 - //#define Y2_IS_TMC2208 - //#define Z_IS_TMC2208 - //#define Z2_IS_TMC2208 - //#define E0_IS_TMC2208 - //#define E1_IS_TMC2208 - //#define E2_IS_TMC2208 - //#define E3_IS_TMC2208 - //#define E4_IS_TMC2208 -#endif -#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1310,20 +1267,7 @@ * (https://github.com/ameyer/Arduino-L6470) */ -//#define HAVE_L6470DRIVER -#if ENABLED(HAVE_L6470DRIVER) - - //#define X_IS_L6470 - //#define X2_IS_L6470 - //#define Y_IS_L6470 - //#define Y2_IS_L6470 - //#define Z_IS_L6470 - //#define Z2_IS_L6470 - //#define E0_IS_L6470 - //#define E1_IS_L6470 - //#define E2_IS_L6470 - //#define E3_IS_L6470 - //#define E4_IS_L6470 +#if HAVE_SPIDRIVER(L6470) #define X_MICROSTEPS 16 // number of microsteps #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off @@ -1369,7 +1313,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/core/drivers.h b/Marlin/src/core/drivers.h new file mode 100644 index 000000000000..4fb28eb5aee4 --- /dev/null +++ b/Marlin/src/core/drivers.h @@ -0,0 +1,57 @@ +/** +* Marlin 3D Printer Firmware +* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] +* +* Based on Sprinter and grbl. +* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* +*/ + +#ifndef DRIVERS_H +#define DRIVERS_H + +#define A4988 0x00 +#define DRV8825 0x01 +#define LV8729 0x02 +#define L6470 0x03 +#define TB6560 0x04 +#define TB6600 0x05 +#define TMC2100 0x06 +#define TMC2130 0x07 +#define TMC2208 0x08 +#define TMC26X 0x09 +#define TMC2660 0x0A +#define TMC5130 0x0B +#define DRIVER_TYPE_MASK 0xFF +#define SPI_STEPPER 0x100 + +#define IS_DRIVER_USED(a,t) (defined(a##_DRIVER_TYPE) && (a##_DRIVER_TYPE & DRIVER_TYPE_MASK) == t) +#define HAVE_DRIVER(t) (IS_DRIVER_USED(X,t) || IS_DRIVER_USED(X2,t) || \ + IS_DRIVER_USED(Y,t) || IS_DRIVER_USED(Y2,t) || \ + IS_DRIVER_USED(Z,t) || IS_DRIVER_USED(Z2,t) || \ + IS_DRIVER_USED(E0,t) || IS_DRIVER_USED(E1,t) || \ + IS_DRIVER_USED(E2,t) || IS_DRIVER_USED(E3,t) || \ + IS_DRIVER_USED(E4,t)) + +#define IS_SPIDRIVER_USED(a,t) (IS_DRIVER_USED(a,t) && (a##_DRIVER_TYPE & SPI_STEPPER)) +#define HAVE_SPIDRIVER(t) (IS_SPIDRIVER_USED(X,t) || IS_SPIDRIVER_USED(X2,t) || \ + IS_SPIDRIVER_USED(Y,t) || IS_SPIDRIVER_USED(Y2,t) || \ + IS_SPIDRIVER_USED(Z,t) || IS_SPIDRIVER_USED(Z2,t) || \ + IS_SPIDRIVER_USED(E0,t) || IS_SPIDRIVER_USED(E1,t) || \ + IS_SPIDRIVER_USED(E2,t) || IS_SPIDRIVER_USED(E3,t) || \ + IS_SPIDRIVER_USED(E4,t)) + +#endif // DRIVERS_H diff --git a/Marlin/src/core/macros.h b/Marlin/src/core/macros.h index ce464eb4b7b1..115a9721996f 100644 --- a/Marlin/src/core/macros.h +++ b/Marlin/src/core/macros.h @@ -23,6 +23,8 @@ #ifndef MACROS_H #define MACROS_H +#include "drivers.h" + #define NUM_AXIS 4 #define ABCE 4 #define XYZE 4 @@ -269,4 +271,4 @@ #define FMOD(x, y) fmod(x, y) #define HYPOT(x,y) SQRT(HYPOT2(x,y)) -#endif //__MACROS_H +#endif // MACROS_H diff --git a/Marlin/src/feature/tmc_util.cpp b/Marlin/src/feature/tmc_util.cpp index a5dc428592ec..1c077a61e0ac 100644 --- a/Marlin/src/feature/tmc_util.cpp +++ b/Marlin/src/feature/tmc_util.cpp @@ -52,7 +52,7 @@ bool report_tmc_status = false; bool is_ot; bool is_error; }; - #if ENABLED(HAVE_TMC2130) + #if HAVE_SPIDRIVER(TMC2130) static uint32_t get_pwm_scale(TMC2130Stepper &st) { return st.PWM_SCALE(); } static uint8_t get_status_response(TMC2130Stepper &st) { return st.status_response & 0xF; } static TMC_driver_data get_driver_data(TMC2130Stepper &st) { @@ -70,7 +70,7 @@ bool report_tmc_status = false; return data; } #endif - #if ENABLED(HAVE_TMC2208) + #if HAVE_SPIDRIVER(TMC2208) static uint32_t get_pwm_scale(TMC2208Stepper &st) { return st.pwm_scale_sum(); } static uint8_t get_status_response(TMC2208Stepper &st) { uint32_t drv_status = st.DRV_STATUS(); @@ -159,7 +159,7 @@ bool report_tmc_status = false; } } - #define HAS_HW_COMMS(ST) ENABLED(ST##_IS_TMC2130)|| (ENABLED(ST##_IS_TMC2208) && defined(ST##_HARDWARE_SERIAL)) + #define HAS_HW_COMMS(ST) IS_SPIDRIVER_USED(ST, TMC2130) || (IS_SPIDRIVER_USED(ST, TMC2208) && defined(ST##_HARDWARE_SERIAL)) void monitor_tmc_driver() { static millis_t next_cOT = 0; @@ -311,7 +311,7 @@ void _tmc_say_sgt(const TMC_AxisEnum axis, const int8_t sgt) { SERIAL_EOL(); } - #if ENABLED(HAVE_TMC2130) + #if HAVE_SPIDRIVER(TMC2130) static void tmc_status(TMC2130Stepper &st, const TMC_debug_enum i) { switch (i) { case TMC_PWM_SCALE: SERIAL_PRINT(st.PWM_SCALE(), DEC); break; @@ -331,7 +331,7 @@ void _tmc_say_sgt(const TMC_AxisEnum axis, const int8_t sgt) { } #endif - #if ENABLED(HAVE_TMC2208) + #if HAVE_SPIDRIVER(TMC2208) static void tmc_status(TMC2208Stepper &st, const TMC_debug_enum i) { switch (i) { case TMC_TSTEP: { uint32_t data = 0; st.TSTEP(&data); SERIAL_PROTOCOL(data); break; } @@ -553,7 +553,7 @@ void _tmc_say_sgt(const TMC_AxisEnum axis, const int8_t sgt) { TMC_REPORT("Stallguard thrs", TMC_SGT); DRV_REPORT("DRVSTATUS", TMC_DRV_CODES); - #if ENABLED(HAVE_TMC2130) + #if HAVE_SPIDRIVER(TMC2130) DRV_REPORT("stallguard\t", TMC_STALLGUARD); DRV_REPORT("sg_result\t", TMC_SG_RESULT); DRV_REPORT("fsactive\t", TMC_FSACTIVE); @@ -565,7 +565,7 @@ void _tmc_say_sgt(const TMC_AxisEnum axis, const int8_t sgt) { DRV_REPORT("s2ga\t", TMC_S2GA); DRV_REPORT("otpw\t", TMC_DRV_OTPW); DRV_REPORT("ot\t", TMC_OT); - #if ENABLED(HAVE_TMC2208) + #if HAVE_SPIDRIVER(TMC2208) DRV_REPORT("157C\t", TMC_T157); DRV_REPORT("150C\t", TMC_T150); DRV_REPORT("143C\t", TMC_T143); @@ -591,43 +591,43 @@ void _tmc_say_sgt(const TMC_AxisEnum axis, const int8_t sgt) { #endif // SENSORLESS_HOMING -#if ENABLED(HAVE_TMC2130) +#if HAVE_SPIDRIVER(TMC2130) #define SET_CS_PIN(st) OUT_WRITE(st##_CS_PIN, HIGH) void tmc_init_cs_pins() { - #if ENABLED(X_IS_TMC2130) + #if IS_SPIDRIVER_USED(X, TMC2130) SET_CS_PIN(X); #endif - #if ENABLED(Y_IS_TMC2130) + #if IS_SPIDRIVER_USED(Y, TMC2130) SET_CS_PIN(Y); #endif - #if ENABLED(Z_IS_TMC2130) + #if IS_SPIDRIVER_USED(Z, TMC2130) SET_CS_PIN(Z); #endif - #if ENABLED(X2_IS_TMC2130) + #if IS_SPIDRIVER_USED(X2, TMC2130) SET_CS_PIN(X2); #endif - #if ENABLED(Y2_IS_TMC2130) + #if IS_SPIDRIVER_USED(Y2, TMC2130) SET_CS_PIN(Y2); #endif - #if ENABLED(Z2_IS_TMC2130) + #if IS_SPIDRIVER_USED(Z2, TMC2130) SET_CS_PIN(Z2); #endif - #if ENABLED(E0_IS_TMC2130) + #if IS_SPIDRIVER_USED(E0, TMC2130) SET_CS_PIN(E0); #endif - #if ENABLED(E1_IS_TMC2130) + #if IS_SPIDRIVER_USED(E1, TMC2130) SET_CS_PIN(E1); #endif - #if ENABLED(E2_IS_TMC2130) + #if IS_SPIDRIVER_USED(E2, TMC2130) SET_CS_PIN(E2); #endif - #if ENABLED(E3_IS_TMC2130) + #if IS_SPIDRIVER_USED(E3, TMC2130) SET_CS_PIN(E3); #endif - #if ENABLED(E4_IS_TMC2130) + #if IS_SPIDRIVER_USED(E4, TMC2130) SET_CS_PIN(E4); #endif } -#endif // HAVE_TMC2130 +#endif // TMC2130 #endif // HAS_TRINAMIC diff --git a/Marlin/src/feature/tmc_util.h b/Marlin/src/feature/tmc_util.h index 094b65e9b7b9..a9452e1808c4 100644 --- a/Marlin/src/feature/tmc_util.h +++ b/Marlin/src/feature/tmc_util.h @@ -25,11 +25,11 @@ #include "../inc/MarlinConfigPre.h" -#if ENABLED(HAVE_TMC2130) +#if HAVE_SPIDRIVER(TMC2130) #include #endif -#if ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2208) #include #endif @@ -100,7 +100,7 @@ void monitor_tmc_driver(); void tmc_sensorless_homing(TMC2130Stepper &st, const bool enable=true); #endif -#if ENABLED(HAVE_TMC2130) +#if HAVE_SPIDRIVER(TMC2130) void tmc_init_cs_pins(); #endif diff --git a/Marlin/src/gcode/feature/trinamic/M911-M915.cpp b/Marlin/src/gcode/feature/trinamic/M911-M915.cpp index 8a59837658a0..377e2960d7da 100644 --- a/Marlin/src/gcode/feature/trinamic/M911-M915.cpp +++ b/Marlin/src/gcode/feature/trinamic/M911-M915.cpp @@ -30,7 +30,7 @@ #include "../../../module/planner.h" #include "../../queue.h" -#define M91x_USE(A) (ENABLED(A##_IS_TMC2130) || (ENABLED(A##_IS_TMC2208) && PIN_EXISTS(A##_SERIAL_RX))) +#define M91x_USE(A) (IS_SPIDRIVER_USED(A, TMC2130) || (IS_SPIDRIVER_USED(A, TMC2208) && PIN_EXISTS(A##_SERIAL_RX))) #define M91x_USE_E(N) (E_STEPPERS > N && M91x_USE(E##N)) #define M91x_USE_X (ENABLED(IS_TRAMS) || M91x_USE(X)) #define M91x_USE_Y (ENABLED(IS_TRAMS) || M91x_USE(Y)) @@ -269,26 +269,26 @@ void GcodeSuite::M912() { report = false; switch (i) { case X_AXIS: - #if ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS) + #if IS_SPIDRIVER_USED(X, TMC2130) || ENABLED(IS_TRAMS) if (index == 0) TMC_SET_SGT(X); #endif - #if ENABLED(X2_IS_TMC2130) + #if IS_SPIDRIVER_USED(X2, TMC2130) if (index == 1) TMC_SET_SGT(X2); #endif break; case Y_AXIS: - #if ENABLED(Y_IS_TMC2130) || ENABLED(IS_TRAMS) + #if IS_SPIDRIVER_USED(Y, TMC2130) || ENABLED(IS_TRAMS) if (index == 0) TMC_SET_SGT(Y); #endif - #if ENABLED(Y2_IS_TMC2130) + #if IS_SPIDRIVER_USED(Y2, TMC2130) if (index == 1) TMC_SET_SGT(Y2); #endif break; case Z_AXIS: - #if ENABLED(Z_IS_TMC2130) || ENABLED(IS_TRAMS) + #if IS_SPIDRIVER_USED(Z, TMC2130) || ENABLED(IS_TRAMS) if (index == 0) TMC_SET_SGT(Z); #endif - #if ENABLED(Z2_IS_TMC2130) + #if IS_SPIDRIVER_USED(Z2, TMC2130) if (index == 1) TMC_SET_SGT(Z2); #endif break; @@ -297,26 +297,26 @@ void GcodeSuite::M912() { if (report) LOOP_XYZ(i) switch (i) { case X_AXIS: - #if ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS) + #if IS_SPIDRIVER_USED(X, TMC2130) || ENABLED(IS_TRAMS) TMC_SAY_SGT(X); #endif - #if ENABLED(X2_IS_TMC2130) + #if IS_SPIDRIVER_USED(X2, TMC2130) TMC_SAY_SGT(X2); #endif break; case Y_AXIS: - #if ENABLED(Y_IS_TMC2130) || ENABLED(IS_TRAMS) + #if IS_SPIDRIVER_USED(Y, TMC2130) || ENABLED(IS_TRAMS) TMC_SAY_SGT(Y); #endif - #if ENABLED(Y2_IS_TMC2130) + #if IS_SPIDRIVER_USED(Y2, TMC2130) TMC_SAY_SGT(Y2); #endif break; case Z_AXIS: - #if ENABLED(Z_IS_TMC2130) || ENABLED(IS_TRAMS) + #if IS_SPIDRIVER_USED(Z, TMC2130) || ENABLED(IS_TRAMS) TMC_SAY_SGT(Z); #endif - #if ENABLED(Z2_IS_TMC2130) + #if IS_SPIDRIVER_USED(Z2, TMC2130) TMC_SAY_SGT(Z2); #endif break; diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index 6f847337f456..cfdc9fce15e5 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -132,7 +132,7 @@ * M119 - Report endstops status. * M120 - Enable endstops detection. * M121 - Disable endstops detection. - * M122 - Debug stepper (Requires HAVE_TMC2130 or HAVE_TMC2208) + * M122 - Debug stepper (Requires some [AXES]_DRIVER_TYPE defined as TMC2130/TMC2208 + SPI_STEPPER) * M125 - Save current position and move to filament change position. (Requires PARK_HEAD_ON_PAUSE) * M126 - Solenoid Air Valve Open. (Requires BARICUDA) * M127 - Solenoid Air Valve Closed. (Requires BARICUDA) @@ -219,13 +219,13 @@ * M868 - Report or set position encoder module error correction threshold. * M869 - Report position encoder module error. * M900 - Get or Set Linear Advance K-factor. (Requires LIN_ADVANCE) - * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. (Requires HAVE_TMC2130 or HAVE_TMC2208) + * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. (Requires some [AXES]_DRIVER_TYPE defined as TMC2130/TMC2208 + SPI_STEPPER) * M907 - Set digital trimpot motor current using axis codes. (Requires a board with digital trimpots) * M908 - Control digital trimpot directly. (Requires DAC_STEPPER_CURRENT or DIGIPOTSS_PIN) * M909 - Print digipot/DAC current value. (Requires DAC_STEPPER_CURRENT) * M910 - Commit digipot/DAC value to external EEPROM via I2C. (Requires DAC_STEPPER_CURRENT) - * M911 - Report stepper driver overtemperature pre-warn condition. (Requires HAVE_TMC2130 or HAVE_TMC2208) - * M912 - Clear stepper driver overtemperature pre-warn condition flag. (Requires HAVE_TMC2130 or HAVE_TMC2208) + * M911 - Report stepper driver overtemperature pre-warn condition. (Requires some [AXES]_DRIVER_TYPE defined as TMC2130/TMC2208 + SPI_STEPPER) + * M912 - Clear stepper driver overtemperature pre-warn condition flag. (Requires some [AXES]_DRIVER_TYPE defined as TMC2130/TMC2208 + SPI_STEPPER) * M913 - Set HYBRID_THRESHOLD speed. (Requires HYBRID_THRESHOLD) * M914 - Set SENSORLESS_HOMING sensitivity. (Requires SENSORLESS_HOMING) * diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 417fc59d96bc..d61ac546d759 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -426,6 +426,63 @@ #define ARRAY_BY_HOTENDS(...) ARRAY_N(HOTENDS, __VA_ARGS__) #define ARRAY_BY_HOTENDS1(v1) ARRAY_BY_HOTENDS(v1, v1, v1, v1, v1, v1) +/** + * Driver Timings + * NOTE: Driver timing order is longest-to-shortest duration. + * Preserve this ordering when adding new drivers. + */ +#ifndef MINIMUM_STEPPER_DIR_DELAY + #if HAVE_DRIVER(TB6560) + #define MINIMUM_STEPPER_DIR_DELAY 15000 + #elif HAVE_DRIVER(TB6600) + #define MINIMUM_STEPPER_DIR_DELAY 1500 + #elif HAVE_DRIVER(DRV8825) + #define MINIMUM_STEPPER_DIR_DELAY 650 + #elif HAVE_DRIVER(LV8729) + #define MINIMUM_STEPPER_DIR_DELAY 500 + #elif HAVE_DRIVER(A4988) + #define MINIMUM_STEPPER_DIR_DELAY 200 + #elif HAVE_DRIVER(TMC2100) || HAVE_DRIVER(TMC2130) || HAVE_DRIVER(TMC2208) || HAVE_DRIVER(TMC26X) || HAVE_DRIVER(TMC2660) || HAVE_DRIVER(TMC5130) + #define MINIMUM_STEPPER_DIR_DELAY 20 + #else + #define MINIMUM_STEPPER_DIR_DELAY 0 // Expect at least 10µS since one Stepper ISR must transpire + #endif +#endif + +#ifndef MINIMUM_STEPPER_PULSE + #if HAVE_DRIVER(TB6560) + #define MINIMUM_STEPPER_PULSE 30 + #elif HAVE_DRIVER(TB6600) + #define MINIMUM_STEPPER_PULSE 3 + #elif HAVE_DRIVER(DRV8825) + #define MINIMUM_STEPPER_PULSE 2 + #elif HAVE_DRIVER(A4988) || HAVE_DRIVER(LV8729) + #define MINIMUM_STEPPER_PULSE 1 + #elif HAVE_DRIVER(TMC2100) || HAVE_DRIVER(TMC2130) || HAVE_DRIVER(TMC2208) || HAVE_DRIVER(TMC26X) || HAVE_DRIVER(TMC2660) || HAVE_DRIVER(TMC5130) + #define MINIMUM_STEPPER_PULSE 0 + #else + #define MINIMUM_STEPPER_PULSE 2 + #endif +#endif + +#ifndef MAXIMUM_STEPPER_RATE + #if HAVE_DRIVER(TB6560) + #define MAXIMUM_STEPPER_RATE 15000 + #elif HAVE_DRIVER(LV8729) + #define MAXIMUM_STEPPER_RATE 130000 + #elif HAVE_DRIVER(TB6600) + #define MAXIMUM_STEPPER_RATE 150000 + #elif HAVE_DRIVER(DRV8825) + #define MAXIMUM_STEPPER_RATE 250000 + #elif HAVE_DRIVER(TMC2100) || HAVE_DRIVER(TMC2130) || HAVE_DRIVER(TMC2208) || HAVE_DRIVER(TMC26X) || HAVE_DRIVER(TMC2660) || HAVE_DRIVER(TMC5130) + #define MAXIMUM_STEPPER_RATE 400000 + #elif HAVE_DRIVER(A4988) + #define MAXIMUM_STEPPER_RATE 500000 + #else + #define MAXIMUM_STEPPER_RATE 250000 + #endif +#endif + /** * X_DUAL_ENDSTOPS endstop reassignment */ @@ -711,27 +768,27 @@ #define HAS_SOLENOID_4 (PIN_EXISTS(SOL4)) // Trinamic Stepper Drivers -#define HAS_TRINAMIC (ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) || ENABLED(IS_TRAMS)) -#define X_IS_TRINAMIC (ENABLED( X_IS_TMC2130) || ENABLED( X_IS_TMC2208) || ENABLED(IS_TRAMS)) -#define X2_IS_TRINAMIC (ENABLED(X2_IS_TMC2130) || ENABLED(X2_IS_TMC2208)) -#define Y_IS_TRINAMIC (ENABLED( Y_IS_TMC2130) || ENABLED( Y_IS_TMC2208) || ENABLED(IS_TRAMS)) -#define Y2_IS_TRINAMIC (ENABLED(Y2_IS_TMC2130) || ENABLED(Y2_IS_TMC2208)) -#define Z_IS_TRINAMIC (ENABLED( Z_IS_TMC2130) || ENABLED( Z_IS_TMC2208) || ENABLED(IS_TRAMS)) -#define Z2_IS_TRINAMIC (ENABLED(Z2_IS_TMC2130) || ENABLED(Z2_IS_TMC2208)) -#define E0_IS_TRINAMIC (ENABLED(E0_IS_TMC2130) || ENABLED(E0_IS_TMC2208) || ENABLED(IS_TRAMS)) -#define E1_IS_TRINAMIC (ENABLED(E1_IS_TMC2130) || ENABLED(E1_IS_TMC2208)) -#define E2_IS_TRINAMIC (ENABLED(E2_IS_TMC2130) || ENABLED(E2_IS_TMC2208)) -#define E3_IS_TRINAMIC (ENABLED(E3_IS_TMC2130) || ENABLED(E3_IS_TMC2208)) -#define E4_IS_TRINAMIC (ENABLED(E4_IS_TMC2130) || ENABLED(E4_IS_TMC2208)) +#define HAS_TRINAMIC (HAVE_SPIDRIVER(TMC2130) || HAVE_SPIDRIVER(TMC2208) || ENABLED(IS_TRAMS)) +#define X_IS_TRINAMIC (IS_SPIDRIVER_USED(X, TMC2130) || IS_SPIDRIVER_USED(X, TMC2208) || ENABLED(IS_TRAMS)) +#define X2_IS_TRINAMIC (IS_SPIDRIVER_USED(X2, TMC2130) || IS_SPIDRIVER_USED(X2, TMC2208)) +#define Y_IS_TRINAMIC (IS_SPIDRIVER_USED(Y, TMC2130) || IS_SPIDRIVER_USED(Y, TMC2208) || ENABLED(IS_TRAMS)) +#define Y2_IS_TRINAMIC (IS_SPIDRIVER_USED(Y2, TMC2130) || IS_SPIDRIVER_USED(Y2, TMC2208)) +#define Z_IS_TRINAMIC (IS_SPIDRIVER_USED(Z, TMC2130) || IS_SPIDRIVER_USED(Z, TMC2208) || ENABLED(IS_TRAMS)) +#define Z2_IS_TRINAMIC (IS_SPIDRIVER_USED(Z2, TMC2130) || IS_SPIDRIVER_USED(Z2, TMC2208)) +#define E0_IS_TRINAMIC (IS_SPIDRIVER_USED(E0, TMC2130) || IS_SPIDRIVER_USED(E0, TMC2208) || ENABLED(IS_TRAMS)) +#define E1_IS_TRINAMIC (IS_SPIDRIVER_USED(E1, TMC2130) || IS_SPIDRIVER_USED(E1, TMC2208)) +#define E2_IS_TRINAMIC (IS_SPIDRIVER_USED(E2, TMC2130) || IS_SPIDRIVER_USED(E2, TMC2208)) +#define E3_IS_TRINAMIC (IS_SPIDRIVER_USED(E3, TMC2130) || IS_SPIDRIVER_USED(E3, TMC2208)) +#define E4_IS_TRINAMIC (IS_SPIDRIVER_USED(E4, TMC2130) || IS_SPIDRIVER_USED(E4, TMC2208)) #if ENABLED(SENSORLESS_HOMING) // Disable Z axis sensorless homing if a probe is used to home the Z axis #if HOMING_Z_WITH_PROBE #undef Z_HOMING_SENSITIVITY #endif - #define X_SENSORLESS (ENABLED(X_IS_TMC2130) && defined(X_HOMING_SENSITIVITY)) - #define Y_SENSORLESS (ENABLED(Y_IS_TMC2130) && defined(Y_HOMING_SENSITIVITY)) - #define Z_SENSORLESS (ENABLED(Z_IS_TMC2130) && defined(Z_HOMING_SENSITIVITY)) + #define X_SENSORLESS (IS_SPIDRIVER_USED(X, TMC2130) && defined(X_HOMING_SENSITIVITY)) + #define Y_SENSORLESS (IS_SPIDRIVER_USED(Y, TMC2130) && defined(Y_HOMING_SENSITIVITY)) + #define Z_SENSORLESS (IS_SPIDRIVER_USED(Z, TMC2130) && defined(Z_HOMING_SENSITIVITY)) #endif // Endstops and bed probe diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index e8013994ebae..d822ac5e6176 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -265,10 +265,21 @@ #elif defined(MEASURED_LOWER_LIMIT) || defined(MEASURED_UPPER_LIMIT) #error "MEASURED_(UPPER|LOWER)_LIMIT is now FILWIDTH_ERROR_MARGIN. Please update your configuration." #elif defined(HAVE_TMCDRIVER) - #error "HAVE_TMCDRIVER is now HAVE_TMC26X. Please update your Configuration_adv.h." + #error "HAVE_TMCDRIVER is now [AXIS]_DRIVER_TYPE TMC26X + SPI_STEPPER. Please update your Configuration.h." +#elif defined(HAVE_TMC26X) + #error "HAVE_TMC26X is now [AXIS]_DRIVER_TYPE TMC26X + SPI_STEPPER. Please update your Configuration.h." #elif defined(X_IS_TMC) || defined(X2_IS_TMC) || defined(Y_IS_TMC) || defined(Y2_IS_TMC) || defined(Z_IS_TMC) || defined(Z2_IS_TMC) \ || defined(E0_IS_TMC) || defined(E1_IS_TMC) || defined(E2_IS_TMC) || defined(E3_IS_TMC) || defined(E4_IS_TMC) - #error "[AXIS]_IS_TMC is now [AXIS]_IS_TMC26X. Please update your Configuration_adv.h." + #error "[AXIS]_IS_TMC is now [AXIS]_DRIVER_TYPE TMC26X + SPI_STEPPER. Please update your Configuration.h." +#elif defined(X_IS_TMC26X) || defined(X2_IS_TMC26X) || defined(Y_IS_TMC26X) || defined(Y2_IS_TMC26X) || defined(Z_IS_TMC26X) || defined(Z2_IS_TMC26X) \ + || defined(E0_IS_TMC26X) || defined(E1_IS_TMC26X) || defined(E2_IS_TMC26X) || defined(E3_IS_TMC26X) || defined(E4_IS_TMC26X) + #error "[AXIS]_IS_TMC26X is now [AXIS]_DRIVER_TYPE TMC26X + SPI_STEPPER. Please update your Configuration.h." +#elif defined(X_IS_TMC2130) || defined(X2_IS_TMC2130) || defined(Y_IS_TMC2130) || defined(Y2_IS_TMC2130) || defined(Z_IS_TMC2130) || defined(Z2_IS_TMC2130) \ + || defined(E0_IS_TMC2130) || defined(E1_IS_TMC2130) || defined(E2_IS_TMC2130) || defined(E3_IS_TMC2130) || defined(E4_IS_TMC2130) + #error "[AXIS]_IS_TMC2130 is now [AXIS]_DRIVER_TYPE TMC2130 + SPI_STEPPER. Please update your Configuration.h." +#elif defined(X_IS_TMC2208) || defined(X2_IS_TMC2208) || defined(Y_IS_TMC2208) || defined(Y2_IS_TMC2208) || defined(Z_IS_TMC2208) || defined(Z2_IS_TMC2208) \ + || defined(E0_IS_TMC2208) || defined(E1_IS_TMC2208) || defined(E2_IS_TMC2208) || defined(E3_IS_TMC2208) || defined(E4_IS_TMC2208) +#error "[AXIS]_IS_TMC2208 is now [AXIS]_DRIVER_TYPE TMC2208 + SPI_STEPPER. Please update your Configuration.h." #elif defined(AUTOMATIC_CURRENT_CONTROL) #error "AUTOMATIC_CURRENT_CONTROL is now MONITOR_DRIVER_STATUS. Please update your configuration." #elif defined(FILAMENT_CHANGE_LOAD_LENGTH) @@ -1455,66 +1466,35 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE, #endif /** - * Make sure HAVE_TMC26X is warranted + * Make sure TMC2130 is warranted */ -#if ENABLED(HAVE_TMC26X) && !( \ - ENABLED( X_IS_TMC26X ) \ - || ENABLED( X2_IS_TMC26X ) \ - || ENABLED( Y_IS_TMC26X ) \ - || ENABLED( Y2_IS_TMC26X ) \ - || ENABLED( Z_IS_TMC26X ) \ - || ENABLED( Z2_IS_TMC26X ) \ - || ENABLED( E0_IS_TMC26X ) \ - || ENABLED( E1_IS_TMC26X ) \ - || ENABLED( E2_IS_TMC26X ) \ - || ENABLED( E3_IS_TMC26X ) \ - || ENABLED( E4_IS_TMC26X ) \ - ) - #error "HAVE_TMC26X requires at least one TMC26X stepper to be set." -#endif - -/** - * Make sure HAVE_TMC2130 is warranted - */ -#if ENABLED(HAVE_TMC2130) - #if !( ENABLED( X_IS_TMC2130 ) \ - || ENABLED( X2_IS_TMC2130 ) \ - || ENABLED( Y_IS_TMC2130 ) \ - || ENABLED( Y2_IS_TMC2130 ) \ - || ENABLED( Z_IS_TMC2130 ) \ - || ENABLED( Z2_IS_TMC2130 ) \ - || ENABLED( E0_IS_TMC2130 ) \ - || ENABLED( E1_IS_TMC2130 ) \ - || ENABLED( E2_IS_TMC2130 ) \ - || ENABLED( E3_IS_TMC2130 ) \ - || ENABLED( E4_IS_TMC2130 ) ) - #error "HAVE_TMC2130 requires at least one TMC2130 stepper to be set." - #elif ENABLED(HYBRID_THRESHOLD) && DISABLED(STEALTHCHOP) +#if HAVE_SPIDRIVER(TMC2130) + #if ENABLED(HYBRID_THRESHOLD) && DISABLED(STEALTHCHOP) #error "Enable STEALTHCHOP to use HYBRID_THRESHOLD." #endif - #if ENABLED(X_IS_TMC2130) && !PIN_EXISTS(X_CS) - #error "X_CS_PIN is required for X_IS_TMC2130. Define X_CS_PIN in Configuration_adv.h." - #elif ENABLED(X2_IS_TMC2130) && !PIN_EXISTS(X2_CS) - #error "X2_CS_PIN is required for X2_IS_TMC2130. Define X2_CS_PIN in Configuration_adv.h." - #elif ENABLED(Y_IS_TMC2130) && !PIN_EXISTS(Y_CS) - #error "Y_CS_PIN is required for Y_IS_TMC2130. Define Y_CS_PIN in Configuration_adv.h." - #elif ENABLED(Y2_IS_TMC2130) && !PIN_EXISTS(Y2_CS) - #error "Y2_CS_PIN is required for Y2_IS_TMC2130. Define Y2_CS_PIN in Configuration_adv.h." - #elif ENABLED(Z_IS_TMC2130) && !PIN_EXISTS(Z_CS) - #error "Z_CS_PIN is required for Z_IS_TMC2130. Define Z_CS_PIN in Configuration_adv.h." - #elif ENABLED(Z2_IS_TMC2130) && !PIN_EXISTS(Z2_CS) - #error "Z2_CS_PIN is required for Z2_IS_TMC2130. Define Z2_CS_PIN in Configuration_adv.h." - #elif ENABLED(E0_IS_TMC2130) && !PIN_EXISTS(E0_CS) - #error "E0_CS_PIN is required for E0_IS_TMC2130. Define E0_CS_PIN in Configuration_adv.h." - #elif ENABLED(E1_IS_TMC2130) && !PIN_EXISTS(E1_CS) - #error "E1_CS_PIN is required for E1_IS_TMC2130. Define E1_CS_PIN in Configuration_adv.h." - #elif ENABLED(E2_IS_TMC2130) && !PIN_EXISTS(E2_CS) - #error "E2_CS_PIN is required for E2_IS_TMC2130. Define E2_CS_PIN in Configuration_adv.h." - #elif ENABLED(E3_IS_TMC2130) && !PIN_EXISTS(E3_CS) - #error "E3_CS_PIN is required for E3_IS_TMC2130. Define E3_CS_PIN in Configuration_adv.h." - #elif ENABLED(E4_IS_TMC2130) && !PIN_EXISTS(E4_CS) - #error "E4_CS_PIN is required for E4_IS_TMC2130. Define E4_CS_PIN in Configuration_adv.h." + #if IS_SPIDRIVER_USED(X, TMC2130) && !PIN_EXISTS(X_CS) + #error "X_CS_PIN is required for TMC2130. Define X_CS_PIN in Configuration_adv.h." + #elif IS_SPIDRIVER_USED(X2, TMC2130) && !PIN_EXISTS(X2_CS) + #error "X2_CS_PIN is required for X2. Define X2_CS_PIN in Configuration_adv.h." + #elif IS_SPIDRIVER_USED(Y, TMC2130) && !PIN_EXISTS(Y_CS) + #error "Y_CS_PIN is required for TMC2130. Define Y_CS_PIN in Configuration_adv.h." + #elif IS_SPIDRIVER_USED(Y2, TMC2130) && !PIN_EXISTS(Y2_CS) + #error "Y2_CS_PIN is required for TMC2130. Define Y2_CS_PIN in Configuration_adv.h." + #elif IS_SPIDRIVER_USED(Z, TMC2130) && !PIN_EXISTS(Z_CS) + #error "Z_CS_PIN is required for TMC2130. Define Z_CS_PIN in Configuration_adv.h." + #elif IS_SPIDRIVER_USED(Z2, TMC2130) && !PIN_EXISTS(Z2_CS) + #error "Z2_CS_PIN is required for TMC2130. Define Z2_CS_PIN in Configuration_adv.h." + #elif IS_SPIDRIVER_USED(E0, TMC2130) && !PIN_EXISTS(E0_CS) + #error "E0_CS_PIN is required for TMC2130. Define E0_CS_PIN in Configuration_adv.h." + #elif IS_SPIDRIVER_USED(E1, TMC2130) && !PIN_EXISTS(E1_CS) + #error "E1_CS_PIN is required for TMC2130. Define E1_CS_PIN in Configuration_adv.h." + #elif IS_SPIDRIVER_USED(E2, TMC2130) && !PIN_EXISTS(E2_CS) + #error "E2_CS_PIN is required for TMC2130. Define E2_CS_PIN in Configuration_adv.h." + #elif IS_SPIDRIVER_USED(E3, TMC2130) && !PIN_EXISTS(E3_CS) + #error "E3_CS_PIN is required for TMC2130. Define E3_CS_PIN in Configuration_adv.h." + #elif IS_SPIDRIVER_USED(E4, TMC2130) && !PIN_EXISTS(E4_CS) + #error "E4_CS_PIN is required for TMC2130. Define E4_CS_PIN in Configuration_adv.h." #endif #if ENABLED(SENSORLESS_HOMING) @@ -1552,27 +1532,10 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE, #endif -/** - * Make sure HAVE_TMC2208 is warranted - */ -#if ENABLED(HAVE_TMC2208) && !( \ - ENABLED( X_IS_TMC2208 ) \ - || ENABLED( X2_IS_TMC2208 ) \ - || ENABLED( Y_IS_TMC2208 ) \ - || ENABLED( Y2_IS_TMC2208 ) \ - || ENABLED( Z_IS_TMC2208 ) \ - || ENABLED( Z2_IS_TMC2208 ) \ - || ENABLED( E0_IS_TMC2208 ) \ - || ENABLED( E1_IS_TMC2208 ) \ - || ENABLED( E2_IS_TMC2208 ) \ - || ENABLED( E3_IS_TMC2208 ) ) - #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) && !( \ +#if HAVE_SPIDRIVER(TMC2208) && ENABLED(ENDSTOP_INTERRUPTS_FEATURE) && !( \ defined(X_HARDWARE_SERIAL ) \ || defined(X2_HARDWARE_SERIAL) \ || defined(Y_HARDWARE_SERIAL ) \ @@ -1595,106 +1558,6 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE, #error "TMC_Z_CALIBRATION requires at least one TMC driver on Z axis" #endif -/** - * Make sure HAVE_L6470DRIVER is warranted - */ -#if ENABLED(HAVE_L6470DRIVER) && !( \ - ENABLED( X_IS_L6470 ) \ - || ENABLED( X2_IS_L6470 ) \ - || ENABLED( Y_IS_L6470 ) \ - || ENABLED( Y2_IS_L6470 ) \ - || ENABLED( Z_IS_L6470 ) \ - || ENABLED( Z2_IS_L6470 ) \ - || ENABLED( E0_IS_L6470 ) \ - || ENABLED( E1_IS_L6470 ) \ - || ENABLED( E2_IS_L6470 ) \ - || ENABLED( E3_IS_L6470 ) \ - || ENABLED( E4_IS_L6470 ) \ - ) - #error "HAVE_L6470DRIVER requires at least one L6470 stepper to be set." -#endif - -/** - * Check that each axis has only one driver selected - */ -#if 1 < 0 \ - + ENABLED(X_IS_TMC26X) \ - + ENABLED(X_IS_TMC2130) \ - + ENABLED(X_IS_TMC2208) \ - + ENABLED(X_IS_L6470) - #error "Please enable only one stepper driver for the X axis." -#endif -#if 1 < 0 \ - + ENABLED(X2_IS_TMC26X) \ - + ENABLED(X2_IS_TMC2130) \ - + ENABLED(X2_IS_TMC2208) \ - + ENABLED(X2_IS_L6470) - #error "Please enable only one stepper driver for the X2 axis." -#endif -#if 1 < 0 \ - + ENABLED(Y_IS_TMC26X) \ - + ENABLED(Y_IS_TMC2130) \ - + ENABLED(Y_IS_TMC2208) \ - + ENABLED(Y_IS_L6470) - #error "Please enable only one stepper driver for the Y axis." -#endif -#if 1 < 0 \ - + ENABLED(Y2_IS_TMC26X) \ - + ENABLED(Y2_IS_TMC2130) \ - + ENABLED(Y2_IS_TMC2208) \ - + ENABLED(Y2_IS_L6470) - #error "Please enable only one stepper driver for the Y2 axis." -#endif -#if 1 < 0 \ - + ENABLED(Z_IS_TMC26X) \ - + ENABLED(Z_IS_TMC2130) \ - + ENABLED(Z_IS_TMC2208) \ - + ENABLED(Z_IS_L6470) - #error "Please enable only one stepper driver for the Z axis." -#endif -#if 1 < 0 \ - + ENABLED(Z2_IS_TMC26X) \ - + ENABLED(Z2_IS_TMC2130) \ - + ENABLED(Z2_IS_TMC2208) \ - + ENABLED(Z2_IS_L6470) - #error "Please enable only one stepper driver for the Z2 axis." -#endif -#if 1 < 0 \ - + ENABLED(E0_IS_TMC26X) \ - + ENABLED(E0_IS_TMC2130) \ - + ENABLED(E0_IS_TMC2208) \ - + ENABLED(E0_IS_L6470) - #error "Please enable only one stepper driver for the E0 axis." -#endif -#if 1 < 0 \ - + ENABLED(E1_IS_TMC26X) \ - + ENABLED(E1_IS_TMC2130) \ - + ENABLED(E1_IS_TMC2208) \ - + ENABLED(E1_IS_L6470) - #error "Please enable only one stepper driver for the E1 axis." -#endif -#if 1 < 0 \ - + ENABLED(E2_IS_TMC26X) \ - + ENABLED(E2_IS_TMC2130) \ - + ENABLED(E2_IS_TMC2208) \ - + ENABLED(E2_IS_L6470) - #error "Please enable only one stepper driver for the E2 axis." -#endif -#if 1 < 0 \ - + ENABLED(E3_IS_TMC26X) \ - + ENABLED(E3_IS_TMC2130) \ - + ENABLED(E3_IS_TMC2208) \ - + ENABLED(E3_IS_L6470) - #error "Please enable only one stepper driver for the E3 axis." -#endif -#if 1 < 0 \ - + ENABLED(E4_IS_TMC26X) \ - + ENABLED(E4_IS_TMC2130) \ - + ENABLED(E4_IS_TMC2208) \ - + ENABLED(E4_IS_L6470) - #error "Please enable only one stepper driver for the E4 axis." -#endif - /** * Digipot requirement */ @@ -1756,4 +1619,8 @@ static_assert(COUNT(sanity_arr_3) <= XYZE_N, "DEFAULT_MAX_ACCELERATION has too m #error "FAST_PWM_FAN only supported by 8 bit CPUs." #endif +#if HAVE_SPIDRIVER(A4988) || HAVE_SPIDRIVER(DRV8825) || HAVE_SPIDRIVER(DRV8825) || HAVE_SPIDRIVER(LV8729) || HAVE_SPIDRIVER(TB6560) || HAVE_SPIDRIVER(TB6600) || HAVE_SPIDRIVER(TMC2100) + #error "A4988, DRV8825, LV8729, TB6560, TB6600 and TMC2100 don't support SPI control" +#endif + #endif // _SANITYCHECK_H_ diff --git a/Marlin/src/module/configuration_store.cpp b/Marlin/src/module/configuration_store.cpp index d58382de8341..510bcd1a2eb0 100644 --- a/Marlin/src/module/configuration_store.cpp +++ b/Marlin/src/module/configuration_store.cpp @@ -818,17 +818,17 @@ void MarlinSettings::postprocess() { // int16_t tmc_sgt[XYZ] = { #if ENABLED(SENSORLESS_HOMING) - #if defined(X_HOMING_SENSITIVITY) && (ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS)) + #if defined(X_HOMING_SENSITIVITY) && (IS_SPIDRIVER_USED(X, TMC2130) || ENABLED(IS_TRAMS)) stepperX.sgt(), #else 0, #endif - #if defined(Y_HOMING_SENSITIVITY) && (ENABLED(Y_IS_TMC2130) || ENABLED(IS_TRAMS)) + #if defined(Y_HOMING_SENSITIVITY) && (IS_SPIDRIVER_USED(Y, TMC2130) || ENABLED(IS_TRAMS)) stepperY.sgt(), #else 0, #endif - #if defined(Z_HOMING_SENSITIVITY) && (ENABLED(Z_IS_TMC2130) || ENABLED(IS_TRAMS)) + #if defined(Z_HOMING_SENSITIVITY) && (IS_SPIDRIVER_USED(Z, TMC2130) || ENABLED(IS_TRAMS)) stepperZ.sgt() #else 0 @@ -1405,26 +1405,26 @@ void MarlinSettings::postprocess() { #if ENABLED(SENSORLESS_HOMING) if (!validating) { #ifdef X_HOMING_SENSITIVITY - #if ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS) + #if IS_SPIDRIVER_USED(X, TMC2130) || ENABLED(IS_TRAMS) stepperX.sgt(tmc_sgt[0]); #endif - #if ENABLED(X2_IS_TMC2130) + #if IS_SPIDRIVER_USED(X2, TMC2130) stepperX2.sgt(tmc_sgt[0]); #endif #endif #ifdef Y_HOMING_SENSITIVITY - #if ENABLED(Y_IS_TMC2130) || ENABLED(IS_TRAMS) + #if IS_SPIDRIVER_USED(Y, TMC2130) || ENABLED(IS_TRAMS) stepperY.sgt(tmc_sgt[1]); #endif - #if ENABLED(Y2_IS_TMC2130) + #if IS_SPIDRIVER_USED(Y2, TMC2130) stepperY2.sgt(tmc_sgt[1]); #endif #endif #ifdef Z_HOMING_SENSITIVITY - #if ENABLED(Z_IS_TMC2130) || ENABLED(IS_TRAMS) + #if IS_SPIDRIVER_USED(Z, TMC2130) || ENABLED(IS_TRAMS) stepperZ.sgt(tmc_sgt[2]); #endif - #if ENABLED(Z2_IS_TMC2130) + #if IS_SPIDRIVER_USED(Z2, TMC2130) stepperZ2.sgt(tmc_sgt[2]); #endif #endif @@ -2577,9 +2577,9 @@ void MarlinSettings::reset(PORTARG_SOLO) { SERIAL_ECHOLNPGM_P(port, "Sensorless homing threshold:"); } CONFIG_ECHO_START; - #define HAS_X_SENSORLESS (defined(X_HOMING_SENSITIVITY) && (ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS))) - #define HAS_Y_SENSORLESS (defined(Y_HOMING_SENSITIVITY) && (ENABLED(Y_IS_TMC2130) || ENABLED(IS_TRAMS))) - #define HAS_Z_SENSORLESS (defined(Z_HOMING_SENSITIVITY) && (ENABLED(Z_IS_TMC2130) || ENABLED(IS_TRAMS))) + #define HAS_X_SENSORLESS (defined(X_HOMING_SENSITIVITY) && (IS_SPIDRIVER_USED(X, TMC2130) || ENABLED(IS_TRAMS))) + #define HAS_Y_SENSORLESS (defined(Y_HOMING_SENSITIVITY) && (IS_SPIDRIVER_USED(Y, TMC2130) || ENABLED(IS_TRAMS))) + #define HAS_Z_SENSORLESS (defined(Z_HOMING_SENSITIVITY) && (IS_SPIDRIVER_USED(Z, TMC2130) || ENABLED(IS_TRAMS))) #if HAS_X_SENSORLESS || HAS_Y_SENSORLESS || HAS_Z_SENSORLESS say_M914(PORTVAR_SOLO); #if HAS_X_SENSORLESS @@ -2594,9 +2594,9 @@ void MarlinSettings::reset(PORTARG_SOLO) { SERIAL_EOL_P(port); #endif - #define HAS_X2_SENSORLESS (defined(X_HOMING_SENSITIVITY) && ENABLED(X2_IS_TMC2130)) - #define HAS_Y2_SENSORLESS (defined(Y_HOMING_SENSITIVITY) && ENABLED(Y2_IS_TMC2130)) - #define HAS_Z2_SENSORLESS (defined(Z_HOMING_SENSITIVITY) && ENABLED(Z2_IS_TMC2130)) + #define HAS_X2_SENSORLESS (defined(X_HOMING_SENSITIVITY) && IS_SPIDRIVER_USED(X2, TMC2130)) + #define HAS_Y2_SENSORLESS (defined(Y_HOMING_SENSITIVITY) && IS_SPIDRIVER_USED(Y2, TMC2130)) + #define HAS_Z2_SENSORLESS (defined(Z_HOMING_SENSITIVITY) && IS_SPIDRIVER_USED(Z2, TMC2130)) #if HAS_X2_SENSORLESS || HAS_Y2_SENSORLESS || HAS_Z2_SENSORLESS say_M914(PORTVAR_SOLO); SERIAL_ECHOPGM_P(port, " I1"); diff --git a/Marlin/src/module/stepper_indirection.cpp b/Marlin/src/module/stepper_indirection.cpp index e1ac4a54ad64..bfdc831ce89f 100644 --- a/Marlin/src/module/stepper_indirection.cpp +++ b/Marlin/src/module/stepper_indirection.cpp @@ -38,7 +38,7 @@ // // TMC26X Driver objects and inits // -#if ENABLED(HAVE_TMC26X) +#if HAVE_SPIDRIVER(TMC26X) #include #ifdef STM32F7 @@ -49,37 +49,37 @@ #define _TMC26X_DEFINE(ST) TMC26XStepper stepper##ST(200, ST##_CS_PIN, ST##_STEP_PIN, ST##_DIR_PIN, ST##_MAX_CURRENT, ST##_SENSE_RESISTOR) - #if ENABLED(X_IS_TMC26X) + #if IS_SPIDRIVER_USED(X, TMC26X) _TMC26X_DEFINE(X); #endif - #if ENABLED(X2_IS_TMC26X) + #if IS_SPIDRIVER_USED(X2, TMC26X) _TMC26X_DEFINE(X2); #endif - #if ENABLED(Y_IS_TMC26X) + #if IS_SPIDRIVER_USED(Y, TMC26X) _TMC26X_DEFINE(Y); #endif - #if ENABLED(Y2_IS_TMC26X) + #if IS_SPIDRIVER_USED(Y2, TMC26X) _TMC26X_DEFINE(Y2); #endif - #if ENABLED(Z_IS_TMC26X) + #if IS_SPIDRIVER_USED(Z, TMC26X) _TMC26X_DEFINE(Z); #endif - #if ENABLED(Z2_IS_TMC26X) + #if IS_SPIDRIVER_USED(Z2, TMC26X) _TMC26X_DEFINE(Z2); #endif - #if ENABLED(E0_IS_TMC26X) + #if IS_SPIDRIVER_USED(E0, TMC26X) _TMC26X_DEFINE(E0); #endif - #if ENABLED(E1_IS_TMC26X) + #if IS_SPIDRIVER_USED(E1, TMC26X) _TMC26X_DEFINE(E1); #endif - #if ENABLED(E2_IS_TMC26X) + #if IS_SPIDRIVER_USED(E2, TMC26X) _TMC26X_DEFINE(E2); #endif - #if ENABLED(E3_IS_TMC26X) + #if IS_SPIDRIVER_USED(E3, TMC26X) _TMC26X_DEFINE(E3); #endif - #if ENABLED(E4_IS_TMC26X) + #if IS_SPIDRIVER_USED(E4, TMC26X) _TMC26X_DEFINE(E4); #endif @@ -89,46 +89,46 @@ }while(0) void tmc26x_init_to_defaults() { - #if ENABLED(X_IS_TMC26X) + #if IS_SPIDRIVER_USED(X, TMC26X) _TMC26X_INIT(X); #endif - #if ENABLED(X2_IS_TMC26X) + #if IS_SPIDRIVER_USED(X2, TMC26X) _TMC26X_INIT(X2); #endif - #if ENABLED(Y_IS_TMC26X) + #if IS_SPIDRIVER_USED(Y, TMC26X) _TMC26X_INIT(Y); #endif - #if ENABLED(Y2_IS_TMC26X) + #if IS_SPIDRIVER_USED(Y2, TMC26X) _TMC26X_INIT(Y2); #endif - #if ENABLED(Z_IS_TMC26X) + #if IS_SPIDRIVER_USED(Z, TMC26X) _TMC26X_INIT(Z); #endif - #if ENABLED(Z2_IS_TMC26X) + #if IS_SPIDRIVER_USED(Z2, TMC26X) _TMC26X_INIT(Z2); #endif - #if ENABLED(E0_IS_TMC26X) + #if IS_SPIDRIVER_USED(E0, TMC26X) _TMC26X_INIT(E0); #endif - #if ENABLED(E1_IS_TMC26X) + #if IS_SPIDRIVER_USED(E1, TMC26X) _TMC26X_INIT(E1); #endif - #if ENABLED(E2_IS_TMC26X) + #if IS_SPIDRIVER_USED(E2, TMC26X) _TMC26X_INIT(E2); #endif - #if ENABLED(E3_IS_TMC26X) + #if IS_SPIDRIVER_USED(E3, TMC26X) _TMC26X_INIT(E3); #endif - #if ENABLED(E4_IS_TMC26X) + #if IS_SPIDRIVER_USED(E4, TMC26X) _TMC26X_INIT(E4); #endif } -#endif // HAVE_TMC26X +#endif // TMC26X // // TMC2130 Driver objects and inits // -#if ENABLED(HAVE_TMC2130) +#if HAVE_SPIDRIVER(TMC2130) #include #include @@ -146,37 +146,37 @@ #endif // Stepper objects of TMC2130 steppers used - #if ENABLED(X_IS_TMC2130) + #if IS_SPIDRIVER_USED(X, TMC2130) _TMC2130_DEFINE(X); #endif - #if ENABLED(X2_IS_TMC2130) + #if IS_SPIDRIVER_USED(X2, TMC2130) _TMC2130_DEFINE(X2); #endif - #if ENABLED(Y_IS_TMC2130) + #if IS_SPIDRIVER_USED(Y, TMC2130) _TMC2130_DEFINE(Y); #endif - #if ENABLED(Y2_IS_TMC2130) + #if IS_SPIDRIVER_USED(Y2, TMC2130) _TMC2130_DEFINE(Y2); #endif - #if ENABLED(Z_IS_TMC2130) + #if IS_SPIDRIVER_USED(Z, TMC2130) _TMC2130_DEFINE(Z); #endif - #if ENABLED(Z2_IS_TMC2130) + #if IS_SPIDRIVER_USED(Z2, TMC2130) _TMC2130_DEFINE(Z2); #endif - #if ENABLED(E0_IS_TMC2130) + #if IS_SPIDRIVER_USED(E0, TMC2130) _TMC2130_DEFINE(E0); #endif - #if ENABLED(E1_IS_TMC2130) + #if IS_SPIDRIVER_USED(E1, TMC2130) _TMC2130_DEFINE(E1); #endif - #if ENABLED(E2_IS_TMC2130) + #if IS_SPIDRIVER_USED(E2, TMC2130) _TMC2130_DEFINE(E2); #endif - #if ENABLED(E3_IS_TMC2130) + #if IS_SPIDRIVER_USED(E3, TMC2130) _TMC2130_DEFINE(E3); #endif - #if ENABLED(E4_IS_TMC2130) + #if IS_SPIDRIVER_USED(E4, TMC2130) _TMC2130_DEFINE(E4); #endif @@ -213,74 +213,74 @@ #define _TMC2130_INIT(ST, SPMM) tmc2130_init(stepper##ST, ST##_CURRENT, ST##_MICROSTEPS, ST##_HYBRID_THRESHOLD, SPMM) void tmc2130_init_to_defaults() { - #if ENABLED(X_IS_TMC2130) + #if IS_SPIDRIVER_USED(X, TMC2130) _TMC2130_INIT( X, planner.axis_steps_per_mm[X_AXIS]); #endif - #if ENABLED(X2_IS_TMC2130) + #if IS_SPIDRIVER_USED(X2, TMC2130) _TMC2130_INIT(X2, planner.axis_steps_per_mm[X_AXIS]); #endif - #if ENABLED(Y_IS_TMC2130) + #if IS_SPIDRIVER_USED(Y, TMC2130) _TMC2130_INIT( Y, planner.axis_steps_per_mm[Y_AXIS]); #endif - #if ENABLED(Y2_IS_TMC2130) + #if IS_SPIDRIVER_USED(Y2, TMC2130) _TMC2130_INIT(Y2, planner.axis_steps_per_mm[Y_AXIS]); #endif - #if ENABLED(Z_IS_TMC2130) + #if IS_SPIDRIVER_USED(Z, TMC2130) _TMC2130_INIT( Z, planner.axis_steps_per_mm[Z_AXIS]); #endif - #if ENABLED(Z2_IS_TMC2130) + #if IS_SPIDRIVER_USED(Z2, TMC2130) _TMC2130_INIT(Z2, planner.axis_steps_per_mm[Z_AXIS]); #endif - #if ENABLED(E0_IS_TMC2130) + #if IS_SPIDRIVER_USED(E0, TMC2130) _TMC2130_INIT(E0, planner.axis_steps_per_mm[E_AXIS]); #endif - #if ENABLED(E1_IS_TMC2130) + #if IS_SPIDRIVER_USED(E1, TMC2130) { constexpr int extruder = 1; _TMC2130_INIT(E1, planner.axis_steps_per_mm[E_AXIS_N]); } #endif - #if ENABLED(E2_IS_TMC2130) + #if IS_SPIDRIVER_USED(E2, TMC2130) { constexpr int extruder = 2; _TMC2130_INIT(E2, planner.axis_steps_per_mm[E_AXIS_N]); } #endif - #if ENABLED(E3_IS_TMC2130) + #if IS_SPIDRIVER_USED(E3, TMC2130) { constexpr int extruder = 3; _TMC2130_INIT(E3, planner.axis_steps_per_mm[E_AXIS_N]); } #endif - #if ENABLED(E4_IS_TMC2130) + #if IS_SPIDRIVER_USED(E4, TMC2130) { constexpr int extruder = 4; _TMC2130_INIT(E4, planner.axis_steps_per_mm[E_AXIS_N]); } #endif #if ENABLED(SENSORLESS_HOMING) #define TMC_INIT_SGT(P,Q) stepper##Q.sgt(P##_HOMING_SENSITIVITY); #ifdef X_HOMING_SENSITIVITY - #if ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS) + #if IS_SPIDRIVER_USED(X, TMC2130) || ENABLED(IS_TRAMS) stepperX.sgt(X_HOMING_SENSITIVITY); #endif - #if ENABLED(X2_IS_TMC2130) + #if IS_SPIDRIVER_USED(X2, TMC2130) stepperX2.sgt(X_HOMING_SENSITIVITY); #endif #endif #ifdef Y_HOMING_SENSITIVITY - #if ENABLED(Y_IS_TMC2130) || ENABLED(IS_TRAMS) + #if IS_SPIDRIVER_USED(Y, TMC2130) || ENABLED(IS_TRAMS) stepperY.sgt(Y_HOMING_SENSITIVITY); #endif - #if ENABLED(Y2_IS_TMC2130) + #if IS_SPIDRIVER_USED(Y2, TMC2130) stepperY2.sgt(Y_HOMING_SENSITIVITY); #endif #endif #ifdef Z_HOMING_SENSITIVITY - #if ENABLED(Z_IS_TMC2130) || ENABLED(IS_TRAMS) + #if IS_SPIDRIVER_USED(Z, TMC2130) || ENABLED(IS_TRAMS) stepperZ.sgt(Z_HOMING_SENSITIVITY); #endif - #if ENABLED(Z2_IS_TMC2130) + #if IS_SPIDRIVER_USED(Z2, TMC2130) stepperZ2.sgt(Z_HOMING_SENSITIVITY); #endif #endif #endif } -#endif // HAVE_TMC2130 +#endif // TMC2130 // // TMC2208 Driver objects and inits // -#if ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2208) #include #include @@ -296,77 +296,77 @@ TMC2208Stepper stepper##ST(&ST##_HARDWARE_SERIAL, ST##_SERIAL_RX_PIN > -1) // Stepper objects of TMC2208 steppers used - #if ENABLED(X_IS_TMC2208) + #if IS_SPIDRIVER_USED(X, TMC2208) #ifdef X_HARDWARE_SERIAL _TMC2208_DEFINE_HARDWARE(X); #else _TMC2208_DEFINE_SOFTWARE(X); #endif #endif - #if ENABLED(X2_IS_TMC2208) + #if IS_SPIDRIVER_USED(X2, TMC2208) #ifdef X2_HARDWARE_SERIAL _TMC2208_DEFINE_HARDWARE(X2); #else _TMC2208_DEFINE_SOFTWARE(X2); #endif #endif - #if ENABLED(Y_IS_TMC2208) + #if IS_SPIDRIVER_USED(Y, TMC2208) #ifdef Y_HARDWARE_SERIAL _TMC2208_DEFINE_HARDWARE(Y); #else _TMC2208_DEFINE_SOFTWARE(Y); #endif #endif - #if ENABLED(Y2_IS_TMC2208) + #if IS_SPIDRIVER_USED(Y2, TMC2208) #ifdef Y2_HARDWARE_SERIAL _TMC2208_DEFINE_HARDWARE(Y2); #else _TMC2208_DEFINE_SOFTWARE(Y2); #endif #endif - #if ENABLED(Z_IS_TMC2208) + #if IS_SPIDRIVER_USED(Z, TMC2208) #ifdef Z_HARDWARE_SERIAL _TMC2208_DEFINE_HARDWARE(Z); #else _TMC2208_DEFINE_SOFTWARE(Z); #endif #endif - #if ENABLED(Z2_IS_TMC2208) + #if IS_SPIDRIVER_USED(Z2, TMC2208) #ifdef Z2_HARDWARE_SERIAL _TMC2208_DEFINE_HARDWARE(Z2); #else _TMC2208_DEFINE_SOFTWARE(Z2); #endif #endif - #if ENABLED(E0_IS_TMC2208) + #if IS_SPIDRIVER_USED(E0, TMC2208) #ifdef E0_HARDWARE_SERIAL _TMC2208_DEFINE_HARDWARE(E0); #else _TMC2208_DEFINE_SOFTWARE(E0); #endif #endif - #if ENABLED(E1_IS_TMC2208) + #if IS_SPIDRIVER_USED(E1, TMC2208) #ifdef E1_HARDWARE_SERIAL _TMC2208_DEFINE_HARDWARE(E1); #else _TMC2208_DEFINE_SOFTWARE(E1); #endif #endif - #if ENABLED(E2_IS_TMC2208) + #if IS_SPIDRIVER_USED(E2, TMC2208) #ifdef E2_HARDWARE_SERIAL _TMC2208_DEFINE_HARDWARE(E2); #else _TMC2208_DEFINE_SOFTWARE(E2); #endif #endif - #if ENABLED(E3_IS_TMC2208) + #if IS_SPIDRIVER_USED(E3, TMC2208) #ifdef E3_HARDWARE_SERIAL _TMC2208_DEFINE_HARDWARE(E3); #else _TMC2208_DEFINE_SOFTWARE(E3); #endif #endif - #if ENABLED(E4_IS_TMC2208) + #if IS_SPIDRIVER_USED(E4, TMC2208) #ifdef E4_HARDWARE_SERIAL _TMC2208_DEFINE_HARDWARE(E4); #else @@ -375,37 +375,37 @@ #endif void tmc2208_serial_begin() { - #if ENABLED(X_IS_TMC2208) + #if IS_SPIDRIVER_USED(X, TMC2208) X_HARDWARE_SERIAL.begin(115200); #endif - #if ENABLED(X2_IS_TMC2208) + #if IS_SPIDRIVER_USED(X2, TMC2208) X2_HARDWARE_SERIAL.begin(115200); #endif - #if ENABLED(Y_IS_TMC2208) + #if IS_SPIDRIVER_USED(Y, TMC2208) Y_HARDWARE_SERIAL.begin(115200); #endif - #if ENABLED(Y2_IS_TMC2208) + #if IS_SPIDRIVER_USED(Y2, TMC2208) Y2_HARDWARE_SERIAL.begin(115200); #endif - #if ENABLED(Z_IS_TMC2208) + #if IS_SPIDRIVER_USED(Z, TMC2208) Z_HARDWARE_SERIAL.begin(115200); #endif - #if ENABLED(Z2_IS_TMC2208) + #if IS_SPIDRIVER_USED(Z2, TMC2208) Z2_HARDWARE_SERIAL.begin(115200); #endif - #if ENABLED(E0_IS_TMC2208) + #if IS_SPIDRIVER_USED(E0, TMC2208) E0_HARDWARE_SERIAL.begin(115200); #endif - #if ENABLED(E1_IS_TMC2208) + #if IS_SPIDRIVER_USED(E1, TMC2208) E1_HARDWARE_SERIAL.begin(115200); #endif - #if ENABLED(E2_IS_TMC2208) + #if IS_SPIDRIVER_USED(E2, TMC2208) E2_HARDWARE_SERIAL.begin(115200); #endif - #if ENABLED(E3_IS_TMC2208) + #if IS_SPIDRIVER_USED(E3, TMC2208) E3_HARDWARE_SERIAL.begin(115200); #endif - #if ENABLED(E4_IS_TMC2208) + #if IS_SPIDRIVER_USED(E4, TMC2208) E4_HARDWARE_SERIAL.begin(115200); #endif } @@ -449,41 +449,41 @@ #define _TMC2208_INIT(ST, SPMM) tmc2208_init(stepper##ST, ST##_CURRENT, ST##_MICROSTEPS, ST##_HYBRID_THRESHOLD, SPMM) void tmc2208_init_to_defaults() { - #if ENABLED(X_IS_TMC2208) + #if IS_SPIDRIVER_USED(X, TMC2208) _TMC2208_INIT(X, planner.axis_steps_per_mm[X_AXIS]); #endif - #if ENABLED(X2_IS_TMC2208) + #if IS_SPIDRIVER_USED(X2, TMC2208) _TMC2208_INIT(X2, planner.axis_steps_per_mm[X_AXIS]); #endif - #if ENABLED(Y_IS_TMC2208) + #if IS_SPIDRIVER_USED(Y, TMC2208) _TMC2208_INIT(Y, planner.axis_steps_per_mm[Y_AXIS]); #endif - #if ENABLED(Y2_IS_TMC2208) + #if IS_SPIDRIVER_USED(Y2, TMC2208) _TMC2208_INIT(Y2, planner.axis_steps_per_mm[Y_AXIS]); #endif - #if ENABLED(Z_IS_TMC2208) + #if IS_SPIDRIVER_USED(Z, TMC2208) _TMC2208_INIT(Z, planner.axis_steps_per_mm[Z_AXIS]); #endif - #if ENABLED(Z2_IS_TMC2208) + #if IS_SPIDRIVER_USED(Z2, TMC2208) _TMC2208_INIT(Z2, planner.axis_steps_per_mm[Z_AXIS]); #endif - #if ENABLED(E0_IS_TMC2208) + #if IS_SPIDRIVER_USED(E0, TMC2208) _TMC2208_INIT(E0, planner.axis_steps_per_mm[E_AXIS]); #endif - #if ENABLED(E1_IS_TMC2208) + #if IS_SPIDRIVER_USED(E1, TMC2208) { constexpr int extruder = 1; _TMC2208_INIT(E1, planner.axis_steps_per_mm[E_AXIS_N]); } #endif - #if ENABLED(E2_IS_TMC2208) + #if IS_SPIDRIVER_USED(E2, TMC2208) { constexpr int extruder = 2; _TMC2208_INIT(E2, planner.axis_steps_per_mm[E_AXIS_N]); } #endif - #if ENABLED(E3_IS_TMC2208) + #if IS_SPIDRIVER_USED(E3, TMC2208) { constexpr int extruder = 3; _TMC2208_INIT(E3, planner.axis_steps_per_mm[E_AXIS_N]); } #endif - #if ENABLED(E4_IS_TMC2208) + #if IS_SPIDRIVER_USED(E4, TMC2208) { constexpr int extruder = 4; _TMC2208_INIT(E4, planner.axis_steps_per_mm[E_AXIS_N]); } #endif } -#endif // HAVE_TMC2208 +#endif // TMC2208 void restore_stepper_drivers() { #if X_IS_TRINAMIC @@ -522,21 +522,21 @@ void restore_stepper_drivers() { } void reset_stepper_drivers() { - #if ENABLED(HAVE_TMC26X) + #if HAVE_SPIDRIVER(TMC26X) tmc26x_init_to_defaults(); #endif - #if ENABLED(HAVE_TMC2130) + #if HAVE_SPIDRIVER(TMC2130) delay(100); tmc2130_init_to_defaults(); #endif - #if ENABLED(HAVE_TMC2208) + #if HAVE_SPIDRIVER(TMC2208) delay(100); tmc2208_init_to_defaults(); #endif #ifdef TMC_ADV TMC_ADV() #endif - #if ENABLED(HAVE_L6470DRIVER) + #if HAVE_SPIDRIVER(L6470) L6470_init_to_defaults(); #endif } @@ -544,7 +544,7 @@ void reset_stepper_drivers() { // // L6470 Driver objects and inits // -#if ENABLED(HAVE_L6470DRIVER) +#if HAVE_SPIDRIVER(L6470) #include #include @@ -552,37 +552,37 @@ void reset_stepper_drivers() { #define _L6470_DEFINE(ST) L6470 stepper##ST(ST##_ENABLE_PIN) // L6470 Stepper objects - #if ENABLED(X_IS_L6470) + #if IS_SPIDRIVER_USED(X, L6470) _L6470_DEFINE(X); #endif - #if ENABLED(X2_IS_L6470) + #if IS_SPIDRIVER_USED(X2, L6470) _L6470_DEFINE(X2); #endif - #if ENABLED(Y_IS_L6470) + #if IS_SPIDRIVER_USED(Y, L6470) _L6470_DEFINE(Y); #endif - #if ENABLED(Y2_IS_L6470) + #if IS_SPIDRIVER_USED(Y2, L6470) _L6470_DEFINE(Y2); #endif - #if ENABLED(Z_IS_L6470) + #if IS_SPIDRIVER_USED(Z, L6470) _L6470_DEFINE(Z); #endif - #if ENABLED(Z2_IS_L6470) + #if IS_SPIDRIVER_USED(Z2, L6470) _L6470_DEFINE(Z2); #endif - #if ENABLED(E0_IS_L6470) + #if IS_SPIDRIVER_USED(E0, L6470) _L6470_DEFINE(E0); #endif - #if ENABLED(E1_IS_L6470) + #if IS_SPIDRIVER_USED(E1, L6470) _L6470_DEFINE(E1); #endif - #if ENABLED(E2_IS_L6470) + #if IS_SPIDRIVER_USED(E2, L6470) _L6470_DEFINE(E2); #endif - #if ENABLED(E3_IS_L6470) + #if IS_SPIDRIVER_USED(E3, L6470) _L6470_DEFINE(E3); #endif - #if ENABLED(E4_IS_L6470) + #if IS_SPIDRIVER_USED(E4, L6470) _L6470_DEFINE(E4); #endif @@ -595,39 +595,39 @@ void reset_stepper_drivers() { }while(0) void L6470_init_to_defaults() { - #if ENABLED(X_IS_L6470) + #if IS_SPIDRIVER_USED(X, L6470) _L6470_INIT(X); #endif - #if ENABLED(X2_IS_L6470) + #if IS_SPIDRIVER_USED(X2, L6470) _L6470_INIT(X2); #endif - #if ENABLED(Y_IS_L6470) + #if IS_SPIDRIVER_USED(Y, L6470) _L6470_INIT(Y); #endif - #if ENABLED(Y2_IS_L6470) + #if IS_SPIDRIVER_USED(Y2, L6470) _L6470_INIT(Y2); #endif - #if ENABLED(Z_IS_L6470) + #if IS_SPIDRIVER_USED(Z, L6470) _L6470_INIT(Z); #endif - #if ENABLED(Z2_IS_L6470) + #if IS_SPIDRIVER_USED(Z2, L6470) _L6470_INIT(Z2); #endif - #if ENABLED(E0_IS_L6470) + #if IS_SPIDRIVER_USED(E0, L6470) _L6470_INIT(E0); #endif - #if ENABLED(E1_IS_L6470) + #if IS_SPIDRIVER_USED(E1, L6470) _L6470_INIT(E1); #endif - #if ENABLED(E2_IS_L6470) + #if IS_SPIDRIVER_USED(E2, L6470) _L6470_INIT(E2); #endif - #if ENABLED(E3_IS_L6470) + #if IS_SPIDRIVER_USED(E3, L6470) _L6470_INIT(E3); #endif - #if ENABLED(E4_IS_L6470) + #if IS_SPIDRIVER_USED(E4, L6470) _L6470_INIT(E4); #endif } -#endif // HAVE_L6470DRIVER +#endif // L6470 diff --git a/Marlin/src/module/stepper_indirection.h b/Marlin/src/module/stepper_indirection.h index 7b80a459bf7b..cdcebcdc1f5f 100644 --- a/Marlin/src/module/stepper_indirection.h +++ b/Marlin/src/module/stepper_indirection.h @@ -47,7 +47,7 @@ #include "../inc/MarlinConfig.h" // TMC26X drivers have STEP/DIR on normal pins, but ENABLE via SPI -#if ENABLED(HAVE_TMC26X) +#if HAVE_SPIDRIVER(TMC26X) #include #ifdef STM32F7 #include "../HAL/HAL_STM32F7/TMC2660.h" @@ -57,19 +57,19 @@ void tmc26x_init_to_defaults(); #endif -#if ENABLED(HAVE_TMC2130) +#if HAVE_SPIDRIVER(TMC2130) #include void tmc2130_init_to_defaults(); #endif -#if ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2208) #include void tmc2208_serial_begin(); void tmc2208_init_to_defaults(); #endif // L6470 has STEP on normal pins, but DIR/ENABLE via SPI -#if ENABLED(HAVE_L6470DRIVER) +#if HAVE_SPIDRIVER(L6470) #include #include void L6470_init_to_defaults(); @@ -79,7 +79,7 @@ void restore_stepper_drivers(); // Called by PSU_ON void reset_stepper_drivers(); // Called by settings.load / settings.reset // X Stepper -#if ENABLED(X_IS_L6470) +#if IS_SPIDRIVER_USED(X, L6470) extern L6470 stepperX; #define X_ENABLE_INIT NOOP #define X_ENABLE_WRITE(STATE) do{ if (STATE) stepperX.Step_Clock(stepperX.getStatus() & STATUS_HIZ); else stepperX.softFree(); }while(0) @@ -88,15 +88,15 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define X_DIR_WRITE(STATE) stepperX.Step_Clock(STATE) #define X_DIR_READ (stepperX.getStatus() & STATUS_DIR) #else - #if ENABLED(X_IS_TMC26X) + #if IS_SPIDRIVER_USED(X, TMC26X) extern TMC26XStepper stepperX; #define X_ENABLE_INIT NOOP #define X_ENABLE_WRITE(STATE) stepperX.setEnabled(STATE) #define X_ENABLE_READ stepperX.isEnabled() #else - #if ENABLED(X_IS_TMC2130) + #if IS_SPIDRIVER_USED(X, TMC2130) extern TMC2130Stepper stepperX; - #elif ENABLED(X_IS_TMC2208) + #elif IS_SPIDRIVER_USED(X, TMC2208) extern TMC2208Stepper stepperX; #endif #define X_ENABLE_INIT SET_OUTPUT(X_ENABLE_PIN) @@ -112,7 +112,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define X_STEP_READ READ(X_STEP_PIN) // Y Stepper -#if ENABLED(Y_IS_L6470) +#if IS_SPIDRIVER_USED(Y, L6470) extern L6470 stepperY; #define Y_ENABLE_INIT NOOP #define Y_ENABLE_WRITE(STATE) do{ if (STATE) stepperY.Step_Clock(stepperY.getStatus() & STATUS_HIZ); else stepperY.softFree(); }while(0) @@ -121,15 +121,15 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define Y_DIR_WRITE(STATE) stepperY.Step_Clock(STATE) #define Y_DIR_READ (stepperY.getStatus() & STATUS_DIR) #else - #if ENABLED(Y_IS_TMC26X) + #if IS_SPIDRIVER_USED(Y, TMC26X) extern TMC26XStepper stepperY; #define Y_ENABLE_INIT NOOP #define Y_ENABLE_WRITE(STATE) stepperY.setEnabled(STATE) #define Y_ENABLE_READ stepperY.isEnabled() #else - #if ENABLED(Y_IS_TMC2130) + #if IS_SPIDRIVER_USED(Y, TMC2130) extern TMC2130Stepper stepperY; - #elif ENABLED(Y_IS_TMC2208) + #elif IS_SPIDRIVER_USED(Y, TMC2208) extern TMC2208Stepper stepperY; #endif #define Y_ENABLE_INIT SET_OUTPUT(Y_ENABLE_PIN) @@ -145,7 +145,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define Y_STEP_READ READ(Y_STEP_PIN) // Z Stepper -#if ENABLED(Z_IS_L6470) +#if IS_SPIDRIVER_USED(Z, L6470) extern L6470 stepperZ; #define Z_ENABLE_INIT NOOP #define Z_ENABLE_WRITE(STATE) do{ if (STATE) stepperZ.Step_Clock(stepperZ.getStatus() & STATUS_HIZ); else stepperZ.softFree(); }while(0) @@ -154,15 +154,15 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define Z_DIR_WRITE(STATE) stepperZ.Step_Clock(STATE) #define Z_DIR_READ (stepperZ.getStatus() & STATUS_DIR) #else - #if ENABLED(Z_IS_TMC26X) + #if IS_SPIDRIVER_USED(Z, TMC26X) extern TMC26XStepper stepperZ; #define Z_ENABLE_INIT NOOP #define Z_ENABLE_WRITE(STATE) stepperZ.setEnabled(STATE) #define Z_ENABLE_READ stepperZ.isEnabled() #else - #if ENABLED(Z_IS_TMC2130) + #if IS_SPIDRIVER_USED(Z, TMC2130) extern TMC2130Stepper stepperZ; - #elif ENABLED(Z_IS_TMC2208) + #elif IS_SPIDRIVER_USED(Z, TMC2208) extern TMC2208Stepper stepperZ; #endif #define Z_ENABLE_INIT SET_OUTPUT(Z_ENABLE_PIN) @@ -179,7 +179,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset // X2 Stepper #if HAS_X2_ENABLE - #if ENABLED(X2_IS_L6470) + #if IS_SPIDRIVER_USED(X2, L6470) extern L6470 stepperX2; #define X2_ENABLE_INIT NOOP #define X2_ENABLE_WRITE(STATE) do{ if (STATE) stepperX2.Step_Clock(stepperX2.getStatus() & STATUS_HIZ); else stepperX2.softFree(); }while(0) @@ -188,15 +188,15 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define X2_DIR_WRITE(STATE) stepperX2.Step_Clock(STATE) #define X2_DIR_READ (stepperX2.getStatus() & STATUS_DIR) #else - #if ENABLED(X2_IS_TMC26X) + #if IS_SPIDRIVER_USED(X2, TMC26X) extern TMC26XStepper stepperX2; #define X2_ENABLE_INIT NOOP #define X2_ENABLE_WRITE(STATE) stepperX2.setEnabled(STATE) #define X2_ENABLE_READ stepperX2.isEnabled() #else - #if ENABLED(X2_IS_TMC2130) + #if IS_SPIDRIVER_USED(X2, TMC2130) extern TMC2130Stepper stepperX2; - #elif ENABLED(X2_IS_TMC2208) + #elif IS_SPIDRIVER_USED(X2, TMC2208) extern TMC2208Stepper stepperX2; #endif #define X2_ENABLE_INIT SET_OUTPUT(X2_ENABLE_PIN) @@ -214,7 +214,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset // Y2 Stepper #if HAS_Y2_ENABLE - #if ENABLED(Y2_IS_L6470) + #if IS_SPIDRIVER_USED(Y2, L6470) extern L6470 stepperY2; #define Y2_ENABLE_INIT NOOP #define Y2_ENABLE_WRITE(STATE) do{ if (STATE) stepperY2.Step_Clock(stepperY2.getStatus() & STATUS_HIZ); else stepperY2.softFree(); }while(0) @@ -223,15 +223,15 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define Y2_DIR_WRITE(STATE) stepperY2.Step_Clock(STATE) #define Y2_DIR_READ (stepperY2.getStatus() & STATUS_DIR) #else - #if ENABLED(Y2_IS_TMC26X) + #if IS_SPIDRIVER_USED(Y2, TMC26X) extern TMC26XStepper stepperY2; #define Y2_ENABLE_INIT NOOP #define Y2_ENABLE_WRITE(STATE) stepperY2.setEnabled(STATE) #define Y2_ENABLE_READ stepperY2.isEnabled() #else - #if ENABLED(Y2_IS_TMC2130) + #if IS_SPIDRIVER_USED(Y2, TMC2130) extern TMC2130Stepper stepperY2; - #elif ENABLED(Y2_IS_TMC2208) + #elif IS_SPIDRIVER_USED(Y2, TMC2208) extern TMC2208Stepper stepperY2; #endif #define Y2_ENABLE_INIT SET_OUTPUT(Y2_ENABLE_PIN) @@ -249,7 +249,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset // Z2 Stepper #if HAS_Z2_ENABLE - #if ENABLED(Z2_IS_L6470) + #if IS_SPIDRIVER_USED(Z2, L6470) extern L6470 stepperZ2; #define Z2_ENABLE_INIT NOOP #define Z2_ENABLE_WRITE(STATE) do{ if (STATE) stepperZ2.Step_Clock(stepperZ2.getStatus() & STATUS_HIZ); else stepperZ2.softFree(); }while(0) @@ -258,15 +258,15 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define Z2_DIR_WRITE(STATE) stepperZ2.Step_Clock(STATE) #define Z2_DIR_READ (stepperZ2.getStatus() & STATUS_DIR) #else - #if ENABLED(Z2_IS_TMC26X) + #if IS_SPIDRIVER_USED(Z2, TMC26X) extern TMC26XStepper stepperZ2; #define Z2_ENABLE_INIT NOOP #define Z2_ENABLE_WRITE(STATE) stepperZ2.setEnabled(STATE) #define Z2_ENABLE_READ stepperZ2.isEnabled() #else - #if ENABLED(Z2_IS_TMC2130) + #if IS_SPIDRIVER_USED(Z2, TMC2130) extern TMC2130Stepper stepperZ2; - #elif ENABLED(Z2_IS_TMC2208) + #elif IS_SPIDRIVER_USED(Z2, TMC2208) extern TMC2208Stepper stepperZ2; #endif #define Z2_ENABLE_INIT SET_OUTPUT(Z2_ENABLE_PIN) @@ -283,7 +283,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #endif // E0 Stepper -#if ENABLED(E0_IS_L6470) +#if IS_SPIDRIVER_USED(E0, L6470) extern L6470 stepperE0; #define E0_ENABLE_INIT NOOP #define E0_ENABLE_WRITE(STATE) do{ if (STATE) stepperE0.Step_Clock(stepperE0.getStatus() & STATUS_HIZ); else stepperE0.softFree(); }while(0) @@ -292,15 +292,15 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define E0_DIR_WRITE(STATE) stepperE0.Step_Clock(STATE) #define E0_DIR_READ (stepperE0.getStatus() & STATUS_DIR) #else - #if ENABLED(E0_IS_TMC26X) + #if IS_SPIDRIVER_USED(E0, TMC26X) extern TMC26XStepper stepperE0; #define E0_ENABLE_INIT NOOP #define E0_ENABLE_WRITE(STATE) stepperE0.setEnabled(STATE) #define E0_ENABLE_READ stepperE0.isEnabled() #else - #if ENABLED(E0_IS_TMC2130) + #if IS_SPIDRIVER_USED(E0, TMC2130) extern TMC2130Stepper stepperE0; - #elif ENABLED(E0_IS_TMC2208) + #elif IS_SPIDRIVER_USED(E0, TMC2208) extern TMC2208Stepper stepperE0; #endif #define E0_ENABLE_INIT SET_OUTPUT(E0_ENABLE_PIN) @@ -316,7 +316,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define E0_STEP_READ READ(E0_STEP_PIN) // E1 Stepper -#if ENABLED(E1_IS_L6470) +#if IS_SPIDRIVER_USED(E1, L6470) extern L6470 stepperE1; #define E1_ENABLE_INIT NOOP #define E1_ENABLE_WRITE(STATE) do{ if (STATE) stepperE1.Step_Clock(stepperE1.getStatus() & STATUS_HIZ); else stepperE1.softFree(); }while(0) @@ -325,15 +325,15 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define E1_DIR_WRITE(STATE) stepperE1.Step_Clock(STATE) #define E1_DIR_READ (stepperE1.getStatus() & STATUS_DIR) #else - #if ENABLED(E1_IS_TMC26X) + #if IS_SPIDRIVER_USED(E1, TMC26X) extern TMC26XStepper stepperE1; #define E1_ENABLE_INIT NOOP #define E1_ENABLE_WRITE(STATE) stepperE1.setEnabled(STATE) #define E1_ENABLE_READ stepperE1.isEnabled() #else - #if ENABLED(E1_IS_TMC2130) + #if IS_SPIDRIVER_USED(E1, TMC2130) extern TMC2130Stepper stepperE1; - #elif ENABLED(E1_IS_TMC2208) + #elif IS_SPIDRIVER_USED(E1, TMC2208) extern TMC2208Stepper stepperE1; #endif #define E1_ENABLE_INIT SET_OUTPUT(E1_ENABLE_PIN) @@ -349,7 +349,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define E1_STEP_READ READ(E1_STEP_PIN) // E2 Stepper -#if ENABLED(E2_IS_L6470) +#if IS_SPIDRIVER_USED(E2, L6470) extern L6470 stepperE2; #define E2_ENABLE_INIT NOOP #define E2_ENABLE_WRITE(STATE) do{ if (STATE) stepperE2.Step_Clock(stepperE2.getStatus() & STATUS_HIZ); else stepperE2.softFree(); }while(0) @@ -358,15 +358,15 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define E2_DIR_WRITE(STATE) stepperE2.Step_Clock(STATE) #define E2_DIR_READ (stepperE2.getStatus() & STATUS_DIR) #else - #if ENABLED(E2_IS_TMC26X) + #if IS_SPIDRIVER_USED(E2, TMC26X) extern TMC26XStepper stepperE2; #define E2_ENABLE_INIT NOOP #define E2_ENABLE_WRITE(STATE) stepperE2.setEnabled(STATE) #define E2_ENABLE_READ stepperE2.isEnabled() #else - #if ENABLED(E2_IS_TMC2130) + #if IS_SPIDRIVER_USED(E2, TMC2130) extern TMC2130Stepper stepperE2; - #elif ENABLED(E2_IS_TMC2208) + #elif IS_SPIDRIVER_USED(E2, TMC2208) extern TMC2208Stepper stepperE2; #endif #define E2_ENABLE_INIT SET_OUTPUT(E2_ENABLE_PIN) @@ -382,7 +382,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define E2_STEP_READ READ(E2_STEP_PIN) // E3 Stepper -#if ENABLED(E3_IS_L6470) +#if IS_SPIDRIVER_USED(E3, L6470) extern L6470 stepperE3; #define E3_ENABLE_INIT NOOP #define E3_ENABLE_WRITE(STATE) do{ if (STATE) stepperE3.Step_Clock(stepperE3.getStatus() & STATUS_HIZ); else stepperE3.softFree(); }while(0) @@ -391,15 +391,15 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define E3_DIR_WRITE(STATE) stepperE3.Step_Clock(STATE) #define E3_DIR_READ (stepperE3.getStatus() & STATUS_DIR) #else - #if ENABLED(E3_IS_TMC26X) + #if IS_SPIDRIVER_USED(E3, TMC26X) extern TMC26XStepper stepperE3; #define E3_ENABLE_INIT NOOP #define E3_ENABLE_WRITE(STATE) stepperE3.setEnabled(STATE) #define E3_ENABLE_READ stepperE3.isEnabled() #else - #if ENABLED(E3_IS_TMC2130) + #if IS_SPIDRIVER_USED(E3, TMC2130) extern TMC2130Stepper stepperE3; - #elif ENABLED(E3_IS_TMC2208) + #elif IS_SPIDRIVER_USED(E3, TMC2208) extern TMC2208Stepper stepperE3; #endif #define E3_ENABLE_INIT SET_OUTPUT(E3_ENABLE_PIN) @@ -415,7 +415,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define E3_STEP_READ READ(E3_STEP_PIN) // E4 Stepper -#if ENABLED(E4_IS_L6470) +#if IS_SPIDRIVER_USED(E4, L6470) extern L6470 stepperE4; #define E4_ENABLE_INIT NOOP #define E4_ENABLE_WRITE(STATE) do{ if (STATE) stepperE4.Step_Clock(stepperE4.getStatus() & STATUS_HIZ); else stepperE4.softFree(); }while(0) @@ -424,15 +424,15 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define E4_DIR_WRITE(STATE) stepperE4.Step_Clock(STATE) #define E4_DIR_READ (stepperE4.getStatus() & STATUS_DIR) #else - #if ENABLED(E4_IS_TMC26X) + #if IS_SPIDRIVER_USED(E4, TMC26X) extern TMC26XStepper stepperE4; #define E4_ENABLE_INIT NOOP #define E4_ENABLE_WRITE(STATE) stepperE4.setEnabled(STATE) #define E4_ENABLE_READ stepperE4.isEnabled() #else - #if ENABLED(E4_IS_TMC2130) + #if IS_SPIDRIVER_USED(E4, TMC2130) extern TMC2130Stepper stepperE4; - #elif ENABLED(E4_IS_TMC2208) + #elif IS_SPIDRIVER_USED(E4, TMC2208) extern TMC2208Stepper stepperE4; #endif #define E4_ENABLE_INIT SET_OUTPUT(E4_ENABLE_PIN) diff --git a/Marlin/src/pins/pins_EINSY_RAMBO.h b/Marlin/src/pins/pins_EINSY_RAMBO.h index b3c1d1caa010..213622839aa1 100644 --- a/Marlin/src/pins/pins_EINSY_RAMBO.h +++ b/Marlin/src/pins/pins_EINSY_RAMBO.h @@ -33,10 +33,8 @@ // // TMC2130 Configuration_adv defaults for EinsyRambo // -#if DISABLED(HAVE_TMC2130) - #error "You must enable TMC2130 support in Configuration_adv.h for EinsyRambo." -#elif DISABLED(X_IS_TMC2130) || DISABLED(Y_IS_TMC2130) || DISABLED(Z_IS_TMC2130) || DISABLED(E0_IS_TMC2130) - #error "You must enable ([XYZ]|E0)_IS_TMC2130 in Configuration_adv.h for EinsyRambo." +#if !IS_SPIDRIVER_USED(X,TMC2130) || !IS_SPIDRIVER_USED(Y,TMC2130) || !IS_SPIDRIVER_USED(Z,TMC2130) || !IS_SPIDRIVER_USED(E0,TMC2130) + #error "You must define ([XYZ]|E0)_DRIVER_TYPE TMC2130 + SPI_STEPPER in Configuration.h for EinsyRambo." #endif // TMC2130 Diag Pins (currently just for reference) diff --git a/Marlin/src/pins/pins_EINSY_RETRO.h b/Marlin/src/pins/pins_EINSY_RETRO.h index df4f1c20beba..458c5b919fc5 100644 --- a/Marlin/src/pins/pins_EINSY_RETRO.h +++ b/Marlin/src/pins/pins_EINSY_RETRO.h @@ -33,10 +33,8 @@ // // TMC2130 Configuration_adv defaults for EinsyRetro // -#if DISABLED(HAVE_TMC2130) - #error "You must enable TMC2130 support in Configuration_adv.h for EinsyRetro." -#elif DISABLED(X_IS_TMC2130) || DISABLED(Y_IS_TMC2130) || DISABLED(Z_IS_TMC2130) || DISABLED(E0_IS_TMC2130) - #error "You must enable ([XYZ]|E0)_IS_TMC2130 in Configuration_adv.h for EinsyRetro." +#if !IS_SPIDRIVER_USED(X,TMC2130) || !IS_SPIDRIVER_USED(Y,TMC2130) || !IS_SPIDRIVER_USED(Z,TMC2130) || !IS_SPIDRIVER_USED(E0,TMC2130) + #error "You must define ([XYZ]|E0)_DRIVER_TYPE TMC2130 + SPI_STEPPER in Configuration.h for EinsyRetro." #endif // TMC2130 Diag Pins (currently just for reference) diff --git a/Marlin/src/pins/pins_RAMPS.h b/Marlin/src/pins/pins_RAMPS.h index a85f3b604947..3c06f5e4d5bc 100644 --- a/Marlin/src/pins/pins_RAMPS.h +++ b/Marlin/src/pins/pins_RAMPS.h @@ -146,7 +146,7 @@ #endif #endif -#if ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2208) /** * TMC2208 stepper drivers * diff --git a/Marlin/src/pins/pins_RAMPS_FD_V1.h b/Marlin/src/pins/pins_RAMPS_FD_V1.h index d8cdeb54f949..d7bfc457ae7a 100644 --- a/Marlin/src/pins/pins_RAMPS_FD_V1.h +++ b/Marlin/src/pins/pins_RAMPS_FD_V1.h @@ -178,7 +178,7 @@ #endif // ULTRA_LCD -#if ENABLED(HAVE_TMC2208) +#if HAVE_SPIDRIVER(TMC2208) /** * TMC2208 stepper drivers *