From e5c0b490c891336cf7dc19e76cc25b6c410c59f6 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 17 Jul 2018 19:47:08 -0500 Subject: [PATCH] Add *_DRIVER_TYPE to example configs Co-Authored-By: teemuatlut --- .../AlephObjects/TAZ4/Configuration_adv.h | 125 +++------- .../AliExpress/CL-260/Configuration.h | 23 ++ .../config/examples/Anet/A6/Configuration.h | 23 ++ .../examples/Anet/A6/Configuration_adv.h | 125 +++------- .../examples/Anet/A8/Configuration_adv.h | 125 +++------- .../examples/Azteeg/X5GT/Configuration.h | 23 ++ .../examples/Azteeg/X5GT/Configuration_adv.h | 125 +++------- .../BIBO/TouchX/cyclops/Configuration_adv.h | 125 +++------- .../BIBO/TouchX/default/Configuration_adv.h | 125 +++------- .../examples/BQ/Hephestos/Configuration_adv.h | 125 +++------- .../examples/BQ/Hephestos_2/Configuration.h | 23 ++ .../BQ/Hephestos_2/Configuration_adv.h | 125 +++------- .../examples/BQ/WITBOX/Configuration_adv.h | 125 +++------- .../examples/Cartesio/Configuration_adv.h | 125 +++------- .../examples/Creality/CR-10/Configuration.h | 23 ++ .../Creality/CR-10/Configuration_adv.h | 125 +++------- .../examples/Creality/CR-10S/Configuration.h | 23 ++ .../Creality/CR-10S/Configuration_adv.h | 125 +++------- .../Creality/CR-10mini/Configuration.h | 23 ++ .../Creality/CR-10mini/Configuration_adv.h | 125 +++------- .../examples/Creality/CR-8/Configuration.h | 23 ++ .../Creality/CR-8/Configuration_adv.h | 125 +++------- .../examples/Creality/Ender-2/Configuration.h | 23 ++ .../Creality/Ender-2/Configuration_adv.h | 125 +++------- .../examples/Creality/Ender-3/Configuration.h | 23 ++ .../Creality/Ender-3/Configuration_adv.h | 125 +++------- .../examples/Creality/Ender-4/Configuration.h | 23 ++ .../Creality/Ender-4/Configuration_adv.h | 125 +++------- .../src/config/examples/Felix/Configuration.h | 23 ++ .../config/examples/Felix/Configuration_adv.h | 125 +++------- .../examples/Felix/DUAL/Configuration.h | 23 ++ .../FolgerTech/i3-2020/Configuration_adv.h | 125 +++------- .../examples/Geeetech/GT2560/Configuration.h | 23 ++ .../Geeetech/I3_Pro_X-GT2560/Configuration.h | 23 ++ .../Prusa i3 Pro B/bltouch/Configuration.h | 23 ++ .../Prusa i3 Pro B/noprobe/Configuration.h | 23 ++ .../Geeetech/Prusa i3 Pro C/Configuration.h | 23 ++ .../Prusa i3 Pro C/Configuration_adv.h | 125 +++------- .../Geeetech/Prusa i3 Pro W/Configuration.h | 23 ++ .../Prusa i3 Pro W/Configuration_adv.h | 125 +++------- .../Infitary/i3-M508/Configuration_adv.h | 125 +++------- .../examples/JGAurora/A5/Configuration.h | 23 ++ .../examples/JGAurora/A5/Configuration_adv.h | 125 +++------- .../examples/MakerParts/Configuration_adv.h | 125 +++------- .../examples/Malyan/M150/Configuration_adv.h | 125 +++------- .../examples/Malyan/M200/Configuration.h | 23 ++ .../examples/Malyan/M200/Configuration_adv.h | 125 +++------- .../Micromake/C1/basic/Configuration.h | 23 ++ .../Micromake/C1/enhanced/Configuration_adv.h | 125 +++------- .../examples/Mks/Sbase/Configuration_adv.h | 125 +++------- .../examples/RepRapPro/Huxley/Configuration.h | 23 ++ .../examples/RigidBot/Configuration_adv.h | 125 +++------- .../config/examples/SCARA/Configuration_adv.h | 125 +++------- .../config/examples/STM32F10/Configuration.h | 23 ++ .../config/examples/STM32F4/Configuration.h | 23 ++ .../examples/Sanguinololu/Configuration.h | 23 ++ .../examples/Sanguinololu/Configuration_adv.h | 125 +++------- .../examples/TheBorg/Configuration_adv.h | 214 +++++++----------- .../config/examples/TinyBoy2/Configuration.h | 25 +- .../examples/TinyBoy2/Configuration_adv.h | 125 +++------- .../config/examples/Tronxy/X1/Configuration.h | 23 ++ .../examples/Tronxy/X3A/Configuration_adv.h | 125 +++------- .../examples/Tronxy/XY100/Configuration.h | 23 ++ .../UltiMachine/Archim2/Configuration.h | 23 ++ .../UltiMachine/Archim2/Configuration_adv.h | 125 +++------- .../examples/Velleman/K8200/Configuration.h | 23 ++ .../Velleman/K8200/Configuration_adv.h | 125 +++------- .../Velleman/K8400/Configuration_adv.h | 125 +++------- .../Wanhao/Duplicator 6/Configuration.h | 23 ++ .../Wanhao/Duplicator 6/Configuration_adv.h | 125 +++------- .../examples/adafruit/ST7565/Configuration.h | 23 ++ .../FLSUN/auto_calibrate/Configuration_adv.h | 125 +++------- .../delta/FLSUN/kossel/Configuration_adv.h | 125 +++------- .../delta/FLSUN/kossel_mini/Configuration.h | 23 ++ .../FLSUN/kossel_mini/Configuration_adv.h | 125 +++------- .../delta/generic/Configuration_adv.h | 125 +++------- .../delta/kossel_mini/Configuration.h | 23 ++ .../delta/kossel_mini/Configuration_adv.h | 125 +++------- .../examples/delta/kossel_pro/Configuration.h | 23 ++ .../delta/kossel_pro/Configuration_adv.h | 125 +++------- .../examples/delta/kossel_xl/Configuration.h | 23 ++ .../delta/kossel_xl/Configuration_adv.h | 125 +++------- .../examples/gCreate/gMax1.5+/Configuration.h | 25 +- .../gCreate/gMax1.5+/Configuration_adv.h | 125 +++------- .../config/examples/makibox/Configuration.h | 23 ++ .../examples/makibox/Configuration_adv.h | 125 +++------- .../examples/stm32f103ret6/Configuration.h | 23 ++ .../tvrrug/Round2/Configuration_adv.h | 125 +++------- .../src/config/examples/wt150/Configuration.h | 23 ++ .../config/examples/wt150/Configuration_adv.h | 125 +++------- 90 files changed, 2802 insertions(+), 4359 deletions(-) diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h index 9cc0a4d5ab..57a17b0918 100644 --- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h +++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h @@ -837,15 +837,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -855,8 +857,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -867,8 +871,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,23 +1042,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1098,62 +1093,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1308,25 +1270,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1372,7 +1321,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 0cc9e3e94f..e4508b29d4 100644 --- a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h +++ b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h @@ -551,6 +551,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 6ad6d95743..f0e6ead230 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration.h @@ -571,6 +571,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 dc255f7a4c..24b3ddb208 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h @@ -837,15 +837,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -855,8 +857,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -867,8 +871,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,23 +1042,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1098,62 +1093,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1308,25 +1270,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1372,7 +1321,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_adv.h b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h index 276cd91e47..afc6831015 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h @@ -837,15 +837,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -855,8 +857,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -867,8 +871,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,23 +1042,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1098,62 +1093,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1308,25 +1270,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1372,7 +1321,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 bc9a5e1528..6cb02526ca 100644 --- a/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h +++ b/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h @@ -551,6 +551,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 dfdd17e4ee..42827a6eed 100644 --- a/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h +++ b/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h @@ -837,15 +837,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -855,8 +857,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -867,8 +871,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,23 +1042,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1098,62 +1093,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1308,25 +1270,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1372,7 +1321,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_adv.h b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h index a76fa7d5e8..05727fcc91 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h +++ b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h @@ -837,15 +837,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -855,8 +857,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -867,8 +871,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,23 +1042,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1098,62 +1093,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1308,25 +1270,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1372,7 +1321,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_adv.h b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h index d2b924df97..840e7fb767 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h +++ b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h @@ -837,15 +837,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -855,8 +857,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -867,8 +871,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,23 +1042,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1098,62 +1093,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1308,25 +1270,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1372,7 +1321,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_adv.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h index d5edc5950a..3592978455 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h @@ -837,15 +837,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -855,8 +857,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -867,8 +871,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,23 +1042,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1098,62 +1093,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1308,25 +1270,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1372,7 +1321,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 5d37faa9ab..891a722e01 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h @@ -552,6 +552,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 077bdbe10b..d5f94fb7ba 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h @@ -845,15 +845,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -863,8 +865,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -875,8 +879,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1044,23 +1050,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1106,62 +1101,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1316,25 +1278,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1380,7 +1329,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_adv.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h index d5edc5950a..3592978455 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h @@ -837,15 +837,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -855,8 +857,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -867,8 +871,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,23 +1042,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1098,62 +1093,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1308,25 +1270,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1372,7 +1321,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/Cartesio/Configuration_adv.h b/Marlin/src/config/examples/Cartesio/Configuration_adv.h index 9b2786c4cb..be9c6033db 100644 --- a/Marlin/src/config/examples/Cartesio/Configuration_adv.h +++ b/Marlin/src/config/examples/Cartesio/Configuration_adv.h @@ -837,15 +837,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -855,8 +857,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -867,8 +871,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,23 +1042,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1098,62 +1093,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1308,25 +1270,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1372,7 +1321,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 3901584fa9..f95cf69fa6 100755 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration.h +++ b/Marlin/src/config/examples/Creality/CR-10/Configuration.h @@ -561,6 +561,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 982092684f..f2ada46ae4 100755 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h @@ -837,15 +837,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -855,8 +857,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -867,8 +871,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,23 +1042,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1098,62 +1093,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1308,25 +1270,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1372,7 +1321,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 7f6e635e66..40dde29f39 100644 --- a/Marlin/src/config/examples/Creality/CR-10S/Configuration.h +++ b/Marlin/src/config/examples/Creality/CR-10S/Configuration.h @@ -551,6 +551,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 2627c5a143..c9b808e6bc 100644 --- a/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h @@ -837,15 +837,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -855,8 +857,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -867,8 +871,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,23 +1042,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1098,62 +1093,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1308,25 +1270,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1372,7 +1321,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 dd142643bd..d1be6f598c 100644 --- a/Marlin/src/config/examples/Creality/CR-10mini/Configuration.h +++ b/Marlin/src/config/examples/Creality/CR-10mini/Configuration.h @@ -570,6 +570,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 c2347371e4..ab87a5e5bf 100644 --- a/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h @@ -837,15 +837,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -855,8 +857,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -867,8 +871,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,23 +1042,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1098,62 +1093,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1308,25 +1270,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1372,7 +1321,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 24c2f8d0bc..1a5d4b10ff 100644 --- a/Marlin/src/config/examples/Creality/CR-8/Configuration.h +++ b/Marlin/src/config/examples/Creality/CR-8/Configuration.h @@ -561,6 +561,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 f335cf870c..e8a56d519a 100644 --- a/Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h @@ -837,15 +837,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -855,8 +857,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -867,8 +871,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,23 +1042,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1098,62 +1093,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1308,25 +1270,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1372,7 +1321,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 66cbc60389..5ebfe43944 100644 --- a/Marlin/src/config/examples/Creality/Ender-2/Configuration.h +++ b/Marlin/src/config/examples/Creality/Ender-2/Configuration.h @@ -555,6 +555,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 719f0cd582..feca063213 100644 --- a/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h @@ -837,15 +837,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -855,8 +857,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -867,8 +871,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,23 +1042,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1098,62 +1093,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1308,25 +1270,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1372,7 +1321,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 415bbf99ce..54300ff1bd 100644 --- a/Marlin/src/config/examples/Creality/Ender-3/Configuration.h +++ b/Marlin/src/config/examples/Creality/Ender-3/Configuration.h @@ -555,6 +555,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 3e8a9ada3e..48b166eac7 100644 --- a/Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h @@ -837,15 +837,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -855,8 +857,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -867,8 +871,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,23 +1042,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1098,62 +1093,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1308,25 +1270,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1372,7 +1321,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 3566866652..b2796b94cc 100644 --- a/Marlin/src/config/examples/Creality/Ender-4/Configuration.h +++ b/Marlin/src/config/examples/Creality/Ender-4/Configuration.h @@ -561,6 +561,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 f335cf870c..e8a56d519a 100644 --- a/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h @@ -837,15 +837,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -855,8 +857,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -867,8 +871,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,23 +1042,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1098,62 +1093,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1308,25 +1270,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1372,7 +1321,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 dd973926fb..a88c4f5b6c 100644 --- a/Marlin/src/config/examples/Felix/Configuration.h +++ b/Marlin/src/config/examples/Felix/Configuration.h @@ -532,6 +532,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 42d40669e0..a72348067f 100644 --- a/Marlin/src/config/examples/Felix/Configuration_adv.h +++ b/Marlin/src/config/examples/Felix/Configuration_adv.h @@ -837,15 +837,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -855,8 +857,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -867,8 +871,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,23 +1042,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1098,62 +1093,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1308,25 +1270,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1372,7 +1321,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 f49bda32b3..9bfaa9f871 100644 --- a/Marlin/src/config/examples/Felix/DUAL/Configuration.h +++ b/Marlin/src/config/examples/Felix/DUAL/Configuration.h @@ -532,6 +532,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 8dbe935f37..3aa686217f 100644 --- a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h +++ b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h @@ -837,15 +837,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -855,8 +857,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -867,8 +871,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,23 +1042,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1098,62 +1093,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1308,25 +1270,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1372,7 +1321,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 c2a7c201a0..493a492f21 100644 --- a/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h +++ b/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h @@ -566,6 +566,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 0aaa3c8c3f..5aea57a965 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 @@ -551,6 +551,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 b939cb1608..4cd0a02a34 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 @@ -566,6 +566,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 47364bbc6a..d6a7766691 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 @@ -566,6 +566,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 267146ea32..dbf2903554 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 @@ -551,6 +551,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 40b64bfa32..18a7483cbc 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 @@ -837,15 +837,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -855,8 +857,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -867,8 +871,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,23 +1042,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1098,62 +1093,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1308,25 +1270,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1372,7 +1321,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 8a34807c1f..632e418e54 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 @@ -551,6 +551,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 40b64bfa32..18a7483cbc 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 @@ -837,15 +837,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -855,8 +857,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -867,8 +871,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,23 +1042,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1098,62 +1093,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1308,25 +1270,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1372,7 +1321,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_adv.h b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h index 14358c2ccb..49f8c2b2ca 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h @@ -837,15 +837,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -855,8 +857,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -867,8 +871,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,23 +1042,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1098,62 +1093,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1308,25 +1270,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1372,7 +1321,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 92fe04d48f..6a6f4191b4 100644 --- a/Marlin/src/config/examples/JGAurora/A5/Configuration.h +++ b/Marlin/src/config/examples/JGAurora/A5/Configuration.h @@ -563,6 +563,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 6f4346c035..26253ef14d 100644 --- a/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h +++ b/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h @@ -837,15 +837,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -855,8 +857,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -867,8 +871,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,23 +1042,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1098,62 +1093,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1308,25 +1270,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1372,7 +1321,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/MakerParts/Configuration_adv.h b/Marlin/src/config/examples/MakerParts/Configuration_adv.h index 659cd120ee..78af647746 100644 --- a/Marlin/src/config/examples/MakerParts/Configuration_adv.h +++ b/Marlin/src/config/examples/MakerParts/Configuration_adv.h @@ -837,15 +837,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -855,8 +857,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -867,8 +871,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,23 +1042,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1098,62 +1093,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1308,25 +1270,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1372,7 +1321,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_adv.h b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h index 8b1f8818f4..5e55db4233 100644 --- a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h @@ -837,15 +837,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -855,8 +857,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -867,8 +871,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,23 +1042,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1098,62 +1093,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1308,25 +1270,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1372,7 +1321,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 cd22cc4029..123d58c311 100644 --- a/Marlin/src/config/examples/Malyan/M200/Configuration.h +++ b/Marlin/src/config/examples/Malyan/M200/Configuration.h @@ -550,6 +550,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 cafe64bfbe..4b8eadb5cd 100644 --- a/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h @@ -837,15 +837,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -855,8 +857,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -867,8 +871,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,23 +1042,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1098,62 +1093,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1308,25 +1270,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1372,7 +1321,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 8ee16bcf36..1eda0e38ab 100644 --- a/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h +++ b/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h @@ -551,6 +551,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 c1cb035af7..c6fe2c7b85 100644 --- a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h +++ b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h @@ -837,15 +837,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -855,8 +857,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -867,8 +871,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,23 +1042,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1098,62 +1093,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1308,25 +1270,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1372,7 +1321,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_adv.h b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h index 4378d1828b..272fc057fa 100644 --- a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h +++ b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h @@ -845,15 +845,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -863,8 +865,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 4 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -875,8 +879,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1044,23 +1050,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1106,62 +1101,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1316,25 +1278,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1380,7 +1329,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 57904dbfb9..b7932fa213 100644 --- a/Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h +++ b/Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h @@ -551,6 +551,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 769d05aa8b..2e87ca37a1 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration_adv.h +++ b/Marlin/src/config/examples/RigidBot/Configuration_adv.h @@ -837,15 +837,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -855,8 +857,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -867,8 +871,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,23 +1042,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1098,62 +1093,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1308,25 +1270,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1372,7 +1321,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/SCARA/Configuration_adv.h b/Marlin/src/config/examples/SCARA/Configuration_adv.h index 470770bc02..95cd966b24 100644 --- a/Marlin/src/config/examples/SCARA/Configuration_adv.h +++ b/Marlin/src/config/examples/SCARA/Configuration_adv.h @@ -837,15 +837,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -855,8 +857,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -867,8 +871,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,23 +1042,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1098,62 +1093,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1308,25 +1270,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1372,7 +1321,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 98902e44d6..1d90ffea96 100644 --- a/Marlin/src/config/examples/STM32F10/Configuration.h +++ b/Marlin/src/config/examples/STM32F10/Configuration.h @@ -553,6 +553,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 e34063c398..43b6b5562f 100644 --- a/Marlin/src/config/examples/STM32F4/Configuration.h +++ b/Marlin/src/config/examples/STM32F4/Configuration.h @@ -551,6 +551,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 f2cb4391f3..485f6c560a 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration.h @@ -551,6 +551,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 b3175b35e5..60aeebe4aa 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h @@ -837,15 +837,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -855,8 +857,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -867,8 +871,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,23 +1042,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1098,62 +1093,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1308,25 +1270,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1372,7 +1321,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/TheBorg/Configuration_adv.h b/Marlin/src/config/examples/TheBorg/Configuration_adv.h index dfcd373c0e..0057e1e722 100644 --- a/Marlin/src/config/examples/TheBorg/Configuration_adv.h +++ b/Marlin/src/config/examples/TheBorg/Configuration_adv.h @@ -837,15 +837,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -855,8 +857,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -867,8 +871,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,125 +1042,80 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -#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 - - #define X_MAX_CURRENT 1200 // in mA - #define X_SENSE_RESISTOR 50 // in mOhms - #define X_MICROSTEPS 32 // number of microsteps - - #define X2_MAX_CURRENT 1200 - #define X2_SENSE_RESISTOR 50 - #define X2_MICROSTEPS 32 - - #define Y_MAX_CURRENT 1200 - #define Y_SENSE_RESISTOR 50 - #define Y_MICROSTEPS 32 - - #define Y2_MAX_CURRENT 1200 - #define Y2_SENSE_RESISTOR 50 - #define Y2_MICROSTEPS 32 - - #define Z_MAX_CURRENT 1200 - #define Z_SENSE_RESISTOR 50 - #define Z_MICROSTEPS 32 - - #define Z2_MAX_CURRENT 1200 - #define Z2_SENSE_RESISTOR 50 - #define Z2_MICROSTEPS 32 - - #define E0_MAX_CURRENT 1200 - #define E0_SENSE_RESISTOR 50 - #define E0_MICROSTEPS 32 - - #define E1_MAX_CURRENT 1200 - #define E1_SENSE_RESISTOR 50 - #define E1_MICROSTEPS 32 - - #define E2_MAX_CURRENT 1200 - #define E2_SENSE_RESISTOR 50 - #define E2_MICROSTEPS 32 - - #define E3_MAX_CURRENT 1200 - #define E3_SENSE_RESISTOR 50 - #define E3_MICROSTEPS 32 - - #define E4_MAX_CURRENT 1200 - #define E4_SENSE_RESISTOR 50 - #define E4_MICROSTEPS 32 +#if HAS_DRIVER(TMC26X) -#endif + #define X_MAX_CURRENT 1000 // in mA + #define X_SENSE_RESISTOR 91 // in mOhms + #define X_MICROSTEPS 16 // number of microsteps + + #define X2_MAX_CURRENT 1000 + #define X2_SENSE_RESISTOR 91 + #define X2_MICROSTEPS 16 + + #define Y_MAX_CURRENT 1000 + #define Y_SENSE_RESISTOR 91 + #define Y_MICROSTEPS 16 + + #define Y2_MAX_CURRENT 1000 + #define Y2_SENSE_RESISTOR 91 + #define Y2_MICROSTEPS 16 + + #define Z_MAX_CURRENT 1000 + #define Z_SENSE_RESISTOR 91 + #define Z_MICROSTEPS 16 + + #define Z2_MAX_CURRENT 1000 + #define Z2_SENSE_RESISTOR 91 + #define Z2_MICROSTEPS 16 + + #define E0_MAX_CURRENT 1000 + #define E0_SENSE_RESISTOR 91 + #define E0_MICROSTEPS 16 + + #define E1_MAX_CURRENT 1000 + #define E1_SENSE_RESISTOR 91 + #define E1_MICROSTEPS 16 + + #define E2_MAX_CURRENT 1000 + #define E2_SENSE_RESISTOR 91 + #define E2_MICROSTEPS 16 + + #define E3_MAX_CURRENT 1000 + #define E3_SENSE_RESISTOR 91 + #define E3_MICROSTEPS 16 + + #define E4_MAX_CURRENT 1000 + #define E4_SENSE_RESISTOR 91 + #define E4_MICROSTEPS 16 + +#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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,25 +1270,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1373,7 +1321,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 6b1af6ed5e..e2520b0d8f 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration.h +++ b/Marlin/src/config/examples/TinyBoy2/Configuration.h @@ -602,9 +602,32 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 +//#define ENDSTOP_INTERRUPTS_FEATURE /** * Endstop Noise Filter diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h index 9076b2ad4b..e0b9ad5573 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h +++ b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h @@ -837,15 +837,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -855,8 +857,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -867,8 +871,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,23 +1042,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1098,62 +1093,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1308,25 +1270,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1372,7 +1321,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 c88c5ab47f..ce0b0d8b0a 100644 --- a/Marlin/src/config/examples/Tronxy/X1/Configuration.h +++ b/Marlin/src/config/examples/Tronxy/X1/Configuration.h @@ -551,6 +551,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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/X3A/Configuration_adv.h b/Marlin/src/config/examples/Tronxy/X3A/Configuration_adv.h index 32b1100e42..8b72335a0d 100644 --- a/Marlin/src/config/examples/Tronxy/X3A/Configuration_adv.h +++ b/Marlin/src/config/examples/Tronxy/X3A/Configuration_adv.h @@ -837,15 +837,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -855,8 +857,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -867,8 +871,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,23 +1042,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1098,62 +1093,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1308,25 +1270,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1372,7 +1321,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/Tronxy/XY100/Configuration.h b/Marlin/src/config/examples/Tronxy/XY100/Configuration.h index 94369ac838..0770e05158 100644 --- a/Marlin/src/config/examples/Tronxy/XY100/Configuration.h +++ b/Marlin/src/config/examples/Tronxy/XY100/Configuration.h @@ -562,6 +562,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 28a913bad1..cff4bbadda 100644 --- a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h +++ b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h @@ -551,6 +551,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE TMC2130 +#define Y_DRIVER_TYPE TMC2130 +#define Z_DRIVER_TYPE TMC2130 +//#define X2_DRIVER_TYPE A4988 +//#define Y2_DRIVER_TYPE A4988 +//#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE TMC2130 +//#define E1_DRIVER_TYPE A4988 +//#define E2_DRIVER_TYPE A4988 +//#define E3_DRIVER_TYPE A4988 +//#define E4_DRIVER_TYPE A4988 + // 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 2d979888a7..cc818c1749 100644 --- a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h +++ b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h @@ -837,15 +837,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -855,8 +857,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -867,8 +871,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,23 +1042,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1098,62 +1093,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1308,25 +1270,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1372,7 +1321,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 73e02af8d5..84de01ab02 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration.h @@ -581,6 +581,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 f28511c10d..19da7a3e62 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h @@ -840,15 +840,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -858,8 +860,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -870,8 +874,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1039,23 +1045,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1101,62 +1096,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1311,25 +1273,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 +1324,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_adv.h b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h index a3f5885846..0d189a84db 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h @@ -837,15 +837,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -855,8 +857,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -867,8 +871,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,23 +1042,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1098,62 +1093,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1308,25 +1270,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1372,7 +1321,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h index b8423af80c..78f3fb4f83 100644 --- a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h +++ b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h @@ -561,6 +561,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 5371c4438b..6414c4fc96 100644 --- a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h +++ b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h @@ -839,15 +839,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -857,8 +859,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -869,8 +873,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1038,23 +1044,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1100,62 +1095,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1310,25 +1272,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1374,7 +1323,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 336080a597..26e0b4ddb2 100644 --- a/Marlin/src/config/examples/adafruit/ST7565/Configuration.h +++ b/Marlin/src/config/examples/adafruit/ST7565/Configuration.h @@ -551,6 +551,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 9b5699c308..c33fe28ef1 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 @@ -839,15 +839,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -857,8 +859,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -869,8 +873,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1038,23 +1044,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1100,62 +1095,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1310,25 +1272,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1374,7 +1323,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_adv.h b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h index 48ee2e7228..83ff604e75 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h @@ -839,15 +839,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -857,8 +859,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -869,8 +873,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1038,23 +1044,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1100,62 +1095,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1310,25 +1272,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1374,7 +1323,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 5b8606320c..3a6dc2ff44 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h @@ -627,6 +627,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 443db29a21..fe3b08ba6b 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 @@ -839,15 +839,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -857,8 +859,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -869,8 +873,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1038,23 +1044,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1100,62 +1095,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1310,25 +1272,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1374,7 +1323,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS diff --git a/Marlin/src/config/examples/delta/generic/Configuration_adv.h b/Marlin/src/config/examples/delta/generic/Configuration_adv.h index 443db29a21..fe3b08ba6b 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/generic/Configuration_adv.h @@ -839,15 +839,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -857,8 +859,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -869,8 +873,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1038,23 +1044,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1100,62 +1095,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1310,25 +1272,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1374,7 +1323,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 b485cbab20..3df1ca6402 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h @@ -617,6 +617,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 443db29a21..fe3b08ba6b 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h @@ -839,15 +839,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -857,8 +859,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -869,8 +873,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1038,23 +1044,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1100,62 +1095,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1310,25 +1272,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1374,7 +1323,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 58156536ab..cd4457bbfa 100644 --- a/Marlin/src/config/examples/delta/kossel_pro/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration.h @@ -603,6 +603,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 e5f73f1f93..8d771fe40c 100644 --- a/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h @@ -844,15 +844,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -862,8 +864,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -874,8 +878,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1043,23 +1049,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1105,62 +1100,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1315,25 +1277,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1379,7 +1328,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 acc2c677a6..f8fcb4a691 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration.h @@ -621,6 +621,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 4e5b8af3a2..78987d2a6b 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h @@ -839,15 +839,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -857,8 +859,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -869,8 +873,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1038,23 +1044,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1100,62 +1095,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1310,25 +1272,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1374,7 +1323,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 85113a29d5..884f574e5b 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h @@ -564,9 +564,32 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 +//#define ENDSTOP_INTERRUPTS_FEATURE /** * Endstop Noise Filter 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 0ad494097e..7f68f960ce 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h @@ -837,15 +837,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -855,8 +857,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -867,8 +871,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,23 +1042,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1098,62 +1093,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1308,25 +1270,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1372,7 +1321,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 f883caf04f..7e9117b6ef 100644 --- a/Marlin/src/config/examples/makibox/Configuration.h +++ b/Marlin/src/config/examples/makibox/Configuration.h @@ -554,6 +554,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 ffba692b3f..2c2fb3dab0 100644 --- a/Marlin/src/config/examples/makibox/Configuration_adv.h +++ b/Marlin/src/config/examples/makibox/Configuration_adv.h @@ -837,15 +837,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -855,8 +857,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -867,8 +871,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,23 +1042,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1098,62 +1093,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1308,25 +1270,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1372,7 +1321,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 9786bb04fe..0739a5836d 100644 --- a/Marlin/src/config/examples/stm32f103ret6/Configuration.h +++ b/Marlin/src/config/examples/stm32f103ret6/Configuration.h @@ -553,6 +553,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 da3fbb65b7..997bf647f5 100644 --- a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h @@ -837,15 +837,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -855,8 +857,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 30 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -867,8 +871,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 15000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1036,23 +1042,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1098,62 +1093,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1308,25 +1270,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1372,7 +1321,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 4182048dbd..25a8753698 100644 --- a/Marlin/src/config/examples/wt150/Configuration.h +++ b/Marlin/src/config/examples/wt150/Configuration.h @@ -556,6 +556,29 @@ #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. +/** + * Specify Stepper Driver types + * The options are used to determine driver pulse timings as well as more advanced functionality. + * Stepper timing options can be overridden in Configuration_adv.h + * + * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC5130, TMC5130_STANDALONE + * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +#define X2_DRIVER_TYPE A4988 +#define Y2_DRIVER_TYPE A4988 +#define Z2_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +#define E1_DRIVER_TYPE A4988 +#define E2_DRIVER_TYPE A4988 +#define E3_DRIVER_TYPE A4988 +#define E4_DRIVER_TYPE A4988 + // 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 3c60e96ae4..5b0ce763a3 100644 --- a/Marlin/src/config/examples/wt150/Configuration_adv.h +++ b/Marlin/src/config/examples/wt150/Configuration_adv.h @@ -838,15 +838,17 @@ /** * Minimum delay after setting the stepper DIR (in ns) - * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) - * 20 : Minimum for TMC2xxx drivers - * 200 : Minimum for A4988 drivers - * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) - * 650 : Minimum for DRV8825 drivers - * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) - *15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_DIR_DELAY 0 +//#define MINIMUM_STEPPER_DIR_DELAY 650 /** * Minimum stepper driver pulse width (in µs) @@ -856,8 +858,10 @@ * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MINIMUM_STEPPER_PULSE 2 +//#define MINIMUM_STEPPER_PULSE 2 /** * Maximum stepping rate (in Hz) the stepper driver allows @@ -868,8 +872,10 @@ * 150000 : Maximum for TB6600 stepper driver * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. */ -#define MAXIMUM_STEPPER_RATE 250000 +//#define MAXIMUM_STEPPER_RATE 250000 // @section temperature @@ -1037,23 +1043,12 @@ // @section tmc /** - * Enable this section if you have TMC26X motor drivers. - * You will need to import the TMC26XStepper library into the Arduino IDE for this - * (https://github.com/trinamic/TMC26XStepper.git) + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper */ -//#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 HAS_DRIVER(TMC26X) #define X_MAX_CURRENT 1000 // in mA #define X_SENSE_RESISTOR 91 // in mOhms @@ -1099,62 +1094,29 @@ #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. + * + * The TMC2130Stepper library is required for this stepper driver. + * 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. * - * You'll also need the TMC2208Stepper Arduino library - * (https://github.com/teemuatlut/TMC2208Stepper). + * The TMC2208Stepper library is required for this stepper driver. + * 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 HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current @@ -1309,25 +1271,12 @@ // @section L6470 /** - * Enable this section if you have L6470 motor drivers. - * You need to import the L6470 library into the Arduino IDE for this. - * (https://github.com/ameyer/Arduino-L6470) + * L6470 Stepper Driver options + * + * The Arduino-L6470 library is required for this stepper driver. + * 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 HAS_DRIVER(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 @@ -1373,7 +1322,7 @@ #define E4_OVERCURRENT 2000 #define E4_STALLCURRENT 1500 -#endif +#endif // L6470 /** * TWI/I2C BUS