Browse Source

Adaptive multiaxis step smoothing

- Stepper bugs fixed
- Support MIXING_EXTRUDER with Linear Advance
- Miscellaneous cleanup
FLSUN-QQS
etagle 3 years ago
committed by Scott Lahteine
parent
commit
39a7e7720d
57 changed files with 1281 additions and 486 deletions
  1. +8
    -0
      Marlin/Configuration_adv.h
  2. +8
    -0
      Marlin/src/config/default/Configuration_adv.h
  3. +8
    -0
      Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h
  4. +8
    -0
      Marlin/src/config/examples/Anet/A6/Configuration_adv.h
  5. +8
    -0
      Marlin/src/config/examples/Anet/A8/Configuration_adv.h
  6. +8
    -0
      Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h
  7. +8
    -0
      Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h
  8. +8
    -0
      Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h
  9. +8
    -0
      Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h
  10. +8
    -0
      Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h
  11. +8
    -0
      Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h
  12. +8
    -0
      Marlin/src/config/examples/Cartesio/Configuration_adv.h
  13. +8
    -0
      Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h
  14. +8
    -0
      Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h
  15. +8
    -0
      Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h
  16. +8
    -0
      Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h
  17. +8
    -0
      Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h
  18. +8
    -0
      Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h
  19. +8
    -0
      Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h
  20. +8
    -0
      Marlin/src/config/examples/Felix/Configuration_adv.h
  21. +8
    -0
      Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h
  22. +8
    -0
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h
  23. +8
    -0
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h
  24. +8
    -0
      Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h
  25. +8
    -0
      Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h
  26. +1
    -1
      Marlin/src/config/examples/MakerParts/Configuration.h
  27. +8
    -0
      Marlin/src/config/examples/MakerParts/Configuration_adv.h
  28. +8
    -0
      Marlin/src/config/examples/Malyan/M150/Configuration_adv.h
  29. +8
    -0
      Marlin/src/config/examples/Malyan/M200/Configuration_adv.h
  30. +8
    -0
      Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h
  31. +8
    -0
      Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h
  32. +8
    -0
      Marlin/src/config/examples/RigidBot/Configuration_adv.h
  33. +8
    -0
      Marlin/src/config/examples/SCARA/Configuration_adv.h
  34. +8
    -0
      Marlin/src/config/examples/Sanguinololu/Configuration_adv.h
  35. +8
    -0
      Marlin/src/config/examples/TheBorg/Configuration_adv.h
  36. +8
    -0
      Marlin/src/config/examples/TinyBoy2/Configuration_adv.h
  37. +8
    -0
      Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h
  38. +8
    -0
      Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h
  39. +8
    -0
      Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h
  40. +8
    -0
      Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h
  41. +8
    -0
      Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h
  42. +8
    -0
      Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h
  43. +8
    -0
      Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h
  44. +8
    -0
      Marlin/src/config/examples/delta/generic/Configuration_adv.h
  45. +8
    -0
      Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h
  46. +8
    -0
      Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h
  47. +8
    -0
      Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h
  48. +8
    -0
      Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h
  49. +8
    -0
      Marlin/src/config/examples/makibox/Configuration_adv.h
  50. +8
    -0
      Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h
  51. +8
    -0
      Marlin/src/config/examples/wt150/Configuration_adv.h
  52. +128
    -42
      Marlin/src/inc/Conditionals_post.h
  53. +10
    -4
      Marlin/src/module/planner.cpp
  54. +2
    -2
      Marlin/src/module/planner.h
  55. +396
    -381
      Marlin/src/module/stepper.cpp
  56. +75
    -56
      Marlin/src/module/stepper.h
  57. +269
    -0
      docs/Bresenham.md

+ 8
- 0
Marlin/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/default/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/Anet/A6/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/Anet/A8/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/Cartesio/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/Felix/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 1
- 1
Marlin/src/config/examples/MakerParts/Configuration.h View File

