diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 964a2c104aec..77dc6848fa67 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -457,6 +457,23 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +/** + * Custom Microstepping PIN settings + * Allows additional flexibility to defined the proper PIN settings for different + * stepper drivers. Defaults are normally applied in Conditional_post.h + * Uncomment MICROSTEP_CUSTOM to enable manual definition and ensure all microstep modes selected below + * are defined. At max, 3 MS PINS are supported, if less are defined, the last settings are ignoreds + */ +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/default/Configuration_adv.h b/Marlin/src/config/default/Configuration_adv.h index 964a2c104aec..2f0964a60fd0 100644 --- a/Marlin/src/config/default/Configuration_adv.h +++ b/Marlin/src/config/default/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h index b2dbe6e1c7e8..d7cdffa64021 100644 --- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h +++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 4, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h index b375a0d7bb46..259d04356456 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h index 7a502d1b8723..1ba981a6bcf7 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h b/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h index 964a2c104aec..2f0964a60fd0 100644 --- a/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h +++ b/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h index 8cfdb518d069..4b8a66fc8d42 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h +++ b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h index e358b7ff9e3e..8e8935d5fa8f 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h +++ b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h index 0f15c138ffe5..299668e7660a 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h index 7222f3c55233..48da2a80f9b6 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h index 0f15c138ffe5..299668e7660a 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/Cartesio/Configuration_adv.h b/Marlin/src/config/examples/Cartesio/Configuration_adv.h index c10546db2050..63091c87662e 100644 --- a/Marlin/src/config/examples/Cartesio/Configuration_adv.h +++ b/Marlin/src/config/examples/Cartesio/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h index 29367eefbac3..0d1ed930b3e1 100755 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h index e4c439ac0800..fb74c2da51b9 100644 --- a/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h index 8b2e9103d91f..918b07e5bfb5 100644 --- a/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h index 6d63e7c8a5a1..5675ad7768d3 100644 --- a/Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h b/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h index f273d8c82547..37a99038c708 100644 --- a/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h b/Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h index e46d53e0b853..6296f4ad1c06 100644 --- a/Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h b/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h index 6d63e7c8a5a1..5675ad7768d3 100644 --- a/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/Felix/Configuration_adv.h b/Marlin/src/config/examples/Felix/Configuration_adv.h index 2a102f8055bc..8fb73978c39a 100644 --- a/Marlin/src/config/examples/Felix/Configuration_adv.h +++ b/Marlin/src/config/examples/Felix/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h index 8cba5f3e90f6..80ec51ab8b61 100644 --- a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h +++ b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h index 540c4e32faed..6980eae11e21 100644 --- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h +++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h index 540c4e32faed..6980eae11e21 100644 --- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h +++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h index 26fd198fce02..6d946d27cf65 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h b/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h index 93b9e79008cc..51a98853a49f 100644 --- a/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h +++ b/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/MakerParts/Configuration_adv.h b/Marlin/src/config/examples/MakerParts/Configuration_adv.h index 8a3cd6eb6006..8e1ab854b21e 100644 --- a/Marlin/src/config/examples/MakerParts/Configuration_adv.h +++ b/Marlin/src/config/examples/MakerParts/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h index 3a16ec5b3529..7fee777e8449 100644 --- a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h index 7ad114f9ca2a..f78bf5f869db 100644 --- a/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h index ea352b6a5637..f12839b27cfa 100644 --- a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h +++ b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h index 6a65760c407b..7f035a7ba40d 100644 --- a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h +++ b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/RigidBot/Configuration_adv.h b/Marlin/src/config/examples/RigidBot/Configuration_adv.h index 732a8051cbce..abe9dfbe891d 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration_adv.h +++ b/Marlin/src/config/examples/RigidBot/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/SCARA/Configuration_adv.h b/Marlin/src/config/examples/SCARA/Configuration_adv.h index a3d822e8792f..858d9cac2a5d 100644 --- a/Marlin/src/config/examples/SCARA/Configuration_adv.h +++ b/Marlin/src/config/examples/SCARA/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h index 363954706b80..1aefddab608d 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/TheBorg/Configuration_adv.h b/Marlin/src/config/examples/TheBorg/Configuration_adv.h index 44a4b842d635..5f6bd7d3a16a 100644 --- a/Marlin/src/config/examples/TheBorg/Configuration_adv.h +++ b/Marlin/src/config/examples/TheBorg/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h index 31606428e312..189a1819b029 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h +++ b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h index 360ea1f2a4c2..66c929da5a78 100644 --- a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h +++ b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h index 7ff16a271e73..4e7f2457922b 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h @@ -460,6 +460,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h index 7a04202e572e..0f78955cb038 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h index 49a4983a37fd..787ddd0a12f5 100644 --- a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h +++ b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h index 123fe924947f..d912773594fb 100644 --- a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h @@ -459,6 +459,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h index ebce1fe5814c..4c124ad6cba7 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h @@ -459,6 +459,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h index 5eedc749abfe..1adbe8595076 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h @@ -459,6 +459,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/delta/generic/Configuration_adv.h b/Marlin/src/config/examples/delta/generic/Configuration_adv.h index 5eedc749abfe..1adbe8595076 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/generic/Configuration_adv.h @@ -459,6 +459,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h index 5eedc749abfe..1adbe8595076 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h @@ -459,6 +459,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h index b3d4e887dfeb..46d1ff6b3b95 100644 --- a/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h @@ -464,6 +464,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h index 50012d540326..d981ad0cdf4a 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h @@ -459,6 +459,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h index 319bb9632cdf..9d1d410900b4 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/makibox/Configuration_adv.h b/Marlin/src/config/examples/makibox/Configuration_adv.h index ea907a40e117..1319e03ef660 100644 --- a/Marlin/src/config/examples/makibox/Configuration_adv.h +++ b/Marlin/src/config/examples/makibox/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h index 9e85785b787b..e63d7f99eaa2 100644 --- a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/config/examples/wt150/Configuration_adv.h b/Marlin/src/config/examples/wt150/Configuration_adv.h index ff2942212dd8..da225e390569 100644 --- a/Marlin/src/config/examples/wt150/Configuration_adv.h +++ b/Marlin/src/config/examples/wt150/Configuration_adv.h @@ -457,6 +457,16 @@ */ //#define ADAPTIVE_STEP_SMOOTHING +//#define MICROSTEP_CUSTOM +#if ENABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #define MICROSTEP8 HIGH,HIGH,LOW + #define MICROSTEP16 LOW,LOW,HIGH + #define MICROSTEP32 HIGH,LOW,HIGH +#endif + // Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. #define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16] diff --git a/Marlin/src/gcode/control/M350_M351.cpp b/Marlin/src/gcode/control/M350_M351.cpp index cd75e7b2b10d..a83823f31563 100644 --- a/Marlin/src/gcode/control/M350_M351.cpp +++ b/Marlin/src/gcode/control/M350_M351.cpp @@ -41,17 +41,21 @@ void GcodeSuite::M350() { /** * M351: Toggle MS1 MS2 pins directly with axis codes X Y Z E B - * S# determines MS1 or MS2, X# sets the pin high/low. + * S# determines MS1, MS2 or MS3, X# sets the pin high/low. */ void GcodeSuite::M351() { if (parser.seenval('S')) switch (parser.value_byte()) { case 1: - LOOP_XYZE(i) if (parser.seenval(axis_codes[i])) stepper.microstep_ms(i, parser.value_byte(), -1); - if (parser.seenval('B')) stepper.microstep_ms(4, parser.value_byte(), -1); + LOOP_XYZE(i) if (parser.seenval(axis_codes[i])) stepper.microstep_ms(i, parser.value_byte(), -1, -1); + if (parser.seenval('B')) stepper.microstep_ms(4, parser.value_byte(), -1, -1); break; case 2: - LOOP_XYZE(i) if (parser.seenval(axis_codes[i])) stepper.microstep_ms(i, -1, parser.value_byte()); - if (parser.seenval('B')) stepper.microstep_ms(4, -1, parser.value_byte()); + LOOP_XYZE(i) if (parser.seenval(axis_codes[i])) stepper.microstep_ms(i, -1, parser.value_byte(), -1); + if (parser.seenval('B')) stepper.microstep_ms(4, -1, parser.value_byte(), -1); + break; + case 3: + LOOP_XYZE(i) if (parser.seenval(axis_codes[i])) stepper.microstep_ms(i, -1, -1, parser.value_byte()); + if (parser.seenval('B')) stepper.microstep_ms(4, -1, -1, parser.value_byte()); break; } stepper.microstep_readings(); diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 417fc59d96bc..f766526f78c0 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -222,26 +222,37 @@ #define MAX_AUTORETRACT 99 #endif -// MS1 MS2 Stepper Driver Microstepping mode table -#define MICROSTEP1 LOW,LOW -#if ENABLED(HEROIC_STEPPER_DRIVERS) - #define MICROSTEP128 LOW,HIGH -#else - #define MICROSTEP2 HIGH,LOW - #define MICROSTEP4 LOW,HIGH -#endif -#define MICROSTEP8 HIGH,HIGH -#ifdef __SAM3X8E__ - #if MB(ALLIGATOR) - #define MICROSTEP16 LOW,LOW - #define MICROSTEP32 HIGH,HIGH +// MS1 MS2 MS3 Stepper Driver Microstepping mode table +#if DISABLED(MICROSTEP_CUSTOM) + #define MICROSTEP1 LOW,LOW,LOW + #if ENABLED(HEROIC_STEPPER_DRIVERS) + #define MICROSTEP128 LOW,HIGH,LOW + #else + #define MICROSTEP2 HIGH,LOW,LOW + #define MICROSTEP4 LOW,HIGH,LOW + #endif + #define MICROSTEP8 HIGH,HIGH,LOW + #ifdef __SAM3X8E__ + #if MB(ALLIGATOR) + #define MICROSTEP16 LOW,LOW,LOW + #define MICROSTEP32 HIGH,HIGH,LOW + #else + #define MICROSTEP16 HIGH,HIGH,LOW + #endif #else - #define MICROSTEP16 HIGH,HIGH + #define MICROSTEP16 HIGH,HIGH,LOW #endif -#else - #define MICROSTEP16 HIGH,HIGH #endif +#define HAS_MICROSTEP1 defined(MICROSTEP1) +#define HAS_MICROSTEP2 defined(MICROSTEP2) +#define HAS_MICROSTEP4 defined(MICROSTEP4) +#define HAS_MICROSTEP8 defined(MICROSTEP8) +#define HAS_MICROSTEP16 defined(MICROSTEP16) +#define HAS_MICROSTEP32 defined(MICROSTEP32) +#define HAS_MICROSTEP64 defined(MICROSTEP64) +#define HAS_MICROSTEP128 defined(MICROSTEP128) + /** * Override here because this is set in Configuration_adv.h */ @@ -841,7 +852,7 @@ #define HAS_CASE_LIGHT (PIN_EXISTS(CASE_LIGHT) && ENABLED(CASE_LIGHT_ENABLE)) // Digital control -#define HAS_MICROSTEPS (HAS_X_MICROSTEPS || HAS_Y_MICROSTEPS || HAS_Z_MICROSTEPS || HAS_E0_MICROSTEPS || HAS_E1_MICROSTEPS || HAS_E2_MICROSTEPS || HAS_E3_MICROSTEPS || HAS_E4_MICROSTEPS) +#define HAS_MICROSTEPS (HAS_X_MICROSTEPS || HAS_X2_MICROSTEPS || HAS_Y_MICROSTEPS || HAS_Y2_MICROSTEPS || HAS_Z_MICROSTEPS || HAS_Z2_MICROSTEPS || HAS_E0_MICROSTEPS || HAS_E1_MICROSTEPS || HAS_E2_MICROSTEPS || HAS_E3_MICROSTEPS || HAS_E4_MICROSTEPS) #define HAS_STEPPER_RESET (PIN_EXISTS(STEPPER_RESET)) #define HAS_DIGIPOTSS (PIN_EXISTS(DIGIPOTSS)) #define HAS_MOTOR_CURRENT_PWM (PIN_EXISTS(MOTOR_CURRENT_PWM_XY) || PIN_EXISTS(MOTOR_CURRENT_PWM_Z) || PIN_EXISTS(MOTOR_CURRENT_PWM_E)) diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index ba535cddf12a..3a9be7dc0505 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -2460,49 +2460,119 @@ void Stepper::report_positions() { */ void Stepper::microstep_init() { - SET_OUTPUT(X_MS1_PIN); - SET_OUTPUT(X_MS2_PIN); + #if HAS_X_MICROSTEPS + SET_OUTPUT(X_MS1_PIN); + SET_OUTPUT(X_MS2_PIN); + #if PIN_EXISTS(X_MS3) + SET_OUTPUT(X_MS3_PIN); + #endif + #endif + #if HAS_X2_MICROSTEPS + SET_OUTPUT(X2_MS1_PIN); + SET_OUTPUT(X2_MS2_PIN); + #if PIN_EXISTS(X2_MS3) + SET_OUTPUT(X2_MS3_PIN); + #endif + #endif #if HAS_Y_MICROSTEPS SET_OUTPUT(Y_MS1_PIN); SET_OUTPUT(Y_MS2_PIN); + #if PIN_EXISTS(Y_MS3) + SET_OUTPUT(Y_MS3_PIN); + #endif + #endif + #if HAS_Y2_MICROSTEPS + SET_OUTPUT(Y2_MS1_PIN); + SET_OUTPUT(Y2_MS2_PIN); + #if PIN_EXISTS(Y2_MS3) + SET_OUTPUT(Y2_MS3_PIN); + #endif #endif #if HAS_Z_MICROSTEPS SET_OUTPUT(Z_MS1_PIN); SET_OUTPUT(Z_MS2_PIN); + #if PIN_EXISTS(Z_MS3) + SET_OUTPUT(Z_MS3_PIN); + #endif + #endif + #if HAS_Z2_MICROSTEPS + SET_OUTPUT(Z2_MS1_PIN); + SET_OUTPUT(Z2_MS2_PIN); + #if PIN_EXISTS(Z2_MS3) + SET_OUTPUT(Z2_MS3_PIN); + #endif #endif #if HAS_E0_MICROSTEPS SET_OUTPUT(E0_MS1_PIN); SET_OUTPUT(E0_MS2_PIN); + #if PIN_EXISTS(E0_MS3) + SET_OUTPUT(E0_MS3_PIN); + #endif #endif #if HAS_E1_MICROSTEPS SET_OUTPUT(E1_MS1_PIN); SET_OUTPUT(E1_MS2_PIN); + #if PIN_EXISTS(E1_MS3) + SET_OUTPUT(E1_MS3_PIN); + #endif #endif #if HAS_E2_MICROSTEPS SET_OUTPUT(E2_MS1_PIN); SET_OUTPUT(E2_MS2_PIN); + #if PIN_EXISTS(E2_MS3) + SET_OUTPUT(E2_MS3_PIN); + #endif #endif #if HAS_E3_MICROSTEPS SET_OUTPUT(E3_MS1_PIN); SET_OUTPUT(E3_MS2_PIN); + #if PIN_EXISTS(E3_MS3) + SET_OUTPUT(E3_MS3_PIN); + #endif #endif #if HAS_E4_MICROSTEPS SET_OUTPUT(E4_MS1_PIN); SET_OUTPUT(E4_MS2_PIN); + #if PIN_EXISTS(E4_MS3) + SET_OUTPUT(E4_MS3_PIN); + #endif #endif static const uint8_t microstep_modes[] = MICROSTEP_MODES; for (uint16_t i = 0; i < COUNT(microstep_modes); i++) microstep_mode(i, microstep_modes[i]); } - void Stepper::microstep_ms(const uint8_t driver, const int8_t ms1, const int8_t ms2) { + void Stepper::microstep_ms(const uint8_t driver, const int8_t ms1, const int8_t ms2, const int8_t ms3) { if (ms1 >= 0) switch (driver) { - case 0: WRITE(X_MS1_PIN, ms1); break; - #if HAS_Y_MICROSTEPS - case 1: WRITE(Y_MS1_PIN, ms1); break; + #if HAS_X_MICROSTEPS || HAS_X2_MICROSTEPS + case 0: + #if HAS_X_MICROSTEPS + WRITE(X_MS1_PIN, ms1); + #endif + #if HAS_X2_MICROSTEPS + WRITE(X2_MS1_PIN, ms1); + #endif + break; + #endif + #if HAS_Y_MICROSTEPS || HAS_Y2_MICROSTEPS + case 1: + #if HAS_Y_MICROSTEPS + WRITE(Y_MS1_PIN, ms1); + #endif + #if HAS_Y2_MICROSTEPS + WRITE(Y2_MS1_PIN, ms1); + #endif + break; #endif - #if HAS_Z_MICROSTEPS - case 2: WRITE(Z_MS1_PIN, ms1); break; + #if HAS_Z_MICROSTEPS || HAS_Z2_MICROSTEPS + case 2: + #if HAS_Z_MICROSTEPS + WRITE(Z_MS1_PIN, ms1); + #endif + #if HAS_Z2_MICROSTEPS + WRITE(Z2_MS1_PIN, ms1); + #endif + break; #endif #if HAS_E0_MICROSTEPS case 3: WRITE(E0_MS1_PIN, ms1); break; @@ -2521,12 +2591,35 @@ void Stepper::report_positions() { #endif } if (ms2 >= 0) switch (driver) { - case 0: WRITE(X_MS2_PIN, ms2); break; - #if HAS_Y_MICROSTEPS - case 1: WRITE(Y_MS2_PIN, ms2); break; + #if HAS_X_MICROSTEPS || HAS_X2_MICROSTEPS + case 0: + #if HAS_X_MICROSTEPS + WRITE(X_MS2_PIN, ms2); + #endif + #if HAS_X2_MICROSTEPS + WRITE(X2_MS2_PIN, ms2); + #endif + break; + #endif + #if HAS_Y_MICROSTEPS || HAS_Y2_MICROSTEPS + case 1: + #if HAS_Y_MICROSTEPS + WRITE(Y_MS2_PIN, ms2); + #endif + #if HAS_Y2_MICROSTEPS + WRITE(Y2_MS2_PIN, ms2); + #endif + break; #endif - #if HAS_Z_MICROSTEPS - case 2: WRITE(Z_MS2_PIN, ms2); break; + #if HAS_Z_MICROSTEPS || HAS_Z2_MICROSTEPS + case 2: + #if HAS_Z_MICROSTEPS + WRITE(Z_MS2_PIN, ms2); + #endif + #if HAS_Z2_MICROSTEPS + WRITE(Z2_MS2_PIN, ms2); + #endif + break; #endif #if HAS_E0_MICROSTEPS case 3: WRITE(E0_MS2_PIN, ms2); break; @@ -2544,65 +2637,151 @@ void Stepper::report_positions() { case 7: WRITE(E4_MS2_PIN, ms2); break; #endif } + if (ms3 >= 0) switch (driver) { + #if HAS_X_MICROSTEPS || HAS_X2_MICROSTEPS + case 0: + #if HAS_X_MICROSTEPS && PIN_EXISTS(X_MS3) + WRITE(X_MS3_PIN, ms3); + #endif + #if HAS_X2_MICROSTEPS && PIN_EXISTS(X2_MS3) + WRITE(X2_MS3_PIN, ms3); + #endif + break; + #endif + #if HAS_Y_MICROSTEPS || HAS_Y2_MICROSTEPS + case 1: + #if HAS_Y_MICROSTEPS && PIN_EXISTS(Y_MS3) + WRITE(Y_MS3_PIN, ms3); + #endif + #if HAS_Y2_MICROSTEPS && PIN_EXISTS(Y2_MS3) + WRITE(Y2_MS3_PIN, ms3); + #endif + break; + #endif + #if HAS_Z_MICROSTEPS || HAS_Z2_MICROSTEPS + case 2: + #if HAS_Z_MICROSTEPS && PIN_EXISTS(Z_MS3) + WRITE(Z_MS3_PIN, ms3); + #endif + #if HAS_Z2_MICROSTEPS && PIN_EXISTS(Z2_MS3) + WRITE(Z2_MS3_PIN, ms3); + #endif + break; + #endif + #if HAS_E0_MICROSTEPS && PIN_EXISTS(E0_MS3) + case 3: WRITE(E0_MS3_PIN, ms3); break; + #endif + #if HAS_E1_MICROSTEPS && PIN_EXISTS(E1_MS3) + case 4: WRITE(E1_MS3_PIN, ms3); break; + #endif + #if HAS_E2_MICROSTEPS && PIN_EXISTS(E2_MS3) + case 5: WRITE(E2_MS3_PIN, ms3); break; + #endif + #if HAS_E3_MICROSTEPS && PIN_EXISTS(E3_MS3) + case 6: WRITE(E3_MS3_PIN, ms3); break; + #endif + #if HAS_E4_MICROSTEPS && PIN_EXISTS(E4_MS3) + case 7: WRITE(E4_MS3_PIN, ms3); break; + #endif + } } void Stepper::microstep_mode(const uint8_t driver, const uint8_t stepping_mode) { switch (stepping_mode) { - case 1: microstep_ms(driver, MICROSTEP1); break; - #if ENABLED(HEROIC_STEPPER_DRIVERS) - case 128: microstep_ms(driver, MICROSTEP128); break; - #else + #if HAS_MICROSTEP1 + case 1: microstep_ms(driver, MICROSTEP1); break; + #endif + #if HAS_MICROSTEP2 case 2: microstep_ms(driver, MICROSTEP2); break; + #endif + #if HAS_MICROSTEP4 case 4: microstep_ms(driver, MICROSTEP4); break; #endif - case 8: microstep_ms(driver, MICROSTEP8); break; - case 16: microstep_ms(driver, MICROSTEP16); break; - #if MB(ALLIGATOR) + #if HAS_MICROSTEP8 + case 8: microstep_ms(driver, MICROSTEP8); break; + #endif + #if HAS_MICROSTEP16 + case 16: microstep_ms(driver, MICROSTEP16); break; + #endif + #if HAS_MICROSTEP32 case 32: microstep_ms(driver, MICROSTEP32); break; #endif + #if HAS_MICROSTEP64 + case 64: microstep_ms(driver, MICROSTEP64); break; + #endif + #if HAS_MICROSTEP128 + case 128: microstep_ms(driver, MICROSTEP128); break; + #endif + default: SERIAL_ERROR_START(); SERIAL_ERRORLNPGM("Microsteps unavailable"); break; } } void Stepper::microstep_readings() { - SERIAL_PROTOCOLLNPGM("MS1,MS2 Pins"); + SERIAL_PROTOCOLLNPGM("MS1,MS2,MS3 Pins"); SERIAL_PROTOCOLPGM("X: "); - SERIAL_PROTOCOL(READ(X_MS1_PIN)); - SERIAL_PROTOCOLLN(READ(X_MS2_PIN)); + #if HAS_X_MICROSTEPS + SERIAL_PROTOCOL(READ(X_MS1_PIN)); + SERIAL_PROTOCOL(READ(X_MS2_PIN)); + #if PIN_EXISTS(X_MS3) + SERIAL_PROTOCOLLN(READ(X_MS3_PIN)); + #endif + #endif #if HAS_Y_MICROSTEPS SERIAL_PROTOCOLPGM("Y: "); SERIAL_PROTOCOL(READ(Y_MS1_PIN)); - SERIAL_PROTOCOLLN(READ(Y_MS2_PIN)); + SERIAL_PROTOCOL(READ(Y_MS2_PIN)); + #if PIN_EXISTS(Y_MS3) + SERIAL_PROTOCOLLN(READ(Y_MS3_PIN)); + #endif #endif #if HAS_Z_MICROSTEPS SERIAL_PROTOCOLPGM("Z: "); SERIAL_PROTOCOL(READ(Z_MS1_PIN)); - SERIAL_PROTOCOLLN(READ(Z_MS2_PIN)); + SERIAL_PROTOCOL(READ(Z_MS2_PIN)); + #if PIN_EXISTS(Z_MS3) + SERIAL_PROTOCOLLN(READ(Z_MS3_PIN)); + #endif #endif #if HAS_E0_MICROSTEPS SERIAL_PROTOCOLPGM("E0: "); SERIAL_PROTOCOL(READ(E0_MS1_PIN)); - SERIAL_PROTOCOLLN(READ(E0_MS2_PIN)); + SERIAL_PROTOCOL(READ(E0_MS2_PIN)); + #if PIN_EXISTS(E0_MS3) + SERIAL_PROTOCOLLN(READ(E0_MS3_PIN)); + #endif #endif #if HAS_E1_MICROSTEPS SERIAL_PROTOCOLPGM("E1: "); SERIAL_PROTOCOL(READ(E1_MS1_PIN)); - SERIAL_PROTOCOLLN(READ(E1_MS2_PIN)); + SERIAL_PROTOCOL(READ(E1_MS2_PIN)); + #if PIN_EXISTS(E1_MS3) + SERIAL_PROTOCOLLN(READ(E1_MS3_PIN)); + #endif #endif #if HAS_E2_MICROSTEPS SERIAL_PROTOCOLPGM("E2: "); SERIAL_PROTOCOL(READ(E2_MS1_PIN)); - SERIAL_PROTOCOLLN(READ(E2_MS2_PIN)); + SERIAL_PROTOCOL(READ(E2_MS2_PIN)); + #if PIN_EXISTS(E2_MS3) + SERIAL_PROTOCOLLN(READ(E2_MS3_PIN)); + #endif #endif #if HAS_E3_MICROSTEPS SERIAL_PROTOCOLPGM("E3: "); SERIAL_PROTOCOL(READ(E3_MS1_PIN)); - SERIAL_PROTOCOLLN(READ(E3_MS2_PIN)); + SERIAL_PROTOCOL(READ(E3_MS2_PIN)); + #if PIN_EXISTS(E3_MS3) + SERIAL_PROTOCOLLN(READ(E3_MS3_PIN)); + #endif #endif #if HAS_E4_MICROSTEPS SERIAL_PROTOCOLPGM("E4: "); SERIAL_PROTOCOL(READ(E4_MS1_PIN)); - SERIAL_PROTOCOLLN(READ(E4_MS2_PIN)); + SERIAL_PROTOCOL(READ(E4_MS2_PIN)); + #if PIN_EXISTS(E4_MS3) + SERIAL_PROTOCOLLN(READ(E4_MS3_PIN)); + #endif #endif } diff --git a/Marlin/src/module/stepper.h b/Marlin/src/module/stepper.h index 2280bb78b8a0..1e778c5ba450 100644 --- a/Marlin/src/module/stepper.h +++ b/Marlin/src/module/stepper.h @@ -405,7 +405,7 @@ class Stepper { #endif #if HAS_MICROSTEPS - static void microstep_ms(const uint8_t driver, const int8_t ms1, const int8_t ms2); + static void microstep_ms(const uint8_t driver, const int8_t ms1, const int8_t ms2, const int8_t ms3); static void microstep_mode(const uint8_t driver, const uint8_t stepping); static void microstep_readings(); #endif diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 1feead8af20f..4e35ebb25238 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -399,12 +399,36 @@ #ifndef X_MS2_PIN #define X_MS2_PIN -1 #endif +#ifndef X_MS3_PIN + #define X_MS3_PIN -1 +#endif +#ifndef X2_MS1_PIN + #define X2_MS1_PIN -1 +#endif +#ifndef X2_MS2_PIN + #define X2_MS2_PIN -1 +#endif +#ifndef X2_MS3_PIN + #define X2_MS3_PIN -1 +#endif #ifndef Y_MS1_PIN #define Y_MS1_PIN -1 #endif #ifndef Y_MS2_PIN #define Y_MS2_PIN -1 #endif +#ifndef Y_MS3_PIN + #define Y_MS3_PIN -1 +#endif +#ifndef Y2_MS1_PIN + #define Y2_MS1_PIN -1 +#endif +#ifndef Y2_MS2_PIN + #define Y2_MS2_PIN -1 +#endif +#ifndef Y2_MS3_PIN + #define Y2_MS3_PIN -1 +#endif #ifndef Z_MS1_PIN #define Z_MS1_PIN -1 #endif @@ -414,24 +438,42 @@ #ifndef Z_MS3_PIN #define Z_MS3_PIN -1 #endif +#ifndef Z2_MS1_PIN + #define Z2_MS1_PIN -1 +#endif +#ifndef Z2_MS2_PIN + #define Z2_MS2_PIN -1 +#endif +#ifndef Z2_MS3_PIN + #define Z2_MS3_PIN -1 +#endif #ifndef E0_MS1_PIN #define E0_MS1_PIN -1 #endif #ifndef E0_MS2_PIN #define E0_MS2_PIN -1 #endif +#ifndef E0_MS3_PIN + #define E0_MS3_PIN -1 +#endif #ifndef E1_MS1_PIN #define E1_MS1_PIN -1 #endif #ifndef E1_MS2_PIN #define E1_MS2_PIN -1 #endif +#ifndef E1_MS3_PIN + #define E1_MS3_PIN -1 +#endif #ifndef E2_MS1_PIN #define E2_MS1_PIN -1 #endif #ifndef E2_MS2_PIN #define E2_MS2_PIN -1 #endif +#ifndef E2_MS3_PIN + #define E2_MS3_PIN -1 +#endif #ifndef E3_MS1_PIN #define E3_MS1_PIN -1 #endif @@ -656,7 +698,7 @@ #endif // List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those! -#define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, E0_MS1_PIN, E0_MS2_PIN, E0_CS_PIN, +#define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, E0_MS1_PIN, E0_MS2_PIN, E0_MS3_PIN, E0_CS_PIN, #define _E1_PINS #define _E2_PINS #define _E3_PINS @@ -666,18 +708,18 @@ // Tools 0 and 1 use E0 #if EXTRUDERS > 2 // Tools 2 and 3 use E1 #undef _E1_PINS - #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, E1_MS1_PIN, E1_MS2_PIN, E1_CS_PIN, + #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, E1_MS1_PIN, E1_MS2_PIN, E1_MS3_PIN, E1_CS_PIN, #if EXTRUDERS > 4 // Tools 4 and 5 use E2 #undef _E2_PINS - #define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN, E2_MS1_PIN, E2_MS2_PIN, E2_CS_PIN, + #define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN, E2_MS1_PIN, E2_MS2_PIN, E2_MS3_PIN, E2_CS_PIN, #endif #endif #elif EXTRUDERS > 1 #undef _E1_PINS - #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, E1_MS1_PIN, E1_MS2_PIN, E1_CS_PIN, + #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, E1_MS1_PIN, E1_MS2_PIN, E1_MS3_PIN, E1_CS_PIN, #if EXTRUDERS > 2 #undef _E2_PINS - #define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN, E2_MS1_PIN, E2_MS2_PIN, E2_CS_PIN, + #define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN, E2_MS1_PIN, E2_MS2_PIN, E2_MS3_PIN, E2_CS_PIN, #if EXTRUDERS > 3 #undef _E3_PINS #define _E3_PINS E3_STEP_PIN, E3_DIR_PIN, E3_ENABLE_PIN, E3_MS1_PIN, E3_MS2_PIN, E3_MS3_PIN, E3_CS_PIN, @@ -712,16 +754,16 @@ #endif // HOTENDS > 2 #elif ENABLED(MIXING_EXTRUDER) #undef _E1_PINS - #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, E1_MS1_PIN, E1_MS2_PIN, E1_CS_PIN, + #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, E1_MS1_PIN, E1_MS2_PIN, E1_MS3_PIN, E1_CS_PIN, #if MIXING_STEPPERS > 2 #undef _E2_PINS - #define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN, E2_MS1_PIN, E2_MS2_PIN, E2_CS_PIN, + #define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN, E2_MS1_PIN, E2_MS2_PIN, E2_MS3_PIN, E2_CS_PIN, #if MIXING_STEPPERS > 3 #undef _E3_PINS - #define _E3_PINS E3_STEP_PIN, E3_DIR_PIN, E3_ENABLE_PIN, E3_MS1_PIN, E3_MS2_PIN, E3_CS_PIN, + #define _E3_PINS E3_STEP_PIN, E3_DIR_PIN, E3_ENABLE_PIN, E3_MS1_PIN, E3_MS2_PIN, E3_MS3_PIN, E3_CS_PIN, #if MIXING_STEPPERS > 4 #undef _E4_PINS - #define _E4_PINS E4_STEP_PIN, E4_DIR_PIN, E4_ENABLE_PIN, E4_MS1_PIN, E4_MS2_PIN, E4_CS_PIN, + #define _E4_PINS E4_STEP_PIN, E4_DIR_PIN, E4_ENABLE_PIN, E4_MS1_PIN, E4_MS2_PIN, E4_MS3_PIN, E4_CS_PIN, #endif // MIXING_STEPPERS > 4 #endif // MIXING_STEPPERS > 3 #endif // MIXING_STEPPERS > 2 @@ -901,9 +943,9 @@ #endif #define SENSITIVE_PINS { \ - X_STEP_PIN, X_DIR_PIN, X_ENABLE_PIN, X_MIN_PIN, X_MAX_PIN, X_MS1_PIN, X_MS2_PIN, X_CS_PIN, \ - Y_STEP_PIN, Y_DIR_PIN, Y_ENABLE_PIN, Y_MIN_PIN, Y_MAX_PIN, Y_MS1_PIN, Y_MS2_PIN, Y_CS_PIN, \ - Z_STEP_PIN, Z_DIR_PIN, Z_ENABLE_PIN, Z_MIN_PIN, Z_MAX_PIN, Z_MS1_PIN, Z_MS2_PIN, Z_MS3_PIN, Z_CS_PIN, Z_MIN_PROBE_PIN, \ + X_STEP_PIN, X_DIR_PIN, X_ENABLE_PIN, X_MIN_PIN, X_MAX_PIN, X_MS1_PIN, X_MS2_PIN, X_MS3_PIN, X2_MS1_PIN, X2_MS2_PIN, X2_MS3_PIN, X_CS_PIN, \ + Y_STEP_PIN, Y_DIR_PIN, Y_ENABLE_PIN, Y_MIN_PIN, Y_MAX_PIN, Y_MS1_PIN, Y_MS2_PIN, Y_MS3_PIN, Y2_MS1_PIN, Y2_MS2_PIN, Y2_MS3_PIN, Y_CS_PIN, \ + Z_STEP_PIN, Z_DIR_PIN, Z_ENABLE_PIN, Z_MIN_PIN, Z_MAX_PIN, Z_MS1_PIN, Z_MS2_PIN, Z_MS3_PIN, Z2_MS1_PIN, Z2_MS2_PIN, Z2_MS3_PIN, Z_CS_PIN, Z_MIN_PROBE_PIN, \ PS_ON_PIN, HEATER_BED_PIN, FAN_PIN, FAN1_PIN, FAN2_PIN, CONTROLLER_FAN_PIN, \ _E0_PINS _E1_PINS _E2_PINS _E3_PINS _E4_PINS BED_PINS \ _H0_PINS _H1_PINS _H2_PINS _H3_PINS _H4_PINS \ diff --git a/Marlin/src/pins/pinsDebug_list.h b/Marlin/src/pins/pinsDebug_list.h index e19858d528e1..beb72f96687a 100644 --- a/Marlin/src/pins/pinsDebug_list.h +++ b/Marlin/src/pins/pinsDebug_list.h @@ -268,6 +268,9 @@ #if PIN_EXISTS(E0_MS2) REPORT_NAME_DIGITAL(__LINE__, E0_MS2_PIN) #endif +#if PIN_EXISTS(E0_MS3) + REPORT_NAME_DIGITAL(__LINE__, E0_MS3_PIN) +#endif #if PIN_EXISTS(E0_STEP) REPORT_NAME_DIGITAL(__LINE__, E0_STEP_PIN) #endif @@ -289,6 +292,9 @@ #if PIN_EXISTS(E1_MS2) REPORT_NAME_DIGITAL(__LINE__, E1_MS2_PIN) #endif +#if PIN_EXISTS(E1_MS3) + REPORT_NAME_DIGITAL(__LINE__, E1_MS3_PIN) +#endif #if PIN_EXISTS(E1_STEP) REPORT_NAME_DIGITAL(__LINE__, E1_STEP_PIN) #endif @@ -310,6 +316,9 @@ #if PIN_EXISTS(E2_MS2) REPORT_NAME_DIGITAL(__LINE__, E2_MS2_PIN) #endif +#if PIN_EXISTS(E2_MS3) + REPORT_NAME_DIGITAL(__LINE__, E2_MS3_PIN) +#endif #if PIN_EXISTS(E2_STEP) REPORT_NAME_DIGITAL(__LINE__, E2_STEP_PIN) #endif @@ -836,6 +845,9 @@ #if PIN_EXISTS(X_MS2) REPORT_NAME_DIGITAL(__LINE__, X_MS2_PIN) #endif +#if PIN_EXISTS(X_MS3) + REPORT_NAME_DIGITAL(__LINE__, X_MS3_PIN) +#endif #if PIN_EXISTS(X_STEP) REPORT_NAME_DIGITAL(__LINE__, X_STEP_PIN) #endif @@ -848,6 +860,15 @@ #if PIN_EXISTS(X2_ENABLE) REPORT_NAME_DIGITAL(__LINE__, X2_ENABLE_PIN) #endif +#if PIN_EXISTS(X2_MS1) + REPORT_NAME_DIGITAL(__LINE__, X2_MS1_PIN) +#endif +#if PIN_EXISTS(X2_MS2) + REPORT_NAME_DIGITAL(__LINE__, X2_MS2_PIN) +#endif +#if PIN_EXISTS(X2_MS3) + REPORT_NAME_DIGITAL(__LINE__, X2_MS3_PIN) +#endif #if PIN_EXISTS(X2_STEP) REPORT_NAME_DIGITAL(__LINE__, X2_STEP_PIN) #endif @@ -875,6 +896,9 @@ #if PIN_EXISTS(Y_MS2) REPORT_NAME_DIGITAL(__LINE__, Y_MS2_PIN) #endif +#if PIN_EXISTS(Y_MS3) + REPORT_NAME_DIGITAL(__LINE__, Y_MS3_PIN) +#endif #if PIN_EXISTS(Y_STEP) REPORT_NAME_DIGITAL(__LINE__, Y_STEP_PIN) #endif @@ -887,6 +911,15 @@ #if PIN_EXISTS(Y2_ENABLE) REPORT_NAME_DIGITAL(__LINE__, Y2_ENABLE_PIN) #endif +#if PIN_EXISTS(Y2_MS1) + REPORT_NAME_DIGITAL(__LINE__, Y2_MS1_PIN) +#endif +#if PIN_EXISTS(Y2_MS2) + REPORT_NAME_DIGITAL(__LINE__, Y2_MS2_PIN) +#endif +#if PIN_EXISTS(Y2_MS3) + REPORT_NAME_DIGITAL(__LINE__, Y2_MS3_PIN) +#endif #if PIN_EXISTS(Y2_STEP) REPORT_NAME_DIGITAL(__LINE__, Y2_STEP_PIN) #endif @@ -917,6 +950,9 @@ #if PIN_EXISTS(Z_MS2) REPORT_NAME_DIGITAL(__LINE__, Z_MS2_PIN) #endif +#if PIN_EXISTS(Z_MS3) + REPORT_NAME_DIGITAL(__LINE__, Z_MS3_PIN) +#endif #if PIN_EXISTS(Z_PROBE) REPORT_NAME_DIGITAL(__LINE__, Z_PROBE_PIN) #endif