diff --git a/Marlin/Conditionals_post.h b/Marlin/Conditionals_post.h index df44597d9..25cecf4f5 100644 --- a/Marlin/Conditionals_post.h +++ b/Marlin/Conditionals_post.h @@ -1316,6 +1316,11 @@ #define MAXIMUM_STEPPER_RATE (1000000UL / (2UL * (MINIMUM_STEPPER_PULSE))) #endif +// Calculate a default maximum stepper rate, if not supplied +#ifndef MAXIMUM_STEPPER_RATE + #define MAXIMUM_STEPPER_RATE (1000000UL / (2UL * (MINIMUM_STEPPER_PULSE))) +#endif + // // Estimate the amount of time the ISR will take to execute // @@ -1377,6 +1382,9 @@ // And the total minimum loop time is, without including the base #define MIN_ISR_LOOP_CYCLES (ISR_X_STEPPER_CYCLES + ISR_Y_STEPPER_CYCLES + ISR_Z_STEPPER_CYCLES + ISR_E_STEPPER_CYCLES + ISR_MIXING_STEPPER_CYCLES) +// Calculate the minimum MPU cycles needed per pulse to enforce not surpassing the maximum stepper rate +#define MIN_STEPPER_PULSE_CYCLES MAX((F_CPU) / (MAXIMUM_STEPPER_RATE), ((F_CPU) / 500000UL) * MINIMUM_STEPPER_PULSE) + // But the user could be enforcing a minimum time, so the loop time is #define ISR_LOOP_CYCLES (ISR_LOOP_BASE_CYCLES + MAX(MIN_STEPPER_PULSE_CYCLES, MIN_ISR_LOOP_CYCLES)) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index e3e112bb3..0826f9d08 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -811,9 +811,6 @@ #define INVERT_Y_DIR true #define INVERT_Z_DIR false -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 42f2ecad6..5f8530c80 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -817,6 +817,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h index bf9796780..86bfb33ba 100644 --- a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h +++ b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h @@ -836,9 +836,6 @@ #define INVERT_Y_DIR true #define INVERT_Z_DIR false -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h index 9bee6cc96..60715bd11 100644 --- a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h +++ b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h @@ -817,6 +817,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/AliExpress/CL-260/Configuration.h b/Marlin/example_configurations/AliExpress/CL-260/Configuration.h index 2cadaad04..a7d60e050 100644 --- a/Marlin/example_configurations/AliExpress/CL-260/Configuration.h +++ b/Marlin/example_configurations/AliExpress/CL-260/Configuration.h @@ -816,9 +816,6 @@ #define INVERT_Y_DIR true #define INVERT_Z_DIR false -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/Anet/A6/Configuration.h b/Marlin/example_configurations/Anet/A6/Configuration.h index ea9dae30b..f4730f88f 100644 --- a/Marlin/example_configurations/Anet/A6/Configuration.h +++ b/Marlin/example_configurations/Anet/A6/Configuration.h @@ -895,9 +895,6 @@ #define INVERT_Y_DIR false #define INVERT_Z_DIR true -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/Anet/A6/Configuration_adv.h b/Marlin/example_configurations/Anet/A6/Configuration_adv.h index d3e34e3da..0c2e5d5a8 100644 --- a/Marlin/example_configurations/Anet/A6/Configuration_adv.h +++ b/Marlin/example_configurations/Anet/A6/Configuration_adv.h @@ -817,6 +817,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/Anet/A8/Configuration.h b/Marlin/example_configurations/Anet/A8/Configuration.h index b1bc51f63..ac31bf5eb 100644 --- a/Marlin/example_configurations/Anet/A8/Configuration.h +++ b/Marlin/example_configurations/Anet/A8/Configuration.h @@ -823,9 +823,6 @@ #define INVERT_Y_DIR false #define INVERT_Z_DIR true -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/Anet/A8/Configuration_adv.h b/Marlin/example_configurations/Anet/A8/Configuration_adv.h index 0a1951a18..a3304c20e 100644 --- a/Marlin/example_configurations/Anet/A8/Configuration_adv.h +++ b/Marlin/example_configurations/Anet/A8/Configuration_adv.h @@ -817,6 +817,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration.h b/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration.h index 88c5e6ff0..043b9c832 100644 --- a/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration.h +++ b/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration.h @@ -816,9 +816,6 @@ #define INVERT_Y_DIR false #define INVERT_Z_DIR false -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration_adv.h b/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration_adv.h index 4e60da692..58c61040f 100644 --- a/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration_adv.h +++ b/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration_adv.h @@ -817,6 +817,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/BIBO/TouchX/default/Configuration.h b/Marlin/example_configurations/BIBO/TouchX/default/Configuration.h index 6782c89a1..4493a88d3 100644 --- a/Marlin/example_configurations/BIBO/TouchX/default/Configuration.h +++ b/Marlin/example_configurations/BIBO/TouchX/default/Configuration.h @@ -816,9 +816,6 @@ #define INVERT_Y_DIR true #define INVERT_Z_DIR false -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/BIBO/TouchX/default/Configuration_adv.h b/Marlin/example_configurations/BIBO/TouchX/default/Configuration_adv.h index 42f2ecad6..5f8530c80 100644 --- a/Marlin/example_configurations/BIBO/TouchX/default/Configuration_adv.h +++ b/Marlin/example_configurations/BIBO/TouchX/default/Configuration_adv.h @@ -817,6 +817,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/BQ/Hephestos/Configuration.h b/Marlin/example_configurations/BQ/Hephestos/Configuration.h index e5ebfba6a..45fa3fff0 100644 --- a/Marlin/example_configurations/BQ/Hephestos/Configuration.h +++ b/Marlin/example_configurations/BQ/Hephestos/Configuration.h @@ -804,9 +804,6 @@ #define INVERT_Y_DIR false #define INVERT_Z_DIR true -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h b/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h index 167242dfe..3db720b37 100644 --- a/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h +++ b/Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h @@ -817,6 +817,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h b/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h index 9f9217c20..c1ea61a14 100644 --- a/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h +++ b/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h @@ -814,9 +814,6 @@ #define INVERT_Y_DIR true #define INVERT_Z_DIR true -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h b/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h index e4fe7d2d8..5fe95b651 100644 --- a/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h +++ b/Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h @@ -825,6 +825,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/BQ/WITBOX/Configuration.h b/Marlin/example_configurations/BQ/WITBOX/Configuration.h index 722ee4f78..e4d5f28d2 100644 --- a/Marlin/example_configurations/BQ/WITBOX/Configuration.h +++ b/Marlin/example_configurations/BQ/WITBOX/Configuration.h @@ -804,9 +804,6 @@ #define INVERT_Y_DIR false #define INVERT_Z_DIR true -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h b/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h index 167242dfe..3db720b37 100644 --- a/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h +++ b/Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h @@ -817,6 +817,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/Cartesio/Configuration.h b/Marlin/example_configurations/Cartesio/Configuration.h index 8beeefd95..8287e06a7 100644 --- a/Marlin/example_configurations/Cartesio/Configuration.h +++ b/Marlin/example_configurations/Cartesio/Configuration.h @@ -815,9 +815,6 @@ #define INVERT_Y_DIR true #define INVERT_Z_DIR false -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/Cartesio/Configuration_adv.h b/Marlin/example_configurations/Cartesio/Configuration_adv.h index ecfe86cd8..58b19ae30 100644 --- a/Marlin/example_configurations/Cartesio/Configuration_adv.h +++ b/Marlin/example_configurations/Cartesio/Configuration_adv.h @@ -817,6 +817,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/Creality/CR-10/Configuration.h b/Marlin/example_configurations/Creality/CR-10/Configuration.h index 9be6c1d4b..a1ea0e81c 100755 --- a/Marlin/example_configurations/Creality/CR-10/Configuration.h +++ b/Marlin/example_configurations/Creality/CR-10/Configuration.h @@ -826,9 +826,6 @@ #define INVERT_Y_DIR true #define INVERT_Z_DIR false -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/Creality/CR-10/Configuration_adv.h b/Marlin/example_configurations/Creality/CR-10/Configuration_adv.h index e6b6ca213..caea18b42 100755 --- a/Marlin/example_configurations/Creality/CR-10/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/CR-10/Configuration_adv.h @@ -817,6 +817,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/Creality/CR-10S/Configuration.h b/Marlin/example_configurations/Creality/CR-10S/Configuration.h index 63d3909a4..c7af2ba71 100644 --- a/Marlin/example_configurations/Creality/CR-10S/Configuration.h +++ b/Marlin/example_configurations/Creality/CR-10S/Configuration.h @@ -816,9 +816,6 @@ #define INVERT_Y_DIR false #define INVERT_Z_DIR true -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/Creality/CR-10S/Configuration_adv.h b/Marlin/example_configurations/Creality/CR-10S/Configuration_adv.h index 08bce22e4..54e763088 100644 --- a/Marlin/example_configurations/Creality/CR-10S/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/CR-10S/Configuration_adv.h @@ -817,6 +817,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/Creality/CR-10mini/Configuration.h b/Marlin/example_configurations/Creality/CR-10mini/Configuration.h index 4517951e3..9b2c21365 100644 --- a/Marlin/example_configurations/Creality/CR-10mini/Configuration.h +++ b/Marlin/example_configurations/Creality/CR-10mini/Configuration.h @@ -835,9 +835,6 @@ #define INVERT_Y_DIR true #define INVERT_Z_DIR false -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/Creality/CR-10mini/Configuration_adv.h b/Marlin/example_configurations/Creality/CR-10mini/Configuration_adv.h index ca2f939f7..65db893f3 100644 --- a/Marlin/example_configurations/Creality/CR-10mini/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/CR-10mini/Configuration_adv.h @@ -817,6 +817,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/Creality/CR-8/Configuration.h b/Marlin/example_configurations/Creality/CR-8/Configuration.h index a6e83b7fc..af1b69148 100644 --- a/Marlin/example_configurations/Creality/CR-8/Configuration.h +++ b/Marlin/example_configurations/Creality/CR-8/Configuration.h @@ -826,9 +826,6 @@ #define INVERT_Y_DIR true #define INVERT_Z_DIR false -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/Creality/CR-8/Configuration_adv.h b/Marlin/example_configurations/Creality/CR-8/Configuration_adv.h index 8c4812bfc..34e411cae 100644 --- a/Marlin/example_configurations/Creality/CR-8/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/CR-8/Configuration_adv.h @@ -817,6 +817,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/Creality/Ender-2/Configuration.h b/Marlin/example_configurations/Creality/Ender-2/Configuration.h index 2a59c53ef..bbe5a9f53 100644 --- a/Marlin/example_configurations/Creality/Ender-2/Configuration.h +++ b/Marlin/example_configurations/Creality/Ender-2/Configuration.h @@ -820,9 +820,6 @@ #define INVERT_Y_DIR true #define INVERT_Z_DIR false -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/Creality/Ender-2/Configuration_adv.h b/Marlin/example_configurations/Creality/Ender-2/Configuration_adv.h index 23785efb7..2b5423752 100644 --- a/Marlin/example_configurations/Creality/Ender-2/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/Ender-2/Configuration_adv.h @@ -817,6 +817,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/Creality/Ender-3/Configuration.h b/Marlin/example_configurations/Creality/Ender-3/Configuration.h index 8d523047b..0590bb0f9 100644 --- a/Marlin/example_configurations/Creality/Ender-3/Configuration.h +++ b/Marlin/example_configurations/Creality/Ender-3/Configuration.h @@ -820,9 +820,6 @@ #define INVERT_Y_DIR true #define INVERT_Z_DIR false -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/Creality/Ender-3/Configuration_adv.h b/Marlin/example_configurations/Creality/Ender-3/Configuration_adv.h index af8105c22..5581bb3f2 100644 --- a/Marlin/example_configurations/Creality/Ender-3/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/Ender-3/Configuration_adv.h @@ -817,6 +817,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/Creality/Ender-4/Configuration.h b/Marlin/example_configurations/Creality/Ender-4/Configuration.h index a617d5453..6ea24c4e5 100644 --- a/Marlin/example_configurations/Creality/Ender-4/Configuration.h +++ b/Marlin/example_configurations/Creality/Ender-4/Configuration.h @@ -826,9 +826,6 @@ #define INVERT_Y_DIR true #define INVERT_Z_DIR true -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/Creality/Ender-4/Configuration_adv.h b/Marlin/example_configurations/Creality/Ender-4/Configuration_adv.h index 8c4812bfc..34e411cae 100644 --- a/Marlin/example_configurations/Creality/Ender-4/Configuration_adv.h +++ b/Marlin/example_configurations/Creality/Ender-4/Configuration_adv.h @@ -817,6 +817,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index 2201b5c81..be505a20a 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -798,9 +798,6 @@ #define INVERT_Y_DIR true #define INVERT_Z_DIR true -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/Felix/Configuration_adv.h b/Marlin/example_configurations/Felix/Configuration_adv.h index b1cf98f0f..96d0a927c 100644 --- a/Marlin/example_configurations/Felix/Configuration_adv.h +++ b/Marlin/example_configurations/Felix/Configuration_adv.h @@ -817,6 +817,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/Felix/DUAL/Configuration.h b/Marlin/example_configurations/Felix/DUAL/Configuration.h index f8fd2971a..77361440f 100644 --- a/Marlin/example_configurations/Felix/DUAL/Configuration.h +++ b/Marlin/example_configurations/Felix/DUAL/Configuration.h @@ -798,9 +798,6 @@ #define INVERT_Y_DIR true #define INVERT_Z_DIR true -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/FolgerTech/i3-2020/Configuration.h b/Marlin/example_configurations/FolgerTech/i3-2020/Configuration.h index 64a90a104..907d8a4b1 100644 --- a/Marlin/example_configurations/FolgerTech/i3-2020/Configuration.h +++ b/Marlin/example_configurations/FolgerTech/i3-2020/Configuration.h @@ -822,9 +822,6 @@ #define INVERT_Y_DIR true #define INVERT_Z_DIR true -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/FolgerTech/i3-2020/Configuration_adv.h b/Marlin/example_configurations/FolgerTech/i3-2020/Configuration_adv.h index 9568464fb..67fe5f859 100644 --- a/Marlin/example_configurations/FolgerTech/i3-2020/Configuration_adv.h +++ b/Marlin/example_configurations/FolgerTech/i3-2020/Configuration_adv.h @@ -817,6 +817,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/Geeetech/GT2560/Configuration.h b/Marlin/example_configurations/Geeetech/GT2560/Configuration.h index d2c008f23..6165a0d2f 100644 --- a/Marlin/example_configurations/Geeetech/GT2560/Configuration.h +++ b/Marlin/example_configurations/Geeetech/GT2560/Configuration.h @@ -831,9 +831,6 @@ #define INVERT_Y_DIR true #define INVERT_Z_DIR false -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h b/Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h index 80c78406b..4e0a795cb 100644 --- a/Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h +++ b/Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h @@ -816,9 +816,6 @@ #define INVERT_Y_DIR true #define INVERT_Z_DIR false -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h b/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h index 74b061ea6..a6da74e48 100644 --- a/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h +++ b/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h @@ -832,9 +832,6 @@ #define INVERT_Y_DIR true #define INVERT_Z_DIR false -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h b/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h index 635d87fd9..54028bcec 100644 --- a/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h +++ b/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h @@ -831,9 +831,6 @@ #define INVERT_Y_DIR true #define INVERT_Z_DIR false -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/Geeetech/Prusa i3 Pro C/Configuration.h b/Marlin/example_configurations/Geeetech/Prusa i3 Pro C/Configuration.h index 74468f55a..b99c70645 100644 --- a/Marlin/example_configurations/Geeetech/Prusa i3 Pro C/Configuration.h +++ b/Marlin/example_configurations/Geeetech/Prusa i3 Pro C/Configuration.h @@ -816,9 +816,6 @@ #define INVERT_Y_DIR false #define INVERT_Z_DIR false -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/Geeetech/Prusa i3 Pro C/Configuration_adv.h b/Marlin/example_configurations/Geeetech/Prusa i3 Pro C/Configuration_adv.h index ccb7abd49..6f93f3d19 100644 --- a/Marlin/example_configurations/Geeetech/Prusa i3 Pro C/Configuration_adv.h +++ b/Marlin/example_configurations/Geeetech/Prusa i3 Pro C/Configuration_adv.h @@ -817,6 +817,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/Geeetech/Prusa i3 Pro W/Configuration.h b/Marlin/example_configurations/Geeetech/Prusa i3 Pro W/Configuration.h index c98ba025b..5a75e1df7 100644 --- a/Marlin/example_configurations/Geeetech/Prusa i3 Pro W/Configuration.h +++ b/Marlin/example_configurations/Geeetech/Prusa i3 Pro W/Configuration.h @@ -816,9 +816,6 @@ #define INVERT_Y_DIR true #define INVERT_Z_DIR false -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/Geeetech/Prusa i3 Pro W/Configuration_adv.h b/Marlin/example_configurations/Geeetech/Prusa i3 Pro W/Configuration_adv.h index ccb7abd49..6f93f3d19 100644 --- a/Marlin/example_configurations/Geeetech/Prusa i3 Pro W/Configuration_adv.h +++ b/Marlin/example_configurations/Geeetech/Prusa i3 Pro W/Configuration_adv.h @@ -817,6 +817,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/Infitary/i3-M508/Configuration.h b/Marlin/example_configurations/Infitary/i3-M508/Configuration.h index 35e4a80e4..8ec0e0699 100644 --- a/Marlin/example_configurations/Infitary/i3-M508/Configuration.h +++ b/Marlin/example_configurations/Infitary/i3-M508/Configuration.h @@ -820,9 +820,6 @@ #define INVERT_Y_DIR true #define INVERT_Z_DIR false -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h b/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h index 928b038bc..f0924c700 100644 --- a/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h +++ b/Marlin/example_configurations/Infitary/i3-M508/Configuration_adv.h @@ -817,6 +817,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/JGAurora/A5/Configuration.h b/Marlin/example_configurations/JGAurora/A5/Configuration.h index 9bdf32c1e..2467f6df7 100644 --- a/Marlin/example_configurations/JGAurora/A5/Configuration.h +++ b/Marlin/example_configurations/JGAurora/A5/Configuration.h @@ -828,9 +828,6 @@ #define INVERT_Y_DIR false #define INVERT_Z_DIR false -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/JGAurora/A5/Configuration_adv.h b/Marlin/example_configurations/JGAurora/A5/Configuration_adv.h index b005ea0bc..c3a84aa33 100644 --- a/Marlin/example_configurations/JGAurora/A5/Configuration_adv.h +++ b/Marlin/example_configurations/JGAurora/A5/Configuration_adv.h @@ -817,6 +817,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/Malyan/M150/Configuration.h b/Marlin/example_configurations/Malyan/M150/Configuration.h index 20023535e..2bfc18b83 100644 --- a/Marlin/example_configurations/Malyan/M150/Configuration.h +++ b/Marlin/example_configurations/Malyan/M150/Configuration.h @@ -840,9 +840,6 @@ #define INVERT_Y_DIR false #define INVERT_Z_DIR false -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/Malyan/M150/Configuration_adv.h b/Marlin/example_configurations/Malyan/M150/Configuration_adv.h index 686ec8d59..f481a0029 100644 --- a/Marlin/example_configurations/Malyan/M150/Configuration_adv.h +++ b/Marlin/example_configurations/Malyan/M150/Configuration_adv.h @@ -817,6 +817,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/Micromake/C1/basic/Configuration.h b/Marlin/example_configurations/Micromake/C1/basic/Configuration.h index 4ae3ac116..61a749024 100644 --- a/Marlin/example_configurations/Micromake/C1/basic/Configuration.h +++ b/Marlin/example_configurations/Micromake/C1/basic/Configuration.h @@ -820,9 +820,6 @@ #define INVERT_Y_DIR false #define INVERT_Z_DIR false -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/Micromake/C1/enhanced/Configuration.h b/Marlin/example_configurations/Micromake/C1/enhanced/Configuration.h index cca99dfe8..6832b8e81 100644 --- a/Marlin/example_configurations/Micromake/C1/enhanced/Configuration.h +++ b/Marlin/example_configurations/Micromake/C1/enhanced/Configuration.h @@ -820,9 +820,6 @@ #define INVERT_Y_DIR false #define INVERT_Z_DIR false -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/Micromake/C1/enhanced/Configuration_adv.h b/Marlin/example_configurations/Micromake/C1/enhanced/Configuration_adv.h index 1861129d3..30f2229e7 100644 --- a/Marlin/example_configurations/Micromake/C1/enhanced/Configuration_adv.h +++ b/Marlin/example_configurations/Micromake/C1/enhanced/Configuration_adv.h @@ -817,6 +817,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/RepRapPro/Huxley/Configuration.h b/Marlin/example_configurations/RepRapPro/Huxley/Configuration.h index 728d4bfac..249ec1a9f 100644 --- a/Marlin/example_configurations/RepRapPro/Huxley/Configuration.h +++ b/Marlin/example_configurations/RepRapPro/Huxley/Configuration.h @@ -856,9 +856,6 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley #define INVERT_Y_DIR false #define INVERT_Z_DIR false -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h index 90dd517ae..a044ed7c1 100644 --- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h @@ -816,9 +816,6 @@ #define INVERT_Y_DIR true #define INVERT_Z_DIR false -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/RigidBot/Configuration.h b/Marlin/example_configurations/RigidBot/Configuration.h index aeaae9ac8..d5b58a603 100644 --- a/Marlin/example_configurations/RigidBot/Configuration.h +++ b/Marlin/example_configurations/RigidBot/Configuration.h @@ -814,9 +814,6 @@ #define INVERT_Y_DIR false #define INVERT_Z_DIR false -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/RigidBot/Configuration_adv.h b/Marlin/example_configurations/RigidBot/Configuration_adv.h index 3954bbf90..f580e791f 100644 --- a/Marlin/example_configurations/RigidBot/Configuration_adv.h +++ b/Marlin/example_configurations/RigidBot/Configuration_adv.h @@ -817,6 +817,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index c0f04ec30..a7d14e411 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -829,9 +829,6 @@ #define INVERT_Y_DIR false #define INVERT_Z_DIR true -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/SCARA/Configuration_adv.h b/Marlin/example_configurations/SCARA/Configuration_adv.h index a12357e0b..8fa61daf9 100644 --- a/Marlin/example_configurations/SCARA/Configuration_adv.h +++ b/Marlin/example_configurations/SCARA/Configuration_adv.h @@ -817,6 +817,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/Sanguinololu/Configuration.h b/Marlin/example_configurations/Sanguinololu/Configuration.h index 4f12e1344..f5e2d130d 100644 --- a/Marlin/example_configurations/Sanguinololu/Configuration.h +++ b/Marlin/example_configurations/Sanguinololu/Configuration.h @@ -847,9 +847,6 @@ #define INVERT_Y_DIR false #define INVERT_Z_DIR false -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/Sanguinololu/Configuration_adv.h b/Marlin/example_configurations/Sanguinololu/Configuration_adv.h index 3cdd08171..0f4e69e1d 100644 --- a/Marlin/example_configurations/Sanguinololu/Configuration_adv.h +++ b/Marlin/example_configurations/Sanguinololu/Configuration_adv.h @@ -817,6 +817,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/TinyBoy2/Configuration_adv.h b/Marlin/example_configurations/TinyBoy2/Configuration_adv.h index a18514453..dd7e7f17b 100644 --- a/Marlin/example_configurations/TinyBoy2/Configuration_adv.h +++ b/Marlin/example_configurations/TinyBoy2/Configuration_adv.h @@ -817,6 +817,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/Tronxy/X1/Configuration.h b/Marlin/example_configurations/Tronxy/X1/Configuration.h index dce00f73d..fa8af6117 100644 --- a/Marlin/example_configurations/Tronxy/X1/Configuration.h +++ b/Marlin/example_configurations/Tronxy/X1/Configuration.h @@ -816,9 +816,6 @@ #define INVERT_Y_DIR false #define INVERT_Z_DIR true -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/Tronxy/X5S/Configuration.h b/Marlin/example_configurations/Tronxy/X5S/Configuration.h index 7c0f3aede..495e71a7e 100644 --- a/Marlin/example_configurations/Tronxy/X5S/Configuration.h +++ b/Marlin/example_configurations/Tronxy/X5S/Configuration.h @@ -816,9 +816,6 @@ #define INVERT_Y_DIR true #define INVERT_Z_DIR false -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/Tronxy/XY100/Configuration.h b/Marlin/example_configurations/Tronxy/XY100/Configuration.h index c6335c3af..413f9a7d8 100644 --- a/Marlin/example_configurations/Tronxy/XY100/Configuration.h +++ b/Marlin/example_configurations/Tronxy/XY100/Configuration.h @@ -827,9 +827,6 @@ #define INVERT_Y_DIR false #define INVERT_Z_DIR true -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/Velleman/K8200/Configuration.h b/Marlin/example_configurations/Velleman/K8200/Configuration.h index 1cf860b45..ef2f10ba4 100644 --- a/Marlin/example_configurations/Velleman/K8200/Configuration.h +++ b/Marlin/example_configurations/Velleman/K8200/Configuration.h @@ -845,9 +845,6 @@ #define INVERT_Y_DIR false // K8200: false #define INVERT_Z_DIR false -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h b/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h index 1fd114fda..0e0bf6e10 100644 --- a/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h +++ b/Marlin/example_configurations/Velleman/K8200/Configuration_adv.h @@ -820,6 +820,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/Velleman/K8400/Configuration.h b/Marlin/example_configurations/Velleman/K8400/Configuration.h index a2ecc4676..83b44341e 100644 --- a/Marlin/example_configurations/Velleman/K8400/Configuration.h +++ b/Marlin/example_configurations/Velleman/K8400/Configuration.h @@ -816,9 +816,6 @@ #define INVERT_Y_DIR true #define INVERT_Z_DIR true -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h b/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h index 9b7cb314e..2ccddc215 100644 --- a/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h +++ b/Marlin/example_configurations/Velleman/K8400/Configuration_adv.h @@ -817,6 +817,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h b/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h index 35dacaa3d..69eae61b2 100644 --- a/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h +++ b/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h @@ -816,9 +816,6 @@ #define INVERT_Y_DIR true #define INVERT_Z_DIR true -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration.h b/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration.h index 6a08b8fff..3ec509805 100644 --- a/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration.h +++ b/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration.h @@ -826,9 +826,6 @@ #define INVERT_Y_DIR false #define INVERT_Z_DIR true -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration_adv.h b/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration_adv.h index dbe453266..a929510ae 100644 --- a/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration_adv.h +++ b/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration_adv.h @@ -819,6 +819,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/adafruit/ST7565/Configuration.h b/Marlin/example_configurations/adafruit/ST7565/Configuration.h index 699cbfb5e..fed7cd22c 100644 --- a/Marlin/example_configurations/adafruit/ST7565/Configuration.h +++ b/Marlin/example_configurations/adafruit/ST7565/Configuration.h @@ -816,9 +816,6 @@ #define INVERT_Y_DIR true #define INVERT_Z_DIR false -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h index 4363f2fe5..69771cfca 100644 --- a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h @@ -948,9 +948,6 @@ #define INVERT_Y_DIR true #define INVERT_Z_DIR true -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h index 778080e5b..c03c99186 100644 --- a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration_adv.h @@ -819,6 +819,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/delta/FLSUN/kossel/Configuration.h b/Marlin/example_configurations/delta/FLSUN/kossel/Configuration.h index b211e5acc..3bea5acc5 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel/Configuration.h @@ -947,9 +947,6 @@ #define INVERT_Y_DIR true #define INVERT_Z_DIR true -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/delta/FLSUN/kossel/Configuration_adv.h b/Marlin/example_configurations/delta/FLSUN/kossel/Configuration_adv.h index f86c8226b..842473937 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel/Configuration_adv.h @@ -819,6 +819,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h index 0dabaf2e2..58750f432 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h @@ -947,9 +947,6 @@ #define INVERT_Y_DIR true #define INVERT_Z_DIR true -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h index b87c917ca..154b5caab 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration_adv.h @@ -819,6 +819,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/delta/Hatchbox_Alpha/Configuration.h b/Marlin/example_configurations/delta/Hatchbox_Alpha/Configuration.h index 6a6ce6ec1..c40186801 100644 --- a/Marlin/example_configurations/delta/Hatchbox_Alpha/Configuration.h +++ b/Marlin/example_configurations/delta/Hatchbox_Alpha/Configuration.h @@ -950,9 +950,6 @@ #define INVERT_Y_DIR false #define INVERT_Z_DIR false -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index a1e5e8d93..a8d9131d2 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -935,9 +935,6 @@ #define INVERT_Y_DIR false #define INVERT_Z_DIR false -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/delta/generic/Configuration_adv.h b/Marlin/example_configurations/delta/generic/Configuration_adv.h index b87c917ca..154b5caab 100644 --- a/Marlin/example_configurations/delta/generic/Configuration_adv.h +++ b/Marlin/example_configurations/delta/generic/Configuration_adv.h @@ -819,6 +819,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index 38b235787..2cc55ce53 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -937,9 +937,6 @@ #define INVERT_Y_DIR false #define INVERT_Z_DIR false -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h index b87c917ca..154b5caab 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h @@ -819,6 +819,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration.h b/Marlin/example_configurations/delta/kossel_pro/Configuration.h index 191ff9116..381b20f8b 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h @@ -938,9 +938,6 @@ #define INVERT_Y_DIR true #define INVERT_Z_DIR true -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h index 0a6616807..db34166bd 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h @@ -824,6 +824,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration.h b/Marlin/example_configurations/delta/kossel_xl/Configuration.h index 77933048d..23417c83f 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration.h @@ -938,9 +938,6 @@ #define INVERT_Y_DIR false #define INVERT_Z_DIR false -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h index a70affd96..0f7d5703b 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h @@ -819,6 +819,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h index c5b76a1bb..6fd52d653 100644 --- a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h +++ b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h @@ -829,9 +829,6 @@ #define INVERT_Y_DIR true #define INVERT_Z_DIR true -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h index 112cc0d32..77773de18 100644 --- a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h +++ b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration_adv.h @@ -817,6 +817,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index 51e5e85af..2e7baf60e 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -819,9 +819,6 @@ #define INVERT_Y_DIR false #define INVERT_Z_DIR false -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/makibox/Configuration_adv.h b/Marlin/example_configurations/makibox/Configuration_adv.h index 8d6f91f95..f0dc1c3f3 100644 --- a/Marlin/example_configurations/makibox/Configuration_adv.h +++ b/Marlin/example_configurations/makibox/Configuration_adv.h @@ -817,6 +817,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index 928e7c48b..8aad62aeb 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -811,9 +811,6 @@ #define INVERT_Y_DIR false #define INVERT_Z_DIR true -// Enable this option for Toshiba stepper drivers -#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h index d3faf50e8..b21648ace 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h @@ -817,6 +817,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/example_configurations/wt150/Configuration.h b/Marlin/example_configurations/wt150/Configuration.h index 7c549e069..21bd221ff 100644 --- a/Marlin/example_configurations/wt150/Configuration.h +++ b/Marlin/example_configurations/wt150/Configuration.h @@ -821,9 +821,6 @@ #define INVERT_Y_DIR false #define INVERT_Z_DIR false -// Enable this option for Toshiba stepper drivers -//#define CONFIG_STEPPERS_TOSHIBA - // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. diff --git a/Marlin/example_configurations/wt150/Configuration_adv.h b/Marlin/example_configurations/wt150/Configuration_adv.h index 568014f27..f51cfc9b3 100644 --- a/Marlin/example_configurations/wt150/Configuration_adv.h +++ b/Marlin/example_configurations/wt150/Configuration_adv.h @@ -818,6 +818,17 @@ */ #define MINIMUM_STEPPER_PULSE 2 +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + */ +#define MAXIMUM_STEPPER_RATE 250000 // DRV8825 + // @section temperature // Control heater 0 and heater 1 in parallel. diff --git a/Marlin/stepper.cpp b/Marlin/stepper.cpp index 60ab49f28..ae1dff990 100644 --- a/Marlin/stepper.cpp +++ b/Marlin/stepper.cpp @@ -1259,8 +1259,20 @@ void Stepper::stepper_pulse_phase_isr() { // If there is no current block, do nothing if (!current_block) return; + // Count of pending loops and events for this iteration + const uint32_t pending_events = step_event_count - step_events_completed; + uint8_t events_to_do = MIN(pending_events, steps_per_isr); + + // Just update the value we will get at the end of the loop + step_events_completed += events_to_do; + + #if MINIMUM_STEPPER_PULSE > 0 + // Get the timer count and estimate the end of the pulse + hal_timer_t pulse_end = HAL_timer_get_count(PULSE_TIMER_NUM) + hal_timer_t((HAL_TICKS_PER_US) * (MINIMUM_STEPPER_PULSE)); + #endif + // Take multiple steps per interrupt (For high speed moves) - for (uint8_t i = steps_per_isr; i--;) { + do { #define _APPLY_STEP(AXIS) AXIS ##_APPLY_STEP #define _INVERT_STEP_PIN(AXIS) INVERT_## AXIS ##_STEP_PIN @@ -1282,11 +1294,6 @@ void Stepper::stepper_pulse_phase_isr() { } \ }while(0) - #if MINIMUM_STEPPER_PULSE > 0 - // Get the timer count and estimate the end of the pulse - hal_timer_t pulse_end = HAL_timer_get_count(PULSE_TIMER_NUM) + hal_timer_t((HAL_TICKS_PER_US) * (MINIMUM_STEPPER_PULSE)); - #endif - // Pulse start #if HAS_X_STEP PULSE_START(X); @@ -1335,8 +1342,8 @@ void Stepper::stepper_pulse_phase_isr() { #if MINIMUM_STEPPER_PULSE > 0 // Just wait for the requested pulse duration while (HAL_timer_get_count(PULSE_TIMER_NUM) < pulse_end) { /* nada */ } - // Get the timer count and estimate the end of the pulse for the OFF phase - pulse_end = HAL_timer_get_count(PULSE_TIMER_NUM) + hal_timer_t((HAL_TICKS_PER_US) * (MINIMUM_STEPPER_PULSE)); + // Add to the value, the value needed for the pulse end and ensuring the maximum driver rate is enforced + pulse_end += hal_timer_t(MIN_STEPPER_PULSE_CYCLES) - hal_timer_t((HAL_TICKS_PER_US) * (MINIMUM_STEPPER_PULSE)); #endif // Pulse stop @@ -1363,15 +1370,20 @@ void Stepper::stepper_pulse_phase_isr() { #endif #endif // !LIN_ADVANCE - // If all events done, break loop now - if (++step_events_completed >= step_event_count) break; + // Decrement the count of pending pulses to do + --events_to_do; #if MINIMUM_STEPPER_PULSE > 0 // For minimum pulse time wait after stopping pulses also - // Just wait for the requested pulse duration - if (i) while (HAL_timer_get_count(PULSE_TIMER_NUM) < pulse_end) { /* nada */ } + if (events_to_do) { + // Just wait for the requested pulse duration + while (HAL_timer_get_count(PULSE_TIMER_NUM) < pulse_end) { /* nada */ } + // Add to the value, the time that the pulse must be active (to be used on the next loop) + pulse_end += hal_timer_t((HAL_TICKS_PER_US) * (MINIMUM_STEPPER_PULSE)); + } #endif - } // steps_loop + + } while (events_to_do); } // This is the last half of the stepper interrupt: This one processes and @@ -1769,8 +1781,8 @@ uint32_t Stepper::stepper_block_phase_isr() { #if MINIMUM_STEPPER_PULSE > 0 // Just wait for the requested pulse duration while (HAL_timer_get_count(PULSE_TIMER_NUM) < pulse_end) { /* nada */ } - // Get the timer count and estimate the end of the pulse for the OFF phase - pulse_end = HAL_timer_get_count(PULSE_TIMER_NUM) + hal_timer_t((HAL_TICKS_PER_US) * (MINIMUM_STEPPER_PULSE)); + // Add to the value, the value needed for the pulse end and ensuring the maximum driver rate is enforced + pulse_end += hal_timer_t(MIN_STEPPER_PULSE_CYCLES) - hal_timer_t((HAL_TICKS_PER_US) * (MINIMUM_STEPPER_PULSE)); #endif LA_steps < 0 ? ++LA_steps : --LA_steps;