@ -631,7 +631,7 @@
* Override with M201
* X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
*/
#define DEFAULT_MAX_ACCELERATION { MAX_XYAXIS_ACCEL, MAX_XYAXIS_ACCEL, 100, 200 }
#define DEFAULT_MAX_ACCELERATION { MAX_XYAXIS_ACCEL, MAX_XYAXIS_ACCEL, 10, 200 }
/**
* Default Acceleration (change/s) change = mm/s


+ 8
- 0
Marlin/src/config/examples/MakerParts/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/Malyan/M150/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/Malyan/M200/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/RigidBot/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/SCARA/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/Sanguinololu/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/TheBorg/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/TinyBoy2/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h View File

@ -453,6 +453,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h View File

@ -452,6 +452,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h View File

@ -452,6 +452,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h View File

@ -452,6 +452,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/delta/generic/Configuration_adv.h View File

@ -452,6 +452,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h View File

@ -452,6 +452,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h View File

@ -457,6 +457,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h View File

@ -452,6 +452,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/makibox/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 8
- 0
Marlin/src/config/examples/wt150/Configuration_adv.h View File

@ -450,6 +450,14 @@
//#define JUNCTION_DEVIATION_INCLUDE_E
#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
// 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]


+ 128
- 42
Marlin/src/inc/Conditionals_post.h View File

@ -215,22 +215,6 @@
#define DEFAULT_KEEPALIVE_INTERVAL 2
#endif
#ifdef CPU_32_BIT
/**
* Hidden options for developer
*/
// Double stepping starts at STEP_DOUBLER_FREQUENCY + 1, quad stepping starts at STEP_DOUBLER_FREQUENCY * 2 + 1
#ifndef STEP_DOUBLER_FREQUENCY
#if ENABLED(LIN_ADVANCE)
#define STEP_DOUBLER_FREQUENCY 60000 // Hz
#else
#define STEP_DOUBLER_FREQUENCY 80000 // Hz
#endif
#endif
// Disable double / quad stepping
//#define DISABLE_MULTI_STEPPING
#endif
/**
* Provide a MAX_AUTORETRACT for older configs
*/
@ -238,23 +222,6 @@
#define MAX_AUTORETRACT 99
#endif
/**
* MAX_STEP_FREQUENCY differs for TOSHIBA
*/
#if ENABLED(CONFIG_STEPPERS_TOSHIBA)
#ifdef CPU_32_BIT
#define MAX_STEP_FREQUENCY STEP_DOUBLER_FREQUENCY // Max step frequency for Toshiba Stepper Controllers, 96kHz is close to maximum for an Arduino Due
#else
#define MAX_STEP_FREQUENCY 10000 // Max step frequency for Toshiba Stepper Controllers
#endif
#else
#ifdef CPU_32_BIT
#define MAX_STEP_FREQUENCY (STEP_DOUBLER_FREQUENCY * 4) // Max step frequency for the Due is approx. 330kHz
#else
#define MAX_STEP_FREQUENCY 40000 // Max step frequency for Ultimaker (5000 pps / half step)
#endif
#endif
// MS1 MS2 Stepper Driver Microstepping mode table
#define MICROSTEP1 LOW,LOW
#if ENABLED(HEROIC_STEPPER_DRIVERS)
@ -1346,15 +1313,6 @@
#define MANUAL_PROBE_HEIGHT Z_HOMING_HEIGHT
#endif
// Stepper pulse duration, in cycles
#define STEP_PULSE_CYCLES ((MINIMUM_STEPPER_PULSE) * CYCLES_PER_MICROSECOND)
#ifdef CPU_32_BIT
// Add additional delay for between direction signal and pulse signal of stepper
#ifndef STEPPER_DIRECTION_DELAY
#define STEPPER_DIRECTION_DELAY 0 // time in microseconds
#endif
#endif
#ifndef __SAM3X8E__ //todo: hal: broken hal encapsulation
#undef UI_VOLTAGE_LEVEL
#undef RADDS_DISPLAY
@ -1486,4 +1444,132 @@
#define USE_EXECUTE_COMMANDS_IMMEDIATE
#endif
//
// Estimate the amount of time the ISR will take to execute
//
#ifdef CPU_32_BIT
// The base ISR takes 792 cycles
#define ISR_BASE_CYCLES 792UL
// Linear advance base time is 64 cycles
#if ENABLED(LIN_ADVANCE)
#define ISR_LA_BASE_CYCLES 64UL
#else
#define ISR_LA_BASE_CYCLES 0UL
#endif
// S curve interpolation adds 40 cycles
#if ENABLED(S_CURVE_ACCELERATION)
#define ISR_S_CURVE_CYCLES 40UL
#else
#define ISR_S_CURVE_CYCLES 0UL
#endif
// Stepper Loop base cycles
#define ISR_LOOP_BASE_CYCLES 4UL
// And each stepper takes 16 cycles
#define ISR_STEPPER_CYCLES 16UL
#else
// The base ISR takes 752 cycles
#define ISR_BASE_CYCLES 752UL
// Linear advance base time is 32 cycles
#if ENABLED(LIN_ADVANCE)
#define ISR_LA_BASE_CYCLES 32UL
#else
#define ISR_LA_BASE_CYCLES 0UL
#endif
// S curve interpolation adds 160 cycles
#if ENABLED(S_CURVE_ACCELERATION)
#define ISR_S_CURVE_CYCLES 160UL
#else
#define ISR_S_CURVE_CYCLES 0UL
#endif
// Stepper Loop base cycles
#define ISR_LOOP_BASE_CYCLES 32UL
// And each stepper takes 88 cycles
#define ISR_STEPPER_CYCLES 88UL
#endif
// For each stepper, we add its time
#ifdef HAS_X_STEP
#define ISR_X_STEPPER_CYCLES ISR_STEPPER_CYCLES
#else
#define ISR_X_STEPPER_CYCLES 0UL
#endif
// For each stepper, we add its time
#ifdef HAS_Y_STEP
#define ISR_Y_STEPPER_CYCLES ISR_STEPPER_CYCLES
#else
#define ISR_Y_STEPPER_CYCLES 0UL
#endif
// For each stepper, we add its time
#ifdef HAS_Z_STEP
#define ISR_Z_STEPPER_CYCLES ISR_STEPPER_CYCLES
#else
#define ISR_Z_STEPPER_CYCLES 0UL
#endif
// E is always interpolated, even for mixing extruders
#define ISR_E_STEPPER_CYCLES ISR_STEPPER_CYCLES
// If linear advance is disabled, then the loop also handles them
#if DISABLED(LIN_ADVANCE) && ENABLED(MIXING_EXTRUDER)
#define ISR_MIXING_STEPPER_CYCLES ((MIXING_STEPPERS) * ISR_STEPPER_CYCLES)
#else
#define ISR_MIXING_STEPPER_CYCLES 0UL
#endif
// 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)
// But the user could be enforcing a minimum time, so the loop time is
#define ISR_LOOP_CYCLES (ISR_LOOP_BASE_CYCLES + ((MINIMUM_STEPPER_PULSE*2UL) > MIN_ISR_LOOP_CYCLES ? (MINIMUM_STEPPER_PULSE*2UL) : MIN_ISR_LOOP_CYCLES))
// If linear advance is enabled, then it is handled separately
#if ENABLED(LIN_ADVANCE)
// Estimate the minimum LA loop time
#if ENABLED(MIXING_EXTRUDER)
#define MIN_ISR_LA_LOOP_CYCLES ((MIXING_STEPPERS) * (ISR_STEPPER_CYCLES))
#else
#define MIN_ISR_LA_LOOP_CYCLES ISR_STEPPER_CYCLES
#endif
// And the real loop time
#define ISR_LA_LOOP_CYCLES ((MINIMUM_STEPPER_PULSE*2UL) > MIN_ISR_LA_LOOP_CYCLES ? (MINIMUM_STEPPER_PULSE*2UL) : MIN_ISR_LA_LOOP_CYCLES)
#else
#define ISR_LA_LOOP_CYCLES 0UL
#endif
// Now estimate the total ISR execution time in cycles given a step per ISR multiplier
#define ISR_EXECUTION_CYCLES(rate) (((ISR_BASE_CYCLES + ISR_S_CURVE_CYCLES + (ISR_LOOP_CYCLES * rate) + ISR_LA_BASE_CYCLES + ISR_LA_LOOP_CYCLES)) / rate)
// The maximum allowable stepping frequency when doing x128-x1 stepping (in Hz)
#define MAX_128X_STEP_ISR_FREQUENCY (F_CPU / ISR_EXECUTION_CYCLES(128))
#define MAX_64X_STEP_ISR_FREQUENCY (F_CPU / ISR_EXECUTION_CYCLES(64))
#define MAX_32X_STEP_ISR_FREQUENCY (F_CPU / ISR_EXECUTION_CYCLES(32))
#define MAX_16X_STEP_ISR_FREQUENCY (F_CPU / ISR_EXECUTION_CYCLES(16))
#define MAX_8X_STEP_ISR_FREQUENCY (F_CPU / ISR_EXECUTION_CYCLES(8))
#define MAX_4X_STEP_ISR_FREQUENCY (F_CPU / ISR_EXECUTION_CYCLES(4))
#define MAX_2X_STEP_ISR_FREQUENCY (F_CPU / ISR_EXECUTION_CYCLES(2))
#define MAX_1X_STEP_ISR_FREQUENCY (F_CPU / ISR_EXECUTION_CYCLES(1))
// The minimum allowable frequency for step smoothing will be 1/10 of the maximum nominal frequency (in Hz)
#define MIN_STEP_ISR_FREQUENCY MAX_1X_STEP_ISR_FREQUENCY
// Disable multiple steps per ISR
//#define DISABLE_MULTI_STEPPING
#endif // CONDITIONALS_POST_H

