diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h index 9cc0a4d5a..57a17b091 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 0cc9e3e94..e4508b29d 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 6ad6d9574..f0e6ead23 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 dc255f7a4..24b3ddb20 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 276cd91e4..afc683101 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 bc9a5e152..6cb02526c 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 dfdd17e4e..42827a6ee 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 a76fa7d5e..05727fcc9 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 d2b924df9..840e7fb76 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 d5edc5950..359297845 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 5d37faa9a..891a722e0 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 077bdbe10..d5f94fb7b 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 d5edc5950..359297845 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 9b2786c4c..be9c6033d 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 3901584fa..f95cf69fa 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 982092684..f2ada46ae 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 7f6e635e6..40dde29f3 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 2627c5a14..c9b808e6b 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 dd142643b..d1be6f598 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 c2347371e..ab87a5e5b 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 24c2f8d0b..1a5d4b10f 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 f335cf870..e8a56d519 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 66cbc6038..5ebfe4394 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 719f0cd58..feca06321 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 415bbf99c..54300ff1b 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 3e8a9ada3..48b166eac 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 356686665..b2796b94c 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 f335cf870..e8a56d519 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 dd973926f..a88c4f5b6 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 42d40669e..a72348067 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 f49bda32b..9bfaa9f87 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 8dbe935f3..3aa686217 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 c2a7c201a..493a492f2 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 0aaa3c8c3..5aea57a96 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 b939cb160..4cd0a02a3 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 47364bbc6..d6a776669 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 267146ea3..dbf290355 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 40b64bfa3..18a7483cb 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 8a34807c1..632e418e5 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 40b64bfa3..18a7483cb 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 14358c2cc..49f8c2b2c 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 92fe04d48..6a6f4191b 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 6f4346c03..26253ef14 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 659cd120e..78af64774 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 8b1f8818f..5e55db423 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 cd22cc402..123d58c31 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 cafe64bfb..4b8eadb5c 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 8ee16bcf3..1eda0e38a 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 c1cb035af..c6fe2c7b8 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 4378d1828..272fc057f 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 57904dbfb..b7932fa21 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 769d05aa8..2e87ca37a 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 470770bc0..95cd966b2 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 98902e44d..1d90ffea9 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 e34063c39..43b6b5562 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 f2cb4391f..485f6c560 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 b3175b35e..60aeebe4a 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 dfcd373c0..0057e1e72 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 HAS_DRIVER(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 1000 // in mA + #define X_SENSE_RESISTOR 91 // in mOhms + #define X_MICROSTEPS 16 // number of microsteps - #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 1000 + #define X2_SENSE_RESISTOR 91 + #define X2_MICROSTEPS 16 - #define X2_MAX_CURRENT 1200 - #define X2_SENSE_RESISTOR 50 - #define X2_MICROSTEPS 32 + #define Y_MAX_CURRENT 1000 + #define Y_SENSE_RESISTOR 91 + #define Y_MICROSTEPS 16 - #define Y_MAX_CURRENT 1200 - #define Y_SENSE_RESISTOR 50 - #define Y_MICROSTEPS 32 + #define Y2_MAX_CURRENT 1000 + #define Y2_SENSE_RESISTOR 91 + #define Y2_MICROSTEPS 16 - #define Y2_MAX_CURRENT 1200 - #define Y2_SENSE_RESISTOR 50 - #define Y2_MICROSTEPS 32 + #define Z_MAX_CURRENT 1000 + #define Z_SENSE_RESISTOR 91 + #define Z_MICROSTEPS 16 - #define Z_MAX_CURRENT 1200 - #define Z_SENSE_RESISTOR 50 - #define Z_MICROSTEPS 32 + #define Z2_MAX_CURRENT 1000 + #define Z2_SENSE_RESISTOR 91 + #define Z2_MICROSTEPS 16 - #define Z2_MAX_CURRENT 1200 - #define Z2_SENSE_RESISTOR 50 - #define Z2_MICROSTEPS 32 + #define E0_MAX_CURRENT 1000 + #define E0_SENSE_RESISTOR 91 + #define E0_MICROSTEPS 16 - #define E0_MAX_CURRENT 1200 - #define E0_SENSE_RESISTOR 50 - #define E0_MICROSTEPS 32 + #define E1_MAX_CURRENT 1000 + #define E1_SENSE_RESISTOR 91 + #define E1_MICROSTEPS 16 - #define E1_MAX_CURRENT 1200 - #define E1_SENSE_RESISTOR 50 - #define E1_MICROSTEPS 32 + #define E2_MAX_CURRENT 1000 + #define E2_SENSE_RESISTOR 91 + #define E2_MICROSTEPS 16 - #define E2_MAX_CURRENT 1200 - #define E2_SENSE_RESISTOR 50 - #define E2_MICROSTEPS 32 + #define E3_MAX_CURRENT 1000 + #define E3_SENSE_RESISTOR 91 + #define E3_MICROSTEPS 16 - #define E3_MAX_CURRENT 1200 - #define E3_SENSE_RESISTOR 50 - #define E3_MICROSTEPS 32 + #define E4_MAX_CURRENT 1000 + #define E4_SENSE_RESISTOR 91 + #define E4_MICROSTEPS 16 - #define E4_MAX_CURRENT 1200 - #define E4_SENSE_RESISTOR 50 - #define E4_MICROSTEPS 32 - -#endif +#endif // TMC26X // @section tmc_smart /** - * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. - * - * You'll also need the TMC2130Stepper Arduino library - * (https://github.com/teemuatlut/TMC2130Stepper). - * * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to * the hardware SPI interface on your board and define the required CS pins * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. - */ -//#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) // Choose your axes here. This is mandatory! - //#define X_IS_TMC2130 - //#define X2_IS_TMC2130 - //#define Y_IS_TMC2130 - //#define Y2_IS_TMC2130 - //#define Z_IS_TMC2130 - //#define Z2_IS_TMC2130 - //#define E0_IS_TMC2130 - //#define E1_IS_TMC2130 - //#define E2_IS_TMC2130 - //#define E3_IS_TMC2130 - //#define E4_IS_TMC2130 -#endif - -/** - * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. - * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. + * + * 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 6b1af6ed5..e2520b0d8 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 9076b2ad4..e0b9ad557 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 c88c5ab47..ce0b0d8b0 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 32b1100e4..8b72335a0 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 94369ac83..0770e0515 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 28a913bad..cff4bbadd 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 2d979888a..cc818c174 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 73e02af8d..84de01ab0 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 f28511c10..19da7a3e6 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 a3f588584..0d189a84d 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 b8423af80..78f3fb4f8 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 5371c4438..6414c4fc9 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 336080a59..26e0b4ddb 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 9b5699c30..c33fe28ef 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 48ee2e722..83ff604e7 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 5b8606320..3a6dc2ff4 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 443db29a2..fe3b08ba6 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 443db29a2..fe3b08ba6 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 b485cbab2..3df1ca640 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 443db29a2..fe3b08ba6 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 58156536a..cd4457bbf 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 e5f73f1f9..8d771fe40 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 acc2c677a..f8fcb4a69 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 4e5b8af3a..78987d2a6 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 85113a29d..884f574e5 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 0ad494097..7f68f960c 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 f883caf04..7e9117b6e 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 ffba692b3..2c2fb3dab 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 9786bb04f..0739a5836 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 da3fbb65b..997bf647f 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 4182048db..25a875369 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 3c60e96ae..5b0ce763a 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