diff --git a/Marlin/Conditionals_post.h b/Marlin/Conditionals_post.h index df44597d9c..25cecf4f50 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 e3e112bb3e..0826f9d087 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 42f2ecad61..5f8530c80b 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 bf97967803..86bfb33bae 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 9bee6cc96c..60715bd11b 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 2cadaad045..a7d60e050e 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 ea9dae30b7..f4730f88f4 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 d3e34e3dac..0c2e5d5a89 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 b1bc51f63c..ac31bf5eb9 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 0a1951a18d..a3304c20ef 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 88c5e6ff06..043b9c832e 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 4e60da6922..58c61040fb 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 6782c89a1c..4493a88d39 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 42f2ecad61..5f8530c80b 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 e5ebfba6a8..45fa3fff04 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 167242dfe5..3db720b377 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 9f9217c206..c1ea61a144 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 e4fe7d2d8f..5fe95b651a 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 722ee4f780..e4d5f28d20 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 167242dfe5..3db720b377 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 8beeefd95c..8287e06a73 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 ecfe86cd82..58b19ae306 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 9be6c1d4b1..a1ea0e81c9 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 e6b6ca2139..caea18b423 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 63d3909a4a..c7af2ba713 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 08bce22e41..54e7630883 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 4517951e31..9b2c21365b 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 ca2f939f7b..65db893f37 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 a6e83b7fc4..af1b69148d 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 8c4812bfc1..34e411cae6 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 2a59c53ef7..bbe5a9f538 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 23785efb73..2b54237522 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 8d523047b9..0590bb0f96 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 af8105c227..5581bb3f2e 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 a617d5453d..6ea24c4e5f 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 8c4812bfc1..34e411cae6 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 2201b5c813..be505a20a9 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 b1cf98f0fc..96d0a927cf 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 f8fd2971a8..77361440f8 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 64a90a1048..907d8a4b14 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 9568464fbd..67fe5f859b 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 d2c008f23c..6165a0d2f2 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 80c78406b1..4e0a795cb6 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 74b061ea6a..a6da74e48b 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 635d87fd92..54028bcec5 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 74468f55a6..b99c706459 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 ccb7abd49f..6f93f3d190 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 c98ba025b6..5a75e1df7c 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 ccb7abd49f..6f93f3d190 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 35e4a80e47..8ec0e0699a 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 928b038bc4..f0924c7004 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 9bdf32c1ed..2467f6df72 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 b005ea0bce..c3a84aa335 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 20023535e4..2bfc18b837 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 686ec8d590..f481a0029a 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 4ae3ac116c..61a7490244 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 cca99dfe8e..6832b8e81a 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 1861129d37..30f2229e77 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 728d4bfac2..249ec1a9fe 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 90dd517ae7..a044ed7c10 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 aeaae9ac81..d5b58a6033 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 3954bbf90a..f580e791fd 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 c0f04ec301..a7d14e4112 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 a12357e0b9..8fa61daf96 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 4f12e13445..f5e2d130db 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 3cdd081712..0f4e69e1db 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 a185144536..dd7e7f17b9 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 dce00f73d9..fa8af61171 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 7c0f3aede4..495e71a7e4 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 c6335c3af0..413f9a7d82 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 1cf860b45f..ef2f10ba41 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 1fd114fda6..0e0bf6e102 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 a2ecc4676d..83b44341e5 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 9b7cb314e5..2ccddc2154 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 35dacaa3da..69eae61b2d 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 6a08b8fff0..3ec509805d 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 dbe4532666..a929510ae5 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 699cbfb5e4..fed7cd22cd 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 4363f2fe55..69771cfca8 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 778080e5b3..c03c991862 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 b211e5accd..3bea5acc5f 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 f86c8226b7..8424739378 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 0dabaf2e2b..58750f4323 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 b87c917ca8..154b5caabc 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 6a6ce6ec1c..c40186801c 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 a1e5e8d935..a8d9131d2e 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 b87c917ca8..154b5caabc 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 38b2357873..2cc55ce53c 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 b87c917ca8..154b5caabc 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 191ff91161..381b20f8bd 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 0a6616807b..db34166bd1 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 77933048d1..23417c83f0 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 a70affd960..0f7d5703bf 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 c5b76a1bb0..6fd52d6531 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 112cc0d328..77773de185 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 51e5e85af6..2e7baf60ed 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 8d6f91f950..f0dc1c3f3a 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 928e7c48ba..8aad62aeb8 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 d3faf50e86..b21648ace3 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 7c549e0693..21bd221ffe 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 568014f27c..f51cfc9b39 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 60ab49f28a..ae1dff9902 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;