+ 10
- 4
Marlin/src/module/planner.cpp View File

@ -679,9 +679,9 @@ void Planner::init() {
return r11 | (uint16_t(r12) << 8) | (uint32_t(r13) << 16);
}
#else
// All the other 32 CPUs can easily perform the inverse using hardware division,
// All other 32-bit MPUs can easily do inverse using hardware division,
// so we don't need to reduce precision or to use assembly language at all.
// This routine, for all the other archs, returns 0x100000000 / d ~= 0xFFFFFFFF / d
// This routine, for all other archs, returns 0x100000000 / d ~= 0xFFFFFFFF / d
static FORCE_INLINE uint32_t get_period_inverse(const uint32_t d) { return 0xFFFFFFFF / d; }
#endif
#endif
@ -1646,10 +1646,16 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
// Bail if this is a zero-length block
if (block->step_event_count < MIN_STEPS_PER_SEGMENT) return false;
// For a mixing extruder, get a magnified step_event_count for each
// For a mixing extruder, get a magnified esteps for each
#if ENABLED(MIXING_EXTRUDER)
for (uint8_t i = 0; i < MIXING_STEPPERS; i++)
block->mix_event_count[i] = mixing_factor[i] * block->step_event_count;
block->mix_steps[i] = mixing_factor[i] * (
#if ENABLED(LIN_ADVANCE)
esteps
#else
block->step_event_count
#endif
);
#endif
#if FAN_COUNT > 0


+ 2
- 2
Marlin/src/module/planner.h View File

@ -108,7 +108,7 @@ typedef struct {
uint8_t active_extruder; // The extruder to move (if E move)
#if ENABLED(MIXING_EXTRUDER)
uint32_t mix_event_count[MIXING_STEPPERS]; // Scaled step_event_count for the mixing steppers
uint32_t mix_steps[MIXING_STEPPERS]; // Scaled steps[E_AXIS] for the mixing steppers
#endif
// Settings for the trapezoid generator
@ -130,7 +130,7 @@ typedef struct {
// Advance extrusion
#if ENABLED(LIN_ADVANCE)
bool use_advance_lead;
uint16_t advance_speed, // Timer value for extruder speed offset
uint16_t advance_speed, // STEP timer value for extruder speed offset ISR
max_adv_steps, // max. advance steps to get cruising speed pressure (not always nominal_speed!)
final_adv_steps; // advance steps due to exit speed
float e_D_ratio;


+ 396
- 381
Marlin/src/module/stepper.cpp
File diff suppressed because it is too large
View File


+ 75
- 56
Marlin/src/module/stepper.h View File

@ -76,10 +76,14 @@ class Stepper {
private:
static uint8_t last_direction_bits, // The next stepping-bits to be output
last_movement_extruder, // Last movement extruder, as computed when the last movement was fetched from planner
axis_did_move; // Last Movement in the given direction is not null, as computed when the last movement was fetched from planner
static bool abort_current_block; // Signals to the stepper that current block should be aborted
#if DISABLED(MIXING_EXTRUDER)
static uint8_t last_moved_extruder; // Last-moved extruder, as set when the last movement was fetched from planner
#endif
#if ENABLED(X_DUAL_ENDSTOPS)
static bool locked_X_motor, locked_X2_motor;
#endif
@ -90,9 +94,34 @@ class Stepper {
static bool locked_Z_motor, locked_Z2_motor;
#endif
// Counter variables for the Bresenham line tracer
static int32_t counter_X, counter_Y, counter_Z, counter_E;
static uint32_t step_events_completed; // The number of step events executed in the current block
static uint32_t acceleration_time, deceleration_time; // time measured in Stepper Timer ticks
static uint8_t steps_per_isr; // Count of steps to perform per Stepper ISR call
#if ENABLED(ADAPTIVE_STEP_SMOOTHING)
static uint8_t oversampling_factor; // Oversampling factor (log2(multiplier)) to increase temporal resolution of axis
#else
static constexpr uint8_t oversampling_factor = 0;
#endif
// Delta error variables for the Bresenham line tracer
static int32_t delta_error[XYZE];
static uint32_t advance_dividend[XYZE],
advance_divisor,
step_events_completed, // The number of step events executed in the current block
accelerate_until, // The point from where we need to stop acceleration
decelerate_after, // The point from where we need to start decelerating
step_event_count; // The total event count for the current block
// Mixing extruder mix delta_errors for bresenham tracing
#if ENABLED(MIXING_EXTRUDER)
static int32_t delta_error_m[MIXING_STEPPERS];
static uint32_t advance_dividend_m[MIXING_STEPPERS],
advance_divisor_m;
#define MIXING_STEPPERS_LOOP(VAR) \
for (uint8_t VAR = 0; VAR < MIXING_STEPPERS; VAR++)
#else
static int8_t active_extruder; // Active extruder
#endif
#if ENABLED(S_CURVE_ACCELERATION)
static int32_t bezier_A, // A coefficient in Bézier speed curve
@ -107,33 +136,19 @@ class Stepper {
#endif
static uint32_t nextMainISR; // time remaining for the next Step ISR
static bool all_steps_done; // all steps done
#if ENABLED(LIN_ADVANCE)
static uint32_t LA_decelerate_after; // Copy from current executed block. Needed because current_block is set to NULL "too early".
static uint32_t nextAdvanceISR, eISR_Rate;
static uint16_t current_adv_steps, final_adv_steps, max_adv_steps; // Copy from current executed block. Needed because current_block is set to NULL "too early".
static int8_t e_steps;
static bool use_advance_lead;
#if E_STEPPERS > 1
static int8_t LA_active_extruder; // Copy from current executed block. Needed because current_block is set to NULL "too early".
#else
static constexpr int8_t LA_active_extruder = 0;
#endif
static uint32_t nextAdvanceISR, LA_isr_rate;
static uint16_t LA_current_adv_steps, LA_final_adv_steps, LA_max_adv_steps; // Copy from current executed block. Needed because current_block is set to NULL "too early".
static int8_t LA_steps;
static bool LA_use_advance_lead;
#endif // LIN_ADVANCE
static uint32_t acceleration_time, deceleration_time;
static uint8_t step_loops, step_loops_nominal;
static uint32_t ticks_nominal;
static int32_t ticks_nominal;
#if DISABLED(S_CURVE_ACCELERATION)
static uint32_t acc_step_rate; // needed for deceleration start point
#endif
static volatile int32_t endstops_trigsteps[XYZ];
static volatile int32_t endstops_stepsTotal, endstops_stepsDone;
//
// Positions of stepper motors, in step units
@ -145,16 +160,6 @@ class Stepper {
//
static int8_t count_direction[NUM_AXIS];
//
// Mixing extruder mix counters
//
#if ENABLED(MIXING_EXTRUDER)
static int32_t counter_m[MIXING_STEPPERS];
#define MIXING_STEPPERS_LOOP(VAR) \
for (uint8_t VAR = 0; VAR < MIXING_STEPPERS; VAR++) \
if (current_block->mix_event_count[VAR])
#endif
public:
//
@ -201,7 +206,15 @@ class Stepper {
FORCE_INLINE static bool axis_is_moving(const AxisEnum axis) { return TEST(axis_did_move, axis); }
// The extruder associated to the last movement
FORCE_INLINE static uint8_t movement_extruder() { return last_movement_extruder; }
FORCE_INLINE static uint8_t movement_extruder() {
return
#if ENABLED(MIXING_EXTRUDER)
0
#else
last_moved_extruder
#endif
;
}
// Handle a triggered endstop
static void endstop_triggered(const AxisEnum axis);
@ -279,34 +292,42 @@ class Stepper {
// Set direction bits for all steppers
static void set_directions();
// Limit the speed to 10KHz for AVR
#ifndef STEP_DOUBLER_FREQUENCY
#define STEP_DOUBLER_FREQUENCY 10000
#endif
FORCE_INLINE static uint32_t calc_timer_interval(uint32_t step_rate) {
FORCE_INLINE static uint32_t calc_timer_interval(uint32_t step_rate, uint8_t scale, uint8_t* loops) {
uint32_t timer;
NOMORE(step_rate, uint32_t(MAX_STEP_FREQUENCY));
// Scale the frequency, as requested by the caller
step_rate <<= scale;
uint8_t multistep = 1;
#if DISABLED(DISABLE_MULTI_STEPPING)
if (step_rate > STEP_DOUBLER_FREQUENCY * 2) { // If steprate > (STEP_DOUBLER_FREQUENCY * 2) kHz >> step 4 times
step_rate >>= 2;
step_loops = 4;
}
else if (step_rate > STEP_DOUBLER_FREQUENCY) { // If steprate > STEP_DOUBLER_FREQUENCY kHz >> step 2 times
// The stepping frequency limits for each multistepping rate
static const uint32_t limit[] PROGMEM = {
( MAX_1X_STEP_ISR_FREQUENCY ),
( MAX_2X_STEP_ISR_FREQUENCY >> 1),
( MAX_4X_STEP_ISR_FREQUENCY >> 2),
( MAX_8X_STEP_ISR_FREQUENCY >> 3),
( MAX_16X_STEP_ISR_FREQUENCY >> 4),
( MAX_32X_STEP_ISR_FREQUENCY >> 5),
( MAX_64X_STEP_ISR_FREQUENCY >> 6),
(MAX_128X_STEP_ISR_FREQUENCY >> 7)
};
// Select the proper multistepping
uint8_t idx = 0;
while (idx < 7 && step_rate > (uint32_t)pgm_read_dword(&limit[idx])) {
step_rate >>= 1;
step_loops = 2;
}
else
multistep <<= 1;
++idx;
};
#else
NOMORE(step_rate, uint32_t(MAX_1X_STEP_ISR_FREQUENCY));
#endif
step_loops = 1;
*loops = multistep;
#ifdef CPU_32_BIT
// In case of high-performance processor, it is able to calculate in real-time
const uint32_t min_time_per_step = (HAL_STEPPER_TIMER_RATE) / ((STEP_DOUBLER_FREQUENCY) * 2);
timer = uint32_t(HAL_STEPPER_TIMER_RATE) / step_rate;