Browse Source

Merge pull request #11264 from teemuatlut/bf2_define_drivers

[2.0.x] Configure stepper drivers per axis
Scott Lahteine 6 years ago
parent
commit
4dfbae0e5c
No account linked to committer's email address
100 changed files with 2984 additions and 4540 deletions
  1. 23
    0
      Marlin/Configuration.h
  2. 37
    88
      Marlin/Configuration_adv.h
  3. 1
    1
      Marlin/src/HAL/HAL_AVR/SanityCheck.h
  4. 1
    1
      Marlin/src/HAL/HAL_DUE/SanityCheck.h
  5. 1
    1
      Marlin/src/HAL/HAL_LPC1768/SanityCheck.h
  6. 2
    2
      Marlin/src/Marlin.cpp
  7. 23
    0
      Marlin/src/config/default/Configuration.h
  8. 37
    88
      Marlin/src/config/default/Configuration_adv.h
  9. 37
    88
      Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h
  10. 23
    0
      Marlin/src/config/examples/AliExpress/CL-260/Configuration.h
  11. 23
    0
      Marlin/src/config/examples/Anet/A6/Configuration.h
  12. 37
    88
      Marlin/src/config/examples/Anet/A6/Configuration_adv.h
  13. 37
    88
      Marlin/src/config/examples/Anet/A8/Configuration_adv.h
  14. 23
    0
      Marlin/src/config/examples/Azteeg/X5GT/Configuration.h
  15. 37
    88
      Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h
  16. 37
    88
      Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h
  17. 37
    88
      Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h
  18. 37
    88
      Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h
  19. 23
    0
      Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h
  20. 37
    88
      Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h
  21. 37
    88
      Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h
  22. 37
    88
      Marlin/src/config/examples/Cartesio/Configuration_adv.h
  23. 23
    0
      Marlin/src/config/examples/Creality/CR-10/Configuration.h
  24. 37
    88
      Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h
  25. 23
    0
      Marlin/src/config/examples/Creality/CR-10S/Configuration.h
  26. 37
    88
      Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h
  27. 23
    0
      Marlin/src/config/examples/Creality/CR-10mini/Configuration.h
  28. 37
    88
      Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h
  29. 23
    0
      Marlin/src/config/examples/Creality/CR-8/Configuration.h
  30. 37
    88
      Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h
  31. 23
    0
      Marlin/src/config/examples/Creality/Ender-2/Configuration.h
  32. 37
    88
      Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h
  33. 23
    0
      Marlin/src/config/examples/Creality/Ender-3/Configuration.h
  34. 37
    88
      Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h
  35. 23
    0
      Marlin/src/config/examples/Creality/Ender-4/Configuration.h
  36. 37
    88
      Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h
  37. 23
    0
      Marlin/src/config/examples/Felix/Configuration.h
  38. 37
    88
      Marlin/src/config/examples/Felix/Configuration_adv.h
  39. 23
    0
      Marlin/src/config/examples/Felix/DUAL/Configuration.h
  40. 37
    88
      Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h
  41. 23
    0
      Marlin/src/config/examples/Geeetech/GT2560/Configuration.h
  42. 23
    0
      Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h
  43. 23
    0
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h
  44. 23
    0
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h
  45. 23
    0
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h
  46. 37
    88
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h
  47. 23
    0
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h
  48. 37
    88
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h
  49. 37
    88
      Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h
  50. 23
    0
      Marlin/src/config/examples/JGAurora/A5/Configuration.h
  51. 37
    88
      Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h
  52. 37
    88
      Marlin/src/config/examples/MakerParts/Configuration_adv.h
  53. 37
    88
      Marlin/src/config/examples/Malyan/M150/Configuration_adv.h
  54. 23
    0
      Marlin/src/config/examples/Malyan/M200/Configuration.h
  55. 37
    88
      Marlin/src/config/examples/Malyan/M200/Configuration_adv.h
  56. 23
    0
      Marlin/src/config/examples/Micromake/C1/basic/Configuration.h
  57. 37
    88
      Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h
  58. 37
    88
      Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h
  59. 23
    0
      Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h
  60. 37
    88
      Marlin/src/config/examples/RigidBot/Configuration_adv.h
  61. 37
    88
      Marlin/src/config/examples/SCARA/Configuration_adv.h
  62. 23
    0
      Marlin/src/config/examples/STM32F10/Configuration.h
  63. 23
    0
      Marlin/src/config/examples/STM32F4/Configuration.h
  64. 23
    0
      Marlin/src/config/examples/Sanguinololu/Configuration.h
  65. 37
    88
      Marlin/src/config/examples/Sanguinololu/Configuration_adv.h
  66. 81
    133
      Marlin/src/config/examples/TheBorg/Configuration_adv.h
  67. 24
    1
      Marlin/src/config/examples/TinyBoy2/Configuration.h
  68. 37
    88
      Marlin/src/config/examples/TinyBoy2/Configuration_adv.h
  69. 23
    0
      Marlin/src/config/examples/Tronxy/X1/Configuration.h
  70. 37
    88
      Marlin/src/config/examples/Tronxy/X3A/Configuration_adv.h
  71. 23
    0
      Marlin/src/config/examples/Tronxy/XY100/Configuration.h
  72. 23
    0
      Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h
  73. 37
    88
      Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h
  74. 23
    0
      Marlin/src/config/examples/Velleman/K8200/Configuration.h
  75. 37
    88
      Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h
  76. 37
    88
      Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h
  77. 23
    0
      Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h
  78. 37
    88
      Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h
  79. 23
    0
      Marlin/src/config/examples/adafruit/ST7565/Configuration.h
  80. 37
    88
      Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h
  81. 37
    88
      Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h
  82. 23
    0
      Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h
  83. 37
    88
      Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h
  84. 37
    88
      Marlin/src/config/examples/delta/generic/Configuration_adv.h
  85. 23
    0
      Marlin/src/config/examples/delta/kossel_mini/Configuration.h
  86. 37
    88
      Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h
  87. 23
    0
      Marlin/src/config/examples/delta/kossel_pro/Configuration.h
  88. 37
    88
      Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h
  89. 23
    0
      Marlin/src/config/examples/delta/kossel_xl/Configuration.h
  90. 37
    88
      Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h
  91. 24
    1
      Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h
  92. 37
    88
      Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h
  93. 23
    0
      Marlin/src/config/examples/makibox/Configuration.h
  94. 37
    88
      Marlin/src/config/examples/makibox/Configuration_adv.h
  95. 23
    0
      Marlin/src/config/examples/stm32f103ret6/Configuration.h
  96. 37
    88
      Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h
  97. 23
    0
      Marlin/src/config/examples/wt150/Configuration.h
  98. 37
    88
      Marlin/src/config/examples/wt150/Configuration_adv.h
  99. 57
    0
      Marlin/src/core/drivers.h
  100. 0
    0
      Marlin/src/core/macros.h

+ 23
- 0
Marlin/Configuration.h View File

@@ -551,6 +551,29 @@
551 551
 #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
552 552
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
553 553
 
554
+/**
555
+ * Specify Stepper Driver types
556
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
557
+ * Stepper timing options can be overridden in Configuration_adv.h
558
+ *
559
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
560
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
561
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
562
+ *          TMC5130, TMC5130_STANDALONE
563
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
564
+ */
565
+#define X_DRIVER_TYPE  A4988
566
+#define Y_DRIVER_TYPE  A4988
567
+#define Z_DRIVER_TYPE  A4988
568
+#define X2_DRIVER_TYPE A4988
569
+#define Y2_DRIVER_TYPE A4988
570
+#define Z2_DRIVER_TYPE A4988
571
+#define E0_DRIVER_TYPE A4988
572
+#define E1_DRIVER_TYPE A4988
573
+#define E2_DRIVER_TYPE A4988
574
+#define E3_DRIVER_TYPE A4988
575
+#define E4_DRIVER_TYPE A4988
576
+
554 577
 // Enable this feature if all enabled endstop pins are interrupt-capable.
555 578
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
556 579
 //#define ENDSTOP_INTERRUPTS_FEATURE

+ 37
- 88
Marlin/Configuration_adv.h View File

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 2
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 250000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,23 +1042,12 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-//#define HAVE_TMC26X
1044
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1045
-  //#define X_IS_TMC26X
1046
-  //#define X2_IS_TMC26X
1047
-  //#define Y_IS_TMC26X
1048
-  //#define Y2_IS_TMC26X
1049
-  //#define Z_IS_TMC26X
1050
-  //#define Z2_IS_TMC26X
1051
-  //#define E0_IS_TMC26X
1052
-  //#define E1_IS_TMC26X
1053
-  //#define E2_IS_TMC26X
1054
-  //#define E3_IS_TMC26X
1055
-  //#define E4_IS_TMC26X
1050
+#if HAS_DRIVER(TMC26X)
1056 1051
 
1057 1052
   #define X_MAX_CURRENT     1000 // in mA
1058 1053
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1098,62 +1093,29 @@
1098 1093
   #define E4_SENSE_RESISTOR   91
1099 1094
   #define E4_MICROSTEPS       16
1100 1095
 
1101
-#endif
1096
+#endif // TMC26X
1102 1097
 
1103 1098
 // @section tmc_smart
1104 1099
 
1105 1100
 /**
1106
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1107
- *
1108
- * You'll also need the TMC2130Stepper Arduino library
1109
- * (https://github.com/teemuatlut/TMC2130Stepper).
1110
- *
1111 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1112 1102
  * the hardware SPI interface on your board and define the required CS pins
1113 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1114 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1115
- */
1116
-//#define HAVE_TMC2130
1117
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1118
-  //#define X_IS_TMC2130
1119
-  //#define X2_IS_TMC2130
1120
-  //#define Y_IS_TMC2130
1121
-  //#define Y2_IS_TMC2130
1122
-  //#define Z_IS_TMC2130
1123
-  //#define Z2_IS_TMC2130
1124
-  //#define E0_IS_TMC2130
1125
-  //#define E1_IS_TMC2130
1126
-  //#define E2_IS_TMC2130
1127
-  //#define E3_IS_TMC2130
1128
-  //#define E4_IS_TMC2130
1129
-#endif
1130
-
1131
-/**
1132
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1133
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1134 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1135 1112
  * to PDN_UART without a resistor.
1136 1113
  * The drivers can also be used with hardware serial.
1137 1114
  *
1138
- * You'll also need the TMC2208Stepper Arduino library
1139
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1140 1117
  */
1141
-//#define HAVE_TMC2208
1142
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1143
-  //#define X_IS_TMC2208
1144
-  //#define X2_IS_TMC2208
1145
-  //#define Y_IS_TMC2208
1146
-  //#define Y2_IS_TMC2208
1147
-  //#define Z_IS_TMC2208
1148
-  //#define Z2_IS_TMC2208
1149
-  //#define E0_IS_TMC2208
1150
-  //#define E1_IS_TMC2208
1151
-  //#define E2_IS_TMC2208
1152
-  //#define E3_IS_TMC2208
1153
-  //#define E4_IS_TMC2208
1154
-#endif
1155
-
1156
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1157 1119
 
1158 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1159 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1308,25 +1270,12 @@
1308 1270
 // @section L6470
1309 1271
 
1310 1272
 /**
1311
- * Enable this section if you have L6470 motor drivers.
1312
- * You need to import the L6470 library into the Arduino IDE for this.
1313
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1314 1277
  */
1315
-
1316
-//#define HAVE_L6470DRIVER
1317
-#if ENABLED(HAVE_L6470DRIVER)
1318
-
1319
-  //#define X_IS_L6470
1320
-  //#define X2_IS_L6470
1321
-  //#define Y_IS_L6470
1322
-  //#define Y2_IS_L6470
1323
-  //#define Z_IS_L6470
1324
-  //#define Z2_IS_L6470
1325
-  //#define E0_IS_L6470
1326
-  //#define E1_IS_L6470
1327
-  //#define E2_IS_L6470
1328
-  //#define E3_IS_L6470
1329
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1330 1279
 
1331 1280
   #define X_MICROSTEPS      16 // number of microsteps
1332 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1372,7 +1321,7 @@
1372 1321
   #define E4_OVERCURRENT  2000
1373 1322
   #define E4_STALLCURRENT 1500
1374 1323
 
1375
-#endif
1324
+#endif // L6470
1376 1325
 
1377 1326
 /**
1378 1327
  * TWI/I2C BUS

+ 1
- 1
Marlin/src/HAL/HAL_AVR/SanityCheck.h View File

@@ -99,7 +99,7 @@
99 99
 /**
100 100
  * TMC2208 software UART and ENDSTOP_INTERRUPTS both use pin change interrupts (PCI)
101 101
  */
102
-#if ENABLED(HAVE_TMC2208) && ENABLED(ENDSTOP_INTERRUPTS_FEATURE) && !( \
102
+#if HAS_DRIVER(TMC2208) && ENABLED(ENDSTOP_INTERRUPTS_FEATURE) && !( \
103 103
        defined(X_HARDWARE_SERIAL ) \
104 104
     || defined(X2_HARDWARE_SERIAL) \
105 105
     || defined(Y_HARDWARE_SERIAL ) \

+ 1
- 1
Marlin/src/HAL/HAL_DUE/SanityCheck.h View File

@@ -41,7 +41,7 @@
41 41
  */
42 42
 #define _IS_HW_SPI(P) (defined(TMC_SW_##P) && (TMC_SW_##P == MOSI_PIN || TMC_SW_##P == MISO_PIN || TMC_SW_##P == SCK_PIN))
43 43
 
44
-#if ENABLED(SDSUPPORT) && ENABLED(HAVE_TMC2130)
44
+#if ENABLED(SDSUPPORT) && HAS_DRIVER(TMC2130)
45 45
   #if ENABLED(TMC_USE_SW_SPI)
46 46
     #if DISABLED(DUE_SOFTWARE_SPI) && (_IS_HW_SPI(MOSI) || _IS_HW_SPI(MISO) || _IS_HW_SPI(SCK))
47 47
       #error "DUE hardware SPI is required but is incompatible with TMC2130 software SPI. Either disable TMC_USE_SW_SPI or use separate pins for the two SPIs."

+ 1
- 1
Marlin/src/HAL/HAL_LPC1768/SanityCheck.h View File

@@ -66,7 +66,7 @@
66 66
   #endif
67 67
 #endif // SPINDLE_LASER_ENABLE
68 68
 
69
-#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) && ENABLED(HAVE_TMC2130) && DISABLED(TMC_USE_SW_SPI) \
69
+#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) && HAS_DRIVER(TMC2130) && DISABLED(TMC_USE_SW_SPI) \
70 70
     && (MB(RAMPS_14_RE_ARM_EFB) \
71 71
     ||  MB(RAMPS_14_RE_ARM_EEB) \
72 72
     ||  MB(RAMPS_14_RE_ARM_EFF) \

+ 2
- 2
Marlin/src/Marlin.cpp View File

@@ -712,10 +712,10 @@ void setup() {
712 712
   SERIAL_PROTOCOLLNPGM("start");
713 713
   SERIAL_ECHO_START();
714 714
 
715
-  #if ENABLED(HAVE_TMC2130)
715
+  #if HAS_DRIVER(TMC2130)
716 716
     tmc_init_cs_pins();
717 717
   #endif
718
-  #if ENABLED(HAVE_TMC2208)
718
+  #if HAS_DRIVER(TMC2208)
719 719
     tmc2208_serial_begin();
720 720
   #endif
721 721
 

+ 23
- 0
Marlin/src/config/default/Configuration.h View File

@@ -551,6 +551,29 @@
551 551
 #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
552 552
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
553 553
 
554
+/**
555
+ * Specify Stepper Driver types
556
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
557
+ * Stepper timing options can be overridden in Configuration_adv.h
558
+ *
559
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
560
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
561
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
562
+ *          TMC5130, TMC5130_STANDALONE
563
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
564
+ */
565
+#define X_DRIVER_TYPE  A4988
566
+#define Y_DRIVER_TYPE  A4988
567
+#define Z_DRIVER_TYPE  A4988
568
+#define X2_DRIVER_TYPE A4988
569
+#define Y2_DRIVER_TYPE A4988
570
+#define Z2_DRIVER_TYPE A4988
571
+#define E0_DRIVER_TYPE A4988
572
+#define E1_DRIVER_TYPE A4988
573
+#define E2_DRIVER_TYPE A4988
574
+#define E3_DRIVER_TYPE A4988
575
+#define E4_DRIVER_TYPE A4988
576
+
554 577
 // Enable this feature if all enabled endstop pins are interrupt-capable.
555 578
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
556 579
 //#define ENDSTOP_INTERRUPTS_FEATURE

+ 37
- 88
Marlin/src/config/default/Configuration_adv.h View File

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 2
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 250000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,23 +1042,12 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-//#define HAVE_TMC26X
1044
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1045
-  //#define X_IS_TMC26X
1046
-  //#define X2_IS_TMC26X
1047
-  //#define Y_IS_TMC26X
1048
-  //#define Y2_IS_TMC26X
1049
-  //#define Z_IS_TMC26X
1050
-  //#define Z2_IS_TMC26X
1051
-  //#define E0_IS_TMC26X
1052
-  //#define E1_IS_TMC26X
1053
-  //#define E2_IS_TMC26X
1054
-  //#define E3_IS_TMC26X
1055
-  //#define E4_IS_TMC26X
1050
+#if HAS_DRIVER(TMC26X)
1056 1051
 
1057 1052
   #define X_MAX_CURRENT     1000 // in mA
1058 1053
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1098,62 +1093,29 @@
1098 1093
   #define E4_SENSE_RESISTOR   91
1099 1094
   #define E4_MICROSTEPS       16
1100 1095
 
1101
-#endif
1096
+#endif // TMC26X
1102 1097
 
1103 1098
 // @section tmc_smart
1104 1099
 
1105 1100
 /**
1106
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1107
- *
1108
- * You'll also need the TMC2130Stepper Arduino library
1109
- * (https://github.com/teemuatlut/TMC2130Stepper).
1110
- *
1111 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1112 1102
  * the hardware SPI interface on your board and define the required CS pins
1113 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1114 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1115
- */
1116
-//#define HAVE_TMC2130
1117
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1118
-  //#define X_IS_TMC2130
1119
-  //#define X2_IS_TMC2130
1120
-  //#define Y_IS_TMC2130
1121
-  //#define Y2_IS_TMC2130
1122
-  //#define Z_IS_TMC2130
1123
-  //#define Z2_IS_TMC2130
1124
-  //#define E0_IS_TMC2130
1125
-  //#define E1_IS_TMC2130
1126
-  //#define E2_IS_TMC2130
1127
-  //#define E3_IS_TMC2130
1128
-  //#define E4_IS_TMC2130
1129
-#endif
1130
-
1131
-/**
1132
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1133
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1134 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1135 1112
  * to PDN_UART without a resistor.
1136 1113
  * The drivers can also be used with hardware serial.
1137 1114
  *
1138
- * You'll also need the TMC2208Stepper Arduino library
1139
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1140 1117
  */
1141
-//#define HAVE_TMC2208
1142
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1143
-  //#define X_IS_TMC2208
1144
-  //#define X2_IS_TMC2208
1145
-  //#define Y_IS_TMC2208
1146
-  //#define Y2_IS_TMC2208
1147
-  //#define Z_IS_TMC2208
1148
-  //#define Z2_IS_TMC2208
1149
-  //#define E0_IS_TMC2208
1150
-  //#define E1_IS_TMC2208
1151
-  //#define E2_IS_TMC2208
1152
-  //#define E3_IS_TMC2208
1153
-  //#define E4_IS_TMC2208
1154
-#endif
1155
-
1156
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1157 1119
 
1158 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1159 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1308,25 +1270,12 @@
1308 1270
 // @section L6470
1309 1271
 
1310 1272
 /**
1311
- * Enable this section if you have L6470 motor drivers.
1312
- * You need to import the L6470 library into the Arduino IDE for this.
1313
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1314 1277
  */
1315
-
1316
-//#define HAVE_L6470DRIVER
1317
-#if ENABLED(HAVE_L6470DRIVER)
1318
-
1319
-  //#define X_IS_L6470
1320
-  //#define X2_IS_L6470
1321
-  //#define Y_IS_L6470
1322
-  //#define Y2_IS_L6470
1323
-  //#define Z_IS_L6470
1324
-  //#define Z2_IS_L6470
1325
-  //#define E0_IS_L6470
1326
-  //#define E1_IS_L6470
1327
-  //#define E2_IS_L6470
1328
-  //#define E3_IS_L6470
1329
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1330 1279
 
1331 1280
   #define X_MICROSTEPS      16 // number of microsteps
1332 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1372,7 +1321,7 @@
1372 1321
   #define E4_OVERCURRENT  2000
1373 1322
   #define E4_STALLCURRENT 1500
1374 1323
 
1375
-#endif
1324
+#endif // L6470
1376 1325
 
1377 1326
 /**
1378 1327
  * TWI/I2C BUS

+ 37
- 88
Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h View File

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 2
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 250000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,23 +1042,12 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-//#define HAVE_TMC26X
1044
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1045
-  //#define X_IS_TMC26X
1046
-  //#define X2_IS_TMC26X
1047
-  //#define Y_IS_TMC26X
1048
-  //#define Y2_IS_TMC26X
1049
-  //#define Z_IS_TMC26X
1050
-  //#define Z2_IS_TMC26X
1051
-  //#define E0_IS_TMC26X
1052
-  //#define E1_IS_TMC26X
1053
-  //#define E2_IS_TMC26X
1054
-  //#define E3_IS_TMC26X
1055
-  //#define E4_IS_TMC26X
1050
+#if HAS_DRIVER(TMC26X)
1056 1051
 
1057 1052
   #define X_MAX_CURRENT     1000 // in mA
1058 1053
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1098,62 +1093,29 @@
1098 1093
   #define E4_SENSE_RESISTOR   91
1099 1094
   #define E4_MICROSTEPS       16
1100 1095
 
1101
-#endif
1096
+#endif // TMC26X
1102 1097
 
1103 1098
 // @section tmc_smart
1104 1099
 
1105 1100
 /**
1106
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1107
- *
1108
- * You'll also need the TMC2130Stepper Arduino library
1109
- * (https://github.com/teemuatlut/TMC2130Stepper).
1110
- *
1111 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1112 1102
  * the hardware SPI interface on your board and define the required CS pins
1113 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1114 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1115
- */
1116
-//#define HAVE_TMC2130
1117
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1118
-  //#define X_IS_TMC2130
1119
-  //#define X2_IS_TMC2130
1120
-  //#define Y_IS_TMC2130
1121
-  //#define Y2_IS_TMC2130
1122
-  //#define Z_IS_TMC2130
1123
-  //#define Z2_IS_TMC2130
1124
-  //#define E0_IS_TMC2130
1125
-  //#define E1_IS_TMC2130
1126
-  //#define E2_IS_TMC2130
1127
-  //#define E3_IS_TMC2130
1128
-  //#define E4_IS_TMC2130
1129
-#endif
1130
-
1131
-/**
1132
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1133
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1134 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1135 1112
  * to PDN_UART without a resistor.
1136 1113
  * The drivers can also be used with hardware serial.
1137 1114
  *
1138
- * You'll also need the TMC2208Stepper Arduino library
1139
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1140 1117
  */
1141
-//#define HAVE_TMC2208
1142
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1143
-  //#define X_IS_TMC2208
1144
-  //#define X2_IS_TMC2208
1145
-  //#define Y_IS_TMC2208
1146
-  //#define Y2_IS_TMC2208
1147
-  //#define Z_IS_TMC2208
1148
-  //#define Z2_IS_TMC2208
1149
-  //#define E0_IS_TMC2208
1150
-  //#define E1_IS_TMC2208
1151
-  //#define E2_IS_TMC2208
1152
-  //#define E3_IS_TMC2208
1153
-  //#define E4_IS_TMC2208
1154
-#endif
1155
-
1156
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1157 1119
 
1158 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1159 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1308,25 +1270,12 @@
1308 1270
 // @section L6470
1309 1271
 
1310 1272
 /**
1311
- * Enable this section if you have L6470 motor drivers.
1312
- * You need to import the L6470 library into the Arduino IDE for this.
1313
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1314 1277
  */
1315
-
1316
-//#define HAVE_L6470DRIVER
1317
-#if ENABLED(HAVE_L6470DRIVER)
1318
-
1319
-  //#define X_IS_L6470
1320
-  //#define X2_IS_L6470
1321
-  //#define Y_IS_L6470
1322
-  //#define Y2_IS_L6470
1323
-  //#define Z_IS_L6470
1324
-  //#define Z2_IS_L6470
1325
-  //#define E0_IS_L6470
1326
-  //#define E1_IS_L6470
1327
-  //#define E2_IS_L6470
1328
-  //#define E3_IS_L6470
1329
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1330 1279
 
1331 1280
   #define X_MICROSTEPS      16 // number of microsteps
1332 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1372,7 +1321,7 @@
1372 1321
   #define E4_OVERCURRENT  2000
1373 1322
   #define E4_STALLCURRENT 1500
1374 1323
 
1375
-#endif
1324
+#endif // L6470
1376 1325
 
1377 1326
 /**
1378 1327
  * TWI/I2C BUS

+ 23
- 0
Marlin/src/config/examples/AliExpress/CL-260/Configuration.h View File

@@ -551,6 +551,29 @@
551 551
 #define Z_MAX_ENDSTOP_INVERTING true  // set to true to invert the logic of the endstop.
552 552
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
553 553
 
554
+/**
555
+ * Specify Stepper Driver types
556
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
557
+ * Stepper timing options can be overridden in Configuration_adv.h
558
+ *
559
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
560
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
561
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
562
+ *          TMC5130, TMC5130_STANDALONE
563
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
564
+ */
565
+#define X_DRIVER_TYPE  A4988
566
+#define Y_DRIVER_TYPE  A4988
567
+#define Z_DRIVER_TYPE  A4988
568
+#define X2_DRIVER_TYPE A4988
569
+#define Y2_DRIVER_TYPE A4988
570
+#define Z2_DRIVER_TYPE A4988
571
+#define E0_DRIVER_TYPE A4988
572
+#define E1_DRIVER_TYPE A4988
573
+#define E2_DRIVER_TYPE A4988
574
+#define E3_DRIVER_TYPE A4988
575
+#define E4_DRIVER_TYPE A4988
576
+
554 577
 // Enable this feature if all enabled endstop pins are interrupt-capable.
555 578
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
556 579
 //#define ENDSTOP_INTERRUPTS_FEATURE

+ 23
- 0
Marlin/src/config/examples/Anet/A6/Configuration.h View File

@@ -571,6 +571,29 @@
571 571
 #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
572 572
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
573 573
 
574
+/**
575
+ * Specify Stepper Driver types
576
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
577
+ * Stepper timing options can be overridden in Configuration_adv.h
578
+ *
579
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
580
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
581
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
582
+ *          TMC5130, TMC5130_STANDALONE
583
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
584
+ */
585
+#define X_DRIVER_TYPE  A4988
586
+#define Y_DRIVER_TYPE  A4988
587
+#define Z_DRIVER_TYPE  A4988
588
+#define X2_DRIVER_TYPE A4988
589
+#define Y2_DRIVER_TYPE A4988
590
+#define Z2_DRIVER_TYPE A4988
591
+#define E0_DRIVER_TYPE A4988
592
+#define E1_DRIVER_TYPE A4988
593
+#define E2_DRIVER_TYPE A4988
594
+#define E3_DRIVER_TYPE A4988
595
+#define E4_DRIVER_TYPE A4988
596
+
574 597
 // Enable this feature if all enabled endstop pins are interrupt-capable.
575 598
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
576 599
 #define ENDSTOP_INTERRUPTS_FEATURE

+ 37
- 88
Marlin/src/config/examples/Anet/A6/Configuration_adv.h View File

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 2
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 250000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,23 +1042,12 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-//#define HAVE_TMC26X
1044
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1045
-  //#define X_IS_TMC26X
1046
-  //#define X2_IS_TMC26X
1047
-  //#define Y_IS_TMC26X
1048
-  //#define Y2_IS_TMC26X
1049
-  //#define Z_IS_TMC26X
1050
-  //#define Z2_IS_TMC26X
1051
-  //#define E0_IS_TMC26X
1052
-  //#define E1_IS_TMC26X
1053
-  //#define E2_IS_TMC26X
1054
-  //#define E3_IS_TMC26X
1055
-  //#define E4_IS_TMC26X
1050
+#if HAS_DRIVER(TMC26X)
1056 1051
 
1057 1052
   #define X_MAX_CURRENT     1000 // in mA
1058 1053
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1098,62 +1093,29 @@
1098 1093
   #define E4_SENSE_RESISTOR   91
1099 1094
   #define E4_MICROSTEPS       16
1100 1095
 
1101
-#endif
1096
+#endif // TMC26X
1102 1097
 
1103 1098
 // @section tmc_smart
1104 1099
 
1105 1100
 /**
1106
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1107
- *
1108
- * You'll also need the TMC2130Stepper Arduino library
1109
- * (https://github.com/teemuatlut/TMC2130Stepper).
1110
- *
1111 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1112 1102
  * the hardware SPI interface on your board and define the required CS pins
1113 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1114 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1115
- */
1116
-//#define HAVE_TMC2130
1117
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1118
-  //#define X_IS_TMC2130
1119
-  //#define X2_IS_TMC2130
1120
-  //#define Y_IS_TMC2130
1121
-  //#define Y2_IS_TMC2130
1122
-  //#define Z_IS_TMC2130
1123
-  //#define Z2_IS_TMC2130
1124
-  //#define E0_IS_TMC2130
1125
-  //#define E1_IS_TMC2130
1126
-  //#define E2_IS_TMC2130
1127
-  //#define E3_IS_TMC2130
1128
-  //#define E4_IS_TMC2130
1129
-#endif
1130
-
1131
-/**
1132
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1133
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1134 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1135 1112
  * to PDN_UART without a resistor.
1136 1113
  * The drivers can also be used with hardware serial.
1137 1114
  *
1138
- * You'll also need the TMC2208Stepper Arduino library
1139
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1140 1117
  */
1141
-//#define HAVE_TMC2208
1142
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1143
-  //#define X_IS_TMC2208
1144
-  //#define X2_IS_TMC2208
1145
-  //#define Y_IS_TMC2208
1146
-  //#define Y2_IS_TMC2208
1147
-  //#define Z_IS_TMC2208
1148
-  //#define Z2_IS_TMC2208
1149
-  //#define E0_IS_TMC2208
1150
-  //#define E1_IS_TMC2208
1151
-  //#define E2_IS_TMC2208
1152
-  //#define E3_IS_TMC2208
1153
-  //#define E4_IS_TMC2208
1154
-#endif
1155
-
1156
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1157 1119
 
1158 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1159 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1308,25 +1270,12 @@
1308 1270
 // @section L6470
1309 1271
 
1310 1272
 /**
1311
- * Enable this section if you have L6470 motor drivers.
1312
- * You need to import the L6470 library into the Arduino IDE for this.
1313
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1314 1277
  */
1315
-
1316
-//#define HAVE_L6470DRIVER
1317
-#if ENABLED(HAVE_L6470DRIVER)
1318
-
1319
-  //#define X_IS_L6470
1320
-  //#define X2_IS_L6470
1321
-  //#define Y_IS_L6470
1322
-  //#define Y2_IS_L6470
1323
-  //#define Z_IS_L6470
1324
-  //#define Z2_IS_L6470
1325
-  //#define E0_IS_L6470
1326
-  //#define E1_IS_L6470
1327
-  //#define E2_IS_L6470
1328
-  //#define E3_IS_L6470
1329
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1330 1279
 
1331 1280
   #define X_MICROSTEPS      16 // number of microsteps
1332 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1372,7 +1321,7 @@
1372 1321
   #define E4_OVERCURRENT  2000
1373 1322
   #define E4_STALLCURRENT 1500
1374 1323
 
1375
-#endif
1324
+#endif // L6470
1376 1325
 
1377 1326
 /**
1378 1327
  * TWI/I2C BUS

+ 37
- 88
Marlin/src/config/examples/Anet/A8/Configuration_adv.h View File

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 2
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 250000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,23 +1042,12 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-//#define HAVE_TMC26X
1044
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1045
-  //#define X_IS_TMC26X
1046
-  //#define X2_IS_TMC26X
1047
-  //#define Y_IS_TMC26X
1048
-  //#define Y2_IS_TMC26X
1049
-  //#define Z_IS_TMC26X
1050
-  //#define Z2_IS_TMC26X
1051
-  //#define E0_IS_TMC26X
1052
-  //#define E1_IS_TMC26X
1053
-  //#define E2_IS_TMC26X
1054
-  //#define E3_IS_TMC26X
1055
-  //#define E4_IS_TMC26X
1050
+#if HAS_DRIVER(TMC26X)
1056 1051
 
1057 1052
   #define X_MAX_CURRENT     1000 // in mA
1058 1053
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1098,62 +1093,29 @@
1098 1093
   #define E4_SENSE_RESISTOR   91
1099 1094
   #define E4_MICROSTEPS       16
1100 1095
 
1101
-#endif
1096
+#endif // TMC26X
1102 1097
 
1103 1098
 // @section tmc_smart
1104 1099
 
1105 1100
 /**
1106
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1107
- *
1108
- * You'll also need the TMC2130Stepper Arduino library
1109
- * (https://github.com/teemuatlut/TMC2130Stepper).
1110
- *
1111 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1112 1102
  * the hardware SPI interface on your board and define the required CS pins
1113 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1114 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1115
- */
1116
-//#define HAVE_TMC2130
1117
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1118
-  //#define X_IS_TMC2130
1119
-  //#define X2_IS_TMC2130
1120
-  //#define Y_IS_TMC2130
1121
-  //#define Y2_IS_TMC2130
1122
-  //#define Z_IS_TMC2130
1123
-  //#define Z2_IS_TMC2130
1124
-  //#define E0_IS_TMC2130
1125
-  //#define E1_IS_TMC2130
1126
-  //#define E2_IS_TMC2130
1127
-  //#define E3_IS_TMC2130
1128
-  //#define E4_IS_TMC2130
1129
-#endif
1130
-
1131
-/**
1132
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1133
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1134 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1135 1112
  * to PDN_UART without a resistor.
1136 1113
  * The drivers can also be used with hardware serial.
1137 1114
  *
1138
- * You'll also need the TMC2208Stepper Arduino library
1139
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1140 1117
  */
1141
-//#define HAVE_TMC2208
1142
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1143
-  //#define X_IS_TMC2208
1144
-  //#define X2_IS_TMC2208
1145
-  //#define Y_IS_TMC2208
1146
-  //#define Y2_IS_TMC2208
1147
-  //#define Z_IS_TMC2208
1148
-  //#define Z2_IS_TMC2208
1149
-  //#define E0_IS_TMC2208
1150
-  //#define E1_IS_TMC2208
1151
-  //#define E2_IS_TMC2208
1152
-  //#define E3_IS_TMC2208
1153
-  //#define E4_IS_TMC2208
1154
-#endif
1155
-
1156
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1157 1119
 
1158 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1159 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1308,25 +1270,12 @@
1308 1270
 // @section L6470
1309 1271
 
1310 1272
 /**
1311
- * Enable this section if you have L6470 motor drivers.
1312
- * You need to import the L6470 library into the Arduino IDE for this.
1313
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1314 1277
  */
1315
-
1316
-//#define HAVE_L6470DRIVER
1317
-#if ENABLED(HAVE_L6470DRIVER)
1318
-
1319
-  //#define X_IS_L6470
1320
-  //#define X2_IS_L6470
1321
-  //#define Y_IS_L6470
1322
-  //#define Y2_IS_L6470
1323
-  //#define Z_IS_L6470
1324
-  //#define Z2_IS_L6470
1325
-  //#define E0_IS_L6470
1326
-  //#define E1_IS_L6470
1327
-  //#define E2_IS_L6470
1328
-  //#define E3_IS_L6470
1329
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1330 1279
 
1331 1280
   #define X_MICROSTEPS      16 // number of microsteps
1332 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1372,7 +1321,7 @@
1372 1321
   #define E4_OVERCURRENT  2000
1373 1322
   #define E4_STALLCURRENT 1500
1374 1323
 
1375
-#endif
1324
+#endif // L6470
1376 1325
 
1377 1326
 /**
1378 1327
  * TWI/I2C BUS

+ 23
- 0
Marlin/src/config/examples/Azteeg/X5GT/Configuration.h View File

@@ -551,6 +551,29 @@
551 551
 #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
552 552
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
553 553
 
554
+/**
555
+ * Specify Stepper Driver types
556
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
557
+ * Stepper timing options can be overridden in Configuration_adv.h
558
+ *
559
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
560
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
561
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
562
+ *          TMC5130, TMC5130_STANDALONE
563
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
564
+ */
565
+#define X_DRIVER_TYPE  A4988
566
+#define Y_DRIVER_TYPE  A4988
567
+#define Z_DRIVER_TYPE  A4988
568
+#define X2_DRIVER_TYPE A4988
569
+#define Y2_DRIVER_TYPE A4988
570
+#define Z2_DRIVER_TYPE A4988
571
+#define E0_DRIVER_TYPE A4988
572
+#define E1_DRIVER_TYPE A4988
573
+#define E2_DRIVER_TYPE A4988
574
+#define E3_DRIVER_TYPE A4988
575
+#define E4_DRIVER_TYPE A4988
576
+
554 577
 // Enable this feature if all enabled endstop pins are interrupt-capable.
555 578
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
556 579
 //#define ENDSTOP_INTERRUPTS_FEATURE

+ 37
- 88
Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h View File

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 2
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 250000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,23 +1042,12 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-//#define HAVE_TMC26X
1044
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1045
-  //#define X_IS_TMC26X
1046
-  //#define X2_IS_TMC26X
1047
-  //#define Y_IS_TMC26X
1048
-  //#define Y2_IS_TMC26X
1049
-  //#define Z_IS_TMC26X
1050
-  //#define Z2_IS_TMC26X
1051
-  //#define E0_IS_TMC26X
1052
-  //#define E1_IS_TMC26X
1053
-  //#define E2_IS_TMC26X
1054
-  //#define E3_IS_TMC26X
1055
-  //#define E4_IS_TMC26X
1050
+#if HAS_DRIVER(TMC26X)
1056 1051
 
1057 1052
   #define X_MAX_CURRENT     1000 // in mA
1058 1053
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1098,62 +1093,29 @@
1098 1093
   #define E4_SENSE_RESISTOR   91
1099 1094
   #define E4_MICROSTEPS       16
1100 1095
 
1101
-#endif
1096
+#endif // TMC26X
1102 1097
 
1103 1098
 // @section tmc_smart
1104 1099
 
1105 1100
 /**
1106
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1107
- *
1108
- * You'll also need the TMC2130Stepper Arduino library
1109
- * (https://github.com/teemuatlut/TMC2130Stepper).
1110
- *
1111 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1112 1102
  * the hardware SPI interface on your board and define the required CS pins
1113 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1114 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1115
- */
1116
-//#define HAVE_TMC2130
1117
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1118
-  //#define X_IS_TMC2130
1119
-  //#define X2_IS_TMC2130
1120
-  //#define Y_IS_TMC2130
1121
-  //#define Y2_IS_TMC2130
1122
-  //#define Z_IS_TMC2130
1123
-  //#define Z2_IS_TMC2130
1124
-  //#define E0_IS_TMC2130
1125
-  //#define E1_IS_TMC2130
1126
-  //#define E2_IS_TMC2130
1127
-  //#define E3_IS_TMC2130
1128
-  //#define E4_IS_TMC2130
1129
-#endif
1130
-
1131
-/**
1132
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1133
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1134 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1135 1112
  * to PDN_UART without a resistor.
1136 1113
  * The drivers can also be used with hardware serial.
1137 1114
  *
1138
- * You'll also need the TMC2208Stepper Arduino library
1139
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1140 1117
  */
1141
-//#define HAVE_TMC2208
1142
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1143
-  //#define X_IS_TMC2208
1144
-  //#define X2_IS_TMC2208
1145
-  //#define Y_IS_TMC2208
1146
-  //#define Y2_IS_TMC2208
1147
-  //#define Z_IS_TMC2208
1148
-  //#define Z2_IS_TMC2208
1149
-  //#define E0_IS_TMC2208
1150
-  //#define E1_IS_TMC2208
1151
-  //#define E2_IS_TMC2208
1152
-  //#define E3_IS_TMC2208
1153
-  //#define E4_IS_TMC2208
1154
-#endif
1155
-
1156
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1157 1119
 
1158 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1159 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1308,25 +1270,12 @@
1308 1270
 // @section L6470
1309 1271
 
1310 1272
 /**
1311
- * Enable this section if you have L6470 motor drivers.
1312
- * You need to import the L6470 library into the Arduino IDE for this.
1313
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1314 1277
  */
1315
-
1316
-//#define HAVE_L6470DRIVER
1317
-#if ENABLED(HAVE_L6470DRIVER)
1318
-
1319
-  //#define X_IS_L6470
1320
-  //#define X2_IS_L6470
1321
-  //#define Y_IS_L6470
1322
-  //#define Y2_IS_L6470
1323
-  //#define Z_IS_L6470
1324
-  //#define Z2_IS_L6470
1325
-  //#define E0_IS_L6470
1326
-  //#define E1_IS_L6470
1327
-  //#define E2_IS_L6470
1328
-  //#define E3_IS_L6470
1329
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1330 1279
 
1331 1280
   #define X_MICROSTEPS      16 // number of microsteps
1332 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1372,7 +1321,7 @@
1372 1321
   #define E4_OVERCURRENT  2000
1373 1322
   #define E4_STALLCURRENT 1500
1374 1323
 
1375
-#endif
1324
+#endif // L6470
1376 1325
 
1377 1326
 /**
1378 1327
  * TWI/I2C BUS

+ 37
- 88
Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h View File

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 2
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 250000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,23 +1042,12 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-//#define HAVE_TMC26X
1044
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1045
-  //#define X_IS_TMC26X
1046
-  //#define X2_IS_TMC26X
1047
-  //#define Y_IS_TMC26X
1048
-  //#define Y2_IS_TMC26X
1049
-  //#define Z_IS_TMC26X
1050
-  //#define Z2_IS_TMC26X
1051
-  //#define E0_IS_TMC26X
1052
-  //#define E1_IS_TMC26X
1053
-  //#define E2_IS_TMC26X
1054
-  //#define E3_IS_TMC26X
1055
-  //#define E4_IS_TMC26X
1050
+#if HAS_DRIVER(TMC26X)
1056 1051
 
1057 1052
   #define X_MAX_CURRENT     1000 // in mA
1058 1053
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1098,62 +1093,29 @@
1098 1093
   #define E4_SENSE_RESISTOR   91
1099 1094
   #define E4_MICROSTEPS       16
1100 1095
 
1101
-#endif
1096
+#endif // TMC26X
1102 1097
 
1103 1098
 // @section tmc_smart
1104 1099
 
1105 1100
 /**
1106
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1107
- *
1108
- * You'll also need the TMC2130Stepper Arduino library
1109
- * (https://github.com/teemuatlut/TMC2130Stepper).
1110
- *
1111 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1112 1102
  * the hardware SPI interface on your board and define the required CS pins
1113 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1114 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1115
- */
1116
-//#define HAVE_TMC2130
1117
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1118
-  //#define X_IS_TMC2130
1119
-  //#define X2_IS_TMC2130
1120
-  //#define Y_IS_TMC2130
1121
-  //#define Y2_IS_TMC2130
1122
-  //#define Z_IS_TMC2130
1123
-  //#define Z2_IS_TMC2130
1124
-  //#define E0_IS_TMC2130
1125
-  //#define E1_IS_TMC2130
1126
-  //#define E2_IS_TMC2130
1127
-  //#define E3_IS_TMC2130
1128
-  //#define E4_IS_TMC2130
1129
-#endif
1130
-
1131
-/**
1132
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1133
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1134 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1135 1112
  * to PDN_UART without a resistor.
1136 1113
  * The drivers can also be used with hardware serial.
1137 1114
  *
1138
- * You'll also need the TMC2208Stepper Arduino library
1139
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1140 1117
  */
1141
-//#define HAVE_TMC2208
1142
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1143
-  //#define X_IS_TMC2208
1144
-  //#define X2_IS_TMC2208
1145
-  //#define Y_IS_TMC2208
1146
-  //#define Y2_IS_TMC2208
1147
-  //#define Z_IS_TMC2208
1148
-  //#define Z2_IS_TMC2208
1149
-  //#define E0_IS_TMC2208
1150
-  //#define E1_IS_TMC2208
1151
-  //#define E2_IS_TMC2208
1152
-  //#define E3_IS_TMC2208
1153
-  //#define E4_IS_TMC2208
1154
-#endif
1155
-
1156
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1157 1119
 
1158 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1159 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1308,25 +1270,12 @@
1308 1270
 // @section L6470
1309 1271
 
1310 1272
 /**
1311
- * Enable this section if you have L6470 motor drivers.
1312
- * You need to import the L6470 library into the Arduino IDE for this.
1313
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1314 1277
  */
1315
-
1316
-//#define HAVE_L6470DRIVER
1317
-#if ENABLED(HAVE_L6470DRIVER)
1318
-
1319
-  //#define X_IS_L6470
1320
-  //#define X2_IS_L6470
1321
-  //#define Y_IS_L6470
1322
-  //#define Y2_IS_L6470
1323
-  //#define Z_IS_L6470
1324
-  //#define Z2_IS_L6470
1325
-  //#define E0_IS_L6470
1326
-  //#define E1_IS_L6470
1327
-  //#define E2_IS_L6470
1328
-  //#define E3_IS_L6470
1329
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1330 1279
 
1331 1280
   #define X_MICROSTEPS      16 // number of microsteps
1332 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1372,7 +1321,7 @@
1372 1321
   #define E4_OVERCURRENT  2000
1373 1322
   #define E4_STALLCURRENT 1500
1374 1323
 
1375
-#endif
1324
+#endif // L6470
1376 1325
 
1377 1326
 /**
1378 1327
  * TWI/I2C BUS

+ 37
- 88
Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h View File

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 2
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 250000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,23 +1042,12 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-//#define HAVE_TMC26X
1044
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1045
-  //#define X_IS_TMC26X
1046
-  //#define X2_IS_TMC26X
1047
-  //#define Y_IS_TMC26X
1048
-  //#define Y2_IS_TMC26X
1049
-  //#define Z_IS_TMC26X
1050
-  //#define Z2_IS_TMC26X
1051
-  //#define E0_IS_TMC26X
1052
-  //#define E1_IS_TMC26X
1053
-  //#define E2_IS_TMC26X
1054
-  //#define E3_IS_TMC26X
1055
-  //#define E4_IS_TMC26X
1050
+#if HAS_DRIVER(TMC26X)
1056 1051
 
1057 1052
   #define X_MAX_CURRENT     1000 // in mA
1058 1053
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1098,62 +1093,29 @@
1098 1093
   #define E4_SENSE_RESISTOR   91
1099 1094
   #define E4_MICROSTEPS       16
1100 1095
 
1101
-#endif
1096
+#endif // TMC26X
1102 1097
 
1103 1098
 // @section tmc_smart
1104 1099
 
1105 1100
 /**
1106
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1107
- *
1108
- * You'll also need the TMC2130Stepper Arduino library
1109
- * (https://github.com/teemuatlut/TMC2130Stepper).
1110
- *
1111 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1112 1102
  * the hardware SPI interface on your board and define the required CS pins
1113 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1114 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1115
- */
1116
-//#define HAVE_TMC2130
1117
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1118
-  //#define X_IS_TMC2130
1119
-  //#define X2_IS_TMC2130
1120
-  //#define Y_IS_TMC2130
1121
-  //#define Y2_IS_TMC2130
1122
-  //#define Z_IS_TMC2130
1123
-  //#define Z2_IS_TMC2130
1124
-  //#define E0_IS_TMC2130
1125
-  //#define E1_IS_TMC2130
1126
-  //#define E2_IS_TMC2130
1127
-  //#define E3_IS_TMC2130
1128
-  //#define E4_IS_TMC2130
1129
-#endif
1130
-
1131
-/**
1132
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1133
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1134 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1135 1112
  * to PDN_UART without a resistor.
1136 1113
  * The drivers can also be used with hardware serial.
1137 1114
  *
1138
- * You'll also need the TMC2208Stepper Arduino library
1139
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1140 1117
  */
1141
-//#define HAVE_TMC2208
1142
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1143
-  //#define X_IS_TMC2208
1144
-  //#define X2_IS_TMC2208
1145
-  //#define Y_IS_TMC2208
1146
-  //#define Y2_IS_TMC2208
1147
-  //#define Z_IS_TMC2208
1148
-  //#define Z2_IS_TMC2208
1149
-  //#define E0_IS_TMC2208
1150
-  //#define E1_IS_TMC2208
1151
-  //#define E2_IS_TMC2208
1152
-  //#define E3_IS_TMC2208
1153
-  //#define E4_IS_TMC2208
1154
-#endif
1155
-
1156
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1157 1119
 
1158 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1159 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1308,25 +1270,12 @@
1308 1270
 // @section L6470
1309 1271
 
1310 1272
 /**
1311
- * Enable this section if you have L6470 motor drivers.
1312
- * You need to import the L6470 library into the Arduino IDE for this.
1313
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1314 1277
  */
1315
-
1316
-//#define HAVE_L6470DRIVER
1317
-#if ENABLED(HAVE_L6470DRIVER)
1318
-
1319
-  //#define X_IS_L6470
1320
-  //#define X2_IS_L6470
1321
-  //#define Y_IS_L6470
1322
-  //#define Y2_IS_L6470
1323
-  //#define Z_IS_L6470
1324
-  //#define Z2_IS_L6470
1325
-  //#define E0_IS_L6470
1326
-  //#define E1_IS_L6470
1327
-  //#define E2_IS_L6470
1328
-  //#define E3_IS_L6470
1329
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1330 1279
 
1331 1280
   #define X_MICROSTEPS      16 // number of microsteps
1332 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1372,7 +1321,7 @@
1372 1321
   #define E4_OVERCURRENT  2000
1373 1322
   #define E4_STALLCURRENT 1500
1374 1323
 
1375
-#endif
1324
+#endif // L6470
1376 1325
 
1377 1326
 /**
1378 1327
  * TWI/I2C BUS

+ 37
- 88
Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h View File

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 2
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 250000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,23 +1042,12 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-//#define HAVE_TMC26X
1044
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1045
-  //#define X_IS_TMC26X
1046
-  //#define X2_IS_TMC26X
1047
-  //#define Y_IS_TMC26X
1048
-  //#define Y2_IS_TMC26X
1049
-  //#define Z_IS_TMC26X
1050
-  //#define Z2_IS_TMC26X
1051
-  //#define E0_IS_TMC26X
1052
-  //#define E1_IS_TMC26X
1053
-  //#define E2_IS_TMC26X
1054
-  //#define E3_IS_TMC26X
1055
-  //#define E4_IS_TMC26X
1050
+#if HAS_DRIVER(TMC26X)
1056 1051
 
1057 1052
   #define X_MAX_CURRENT     1000 // in mA
1058 1053
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1098,62 +1093,29 @@
1098 1093
   #define E4_SENSE_RESISTOR   91
1099 1094
   #define E4_MICROSTEPS       16
1100 1095
 
1101
-#endif
1096
+#endif // TMC26X
1102 1097
 
1103 1098
 // @section tmc_smart
1104 1099
 
1105 1100
 /**
1106
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1107
- *
1108
- * You'll also need the TMC2130Stepper Arduino library
1109
- * (https://github.com/teemuatlut/TMC2130Stepper).
1110
- *
1111 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1112 1102
  * the hardware SPI interface on your board and define the required CS pins
1113 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1114 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1115
- */
1116
-//#define HAVE_TMC2130
1117
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1118
-  //#define X_IS_TMC2130
1119
-  //#define X2_IS_TMC2130
1120
-  //#define Y_IS_TMC2130
1121
-  //#define Y2_IS_TMC2130
1122
-  //#define Z_IS_TMC2130
1123
-  //#define Z2_IS_TMC2130
1124
-  //#define E0_IS_TMC2130
1125
-  //#define E1_IS_TMC2130
1126
-  //#define E2_IS_TMC2130
1127
-  //#define E3_IS_TMC2130
1128
-  //#define E4_IS_TMC2130
1129
-#endif
1130
-
1131
-/**
1132
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1133
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1134 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1135 1112
  * to PDN_UART without a resistor.
1136 1113
  * The drivers can also be used with hardware serial.
1137 1114
  *
1138
- * You'll also need the TMC2208Stepper Arduino library
1139
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1140 1117
  */
1141
-//#define HAVE_TMC2208
1142
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1143
-  //#define X_IS_TMC2208
1144
-  //#define X2_IS_TMC2208
1145
-  //#define Y_IS_TMC2208
1146
-  //#define Y2_IS_TMC2208
1147
-  //#define Z_IS_TMC2208
1148
-  //#define Z2_IS_TMC2208
1149
-  //#define E0_IS_TMC2208
1150
-  //#define E1_IS_TMC2208
1151
-  //#define E2_IS_TMC2208
1152
-  //#define E3_IS_TMC2208
1153
-  //#define E4_IS_TMC2208
1154
-#endif
1155
-
1156
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1157 1119
 
1158 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1159 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1308,25 +1270,12 @@
1308 1270
 // @section L6470
1309 1271
 
1310 1272
 /**
1311
- * Enable this section if you have L6470 motor drivers.
1312
- * You need to import the L6470 library into the Arduino IDE for this.
1313
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1314 1277
  */
1315
-
1316
-//#define HAVE_L6470DRIVER
1317
-#if ENABLED(HAVE_L6470DRIVER)
1318
-
1319
-  //#define X_IS_L6470
1320
-  //#define X2_IS_L6470
1321
-  //#define Y_IS_L6470
1322
-  //#define Y2_IS_L6470
1323
-  //#define Z_IS_L6470
1324
-  //#define Z2_IS_L6470
1325
-  //#define E0_IS_L6470
1326
-  //#define E1_IS_L6470
1327
-  //#define E2_IS_L6470
1328
-  //#define E3_IS_L6470
1329
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1330 1279
 
1331 1280
   #define X_MICROSTEPS      16 // number of microsteps
1332 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1372,7 +1321,7 @@
1372 1321
   #define E4_OVERCURRENT  2000
1373 1322
   #define E4_STALLCURRENT 1500
1374 1323
 
1375
-#endif
1324
+#endif // L6470
1376 1325
 
1377 1326
 /**
1378 1327
  * TWI/I2C BUS

+ 23
- 0
Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h View File

@@ -552,6 +552,29 @@
552 552
 #define Z_MAX_ENDSTOP_INVERTING true  // set to true to invert the logic of the endstop.
553 553
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
554 554
 
555
+/**
556
+ * Specify Stepper Driver types
557
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
558
+ * Stepper timing options can be overridden in Configuration_adv.h
559
+ *
560
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
561
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
562
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
563
+ *          TMC5130, TMC5130_STANDALONE
564
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
565
+ */
566
+#define X_DRIVER_TYPE  A4988
567
+#define Y_DRIVER_TYPE  A4988
568
+#define Z_DRIVER_TYPE  A4988
569
+#define X2_DRIVER_TYPE A4988
570
+#define Y2_DRIVER_TYPE A4988
571
+#define Z2_DRIVER_TYPE A4988
572
+#define E0_DRIVER_TYPE A4988
573
+#define E1_DRIVER_TYPE A4988
574
+#define E2_DRIVER_TYPE A4988
575
+#define E3_DRIVER_TYPE A4988
576
+#define E4_DRIVER_TYPE A4988
577
+
555 578
 // Enable this feature if all enabled endstop pins are interrupt-capable.
556 579
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
557 580
 #define ENDSTOP_INTERRUPTS_FEATURE

+ 37
- 88
Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h View File

@@ -845,15 +845,17 @@
845 845
 
846 846
 /**
847 847
  * Minimum delay after setting the stepper DIR (in ns)
848
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
849
- *   20 : Minimum for TMC2xxx drivers
850
- *  200 : Minimum for A4988 drivers
851
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
852
- *  650 : Minimum for DRV8825 drivers
853
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
854
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
848
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
849
+ *    20 : Minimum for TMC2xxx drivers
850
+ *   200 : Minimum for A4988 drivers
851
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
852
+ *   650 : Minimum for DRV8825 drivers
853
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
854
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
855
+ *
856
+ * Override the default value based on the driver type set in Configuration.h.
855 857
  */
856
-#define MINIMUM_STEPPER_DIR_DELAY 0
858
+//#define MINIMUM_STEPPER_DIR_DELAY 650
857 859
 
858 860
 /**
859 861
  * Minimum stepper driver pulse width (in µs)
@@ -863,8 +865,10 @@
863 865
  *   2 : Minimum for DRV8825 stepper drivers
864 866
  *   3 : Minimum for TB6600 stepper drivers
865 867
  *  30 : Minimum for TB6560 stepper drivers
868
+ *
869
+ * Override the default value based on the driver type set in Configuration.h.
866 870
  */
867
-#define MINIMUM_STEPPER_PULSE 2
871
+//#define MINIMUM_STEPPER_PULSE 2
868 872
 
869 873
 /**
870 874
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -875,8 +879,10 @@
875 879
  *  150000 : Maximum for TB6600 stepper driver
876 880
  *  130000 : Maximum for LV8729 stepper driver
877 881
  *   15000 : Maximum for TB6560 stepper driver
882
+ *
883
+ * Override the default value based on the driver type set in Configuration.h.
878 884
  */
879
-#define MAXIMUM_STEPPER_RATE 250000
885
+//#define MAXIMUM_STEPPER_RATE 250000
880 886
 
881 887
 // @section temperature
882 888
 
@@ -1044,23 +1050,12 @@
1044 1050
 // @section tmc
1045 1051
 
1046 1052
 /**
1047
- * Enable this section if you have TMC26X motor drivers.
1048
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1049
- * (https://github.com/trinamic/TMC26XStepper.git)
1053
+ * TMC26X Stepper Driver options
1054
+ *
1055
+ * The TMC26XStepper library is required for this stepper driver.
1056
+ * https://github.com/trinamic/TMC26XStepper
1050 1057
  */
1051
-//#define HAVE_TMC26X
1052
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1053
-  //#define X_IS_TMC26X
1054
-  //#define X2_IS_TMC26X
1055
-  //#define Y_IS_TMC26X
1056
-  //#define Y2_IS_TMC26X
1057
-  //#define Z_IS_TMC26X
1058
-  //#define Z2_IS_TMC26X
1059
-  //#define E0_IS_TMC26X
1060
-  //#define E1_IS_TMC26X
1061
-  //#define E2_IS_TMC26X
1062
-  //#define E3_IS_TMC26X
1063
-  //#define E4_IS_TMC26X
1058
+#if HAS_DRIVER(TMC26X)
1064 1059
 
1065 1060
   #define X_MAX_CURRENT     1000 // in mA
1066 1061
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1106,62 +1101,29 @@
1106 1101
   #define E4_SENSE_RESISTOR   91
1107 1102
   #define E4_MICROSTEPS       16
1108 1103
 
1109
-#endif
1104
+#endif // TMC26X
1110 1105
 
1111 1106
 // @section tmc_smart
1112 1107
 
1113 1108
 /**
1114
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1115
- *
1116
- * You'll also need the TMC2130Stepper Arduino library
1117
- * (https://github.com/teemuatlut/TMC2130Stepper).
1118
- *
1119 1109
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1120 1110
  * the hardware SPI interface on your board and define the required CS pins
1121 1111
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1122 1112
  * You may also use software SPI if you wish to use general purpose IO pins.
1123
- */
1124
-//#define HAVE_TMC2130
1125
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1126
-  //#define X_IS_TMC2130
1127
-  //#define X2_IS_TMC2130
1128
-  //#define Y_IS_TMC2130
1129
-  //#define Y2_IS_TMC2130
1130
-  //#define Z_IS_TMC2130
1131
-  //#define Z2_IS_TMC2130
1132
-  //#define E0_IS_TMC2130
1133
-  //#define E1_IS_TMC2130
1134
-  //#define E2_IS_TMC2130
1135
-  //#define E3_IS_TMC2130
1136
-  //#define E4_IS_TMC2130
1137
-#endif
1138
-
1139
-/**
1140
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1141
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1113
+ *
1114
+ * The TMC2130Stepper library is required for this stepper driver.
1115
+ * https://github.com/teemuatlut/TMC2130Stepper
1116
+ *
1117
+ * To use TMC2208 stepper UART-configurable stepper drivers
1118
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1142 1119
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1143 1120
  * to PDN_UART without a resistor.
1144 1121
  * The drivers can also be used with hardware serial.
1145 1122
  *
1146
- * You'll also need the TMC2208Stepper Arduino library
1147
- * (https://github.com/teemuatlut/TMC2208Stepper).
1123
+ * The TMC2208Stepper library is required for this stepper driver.
1124
+ * https://github.com/teemuatlut/TMC2208Stepper
1148 1125
  */
1149
-//#define HAVE_TMC2208
1150
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1151
-  //#define X_IS_TMC2208
1152
-  //#define X2_IS_TMC2208
1153
-  //#define Y_IS_TMC2208
1154
-  //#define Y2_IS_TMC2208
1155
-  //#define Z_IS_TMC2208
1156
-  //#define Z2_IS_TMC2208
1157
-  //#define E0_IS_TMC2208
1158
-  //#define E1_IS_TMC2208
1159
-  //#define E2_IS_TMC2208
1160
-  //#define E3_IS_TMC2208
1161
-  //#define E4_IS_TMC2208
1162
-#endif
1163
-
1164
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1126
+#if HAS_TRINAMIC
1165 1127
 
1166 1128
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1167 1129
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1316,25 +1278,12 @@
1316 1278
 // @section L6470
1317 1279
 
1318 1280
 /**
1319
- * Enable this section if you have L6470 motor drivers.
1320
- * You need to import the L6470 library into the Arduino IDE for this.
1321
- * (https://github.com/ameyer/Arduino-L6470)
1281
+ * L6470 Stepper Driver options
1282
+ *
1283
+ * The Arduino-L6470 library is required for this stepper driver.
1284
+ * https://github.com/ameyer/Arduino-L6470
1322 1285
  */
1323
-
1324
-//#define HAVE_L6470DRIVER
1325
-#if ENABLED(HAVE_L6470DRIVER)
1326
-
1327
-  //#define X_IS_L6470
1328
-  //#define X2_IS_L6470
1329
-  //#define Y_IS_L6470
1330
-  //#define Y2_IS_L6470
1331
-  //#define Z_IS_L6470
1332
-  //#define Z2_IS_L6470
1333
-  //#define E0_IS_L6470
1334
-  //#define E1_IS_L6470
1335
-  //#define E2_IS_L6470
1336
-  //#define E3_IS_L6470
1337
-  //#define E4_IS_L6470
1286
+#if HAS_DRIVER(L6470)
1338 1287
 
1339 1288
   #define X_MICROSTEPS      16 // number of microsteps
1340 1289
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1380,7 +1329,7 @@
1380 1329
   #define E4_OVERCURRENT  2000
1381 1330
   #define E4_STALLCURRENT 1500
1382 1331
 
1383
-#endif
1332
+#endif // L6470
1384 1333
 
1385 1334
 /**
1386 1335
  * TWI/I2C BUS

+ 37
- 88
Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h View File

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 2
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 250000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,23 +1042,12 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-//#define HAVE_TMC26X
1044
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1045
-  //#define X_IS_TMC26X
1046
-  //#define X2_IS_TMC26X
1047
-  //#define Y_IS_TMC26X
1048
-  //#define Y2_IS_TMC26X
1049
-  //#define Z_IS_TMC26X
1050
-  //#define Z2_IS_TMC26X
1051
-  //#define E0_IS_TMC26X
1052
-  //#define E1_IS_TMC26X
1053
-  //#define E2_IS_TMC26X
1054
-  //#define E3_IS_TMC26X
1055
-  //#define E4_IS_TMC26X
1050
+#if HAS_DRIVER(TMC26X)
1056 1051
 
1057 1052
   #define X_MAX_CURRENT     1000 // in mA
1058 1053
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1098,62 +1093,29 @@
1098 1093
   #define E4_SENSE_RESISTOR   91
1099 1094
   #define E4_MICROSTEPS       16
1100 1095
 
1101
-#endif
1096
+#endif // TMC26X
1102 1097
 
1103 1098
 // @section tmc_smart
1104 1099
 
1105 1100
 /**
1106
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1107
- *
1108
- * You'll also need the TMC2130Stepper Arduino library
1109
- * (https://github.com/teemuatlut/TMC2130Stepper).
1110
- *
1111 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1112 1102
  * the hardware SPI interface on your board and define the required CS pins
1113 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1114 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1115
- */
1116
-//#define HAVE_TMC2130
1117
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1118
-  //#define X_IS_TMC2130
1119
-  //#define X2_IS_TMC2130
1120
-  //#define Y_IS_TMC2130
1121
-  //#define Y2_IS_TMC2130
1122
-  //#define Z_IS_TMC2130
1123
-  //#define Z2_IS_TMC2130
1124
-  //#define E0_IS_TMC2130
1125
-  //#define E1_IS_TMC2130
1126
-  //#define E2_IS_TMC2130
1127
-  //#define E3_IS_TMC2130
1128
-  //#define E4_IS_TMC2130
1129
-#endif
1130
-
1131
-/**
1132
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1133
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1134 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1135 1112
  * to PDN_UART without a resistor.
1136 1113
  * The drivers can also be used with hardware serial.
1137 1114
  *
1138
- * You'll also need the TMC2208Stepper Arduino library
1139
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1140 1117
  */
1141
-//#define HAVE_TMC2208
1142
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1143
-  //#define X_IS_TMC2208
1144
-  //#define X2_IS_TMC2208
1145
-  //#define Y_IS_TMC2208
1146
-  //#define Y2_IS_TMC2208
1147
-  //#define Z_IS_TMC2208
1148
-  //#define Z2_IS_TMC2208
1149
-  //#define E0_IS_TMC2208
1150
-  //#define E1_IS_TMC2208
1151
-  //#define E2_IS_TMC2208
1152
-  //#define E3_IS_TMC2208
1153
-  //#define E4_IS_TMC2208
1154
-#endif
1155
-
1156
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1157 1119
 
1158 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1159 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1308,25 +1270,12 @@
1308 1270
 // @section L6470
1309 1271
 
1310 1272
 /**
1311
- * Enable this section if you have L6470 motor drivers.
1312
- * You need to import the L6470 library into the Arduino IDE for this.
1313
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1314 1277
  */
1315
-
1316
-//#define HAVE_L6470DRIVER
1317
-#if ENABLED(HAVE_L6470DRIVER)
1318
-
1319
-  //#define X_IS_L6470
1320
-  //#define X2_IS_L6470
1321
-  //#define Y_IS_L6470
1322
-  //#define Y2_IS_L6470
1323
-  //#define Z_IS_L6470
1324
-  //#define Z2_IS_L6470
1325
-  //#define E0_IS_L6470
1326
-  //#define E1_IS_L6470
1327
-  //#define E2_IS_L6470
1328
-  //#define E3_IS_L6470
1329
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1330 1279
 
1331 1280
   #define X_MICROSTEPS      16 // number of microsteps
1332 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1372,7 +1321,7 @@
1372 1321
   #define E4_OVERCURRENT  2000
1373 1322
   #define E4_STALLCURRENT 1500
1374 1323
 
1375
-#endif
1324
+#endif // L6470
1376 1325
 
1377 1326
 /**
1378 1327
  * TWI/I2C BUS

+ 37
- 88
Marlin/src/config/examples/Cartesio/Configuration_adv.h View File

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 2
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 250000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,23 +1042,12 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-//#define HAVE_TMC26X
1044
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1045
-  //#define X_IS_TMC26X
1046
-  //#define X2_IS_TMC26X
1047
-  //#define Y_IS_TMC26X
1048
-  //#define Y2_IS_TMC26X
1049
-  //#define Z_IS_TMC26X
1050
-  //#define Z2_IS_TMC26X
1051
-  //#define E0_IS_TMC26X
1052
-  //#define E1_IS_TMC26X
1053
-  //#define E2_IS_TMC26X
1054
-  //#define E3_IS_TMC26X
1055
-  //#define E4_IS_TMC26X
1050
+#if HAS_DRIVER(TMC26X)
1056 1051
 
1057 1052
   #define X_MAX_CURRENT     1000 // in mA
1058 1053
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1098,62 +1093,29 @@
1098 1093
   #define E4_SENSE_RESISTOR   91
1099 1094
   #define E4_MICROSTEPS       16
1100 1095
 
1101
-#endif
1096
+#endif // TMC26X
1102 1097
 
1103 1098
 // @section tmc_smart
1104 1099
 
1105 1100
 /**
1106
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1107
- *
1108
- * You'll also need the TMC2130Stepper Arduino library
1109
- * (https://github.com/teemuatlut/TMC2130Stepper).
1110
- *
1111 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1112 1102
  * the hardware SPI interface on your board and define the required CS pins
1113 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1114 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1115
- */
1116
-//#define HAVE_TMC2130
1117
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1118
-  //#define X_IS_TMC2130
1119
-  //#define X2_IS_TMC2130
1120
-  //#define Y_IS_TMC2130
1121
-  //#define Y2_IS_TMC2130
1122
-  //#define Z_IS_TMC2130
1123
-  //#define Z2_IS_TMC2130
1124
-  //#define E0_IS_TMC2130
1125
-  //#define E1_IS_TMC2130
1126
-  //#define E2_IS_TMC2130
1127
-  //#define E3_IS_TMC2130
1128
-  //#define E4_IS_TMC2130
1129
-#endif
1130
-
1131
-/**
1132
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1133
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1134 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1135 1112
  * to PDN_UART without a resistor.
1136 1113
  * The drivers can also be used with hardware serial.
1137 1114
  *
1138
- * You'll also need the TMC2208Stepper Arduino library
1139
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1140 1117
  */
1141
-//#define HAVE_TMC2208
1142
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1143
-  //#define X_IS_TMC2208
1144
-  //#define X2_IS_TMC2208
1145
-  //#define Y_IS_TMC2208
1146
-  //#define Y2_IS_TMC2208
1147
-  //#define Z_IS_TMC2208
1148
-  //#define Z2_IS_TMC2208
1149
-  //#define E0_IS_TMC2208
1150
-  //#define E1_IS_TMC2208
1151
-  //#define E2_IS_TMC2208
1152
-  //#define E3_IS_TMC2208
1153
-  //#define E4_IS_TMC2208
1154
-#endif
1155
-
1156
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1157 1119
 
1158 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1159 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1308,25 +1270,12 @@
1308 1270
 // @section L6470
1309 1271
 
1310 1272
 /**
1311
- * Enable this section if you have L6470 motor drivers.
1312
- * You need to import the L6470 library into the Arduino IDE for this.
1313
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1314 1277
  */
1315
-
1316
-//#define HAVE_L6470DRIVER
1317
-#if ENABLED(HAVE_L6470DRIVER)
1318
-
1319
-  //#define X_IS_L6470
1320
-  //#define X2_IS_L6470
1321
-  //#define Y_IS_L6470
1322
-  //#define Y2_IS_L6470
1323
-  //#define Z_IS_L6470
1324
-  //#define Z2_IS_L6470
1325
-  //#define E0_IS_L6470
1326
-  //#define E1_IS_L6470
1327
-  //#define E2_IS_L6470
1328
-  //#define E3_IS_L6470
1329
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1330 1279
 
1331 1280
   #define X_MICROSTEPS      16 // number of microsteps
1332 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1372,7 +1321,7 @@
1372 1321
   #define E4_OVERCURRENT  2000
1373 1322
   #define E4_STALLCURRENT 1500
1374 1323
 
1375
-#endif
1324
+#endif // L6470
1376 1325
 
1377 1326
 /**
1378 1327
  * TWI/I2C BUS

+ 23
- 0
Marlin/src/config/examples/Creality/CR-10/Configuration.h View File

@@ -561,6 +561,29 @@
561 561
 #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
562 562
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
563 563
 
564
+/**
565
+ * Specify Stepper Driver types
566
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
567
+ * Stepper timing options can be overridden in Configuration_adv.h
568
+ *
569
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
570
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
571
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
572
+ *          TMC5130, TMC5130_STANDALONE
573
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
574
+ */
575
+#define X_DRIVER_TYPE  A4988
576
+#define Y_DRIVER_TYPE  A4988
577
+#define Z_DRIVER_TYPE  A4988
578
+#define X2_DRIVER_TYPE A4988
579
+#define Y2_DRIVER_TYPE A4988
580
+#define Z2_DRIVER_TYPE A4988
581
+#define E0_DRIVER_TYPE A4988
582
+#define E1_DRIVER_TYPE A4988
583
+#define E2_DRIVER_TYPE A4988
584
+#define E3_DRIVER_TYPE A4988
585
+#define E4_DRIVER_TYPE A4988
586
+
564 587
 // Enable this feature if all enabled endstop pins are interrupt-capable.
565 588
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
566 589
 //#define ENDSTOP_INTERRUPTS_FEATURE

+ 37
- 88
Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h View File

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 2
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 250000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,23 +1042,12 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-//#define HAVE_TMC26X
1044
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1045
-  //#define X_IS_TMC26X
1046
-  //#define X2_IS_TMC26X
1047
-  //#define Y_IS_TMC26X
1048
-  //#define Y2_IS_TMC26X
1049
-  //#define Z_IS_TMC26X
1050
-  //#define Z2_IS_TMC26X
1051
-  //#define E0_IS_TMC26X
1052
-  //#define E1_IS_TMC26X
1053
-  //#define E2_IS_TMC26X
1054
-  //#define E3_IS_TMC26X
1055
-  //#define E4_IS_TMC26X
1050
+#if HAS_DRIVER(TMC26X)
1056 1051
 
1057 1052
   #define X_MAX_CURRENT     1000 // in mA
1058 1053
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1098,62 +1093,29 @@
1098 1093
   #define E4_SENSE_RESISTOR   91
1099 1094
   #define E4_MICROSTEPS       16
1100 1095
 
1101
-#endif
1096
+#endif // TMC26X
1102 1097
 
1103 1098
 // @section tmc_smart
1104 1099
 
1105 1100
 /**
1106
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1107
- *
1108
- * You'll also need the TMC2130Stepper Arduino library
1109
- * (https://github.com/teemuatlut/TMC2130Stepper).
1110
- *
1111 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1112 1102
  * the hardware SPI interface on your board and define the required CS pins
1113 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1114 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1115
- */
1116
-//#define HAVE_TMC2130
1117
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1118
-  //#define X_IS_TMC2130
1119
-  //#define X2_IS_TMC2130
1120
-  //#define Y_IS_TMC2130
1121
-  //#define Y2_IS_TMC2130
1122
-  //#define Z_IS_TMC2130
1123
-  //#define Z2_IS_TMC2130
1124
-  //#define E0_IS_TMC2130
1125
-  //#define E1_IS_TMC2130
1126
-  //#define E2_IS_TMC2130
1127
-  //#define E3_IS_TMC2130
1128
-  //#define E4_IS_TMC2130
1129
-#endif
1130
-
1131
-/**
1132
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1133
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1134 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1135 1112
  * to PDN_UART without a resistor.
1136 1113
  * The drivers can also be used with hardware serial.
1137 1114
  *
1138
- * You'll also need the TMC2208Stepper Arduino library
1139
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1140 1117
  */
1141
-//#define HAVE_TMC2208
1142
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1143
-  //#define X_IS_TMC2208
1144
-  //#define X2_IS_TMC2208
1145
-  //#define Y_IS_TMC2208
1146
-  //#define Y2_IS_TMC2208
1147
-  //#define Z_IS_TMC2208
1148
-  //#define Z2_IS_TMC2208
1149
-  //#define E0_IS_TMC2208
1150
-  //#define E1_IS_TMC2208
1151
-  //#define E2_IS_TMC2208
1152
-  //#define E3_IS_TMC2208
1153
-  //#define E4_IS_TMC2208
1154
-#endif
1155
-
1156
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1157 1119
 
1158 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1159 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1308,25 +1270,12 @@
1308 1270
 // @section L6470
1309 1271
 
1310 1272
 /**
1311
- * Enable this section if you have L6470 motor drivers.
1312
- * You need to import the L6470 library into the Arduino IDE for this.
1313
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1314 1277
  */
1315
-
1316
-//#define HAVE_L6470DRIVER
1317
-#if ENABLED(HAVE_L6470DRIVER)
1318
-
1319
-  //#define X_IS_L6470
1320
-  //#define X2_IS_L6470
1321
-  //#define Y_IS_L6470
1322
-  //#define Y2_IS_L6470
1323
-  //#define Z_IS_L6470
1324
-  //#define Z2_IS_L6470
1325
-  //#define E0_IS_L6470
1326
-  //#define E1_IS_L6470
1327
-  //#define E2_IS_L6470
1328
-  //#define E3_IS_L6470
1329
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1330 1279
 
1331 1280
   #define X_MICROSTEPS      16 // number of microsteps
1332 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1372,7 +1321,7 @@
1372 1321
   #define E4_OVERCURRENT  2000
1373 1322
   #define E4_STALLCURRENT 1500
1374 1323
 
1375
-#endif
1324
+#endif // L6470
1376 1325
 
1377 1326
 /**
1378 1327
  * TWI/I2C BUS

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

@@ -551,6 +551,29 @@
551 551
 #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
552 552
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
553 553
 
554
+/**
555
+ * Specify Stepper Driver types
556
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
557
+ * Stepper timing options can be overridden in Configuration_adv.h
558
+ *
559
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
560
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
561
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
562
+ *          TMC5130, TMC5130_STANDALONE
563
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
564
+ */
565
+#define X_DRIVER_TYPE  A4988
566
+#define Y_DRIVER_TYPE  A4988
567
+#define Z_DRIVER_TYPE  A4988
568
+#define X2_DRIVER_TYPE A4988
569
+#define Y2_DRIVER_TYPE A4988
570
+#define Z2_DRIVER_TYPE A4988
571
+#define E0_DRIVER_TYPE A4988
572
+#define E1_DRIVER_TYPE A4988
573
+#define E2_DRIVER_TYPE A4988
574
+#define E3_DRIVER_TYPE A4988
575
+#define E4_DRIVER_TYPE A4988
576
+
554 577
 // Enable this feature if all enabled endstop pins are interrupt-capable.
555 578
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
556 579
 //#define ENDSTOP_INTERRUPTS_FEATURE

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

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 2
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 250000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,23 +1042,12 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-//#define HAVE_TMC26X
1044
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1045
-  //#define X_IS_TMC26X
1046
-  //#define X2_IS_TMC26X
1047
-  //#define Y_IS_TMC26X
1048
-  //#define Y2_IS_TMC26X
1049
-  //#define Z_IS_TMC26X
1050
-  //#define Z2_IS_TMC26X
1051
-  //#define E0_IS_TMC26X
1052
-  //#define E1_IS_TMC26X
1053
-  //#define E2_IS_TMC26X
1054
-  //#define E3_IS_TMC26X
1055
-  //#define E4_IS_TMC26X
1050
+#if HAS_DRIVER(TMC26X)
1056 1051
 
1057 1052
   #define X_MAX_CURRENT     1000 // in mA
1058 1053
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1098,62 +1093,29 @@
1098 1093
   #define E4_SENSE_RESISTOR   91
1099 1094
   #define E4_MICROSTEPS       16
1100 1095
 
1101
-#endif
1096
+#endif // TMC26X
1102 1097
 
1103 1098
 // @section tmc_smart
1104 1099
 
1105 1100
 /**
1106
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1107
- *
1108
- * You'll also need the TMC2130Stepper Arduino library
1109
- * (https://github.com/teemuatlut/TMC2130Stepper).
1110
- *
1111 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1112 1102
  * the hardware SPI interface on your board and define the required CS pins
1113 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1114 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1115
- */
1116
-//#define HAVE_TMC2130
1117
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1118
-  //#define X_IS_TMC2130
1119
-  //#define X2_IS_TMC2130
1120
-  //#define Y_IS_TMC2130
1121
-  //#define Y2_IS_TMC2130
1122
-  //#define Z_IS_TMC2130
1123
-  //#define Z2_IS_TMC2130
1124
-  //#define E0_IS_TMC2130
1125
-  //#define E1_IS_TMC2130
1126
-  //#define E2_IS_TMC2130
1127
-  //#define E3_IS_TMC2130
1128
-  //#define E4_IS_TMC2130
1129
-#endif
1130
-
1131
-/**
1132
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1133
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1134 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1135 1112
  * to PDN_UART without a resistor.
1136 1113
  * The drivers can also be used with hardware serial.
1137 1114
  *
1138
- * You'll also need the TMC2208Stepper Arduino library
1139
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1140 1117
  */
1141
-//#define HAVE_TMC2208
1142
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1143
-  //#define X_IS_TMC2208
1144
-  //#define X2_IS_TMC2208
1145
-  //#define Y_IS_TMC2208
1146
-  //#define Y2_IS_TMC2208
1147
-  //#define Z_IS_TMC2208
1148
-  //#define Z2_IS_TMC2208
1149
-  //#define E0_IS_TMC2208
1150
-  //#define E1_IS_TMC2208
1151
-  //#define E2_IS_TMC2208
1152
-  //#define E3_IS_TMC2208
1153
-  //#define E4_IS_TMC2208
1154
-#endif
1155
-
1156
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1157 1119
 
1158 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1159 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1308,25 +1270,12 @@
1308 1270
 // @section L6470
1309 1271
 
1310 1272
 /**
1311
- * Enable this section if you have L6470 motor drivers.
1312
- * You need to import the L6470 library into the Arduino IDE for this.
1313
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1314 1277
  */
1315
-
1316
-//#define HAVE_L6470DRIVER
1317
-#if ENABLED(HAVE_L6470DRIVER)
1318
-
1319
-  //#define X_IS_L6470
1320
-  //#define X2_IS_L6470
1321
-  //#define Y_IS_L6470
1322
-  //#define Y2_IS_L6470
1323
-  //#define Z_IS_L6470
1324
-  //#define Z2_IS_L6470
1325
-  //#define E0_IS_L6470
1326
-  //#define E1_IS_L6470
1327
-  //#define E2_IS_L6470
1328
-  //#define E3_IS_L6470
1329
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1330 1279
 
1331 1280
   #define X_MICROSTEPS      16 // number of microsteps
1332 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1372,7 +1321,7 @@
1372 1321
   #define E4_OVERCURRENT  2000
1373 1322
   #define E4_STALLCURRENT 1500
1374 1323
 
1375
-#endif
1324
+#endif // L6470
1376 1325
 
1377 1326
 /**
1378 1327
  * TWI/I2C BUS

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

@@ -570,6 +570,29 @@
570 570
 #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
571 571
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
572 572
 
573
+/**
574
+ * Specify Stepper Driver types
575
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
576
+ * Stepper timing options can be overridden in Configuration_adv.h
577
+ *
578
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
579
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
580
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
581
+ *          TMC5130, TMC5130_STANDALONE
582
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
583
+ */
584
+#define X_DRIVER_TYPE  A4988
585
+#define Y_DRIVER_TYPE  A4988
586
+#define Z_DRIVER_TYPE  A4988
587
+#define X2_DRIVER_TYPE A4988
588
+#define Y2_DRIVER_TYPE A4988
589
+#define Z2_DRIVER_TYPE A4988
590
+#define E0_DRIVER_TYPE A4988
591
+#define E1_DRIVER_TYPE A4988
592
+#define E2_DRIVER_TYPE A4988
593
+#define E3_DRIVER_TYPE A4988
594
+#define E4_DRIVER_TYPE A4988
595
+
573 596
 // Enable this feature if all enabled endstop pins are interrupt-capable.
574 597
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
575 598
 //#define ENDSTOP_INTERRUPTS_FEATURE

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

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 2
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 250000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,23 +1042,12 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-//#define HAVE_TMC26X
1044
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1045
-  //#define X_IS_TMC26X
1046
-  //#define X2_IS_TMC26X
1047
-  //#define Y_IS_TMC26X
1048
-  //#define Y2_IS_TMC26X
1049
-  //#define Z_IS_TMC26X
1050
-  //#define Z2_IS_TMC26X
1051
-  //#define E0_IS_TMC26X
1052
-  //#define E1_IS_TMC26X
1053
-  //#define E2_IS_TMC26X
1054
-  //#define E3_IS_TMC26X
1055
-  //#define E4_IS_TMC26X
1050
+#if HAS_DRIVER(TMC26X)
1056 1051
 
1057 1052
   #define X_MAX_CURRENT     1000 // in mA
1058 1053
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1098,62 +1093,29 @@
1098 1093
   #define E4_SENSE_RESISTOR   91
1099 1094
   #define E4_MICROSTEPS       16
1100 1095
 
1101
-#endif
1096
+#endif // TMC26X
1102 1097
 
1103 1098
 // @section tmc_smart
1104 1099
 
1105 1100
 /**
1106
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1107
- *
1108
- * You'll also need the TMC2130Stepper Arduino library
1109
- * (https://github.com/teemuatlut/TMC2130Stepper).
1110
- *
1111 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1112 1102
  * the hardware SPI interface on your board and define the required CS pins
1113 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1114 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1115
- */
1116
-//#define HAVE_TMC2130
1117
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1118
-  //#define X_IS_TMC2130
1119
-  //#define X2_IS_TMC2130
1120
-  //#define Y_IS_TMC2130
1121
-  //#define Y2_IS_TMC2130
1122
-  //#define Z_IS_TMC2130
1123
-  //#define Z2_IS_TMC2130
1124
-  //#define E0_IS_TMC2130
1125
-  //#define E1_IS_TMC2130
1126
-  //#define E2_IS_TMC2130
1127
-  //#define E3_IS_TMC2130
1128
-  //#define E4_IS_TMC2130
1129
-#endif
1130
-
1131
-/**
1132
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1133
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1134 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1135 1112
  * to PDN_UART without a resistor.
1136 1113
  * The drivers can also be used with hardware serial.
1137 1114
  *
1138
- * You'll also need the TMC2208Stepper Arduino library
1139
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1140 1117
  */
1141
-//#define HAVE_TMC2208
1142
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1143
-  //#define X_IS_TMC2208
1144
-  //#define X2_IS_TMC2208
1145
-  //#define Y_IS_TMC2208
1146
-  //#define Y2_IS_TMC2208
1147
-  //#define Z_IS_TMC2208
1148
-  //#define Z2_IS_TMC2208
1149
-  //#define E0_IS_TMC2208
1150
-  //#define E1_IS_TMC2208
1151
-  //#define E2_IS_TMC2208
1152
-  //#define E3_IS_TMC2208
1153
-  //#define E4_IS_TMC2208
1154
-#endif
1155
-
1156
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1157 1119
 
1158 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1159 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1308,25 +1270,12 @@
1308 1270
 // @section L6470
1309 1271
 
1310 1272
 /**
1311
- * Enable this section if you have L6470 motor drivers.
1312
- * You need to import the L6470 library into the Arduino IDE for this.
1313
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1314 1277
  */
1315
-
1316
-//#define HAVE_L6470DRIVER
1317
-#if ENABLED(HAVE_L6470DRIVER)
1318
-
1319
-  //#define X_IS_L6470
1320
-  //#define X2_IS_L6470
1321
-  //#define Y_IS_L6470
1322
-  //#define Y2_IS_L6470
1323
-  //#define Z_IS_L6470
1324
-  //#define Z2_IS_L6470
1325
-  //#define E0_IS_L6470
1326
-  //#define E1_IS_L6470
1327
-  //#define E2_IS_L6470
1328
-  //#define E3_IS_L6470
1329
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1330 1279
 
1331 1280
   #define X_MICROSTEPS      16 // number of microsteps
1332 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1372,7 +1321,7 @@
1372 1321
   #define E4_OVERCURRENT  2000
1373 1322
   #define E4_STALLCURRENT 1500
1374 1323
 
1375
-#endif
1324
+#endif // L6470
1376 1325
 
1377 1326
 /**
1378 1327
  * TWI/I2C BUS

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

@@ -561,6 +561,29 @@
561 561
 #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
562 562
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
563 563
 
564
+/**
565
+ * Specify Stepper Driver types
566
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
567
+ * Stepper timing options can be overridden in Configuration_adv.h
568
+ *
569
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
570
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
571
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
572
+ *          TMC5130, TMC5130_STANDALONE
573
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
574
+ */
575
+#define X_DRIVER_TYPE  A4988
576
+#define Y_DRIVER_TYPE  A4988
577
+#define Z_DRIVER_TYPE  A4988
578
+#define X2_DRIVER_TYPE A4988
579
+#define Y2_DRIVER_TYPE A4988
580
+#define Z2_DRIVER_TYPE A4988
581
+#define E0_DRIVER_TYPE A4988
582
+#define E1_DRIVER_TYPE A4988
583
+#define E2_DRIVER_TYPE A4988
584
+#define E3_DRIVER_TYPE A4988
585
+#define E4_DRIVER_TYPE A4988
586
+
564 587
 // Enable this feature if all enabled endstop pins are interrupt-capable.
565 588
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
566 589
 //#define ENDSTOP_INTERRUPTS_FEATURE

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

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 2
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 250000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,23 +1042,12 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-//#define HAVE_TMC26X
1044
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1045
-  //#define X_IS_TMC26X
1046
-  //#define X2_IS_TMC26X
1047
-  //#define Y_IS_TMC26X
1048
-  //#define Y2_IS_TMC26X
1049
-  //#define Z_IS_TMC26X
1050
-  //#define Z2_IS_TMC26X
1051
-  //#define E0_IS_TMC26X
1052
-  //#define E1_IS_TMC26X
1053
-  //#define E2_IS_TMC26X
1054
-  //#define E3_IS_TMC26X
1055
-  //#define E4_IS_TMC26X
1050
+#if HAS_DRIVER(TMC26X)
1056 1051
 
1057 1052
   #define X_MAX_CURRENT     1000 // in mA
1058 1053
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1098,62 +1093,29 @@
1098 1093
   #define E4_SENSE_RESISTOR   91
1099 1094
   #define E4_MICROSTEPS       16
1100 1095
 
1101
-#endif
1096
+#endif // TMC26X
1102 1097
 
1103 1098
 // @section tmc_smart
1104 1099
 
1105 1100
 /**
1106
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1107
- *
1108
- * You'll also need the TMC2130Stepper Arduino library
1109
- * (https://github.com/teemuatlut/TMC2130Stepper).
1110
- *
1111 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1112 1102
  * the hardware SPI interface on your board and define the required CS pins
1113 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1114 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1115
- */
1116
-//#define HAVE_TMC2130
1117
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1118
-  //#define X_IS_TMC2130
1119
-  //#define X2_IS_TMC2130
1120
-  //#define Y_IS_TMC2130
1121
-  //#define Y2_IS_TMC2130
1122
-  //#define Z_IS_TMC2130
1123
-  //#define Z2_IS_TMC2130
1124
-  //#define E0_IS_TMC2130
1125
-  //#define E1_IS_TMC2130
1126
-  //#define E2_IS_TMC2130
1127
-  //#define E3_IS_TMC2130
1128
-  //#define E4_IS_TMC2130
1129
-#endif
1130
-
1131
-/**
1132
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1133
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1134 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1135 1112
  * to PDN_UART without a resistor.
1136 1113
  * The drivers can also be used with hardware serial.
1137 1114
  *
1138
- * You'll also need the TMC2208Stepper Arduino library
1139
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1140 1117
  */
1141
-//#define HAVE_TMC2208
1142
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1143
-  //#define X_IS_TMC2208
1144
-  //#define X2_IS_TMC2208
1145
-  //#define Y_IS_TMC2208
1146
-  //#define Y2_IS_TMC2208
1147
-  //#define Z_IS_TMC2208
1148
-  //#define Z2_IS_TMC2208
1149
-  //#define E0_IS_TMC2208
1150
-  //#define E1_IS_TMC2208
1151
-  //#define E2_IS_TMC2208
1152
-  //#define E3_IS_TMC2208
1153
-  //#define E4_IS_TMC2208
1154
-#endif
1155
-
1156
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1157 1119
 
1158 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1159 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1308,25 +1270,12 @@
1308 1270
 // @section L6470
1309 1271
 
1310 1272
 /**
1311
- * Enable this section if you have L6470 motor drivers.
1312
- * You need to import the L6470 library into the Arduino IDE for this.
1313
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1314 1277
  */
1315
-
1316
-//#define HAVE_L6470DRIVER
1317
-#if ENABLED(HAVE_L6470DRIVER)
1318
-
1319
-  //#define X_IS_L6470
1320
-  //#define X2_IS_L6470
1321
-  //#define Y_IS_L6470
1322
-  //#define Y2_IS_L6470
1323
-  //#define Z_IS_L6470
1324
-  //#define Z2_IS_L6470
1325
-  //#define E0_IS_L6470
1326
-  //#define E1_IS_L6470
1327
-  //#define E2_IS_L6470
1328
-  //#define E3_IS_L6470
1329
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1330 1279
 
1331 1280
   #define X_MICROSTEPS      16 // number of microsteps
1332 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1372,7 +1321,7 @@
1372 1321
   #define E4_OVERCURRENT  2000
1373 1322
   #define E4_STALLCURRENT 1500
1374 1323
 
1375
-#endif
1324
+#endif // L6470
1376 1325
 
1377 1326
 /**
1378 1327
  * TWI/I2C BUS

+ 23
- 0
Marlin/src/config/examples/Creality/Ender-2/Configuration.h View File

@@ -555,6 +555,29 @@
555 555
 #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
556 556
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
557 557
 
558
+/**
559
+ * Specify Stepper Driver types
560
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
561
+ * Stepper timing options can be overridden in Configuration_adv.h
562
+ *
563
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
564
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
565
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
566
+ *          TMC5130, TMC5130_STANDALONE
567
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
568
+ */
569
+#define X_DRIVER_TYPE  A4988
570
+#define Y_DRIVER_TYPE  A4988
571
+#define Z_DRIVER_TYPE  A4988
572
+#define X2_DRIVER_TYPE A4988
573
+#define Y2_DRIVER_TYPE A4988
574
+#define Z2_DRIVER_TYPE A4988
575
+#define E0_DRIVER_TYPE A4988
576
+#define E1_DRIVER_TYPE A4988
577
+#define E2_DRIVER_TYPE A4988
578
+#define E3_DRIVER_TYPE A4988
579
+#define E4_DRIVER_TYPE A4988
580
+
558 581
 // Enable this feature if all enabled endstop pins are interrupt-capable.
559 582
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
560 583
 //#define ENDSTOP_INTERRUPTS_FEATURE

+ 37
- 88
Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h View File

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 2
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 250000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,23 +1042,12 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-//#define HAVE_TMC26X
1044
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1045
-  //#define X_IS_TMC26X
1046
-  //#define X2_IS_TMC26X
1047
-  //#define Y_IS_TMC26X
1048
-  //#define Y2_IS_TMC26X
1049
-  //#define Z_IS_TMC26X
1050
-  //#define Z2_IS_TMC26X
1051
-  //#define E0_IS_TMC26X
1052
-  //#define E1_IS_TMC26X
1053
-  //#define E2_IS_TMC26X
1054
-  //#define E3_IS_TMC26X
1055
-  //#define E4_IS_TMC26X
1050
+#if HAS_DRIVER(TMC26X)
1056 1051
 
1057 1052
   #define X_MAX_CURRENT     1000 // in mA
1058 1053
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1098,62 +1093,29 @@
1098 1093
   #define E4_SENSE_RESISTOR   91
1099 1094
   #define E4_MICROSTEPS       16
1100 1095
 
1101
-#endif
1096
+#endif // TMC26X
1102 1097
 
1103 1098
 // @section tmc_smart
1104 1099
 
1105 1100
 /**
1106
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1107
- *
1108
- * You'll also need the TMC2130Stepper Arduino library
1109
- * (https://github.com/teemuatlut/TMC2130Stepper).
1110
- *
1111 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1112 1102
  * the hardware SPI interface on your board and define the required CS pins
1113 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1114 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1115
- */
1116
-//#define HAVE_TMC2130
1117
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1118
-  //#define X_IS_TMC2130
1119
-  //#define X2_IS_TMC2130
1120
-  //#define Y_IS_TMC2130
1121
-  //#define Y2_IS_TMC2130
1122
-  //#define Z_IS_TMC2130
1123
-  //#define Z2_IS_TMC2130
1124
-  //#define E0_IS_TMC2130
1125
-  //#define E1_IS_TMC2130
1126
-  //#define E2_IS_TMC2130
1127
-  //#define E3_IS_TMC2130
1128
-  //#define E4_IS_TMC2130
1129
-#endif
1130
-
1131
-/**
1132
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1133
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1134 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1135 1112
  * to PDN_UART without a resistor.
1136 1113
  * The drivers can also be used with hardware serial.
1137 1114
  *
1138
- * You'll also need the TMC2208Stepper Arduino library
1139
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1140 1117
  */
1141
-//#define HAVE_TMC2208
1142
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1143
-  //#define X_IS_TMC2208
1144
-  //#define X2_IS_TMC2208
1145
-  //#define Y_IS_TMC2208
1146
-  //#define Y2_IS_TMC2208
1147
-  //#define Z_IS_TMC2208
1148
-  //#define Z2_IS_TMC2208
1149
-  //#define E0_IS_TMC2208
1150
-  //#define E1_IS_TMC2208
1151
-  //#define E2_IS_TMC2208
1152
-  //#define E3_IS_TMC2208
1153
-  //#define E4_IS_TMC2208
1154
-#endif
1155
-
1156
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1157 1119
 
1158 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1159 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1308,25 +1270,12 @@
1308 1270
 // @section L6470
1309 1271
 
1310 1272
 /**
1311
- * Enable this section if you have L6470 motor drivers.
1312
- * You need to import the L6470 library into the Arduino IDE for this.
1313
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1314 1277
  */
1315
-
1316
-//#define HAVE_L6470DRIVER
1317
-#if ENABLED(HAVE_L6470DRIVER)
1318
-
1319
-  //#define X_IS_L6470
1320
-  //#define X2_IS_L6470
1321
-  //#define Y_IS_L6470
1322
-  //#define Y2_IS_L6470
1323
-  //#define Z_IS_L6470
1324
-  //#define Z2_IS_L6470
1325
-  //#define E0_IS_L6470
1326
-  //#define E1_IS_L6470
1327
-  //#define E2_IS_L6470
1328
-  //#define E3_IS_L6470
1329
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1330 1279
 
1331 1280
   #define X_MICROSTEPS      16 // number of microsteps
1332 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1372,7 +1321,7 @@
1372 1321
   #define E4_OVERCURRENT  2000
1373 1322
   #define E4_STALLCURRENT 1500
1374 1323
 
1375
-#endif
1324
+#endif // L6470
1376 1325
 
1377 1326
 /**
1378 1327
  * TWI/I2C BUS

+ 23
- 0
Marlin/src/config/examples/Creality/Ender-3/Configuration.h View File

@@ -555,6 +555,29 @@
555 555
 #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
556 556
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
557 557
 
558
+/**
559
+ * Specify Stepper Driver types
560
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
561
+ * Stepper timing options can be overridden in Configuration_adv.h
562
+ *
563
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
564
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
565
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
566
+ *          TMC5130, TMC5130_STANDALONE
567
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
568
+ */
569
+#define X_DRIVER_TYPE  A4988
570
+#define Y_DRIVER_TYPE  A4988
571
+#define Z_DRIVER_TYPE  A4988
572
+#define X2_DRIVER_TYPE A4988
573
+#define Y2_DRIVER_TYPE A4988
574
+#define Z2_DRIVER_TYPE A4988
575
+#define E0_DRIVER_TYPE A4988
576
+#define E1_DRIVER_TYPE A4988
577
+#define E2_DRIVER_TYPE A4988
578
+#define E3_DRIVER_TYPE A4988
579
+#define E4_DRIVER_TYPE A4988
580
+
558 581
 // Enable this feature if all enabled endstop pins are interrupt-capable.
559 582
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
560 583
 //#define ENDSTOP_INTERRUPTS_FEATURE

+ 37
- 88
Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h View File

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 2
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 250000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,23 +1042,12 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-//#define HAVE_TMC26X
1044
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1045
-  //#define X_IS_TMC26X
1046
-  //#define X2_IS_TMC26X
1047
-  //#define Y_IS_TMC26X
1048
-  //#define Y2_IS_TMC26X
1049
-  //#define Z_IS_TMC26X
1050
-  //#define Z2_IS_TMC26X
1051
-  //#define E0_IS_TMC26X
1052
-  //#define E1_IS_TMC26X
1053
-  //#define E2_IS_TMC26X
1054
-  //#define E3_IS_TMC26X
1055
-  //#define E4_IS_TMC26X
1050
+#if HAS_DRIVER(TMC26X)
1056 1051
 
1057 1052
   #define X_MAX_CURRENT     1000 // in mA
1058 1053
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1098,62 +1093,29 @@
1098 1093
   #define E4_SENSE_RESISTOR   91
1099 1094
   #define E4_MICROSTEPS       16
1100 1095
 
1101
-#endif
1096
+#endif // TMC26X
1102 1097
 
1103 1098
 // @section tmc_smart
1104 1099
 
1105 1100
 /**
1106
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1107
- *
1108
- * You'll also need the TMC2130Stepper Arduino library
1109
- * (https://github.com/teemuatlut/TMC2130Stepper).
1110
- *
1111 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1112 1102
  * the hardware SPI interface on your board and define the required CS pins
1113 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1114 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1115
- */
1116
-//#define HAVE_TMC2130
1117
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1118
-  //#define X_IS_TMC2130
1119
-  //#define X2_IS_TMC2130
1120
-  //#define Y_IS_TMC2130
1121
-  //#define Y2_IS_TMC2130
1122
-  //#define Z_IS_TMC2130
1123
-  //#define Z2_IS_TMC2130
1124
-  //#define E0_IS_TMC2130
1125
-  //#define E1_IS_TMC2130
1126
-  //#define E2_IS_TMC2130
1127
-  //#define E3_IS_TMC2130
1128
-  //#define E4_IS_TMC2130
1129
-#endif
1130
-
1131
-/**
1132
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1133
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1134 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1135 1112
  * to PDN_UART without a resistor.
1136 1113
  * The drivers can also be used with hardware serial.
1137 1114
  *
1138
- * You'll also need the TMC2208Stepper Arduino library
1139
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1140 1117
  */
1141
-//#define HAVE_TMC2208
1142
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1143
-  //#define X_IS_TMC2208
1144
-  //#define X2_IS_TMC2208
1145
-  //#define Y_IS_TMC2208
1146
-  //#define Y2_IS_TMC2208
1147
-  //#define Z_IS_TMC2208
1148
-  //#define Z2_IS_TMC2208
1149
-  //#define E0_IS_TMC2208
1150
-  //#define E1_IS_TMC2208
1151
-  //#define E2_IS_TMC2208
1152
-  //#define E3_IS_TMC2208
1153
-  //#define E4_IS_TMC2208
1154
-#endif
1155
-
1156
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1157 1119
 
1158 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1159 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1308,25 +1270,12 @@
1308 1270
 // @section L6470
1309 1271
 
1310 1272
 /**
1311
- * Enable this section if you have L6470 motor drivers.
1312
- * You need to import the L6470 library into the Arduino IDE for this.
1313
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1314 1277
  */
1315
-
1316
-//#define HAVE_L6470DRIVER
1317
-#if ENABLED(HAVE_L6470DRIVER)
1318
-
1319
-  //#define X_IS_L6470
1320
-  //#define X2_IS_L6470
1321
-  //#define Y_IS_L6470
1322
-  //#define Y2_IS_L6470
1323
-  //#define Z_IS_L6470
1324
-  //#define Z2_IS_L6470
1325
-  //#define E0_IS_L6470
1326
-  //#define E1_IS_L6470
1327
-  //#define E2_IS_L6470
1328
-  //#define E3_IS_L6470
1329
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1330 1279
 
1331 1280
   #define X_MICROSTEPS      16 // number of microsteps
1332 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1372,7 +1321,7 @@
1372 1321
   #define E4_OVERCURRENT  2000
1373 1322
   #define E4_STALLCURRENT 1500
1374 1323
 
1375
-#endif
1324
+#endif // L6470
1376 1325
 
1377 1326
 /**
1378 1327
  * TWI/I2C BUS

+ 23
- 0
Marlin/src/config/examples/Creality/Ender-4/Configuration.h View File

@@ -561,6 +561,29 @@
561 561
 #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
562 562
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
563 563
 
564
+/**
565
+ * Specify Stepper Driver types
566
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
567
+ * Stepper timing options can be overridden in Configuration_adv.h
568
+ *
569
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
570
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
571
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
572
+ *          TMC5130, TMC5130_STANDALONE
573
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
574
+ */
575
+#define X_DRIVER_TYPE  A4988
576
+#define Y_DRIVER_TYPE  A4988
577
+#define Z_DRIVER_TYPE  A4988
578
+#define X2_DRIVER_TYPE A4988
579
+#define Y2_DRIVER_TYPE A4988
580
+#define Z2_DRIVER_TYPE A4988
581
+#define E0_DRIVER_TYPE A4988
582
+#define E1_DRIVER_TYPE A4988
583
+#define E2_DRIVER_TYPE A4988
584
+#define E3_DRIVER_TYPE A4988
585
+#define E4_DRIVER_TYPE A4988
586
+
564 587
 // Enable this feature if all enabled endstop pins are interrupt-capable.
565 588
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
566 589
 //#define ENDSTOP_INTERRUPTS_FEATURE

+ 37
- 88
Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h View File

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 2
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 250000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,23 +1042,12 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-//#define HAVE_TMC26X
1044
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1045
-  //#define X_IS_TMC26X
1046
-  //#define X2_IS_TMC26X
1047
-  //#define Y_IS_TMC26X
1048
-  //#define Y2_IS_TMC26X
1049
-  //#define Z_IS_TMC26X
1050
-  //#define Z2_IS_TMC26X
1051
-  //#define E0_IS_TMC26X
1052
-  //#define E1_IS_TMC26X
1053
-  //#define E2_IS_TMC26X
1054
-  //#define E3_IS_TMC26X
1055
-  //#define E4_IS_TMC26X
1050
+#if HAS_DRIVER(TMC26X)
1056 1051
 
1057 1052
   #define X_MAX_CURRENT     1000 // in mA
1058 1053
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1098,62 +1093,29 @@
1098 1093
   #define E4_SENSE_RESISTOR   91
1099 1094
   #define E4_MICROSTEPS       16
1100 1095
 
1101
-#endif
1096
+#endif // TMC26X
1102 1097
 
1103 1098
 // @section tmc_smart
1104 1099
 
1105 1100
 /**
1106
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1107
- *
1108
- * You'll also need the TMC2130Stepper Arduino library
1109
- * (https://github.com/teemuatlut/TMC2130Stepper).
1110
- *
1111 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1112 1102
  * the hardware SPI interface on your board and define the required CS pins
1113 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1114 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1115
- */
1116
-//#define HAVE_TMC2130
1117
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1118
-  //#define X_IS_TMC2130
1119
-  //#define X2_IS_TMC2130
1120
-  //#define Y_IS_TMC2130
1121
-  //#define Y2_IS_TMC2130
1122
-  //#define Z_IS_TMC2130
1123
-  //#define Z2_IS_TMC2130
1124
-  //#define E0_IS_TMC2130
1125
-  //#define E1_IS_TMC2130
1126
-  //#define E2_IS_TMC2130
1127
-  //#define E3_IS_TMC2130
1128
-  //#define E4_IS_TMC2130
1129
-#endif
1130
-
1131
-/**
1132
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1133
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1134 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1135 1112
  * to PDN_UART without a resistor.
1136 1113
  * The drivers can also be used with hardware serial.
1137 1114
  *
1138
- * You'll also need the TMC2208Stepper Arduino library
1139
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1140 1117
  */
1141
-//#define HAVE_TMC2208
1142
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1143
-  //#define X_IS_TMC2208
1144
-  //#define X2_IS_TMC2208
1145
-  //#define Y_IS_TMC2208
1146
-  //#define Y2_IS_TMC2208
1147
-  //#define Z_IS_TMC2208
1148
-  //#define Z2_IS_TMC2208
1149
-  //#define E0_IS_TMC2208
1150
-  //#define E1_IS_TMC2208
1151
-  //#define E2_IS_TMC2208
1152
-  //#define E3_IS_TMC2208
1153
-  //#define E4_IS_TMC2208
1154
-#endif
1155
-
1156
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1157 1119
 
1158 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1159 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1308,25 +1270,12 @@
1308 1270
 // @section L6470
1309 1271
 
1310 1272
 /**
1311
- * Enable this section if you have L6470 motor drivers.
1312
- * You need to import the L6470 library into the Arduino IDE for this.
1313
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1314 1277
  */
1315
-
1316
-//#define HAVE_L6470DRIVER
1317
-#if ENABLED(HAVE_L6470DRIVER)
1318
-
1319
-  //#define X_IS_L6470
1320
-  //#define X2_IS_L6470
1321
-  //#define Y_IS_L6470
1322
-  //#define Y2_IS_L6470
1323
-  //#define Z_IS_L6470
1324
-  //#define Z2_IS_L6470
1325
-  //#define E0_IS_L6470
1326
-  //#define E1_IS_L6470
1327
-  //#define E2_IS_L6470
1328
-  //#define E3_IS_L6470
1329
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1330 1279
 
1331 1280
   #define X_MICROSTEPS      16 // number of microsteps
1332 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1372,7 +1321,7 @@
1372 1321
   #define E4_OVERCURRENT  2000
1373 1322
   #define E4_STALLCURRENT 1500
1374 1323
 
1375
-#endif
1324
+#endif // L6470
1376 1325
 
1377 1326
 /**
1378 1327
  * TWI/I2C BUS

+ 23
- 0
Marlin/src/config/examples/Felix/Configuration.h View File

@@ -532,6 +532,29 @@
532 532
 #define Z_MAX_ENDSTOP_INVERTING true  // set to true to invert the logic of the endstop.
533 533
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
534 534
 
535
+/**
536
+ * Specify Stepper Driver types
537
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
538
+ * Stepper timing options can be overridden in Configuration_adv.h
539
+ *
540
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
541
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
542
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
543
+ *          TMC5130, TMC5130_STANDALONE
544
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
545
+ */
546
+#define X_DRIVER_TYPE  A4988
547
+#define Y_DRIVER_TYPE  A4988
548
+#define Z_DRIVER_TYPE  A4988
549
+#define X2_DRIVER_TYPE A4988
550
+#define Y2_DRIVER_TYPE A4988
551
+#define Z2_DRIVER_TYPE A4988
552
+#define E0_DRIVER_TYPE A4988
553
+#define E1_DRIVER_TYPE A4988
554
+#define E2_DRIVER_TYPE A4988
555
+#define E3_DRIVER_TYPE A4988
556
+#define E4_DRIVER_TYPE A4988
557
+
535 558
 // Enable this feature if all enabled endstop pins are interrupt-capable.
536 559
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
537 560
 //#define ENDSTOP_INTERRUPTS_FEATURE

+ 37
- 88
Marlin/src/config/examples/Felix/Configuration_adv.h View File

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 2
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 250000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,23 +1042,12 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-//#define HAVE_TMC26X
1044
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1045
-  //#define X_IS_TMC26X
1046
-  //#define X2_IS_TMC26X
1047
-  //#define Y_IS_TMC26X
1048
-  //#define Y2_IS_TMC26X
1049
-  //#define Z_IS_TMC26X
1050
-  //#define Z2_IS_TMC26X
1051
-  //#define E0_IS_TMC26X
1052
-  //#define E1_IS_TMC26X
1053
-  //#define E2_IS_TMC26X
1054
-  //#define E3_IS_TMC26X
1055
-  //#define E4_IS_TMC26X
1050
+#if HAS_DRIVER(TMC26X)
1056 1051
 
1057 1052
   #define X_MAX_CURRENT     1000 // in mA
1058 1053
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1098,62 +1093,29 @@
1098 1093
   #define E4_SENSE_RESISTOR   91
1099 1094
   #define E4_MICROSTEPS       16
1100 1095
 
1101
-#endif
1096
+#endif // TMC26X
1102 1097
 
1103 1098
 // @section tmc_smart
1104 1099
 
1105 1100
 /**
1106
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1107
- *
1108
- * You'll also need the TMC2130Stepper Arduino library
1109
- * (https://github.com/teemuatlut/TMC2130Stepper).
1110
- *
1111 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1112 1102
  * the hardware SPI interface on your board and define the required CS pins
1113 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1114 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1115
- */
1116
-//#define HAVE_TMC2130
1117
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1118
-  //#define X_IS_TMC2130
1119
-  //#define X2_IS_TMC2130
1120
-  //#define Y_IS_TMC2130
1121
-  //#define Y2_IS_TMC2130
1122
-  //#define Z_IS_TMC2130
1123
-  //#define Z2_IS_TMC2130
1124
-  //#define E0_IS_TMC2130
1125
-  //#define E1_IS_TMC2130
1126
-  //#define E2_IS_TMC2130
1127
-  //#define E3_IS_TMC2130
1128
-  //#define E4_IS_TMC2130
1129
-#endif
1130
-
1131
-/**
1132
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1133
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1134 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1135 1112
  * to PDN_UART without a resistor.
1136 1113
  * The drivers can also be used with hardware serial.
1137 1114
  *
1138
- * You'll also need the TMC2208Stepper Arduino library
1139
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1140 1117
  */
1141
-//#define HAVE_TMC2208
1142
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1143
-  //#define X_IS_TMC2208
1144
-  //#define X2_IS_TMC2208
1145
-  //#define Y_IS_TMC2208
1146
-  //#define Y2_IS_TMC2208
1147
-  //#define Z_IS_TMC2208
1148
-  //#define Z2_IS_TMC2208
1149
-  //#define E0_IS_TMC2208
1150
-  //#define E1_IS_TMC2208
1151
-  //#define E2_IS_TMC2208
1152
-  //#define E3_IS_TMC2208
1153
-  //#define E4_IS_TMC2208
1154
-#endif
1155
-
1156
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1157 1119
 
1158 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1159 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1308,25 +1270,12 @@
1308 1270
 // @section L6470
1309 1271
 
1310 1272
 /**
1311
- * Enable this section if you have L6470 motor drivers.
1312
- * You need to import the L6470 library into the Arduino IDE for this.
1313
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1314 1277
  */
1315
-
1316
-//#define HAVE_L6470DRIVER
1317
-#if ENABLED(HAVE_L6470DRIVER)
1318
-
1319
-  //#define X_IS_L6470
1320
-  //#define X2_IS_L6470
1321
-  //#define Y_IS_L6470
1322
-  //#define Y2_IS_L6470
1323
-  //#define Z_IS_L6470
1324
-  //#define Z2_IS_L6470
1325
-  //#define E0_IS_L6470
1326
-  //#define E1_IS_L6470
1327
-  //#define E2_IS_L6470
1328
-  //#define E3_IS_L6470
1329
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1330 1279
 
1331 1280
   #define X_MICROSTEPS      16 // number of microsteps
1332 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1372,7 +1321,7 @@
1372 1321
   #define E4_OVERCURRENT  2000
1373 1322
   #define E4_STALLCURRENT 1500
1374 1323
 
1375
-#endif
1324
+#endif // L6470
1376 1325
 
1377 1326
 /**
1378 1327
  * TWI/I2C BUS

+ 23
- 0
Marlin/src/config/examples/Felix/DUAL/Configuration.h View File

@@ -532,6 +532,29 @@
532 532
 #define Z_MAX_ENDSTOP_INVERTING true  // set to true to invert the logic of the endstop.
533 533
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
534 534
 
535
+/**
536
+ * Specify Stepper Driver types
537
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
538
+ * Stepper timing options can be overridden in Configuration_adv.h
539
+ *
540
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
541
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
542
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
543
+ *          TMC5130, TMC5130_STANDALONE
544
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
545
+ */
546
+#define X_DRIVER_TYPE  A4988
547
+#define Y_DRIVER_TYPE  A4988
548
+#define Z_DRIVER_TYPE  A4988
549
+#define X2_DRIVER_TYPE A4988
550
+#define Y2_DRIVER_TYPE A4988
551
+#define Z2_DRIVER_TYPE A4988
552
+#define E0_DRIVER_TYPE A4988
553
+#define E1_DRIVER_TYPE A4988
554
+#define E2_DRIVER_TYPE A4988
555
+#define E3_DRIVER_TYPE A4988
556
+#define E4_DRIVER_TYPE A4988
557
+
535 558
 // Enable this feature if all enabled endstop pins are interrupt-capable.
536 559
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
537 560
 //#define ENDSTOP_INTERRUPTS_FEATURE

+ 37
- 88
Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h View File

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 2
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 250000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,23 +1042,12 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-//#define HAVE_TMC26X
1044
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1045
-  //#define X_IS_TMC26X
1046
-  //#define X2_IS_TMC26X
1047
-  //#define Y_IS_TMC26X
1048
-  //#define Y2_IS_TMC26X
1049
-  //#define Z_IS_TMC26X
1050
-  //#define Z2_IS_TMC26X
1051
-  //#define E0_IS_TMC26X
1052
-  //#define E1_IS_TMC26X
1053
-  //#define E2_IS_TMC26X
1054
-  //#define E3_IS_TMC26X
1055
-  //#define E4_IS_TMC26X
1050
+#if HAS_DRIVER(TMC26X)
1056 1051
 
1057 1052
   #define X_MAX_CURRENT     1000 // in mA
1058 1053
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1098,62 +1093,29 @@
1098 1093
   #define E4_SENSE_RESISTOR   91
1099 1094
   #define E4_MICROSTEPS       16
1100 1095
 
1101
-#endif
1096
+#endif // TMC26X
1102 1097
 
1103 1098
 // @section tmc_smart
1104 1099
 
1105 1100
 /**
1106
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1107
- *
1108
- * You'll also need the TMC2130Stepper Arduino library
1109
- * (https://github.com/teemuatlut/TMC2130Stepper).
1110
- *
1111 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1112 1102
  * the hardware SPI interface on your board and define the required CS pins
1113 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1114 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1115
- */
1116
-//#define HAVE_TMC2130
1117
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1118
-  //#define X_IS_TMC2130
1119
-  //#define X2_IS_TMC2130
1120
-  //#define Y_IS_TMC2130
1121
-  //#define Y2_IS_TMC2130
1122
-  //#define Z_IS_TMC2130
1123
-  //#define Z2_IS_TMC2130
1124
-  //#define E0_IS_TMC2130
1125
-  //#define E1_IS_TMC2130
1126
-  //#define E2_IS_TMC2130
1127
-  //#define E3_IS_TMC2130
1128
-  //#define E4_IS_TMC2130
1129
-#endif
1130
-
1131
-/**
1132
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1133
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1134 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1135 1112
  * to PDN_UART without a resistor.
1136 1113
  * The drivers can also be used with hardware serial.
1137 1114
  *
1138
- * You'll also need the TMC2208Stepper Arduino library
1139
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1140 1117
  */
1141
-//#define HAVE_TMC2208
1142
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1143
-  //#define X_IS_TMC2208
1144
-  //#define X2_IS_TMC2208
1145
-  //#define Y_IS_TMC2208
1146
-  //#define Y2_IS_TMC2208
1147
-  //#define Z_IS_TMC2208
1148
-  //#define Z2_IS_TMC2208
1149
-  //#define E0_IS_TMC2208
1150
-  //#define E1_IS_TMC2208
1151
-  //#define E2_IS_TMC2208
1152
-  //#define E3_IS_TMC2208
1153
-  //#define E4_IS_TMC2208
1154
-#endif
1155
-
1156
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1157 1119
 
1158 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1159 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1308,25 +1270,12 @@
1308 1270
 // @section L6470
1309 1271
 
1310 1272
 /**
1311
- * Enable this section if you have L6470 motor drivers.
1312
- * You need to import the L6470 library into the Arduino IDE for this.
1313
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1314 1277
  */
1315
-
1316
-//#define HAVE_L6470DRIVER
1317
-#if ENABLED(HAVE_L6470DRIVER)
1318
-
1319
-  //#define X_IS_L6470
1320
-  //#define X2_IS_L6470
1321
-  //#define Y_IS_L6470
1322
-  //#define Y2_IS_L6470
1323
-  //#define Z_IS_L6470
1324
-  //#define Z2_IS_L6470
1325
-  //#define E0_IS_L6470
1326
-  //#define E1_IS_L6470
1327
-  //#define E2_IS_L6470
1328
-  //#define E3_IS_L6470
1329
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1330 1279
 
1331 1280
   #define X_MICROSTEPS      16 // number of microsteps
1332 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1372,7 +1321,7 @@
1372 1321
   #define E4_OVERCURRENT  2000
1373 1322
   #define E4_STALLCURRENT 1500
1374 1323
 
1375
-#endif
1324
+#endif // L6470
1376 1325
 
1377 1326
 /**
1378 1327
  * TWI/I2C BUS

+ 23
- 0
Marlin/src/config/examples/Geeetech/GT2560/Configuration.h View File

@@ -566,6 +566,29 @@
566 566
 #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
567 567
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
568 568
 
569
+/**
570
+ * Specify Stepper Driver types
571
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
572
+ * Stepper timing options can be overridden in Configuration_adv.h
573
+ *
574
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
575
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
576
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
577
+ *          TMC5130, TMC5130_STANDALONE
578
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
579
+ */
580
+#define X_DRIVER_TYPE  A4988
581
+#define Y_DRIVER_TYPE  A4988
582
+#define Z_DRIVER_TYPE  A4988
583
+#define X2_DRIVER_TYPE A4988
584
+#define Y2_DRIVER_TYPE A4988
585
+#define Z2_DRIVER_TYPE A4988
586
+#define E0_DRIVER_TYPE A4988
587
+#define E1_DRIVER_TYPE A4988
588
+#define E2_DRIVER_TYPE A4988
589
+#define E3_DRIVER_TYPE A4988
590
+#define E4_DRIVER_TYPE A4988
591
+
569 592
 // Enable this feature if all enabled endstop pins are interrupt-capable.
570 593
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
571 594
 //#define ENDSTOP_INTERRUPTS_FEATURE

+ 23
- 0
Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h View File

@@ -551,6 +551,29 @@
551 551
 #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
552 552
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
553 553
 
554
+/**
555
+ * Specify Stepper Driver types
556
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
557
+ * Stepper timing options can be overridden in Configuration_adv.h
558
+ *
559
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
560
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
561
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
562
+ *          TMC5130, TMC5130_STANDALONE
563
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
564
+ */
565
+#define X_DRIVER_TYPE  A4988
566
+#define Y_DRIVER_TYPE  A4988
567
+#define Z_DRIVER_TYPE  A4988
568
+#define X2_DRIVER_TYPE A4988
569
+#define Y2_DRIVER_TYPE A4988
570
+#define Z2_DRIVER_TYPE A4988
571
+#define E0_DRIVER_TYPE A4988
572
+#define E1_DRIVER_TYPE A4988
573
+#define E2_DRIVER_TYPE A4988
574
+#define E3_DRIVER_TYPE A4988
575
+#define E4_DRIVER_TYPE A4988
576
+
554 577
 // Enable this feature if all enabled endstop pins are interrupt-capable.
555 578
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
556 579
 //#define ENDSTOP_INTERRUPTS_FEATURE

+ 23
- 0
Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h View File

@@ -566,6 +566,29 @@
566 566
 #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
567 567
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
568 568
 
569
+/**
570
+ * Specify Stepper Driver types
571
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
572
+ * Stepper timing options can be overridden in Configuration_adv.h
573
+ *
574
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
575
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
576
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
577
+ *          TMC5130, TMC5130_STANDALONE
578
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
579
+ */
580
+#define X_DRIVER_TYPE  A4988
581
+#define Y_DRIVER_TYPE  A4988
582
+#define Z_DRIVER_TYPE  A4988
583
+#define X2_DRIVER_TYPE A4988
584
+#define Y2_DRIVER_TYPE A4988
585
+#define Z2_DRIVER_TYPE A4988
586
+#define E0_DRIVER_TYPE A4988
587
+#define E1_DRIVER_TYPE A4988
588
+#define E2_DRIVER_TYPE A4988
589
+#define E3_DRIVER_TYPE A4988
590
+#define E4_DRIVER_TYPE A4988
591
+
569 592
 // Enable this feature if all enabled endstop pins are interrupt-capable.
570 593
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
571 594
 //#define ENDSTOP_INTERRUPTS_FEATURE

+ 23
- 0
Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h View File

@@ -566,6 +566,29 @@
566 566
 #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
567 567
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
568 568
 
569
+/**
570
+ * Specify Stepper Driver types
571
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
572
+ * Stepper timing options can be overridden in Configuration_adv.h
573
+ *
574
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
575
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
576
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
577
+ *          TMC5130, TMC5130_STANDALONE
578
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
579
+ */
580
+#define X_DRIVER_TYPE  A4988
581
+#define Y_DRIVER_TYPE  A4988
582
+#define Z_DRIVER_TYPE  A4988
583
+#define X2_DRIVER_TYPE A4988
584
+#define Y2_DRIVER_TYPE A4988
585
+#define Z2_DRIVER_TYPE A4988
586
+#define E0_DRIVER_TYPE A4988
587
+#define E1_DRIVER_TYPE A4988
588
+#define E2_DRIVER_TYPE A4988
589
+#define E3_DRIVER_TYPE A4988
590
+#define E4_DRIVER_TYPE A4988
591
+
569 592
 // Enable this feature if all enabled endstop pins are interrupt-capable.
570 593
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
571 594
 //#define ENDSTOP_INTERRUPTS_FEATURE

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

@@ -551,6 +551,29 @@
551 551
 #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
552 552
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
553 553
 
554
+/**
555
+ * Specify Stepper Driver types
556
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
557
+ * Stepper timing options can be overridden in Configuration_adv.h
558
+ *
559
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
560
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
561
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
562
+ *          TMC5130, TMC5130_STANDALONE
563
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
564
+ */
565
+#define X_DRIVER_TYPE  A4988
566
+#define Y_DRIVER_TYPE  A4988
567
+#define Z_DRIVER_TYPE  A4988
568
+#define X2_DRIVER_TYPE A4988
569
+#define Y2_DRIVER_TYPE A4988
570
+#define Z2_DRIVER_TYPE A4988
571
+#define E0_DRIVER_TYPE A4988
572
+#define E1_DRIVER_TYPE A4988
573
+#define E2_DRIVER_TYPE A4988
574
+#define E3_DRIVER_TYPE A4988
575
+#define E4_DRIVER_TYPE A4988
576
+
554 577
 // Enable this feature if all enabled endstop pins are interrupt-capable.
555 578
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
556 579
 //#define ENDSTOP_INTERRUPTS_FEATURE

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

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 2
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 250000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,23 +1042,12 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-//#define HAVE_TMC26X
1044
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1045
-  //#define X_IS_TMC26X
1046
-  //#define X2_IS_TMC26X
1047
-  //#define Y_IS_TMC26X
1048
-  //#define Y2_IS_TMC26X
1049
-  //#define Z_IS_TMC26X
1050
-  //#define Z2_IS_TMC26X
1051
-  //#define E0_IS_TMC26X
1052
-  //#define E1_IS_TMC26X
1053
-  //#define E2_IS_TMC26X
1054
-  //#define E3_IS_TMC26X
1055
-  //#define E4_IS_TMC26X
1050
+#if HAS_DRIVER(TMC26X)
1056 1051
 
1057 1052
   #define X_MAX_CURRENT     1000 // in mA
1058 1053
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1098,62 +1093,29 @@
1098 1093
   #define E4_SENSE_RESISTOR   91
1099 1094
   #define E4_MICROSTEPS       16
1100 1095
 
1101
-#endif
1096
+#endif // TMC26X
1102 1097
 
1103 1098
 // @section tmc_smart
1104 1099
 
1105 1100
 /**
1106
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1107
- *
1108
- * You'll also need the TMC2130Stepper Arduino library
1109
- * (https://github.com/teemuatlut/TMC2130Stepper).
1110
- *
1111 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1112 1102
  * the hardware SPI interface on your board and define the required CS pins
1113 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1114 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1115
- */
1116
-//#define HAVE_TMC2130
1117
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1118
-  //#define X_IS_TMC2130
1119
-  //#define X2_IS_TMC2130
1120
-  //#define Y_IS_TMC2130
1121
-  //#define Y2_IS_TMC2130
1122
-  //#define Z_IS_TMC2130
1123
-  //#define Z2_IS_TMC2130
1124
-  //#define E0_IS_TMC2130
1125
-  //#define E1_IS_TMC2130
1126
-  //#define E2_IS_TMC2130
1127
-  //#define E3_IS_TMC2130
1128
-  //#define E4_IS_TMC2130
1129
-#endif
1130
-
1131
-/**
1132
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1133
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1134 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1135 1112
  * to PDN_UART without a resistor.
1136 1113
  * The drivers can also be used with hardware serial.
1137 1114
  *
1138
- * You'll also need the TMC2208Stepper Arduino library
1139
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1140 1117
  */
1141
-//#define HAVE_TMC2208
1142
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1143
-  //#define X_IS_TMC2208
1144
-  //#define X2_IS_TMC2208
1145
-  //#define Y_IS_TMC2208
1146
-  //#define Y2_IS_TMC2208
1147
-  //#define Z_IS_TMC2208
1148
-  //#define Z2_IS_TMC2208
1149
-  //#define E0_IS_TMC2208
1150
-  //#define E1_IS_TMC2208
1151
-  //#define E2_IS_TMC2208
1152
-  //#define E3_IS_TMC2208
1153
-  //#define E4_IS_TMC2208
1154
-#endif
1155
-
1156
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1157 1119
 
1158 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1159 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1308,25 +1270,12 @@
1308 1270
 // @section L6470
1309 1271
 
1310 1272
 /**
1311
- * Enable this section if you have L6470 motor drivers.
1312
- * You need to import the L6470 library into the Arduino IDE for this.
1313
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1314 1277
  */
1315
-
1316
-//#define HAVE_L6470DRIVER
1317
-#if ENABLED(HAVE_L6470DRIVER)
1318
-
1319
-  //#define X_IS_L6470
1320
-  //#define X2_IS_L6470
1321
-  //#define Y_IS_L6470
1322
-  //#define Y2_IS_L6470
1323
-  //#define Z_IS_L6470
1324
-  //#define Z2_IS_L6470
1325
-  //#define E0_IS_L6470
1326
-  //#define E1_IS_L6470
1327
-  //#define E2_IS_L6470
1328
-  //#define E3_IS_L6470
1329
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1330 1279
 
1331 1280
   #define X_MICROSTEPS      16 // number of microsteps
1332 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1372,7 +1321,7 @@
1372 1321
   #define E4_OVERCURRENT  2000
1373 1322
   #define E4_STALLCURRENT 1500
1374 1323
 
1375
-#endif
1324
+#endif // L6470
1376 1325
 
1377 1326
 /**
1378 1327
  * TWI/I2C BUS

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

@@ -551,6 +551,29 @@
551 551
 #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
552 552
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
553 553
 
554
+/**
555
+ * Specify Stepper Driver types
556
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
557
+ * Stepper timing options can be overridden in Configuration_adv.h
558
+ *
559
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
560
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
561
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
562
+ *          TMC5130, TMC5130_STANDALONE
563
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
564
+ */
565
+#define X_DRIVER_TYPE  A4988
566
+#define Y_DRIVER_TYPE  A4988
567
+#define Z_DRIVER_TYPE  A4988
568
+#define X2_DRIVER_TYPE A4988
569
+#define Y2_DRIVER_TYPE A4988
570
+#define Z2_DRIVER_TYPE A4988
571
+#define E0_DRIVER_TYPE A4988
572
+#define E1_DRIVER_TYPE A4988
573
+#define E2_DRIVER_TYPE A4988
574
+#define E3_DRIVER_TYPE A4988
575
+#define E4_DRIVER_TYPE A4988
576
+
554 577
 // Enable this feature if all enabled endstop pins are interrupt-capable.
555 578
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
556 579
 //#define ENDSTOP_INTERRUPTS_FEATURE

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

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 2
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 250000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,23 +1042,12 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-//#define HAVE_TMC26X
1044
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1045
-  //#define X_IS_TMC26X
1046
-  //#define X2_IS_TMC26X
1047
-  //#define Y_IS_TMC26X
1048
-  //#define Y2_IS_TMC26X
1049
-  //#define Z_IS_TMC26X
1050
-  //#define Z2_IS_TMC26X
1051
-  //#define E0_IS_TMC26X
1052
-  //#define E1_IS_TMC26X
1053
-  //#define E2_IS_TMC26X
1054
-  //#define E3_IS_TMC26X
1055
-  //#define E4_IS_TMC26X
1050
+#if HAS_DRIVER(TMC26X)
1056 1051
 
1057 1052
   #define X_MAX_CURRENT     1000 // in mA
1058 1053
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1098,62 +1093,29 @@
1098 1093
   #define E4_SENSE_RESISTOR   91
1099 1094
   #define E4_MICROSTEPS       16
1100 1095
 
1101
-#endif
1096
+#endif // TMC26X
1102 1097
 
1103 1098
 // @section tmc_smart
1104 1099
 
1105 1100
 /**
1106
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1107
- *
1108
- * You'll also need the TMC2130Stepper Arduino library
1109
- * (https://github.com/teemuatlut/TMC2130Stepper).
1110
- *
1111 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1112 1102
  * the hardware SPI interface on your board and define the required CS pins
1113 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1114 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1115
- */
1116
-//#define HAVE_TMC2130
1117
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1118
-  //#define X_IS_TMC2130
1119
-  //#define X2_IS_TMC2130
1120
-  //#define Y_IS_TMC2130
1121
-  //#define Y2_IS_TMC2130
1122
-  //#define Z_IS_TMC2130
1123
-  //#define Z2_IS_TMC2130
1124
-  //#define E0_IS_TMC2130
1125
-  //#define E1_IS_TMC2130
1126
-  //#define E2_IS_TMC2130
1127
-  //#define E3_IS_TMC2130
1128
-  //#define E4_IS_TMC2130
1129
-#endif
1130
-
1131
-/**
1132
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1133
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1134 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1135 1112
  * to PDN_UART without a resistor.
1136 1113
  * The drivers can also be used with hardware serial.
1137 1114
  *
1138
- * You'll also need the TMC2208Stepper Arduino library
1139
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1140 1117
  */
1141
-//#define HAVE_TMC2208
1142
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1143
-  //#define X_IS_TMC2208
1144
-  //#define X2_IS_TMC2208
1145
-  //#define Y_IS_TMC2208
1146
-  //#define Y2_IS_TMC2208
1147
-  //#define Z_IS_TMC2208
1148
-  //#define Z2_IS_TMC2208
1149
-  //#define E0_IS_TMC2208
1150
-  //#define E1_IS_TMC2208
1151
-  //#define E2_IS_TMC2208
1152
-  //#define E3_IS_TMC2208
1153
-  //#define E4_IS_TMC2208
1154
-#endif
1155
-
1156
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1157 1119
 
1158 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1159 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1308,25 +1270,12 @@
1308 1270
 // @section L6470
1309 1271
 
1310 1272
 /**
1311
- * Enable this section if you have L6470 motor drivers.
1312
- * You need to import the L6470 library into the Arduino IDE for this.
1313
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1314 1277
  */
1315
-
1316
-//#define HAVE_L6470DRIVER
1317
-#if ENABLED(HAVE_L6470DRIVER)
1318
-
1319
-  //#define X_IS_L6470
1320
-  //#define X2_IS_L6470
1321
-  //#define Y_IS_L6470
1322
-  //#define Y2_IS_L6470
1323
-  //#define Z_IS_L6470
1324
-  //#define Z2_IS_L6470
1325
-  //#define E0_IS_L6470
1326
-  //#define E1_IS_L6470
1327
-  //#define E2_IS_L6470
1328
-  //#define E3_IS_L6470
1329
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1330 1279
 
1331 1280
   #define X_MICROSTEPS      16 // number of microsteps
1332 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1372,7 +1321,7 @@
1372 1321
   #define E4_OVERCURRENT  2000
1373 1322
   #define E4_STALLCURRENT 1500
1374 1323
 
1375
-#endif
1324
+#endif // L6470
1376 1325
 
1377 1326
 /**
1378 1327
  * TWI/I2C BUS

+ 37
- 88
Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h View File

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 2
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 250000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,23 +1042,12 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-//#define HAVE_TMC26X
1044
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1045
-  //#define X_IS_TMC26X
1046
-  //#define X2_IS_TMC26X
1047
-  //#define Y_IS_TMC26X
1048
-  //#define Y2_IS_TMC26X
1049
-  //#define Z_IS_TMC26X
1050
-  //#define Z2_IS_TMC26X
1051
-  //#define E0_IS_TMC26X
1052
-  //#define E1_IS_TMC26X
1053
-  //#define E2_IS_TMC26X
1054
-  //#define E3_IS_TMC26X
1055
-  //#define E4_IS_TMC26X
1050
+#if HAS_DRIVER(TMC26X)
1056 1051
 
1057 1052
   #define X_MAX_CURRENT     1000 // in mA
1058 1053
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1098,62 +1093,29 @@
1098 1093
   #define E4_SENSE_RESISTOR   91
1099 1094
   #define E4_MICROSTEPS       16
1100 1095
 
1101
-#endif
1096
+#endif // TMC26X
1102 1097
 
1103 1098
 // @section tmc_smart
1104 1099
 
1105 1100
 /**
1106
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1107
- *
1108
- * You'll also need the TMC2130Stepper Arduino library
1109
- * (https://github.com/teemuatlut/TMC2130Stepper).
1110
- *
1111 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1112 1102
  * the hardware SPI interface on your board and define the required CS pins
1113 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1114 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1115
- */
1116
-//#define HAVE_TMC2130
1117
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1118
-  //#define X_IS_TMC2130
1119
-  //#define X2_IS_TMC2130
1120
-  //#define Y_IS_TMC2130
1121
-  //#define Y2_IS_TMC2130
1122
-  //#define Z_IS_TMC2130
1123
-  //#define Z2_IS_TMC2130
1124
-  //#define E0_IS_TMC2130
1125
-  //#define E1_IS_TMC2130
1126
-  //#define E2_IS_TMC2130
1127
-  //#define E3_IS_TMC2130
1128
-  //#define E4_IS_TMC2130
1129
-#endif
1130
-
1131
-/**
1132
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1133
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1134 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1135 1112
  * to PDN_UART without a resistor.
1136 1113
  * The drivers can also be used with hardware serial.
1137 1114
  *
1138
- * You'll also need the TMC2208Stepper Arduino library
1139
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1140 1117
  */
1141
-//#define HAVE_TMC2208
1142
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1143
-  //#define X_IS_TMC2208
1144
-  //#define X2_IS_TMC2208
1145
-  //#define Y_IS_TMC2208
1146
-  //#define Y2_IS_TMC2208
1147
-  //#define Z_IS_TMC2208
1148
-  //#define Z2_IS_TMC2208
1149
-  //#define E0_IS_TMC2208
1150
-  //#define E1_IS_TMC2208
1151
-  //#define E2_IS_TMC2208
1152
-  //#define E3_IS_TMC2208
1153
-  //#define E4_IS_TMC2208
1154
-#endif
1155
-
1156
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1157 1119
 
1158 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1159 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1308,25 +1270,12 @@
1308 1270
 // @section L6470
1309 1271
 
1310 1272
 /**
1311
- * Enable this section if you have L6470 motor drivers.
1312
- * You need to import the L6470 library into the Arduino IDE for this.
1313
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1314 1277
  */
1315
-
1316
-//#define HAVE_L6470DRIVER
1317
-#if ENABLED(HAVE_L6470DRIVER)
1318
-
1319
-  //#define X_IS_L6470
1320
-  //#define X2_IS_L6470
1321
-  //#define Y_IS_L6470
1322
-  //#define Y2_IS_L6470
1323
-  //#define Z_IS_L6470
1324
-  //#define Z2_IS_L6470
1325
-  //#define E0_IS_L6470
1326
-  //#define E1_IS_L6470
1327
-  //#define E2_IS_L6470
1328
-  //#define E3_IS_L6470
1329
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1330 1279
 
1331 1280
   #define X_MICROSTEPS      16 // number of microsteps
1332 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1372,7 +1321,7 @@
1372 1321
   #define E4_OVERCURRENT  2000
1373 1322
   #define E4_STALLCURRENT 1500
1374 1323
 
1375
-#endif
1324
+#endif // L6470
1376 1325
 
1377 1326
 /**
1378 1327
  * TWI/I2C BUS

+ 23
- 0
Marlin/src/config/examples/JGAurora/A5/Configuration.h View File

@@ -563,6 +563,29 @@
563 563
 #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
564 564
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
565 565
 
566
+/**
567
+ * Specify Stepper Driver types
568
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
569
+ * Stepper timing options can be overridden in Configuration_adv.h
570
+ *
571
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
572
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
573
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
574
+ *          TMC5130, TMC5130_STANDALONE
575
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
576
+ */
577
+#define X_DRIVER_TYPE  A4988
578
+#define Y_DRIVER_TYPE  A4988
579
+#define Z_DRIVER_TYPE  A4988
580
+#define X2_DRIVER_TYPE A4988
581
+#define Y2_DRIVER_TYPE A4988
582
+#define Z2_DRIVER_TYPE A4988
583
+#define E0_DRIVER_TYPE A4988
584
+#define E1_DRIVER_TYPE A4988
585
+#define E2_DRIVER_TYPE A4988
586
+#define E3_DRIVER_TYPE A4988
587
+#define E4_DRIVER_TYPE A4988
588
+
566 589
 // Enable this feature if all enabled endstop pins are interrupt-capable.
567 590
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
568 591
 //#define ENDSTOP_INTERRUPTS_FEATURE

+ 37
- 88
Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h View File

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 2
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 250000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,23 +1042,12 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-//#define HAVE_TMC26X
1044
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1045
-  //#define X_IS_TMC26X
1046
-  //#define X2_IS_TMC26X
1047
-  //#define Y_IS_TMC26X
1048
-  //#define Y2_IS_TMC26X
1049
-  //#define Z_IS_TMC26X
1050
-  //#define Z2_IS_TMC26X
1051
-  //#define E0_IS_TMC26X
1052
-  //#define E1_IS_TMC26X
1053
-  //#define E2_IS_TMC26X
1054
-  //#define E3_IS_TMC26X
1055
-  //#define E4_IS_TMC26X
1050
+#if HAS_DRIVER(TMC26X)
1056 1051
 
1057 1052
   #define X_MAX_CURRENT     1000 // in mA
1058 1053
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1098,62 +1093,29 @@
1098 1093
   #define E4_SENSE_RESISTOR   91
1099 1094
   #define E4_MICROSTEPS       16
1100 1095
 
1101
-#endif
1096
+#endif // TMC26X
1102 1097
 
1103 1098
 // @section tmc_smart
1104 1099
 
1105 1100
 /**
1106
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1107
- *
1108
- * You'll also need the TMC2130Stepper Arduino library
1109
- * (https://github.com/teemuatlut/TMC2130Stepper).
1110
- *
1111 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1112 1102
  * the hardware SPI interface on your board and define the required CS pins
1113 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1114 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1115
- */
1116
-//#define HAVE_TMC2130
1117
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1118
-  //#define X_IS_TMC2130
1119
-  //#define X2_IS_TMC2130
1120
-  //#define Y_IS_TMC2130
1121
-  //#define Y2_IS_TMC2130
1122
-  //#define Z_IS_TMC2130
1123
-  //#define Z2_IS_TMC2130
1124
-  //#define E0_IS_TMC2130
1125
-  //#define E1_IS_TMC2130
1126
-  //#define E2_IS_TMC2130
1127
-  //#define E3_IS_TMC2130
1128
-  //#define E4_IS_TMC2130
1129
-#endif
1130
-
1131
-/**
1132
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1133
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1134 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1135 1112
  * to PDN_UART without a resistor.
1136 1113
  * The drivers can also be used with hardware serial.
1137 1114
  *
1138
- * You'll also need the TMC2208Stepper Arduino library
1139
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1140 1117
  */
1141
-//#define HAVE_TMC2208
1142
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1143
-  //#define X_IS_TMC2208
1144
-  //#define X2_IS_TMC2208
1145
-  //#define Y_IS_TMC2208
1146
-  //#define Y2_IS_TMC2208
1147
-  //#define Z_IS_TMC2208
1148
-  //#define Z2_IS_TMC2208
1149
-  //#define E0_IS_TMC2208
1150
-  //#define E1_IS_TMC2208
1151
-  //#define E2_IS_TMC2208
1152
-  //#define E3_IS_TMC2208
1153
-  //#define E4_IS_TMC2208
1154
-#endif
1155
-
1156
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1157 1119
 
1158 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1159 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1308,25 +1270,12 @@
1308 1270
 // @section L6470
1309 1271
 
1310 1272
 /**
1311
- * Enable this section if you have L6470 motor drivers.
1312
- * You need to import the L6470 library into the Arduino IDE for this.
1313
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1314 1277
  */
1315
-
1316
-//#define HAVE_L6470DRIVER
1317
-#if ENABLED(HAVE_L6470DRIVER)
1318
-
1319
-  //#define X_IS_L6470
1320
-  //#define X2_IS_L6470
1321
-  //#define Y_IS_L6470
1322
-  //#define Y2_IS_L6470
1323
-  //#define Z_IS_L6470
1324
-  //#define Z2_IS_L6470
1325
-  //#define E0_IS_L6470
1326
-  //#define E1_IS_L6470
1327
-  //#define E2_IS_L6470
1328
-  //#define E3_IS_L6470
1329
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1330 1279
 
1331 1280
   #define X_MICROSTEPS      16 // number of microsteps
1332 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1372,7 +1321,7 @@
1372 1321
   #define E4_OVERCURRENT  2000
1373 1322
   #define E4_STALLCURRENT 1500
1374 1323
 
1375
-#endif
1324
+#endif // L6470
1376 1325
 
1377 1326
 /**
1378 1327
  * TWI/I2C BUS

+ 37
- 88
Marlin/src/config/examples/MakerParts/Configuration_adv.h View File

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 2
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 250000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,23 +1042,12 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-//#define HAVE_TMC26X
1044
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1045
-  //#define X_IS_TMC26X
1046
-  //#define X2_IS_TMC26X
1047
-  //#define Y_IS_TMC26X
1048
-  //#define Y2_IS_TMC26X
1049
-  //#define Z_IS_TMC26X
1050
-  //#define Z2_IS_TMC26X
1051
-  //#define E0_IS_TMC26X
1052
-  //#define E1_IS_TMC26X
1053
-  //#define E2_IS_TMC26X
1054
-  //#define E3_IS_TMC26X
1055
-  //#define E4_IS_TMC26X
1050
+#if HAS_DRIVER(TMC26X)
1056 1051
 
1057 1052
   #define X_MAX_CURRENT     1000 // in mA
1058 1053
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1098,62 +1093,29 @@
1098 1093
   #define E4_SENSE_RESISTOR   91
1099 1094
   #define E4_MICROSTEPS       16
1100 1095
 
1101
-#endif
1096
+#endif // TMC26X
1102 1097
 
1103 1098
 // @section tmc_smart
1104 1099
 
1105 1100
 /**
1106
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1107
- *
1108
- * You'll also need the TMC2130Stepper Arduino library
1109
- * (https://github.com/teemuatlut/TMC2130Stepper).
1110
- *
1111 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1112 1102
  * the hardware SPI interface on your board and define the required CS pins
1113 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1114 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1115
- */
1116
-//#define HAVE_TMC2130
1117
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1118
-  //#define X_IS_TMC2130
1119
-  //#define X2_IS_TMC2130
1120
-  //#define Y_IS_TMC2130
1121
-  //#define Y2_IS_TMC2130
1122
-  //#define Z_IS_TMC2130
1123
-  //#define Z2_IS_TMC2130
1124
-  //#define E0_IS_TMC2130
1125
-  //#define E1_IS_TMC2130
1126
-  //#define E2_IS_TMC2130
1127
-  //#define E3_IS_TMC2130
1128
-  //#define E4_IS_TMC2130
1129
-#endif
1130
-
1131
-/**
1132
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1133
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1134 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1135 1112
  * to PDN_UART without a resistor.
1136 1113
  * The drivers can also be used with hardware serial.
1137 1114
  *
1138
- * You'll also need the TMC2208Stepper Arduino library
1139
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1140 1117
  */
1141
-//#define HAVE_TMC2208
1142
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1143
-  //#define X_IS_TMC2208
1144
-  //#define X2_IS_TMC2208
1145
-  //#define Y_IS_TMC2208
1146
-  //#define Y2_IS_TMC2208
1147
-  //#define Z_IS_TMC2208
1148
-  //#define Z2_IS_TMC2208
1149
-  //#define E0_IS_TMC2208
1150
-  //#define E1_IS_TMC2208
1151
-  //#define E2_IS_TMC2208
1152
-  //#define E3_IS_TMC2208
1153
-  //#define E4_IS_TMC2208
1154
-#endif
1155
-
1156
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1157 1119
 
1158 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1159 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1308,25 +1270,12 @@
1308 1270
 // @section L6470
1309 1271
 
1310 1272
 /**
1311
- * Enable this section if you have L6470 motor drivers.
1312
- * You need to import the L6470 library into the Arduino IDE for this.
1313
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1314 1277
  */
1315
-
1316
-//#define HAVE_L6470DRIVER
1317
-#if ENABLED(HAVE_L6470DRIVER)
1318
-
1319
-  //#define X_IS_L6470
1320
-  //#define X2_IS_L6470
1321
-  //#define Y_IS_L6470
1322
-  //#define Y2_IS_L6470
1323
-  //#define Z_IS_L6470
1324
-  //#define Z2_IS_L6470
1325
-  //#define E0_IS_L6470
1326
-  //#define E1_IS_L6470
1327
-  //#define E2_IS_L6470
1328
-  //#define E3_IS_L6470
1329
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1330 1279
 
1331 1280
   #define X_MICROSTEPS      16 // number of microsteps
1332 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1372,7 +1321,7 @@
1372 1321
   #define E4_OVERCURRENT  2000
1373 1322
   #define E4_STALLCURRENT 1500
1374 1323
 
1375
-#endif
1324
+#endif // L6470
1376 1325
 
1377 1326
 /**
1378 1327
  * TWI/I2C BUS

+ 37
- 88
Marlin/src/config/examples/Malyan/M150/Configuration_adv.h View File

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 2
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 250000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,23 +1042,12 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-//#define HAVE_TMC26X
1044
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1045
-  //#define X_IS_TMC26X
1046
-  //#define X2_IS_TMC26X
1047
-  //#define Y_IS_TMC26X
1048
-  //#define Y2_IS_TMC26X
1049
-  //#define Z_IS_TMC26X
1050
-  //#define Z2_IS_TMC26X
1051
-  //#define E0_IS_TMC26X
1052
-  //#define E1_IS_TMC26X
1053
-  //#define E2_IS_TMC26X
1054
-  //#define E3_IS_TMC26X
1055
-  //#define E4_IS_TMC26X
1050
+#if HAS_DRIVER(TMC26X)
1056 1051
 
1057 1052
   #define X_MAX_CURRENT     1000 // in mA
1058 1053
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1098,62 +1093,29 @@
1098 1093
   #define E4_SENSE_RESISTOR   91
1099 1094
   #define E4_MICROSTEPS       16
1100 1095
 
1101
-#endif
1096
+#endif // TMC26X
1102 1097
 
1103 1098
 // @section tmc_smart
1104 1099
 
1105 1100
 /**
1106
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1107
- *
1108
- * You'll also need the TMC2130Stepper Arduino library
1109
- * (https://github.com/teemuatlut/TMC2130Stepper).
1110
- *
1111 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1112 1102
  * the hardware SPI interface on your board and define the required CS pins
1113 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1114 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1115
- */
1116
-//#define HAVE_TMC2130
1117
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1118
-  //#define X_IS_TMC2130
1119
-  //#define X2_IS_TMC2130
1120
-  //#define Y_IS_TMC2130
1121
-  //#define Y2_IS_TMC2130
1122
-  //#define Z_IS_TMC2130
1123
-  //#define Z2_IS_TMC2130
1124
-  //#define E0_IS_TMC2130
1125
-  //#define E1_IS_TMC2130
1126
-  //#define E2_IS_TMC2130
1127
-  //#define E3_IS_TMC2130
1128
-  //#define E4_IS_TMC2130
1129
-#endif
1130
-
1131
-/**
1132
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1133
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1134 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1135 1112
  * to PDN_UART without a resistor.
1136 1113
  * The drivers can also be used with hardware serial.
1137 1114
  *
1138
- * You'll also need the TMC2208Stepper Arduino library
1139
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1140 1117
  */
1141
-//#define HAVE_TMC2208
1142
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1143
-  //#define X_IS_TMC2208
1144
-  //#define X2_IS_TMC2208
1145
-  //#define Y_IS_TMC2208
1146
-  //#define Y2_IS_TMC2208
1147
-  //#define Z_IS_TMC2208
1148
-  //#define Z2_IS_TMC2208
1149
-  //#define E0_IS_TMC2208
1150
-  //#define E1_IS_TMC2208
1151
-  //#define E2_IS_TMC2208
1152
-  //#define E3_IS_TMC2208
1153
-  //#define E4_IS_TMC2208
1154
-#endif
1155
-
1156
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1157 1119
 
1158 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1159 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1308,25 +1270,12 @@
1308 1270
 // @section L6470
1309 1271
 
1310 1272
 /**
1311
- * Enable this section if you have L6470 motor drivers.
1312
- * You need to import the L6470 library into the Arduino IDE for this.
1313
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1314 1277
  */
1315
-
1316
-//#define HAVE_L6470DRIVER
1317
-#if ENABLED(HAVE_L6470DRIVER)
1318
-
1319
-  //#define X_IS_L6470
1320
-  //#define X2_IS_L6470
1321
-  //#define Y_IS_L6470
1322
-  //#define Y2_IS_L6470
1323
-  //#define Z_IS_L6470
1324
-  //#define Z2_IS_L6470
1325
-  //#define E0_IS_L6470
1326
-  //#define E1_IS_L6470
1327
-  //#define E2_IS_L6470
1328
-  //#define E3_IS_L6470
1329
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1330 1279
 
1331 1280
   #define X_MICROSTEPS      16 // number of microsteps
1332 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1372,7 +1321,7 @@
1372 1321
   #define E4_OVERCURRENT  2000
1373 1322
   #define E4_STALLCURRENT 1500
1374 1323
 
1375
-#endif
1324
+#endif // L6470
1376 1325
 
1377 1326
 /**
1378 1327
  * TWI/I2C BUS

+ 23
- 0
Marlin/src/config/examples/Malyan/M200/Configuration.h View File

@@ -550,6 +550,29 @@
550 550
 #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
551 551
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
552 552
 
553
+/**
554
+ * Specify Stepper Driver types
555
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
556
+ * Stepper timing options can be overridden in Configuration_adv.h
557
+ *
558
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
559
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
560
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
561
+ *          TMC5130, TMC5130_STANDALONE
562
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
563
+ */
564
+#define X_DRIVER_TYPE  A4988
565
+#define Y_DRIVER_TYPE  A4988
566
+#define Z_DRIVER_TYPE  A4988
567
+#define X2_DRIVER_TYPE A4988
568
+#define Y2_DRIVER_TYPE A4988
569
+#define Z2_DRIVER_TYPE A4988
570
+#define E0_DRIVER_TYPE A4988
571
+#define E1_DRIVER_TYPE A4988
572
+#define E2_DRIVER_TYPE A4988
573
+#define E3_DRIVER_TYPE A4988
574
+#define E4_DRIVER_TYPE A4988
575
+
553 576
 // Enable this feature if all enabled endstop pins are interrupt-capable.
554 577
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
555 578
 //#define ENDSTOP_INTERRUPTS_FEATURE

+ 37
- 88
Marlin/src/config/examples/Malyan/M200/Configuration_adv.h View File

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 2
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 250000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,23 +1042,12 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-//#define HAVE_TMC26X
1044
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1045
-  //#define X_IS_TMC26X
1046
-  //#define X2_IS_TMC26X
1047
-  //#define Y_IS_TMC26X
1048
-  //#define Y2_IS_TMC26X
1049
-  //#define Z_IS_TMC26X
1050
-  //#define Z2_IS_TMC26X
1051
-  //#define E0_IS_TMC26X
1052
-  //#define E1_IS_TMC26X
1053
-  //#define E2_IS_TMC26X
1054
-  //#define E3_IS_TMC26X
1055
-  //#define E4_IS_TMC26X
1050
+#if HAS_DRIVER(TMC26X)
1056 1051
 
1057 1052
   #define X_MAX_CURRENT     1000 // in mA
1058 1053
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1098,62 +1093,29 @@
1098 1093
   #define E4_SENSE_RESISTOR   91
1099 1094
   #define E4_MICROSTEPS       16
1100 1095
 
1101
-#endif
1096
+#endif // TMC26X
1102 1097
 
1103 1098
 // @section tmc_smart
1104 1099
 
1105 1100
 /**
1106
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1107
- *
1108
- * You'll also need the TMC2130Stepper Arduino library
1109
- * (https://github.com/teemuatlut/TMC2130Stepper).
1110
- *
1111 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1112 1102
  * the hardware SPI interface on your board and define the required CS pins
1113 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1114 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1115
- */
1116
-//#define HAVE_TMC2130
1117
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1118
-  //#define X_IS_TMC2130
1119
-  //#define X2_IS_TMC2130
1120
-  //#define Y_IS_TMC2130
1121
-  //#define Y2_IS_TMC2130
1122
-  //#define Z_IS_TMC2130
1123
-  //#define Z2_IS_TMC2130
1124
-  //#define E0_IS_TMC2130
1125
-  //#define E1_IS_TMC2130
1126
-  //#define E2_IS_TMC2130
1127
-  //#define E3_IS_TMC2130
1128
-  //#define E4_IS_TMC2130
1129
-#endif
1130
-
1131
-/**
1132
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1133
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1134 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1135 1112
  * to PDN_UART without a resistor.
1136 1113
  * The drivers can also be used with hardware serial.
1137 1114
  *
1138
- * You'll also need the TMC2208Stepper Arduino library
1139
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1140 1117
  */
1141
-//#define HAVE_TMC2208
1142
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1143
-  //#define X_IS_TMC2208
1144
-  //#define X2_IS_TMC2208
1145
-  //#define Y_IS_TMC2208
1146
-  //#define Y2_IS_TMC2208
1147
-  //#define Z_IS_TMC2208
1148
-  //#define Z2_IS_TMC2208
1149
-  //#define E0_IS_TMC2208
1150
-  //#define E1_IS_TMC2208
1151
-  //#define E2_IS_TMC2208
1152
-  //#define E3_IS_TMC2208
1153
-  //#define E4_IS_TMC2208
1154
-#endif
1155
-
1156
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1157 1119
 
1158 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1159 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1308,25 +1270,12 @@
1308 1270
 // @section L6470
1309 1271
 
1310 1272
 /**
1311
- * Enable this section if you have L6470 motor drivers.
1312
- * You need to import the L6470 library into the Arduino IDE for this.
1313
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1314 1277
  */
1315
-
1316
-//#define HAVE_L6470DRIVER
1317
-#if ENABLED(HAVE_L6470DRIVER)
1318
-
1319
-  //#define X_IS_L6470
1320
-  //#define X2_IS_L6470
1321
-  //#define Y_IS_L6470
1322
-  //#define Y2_IS_L6470
1323
-  //#define Z_IS_L6470
1324
-  //#define Z2_IS_L6470
1325
-  //#define E0_IS_L6470
1326
-  //#define E1_IS_L6470
1327
-  //#define E2_IS_L6470
1328
-  //#define E3_IS_L6470
1329
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1330 1279
 
1331 1280
   #define X_MICROSTEPS      16 // number of microsteps
1332 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1372,7 +1321,7 @@
1372 1321
   #define E4_OVERCURRENT  2000
1373 1322
   #define E4_STALLCURRENT 1500
1374 1323
 
1375
-#endif
1324
+#endif // L6470
1376 1325
 
1377 1326
 /**
1378 1327
  * TWI/I2C BUS

+ 23
- 0
Marlin/src/config/examples/Micromake/C1/basic/Configuration.h View File

@@ -551,6 +551,29 @@
551 551
 #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
552 552
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
553 553
 
554
+/**
555
+ * Specify Stepper Driver types
556
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
557
+ * Stepper timing options can be overridden in Configuration_adv.h
558
+ *
559
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
560
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
561
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
562
+ *          TMC5130, TMC5130_STANDALONE
563
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
564
+ */
565
+#define X_DRIVER_TYPE  A4988
566
+#define Y_DRIVER_TYPE  A4988
567
+#define Z_DRIVER_TYPE  A4988
568
+#define X2_DRIVER_TYPE A4988
569
+#define Y2_DRIVER_TYPE A4988
570
+#define Z2_DRIVER_TYPE A4988
571
+#define E0_DRIVER_TYPE A4988
572
+#define E1_DRIVER_TYPE A4988
573
+#define E2_DRIVER_TYPE A4988
574
+#define E3_DRIVER_TYPE A4988
575
+#define E4_DRIVER_TYPE A4988
576
+
554 577
 // Enable this feature if all enabled endstop pins are interrupt-capable.
555 578
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
556 579
 //#define ENDSTOP_INTERRUPTS_FEATURE

+ 37
- 88
Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h View File

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 2
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 250000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,23 +1042,12 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-//#define HAVE_TMC26X
1044
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1045
-  //#define X_IS_TMC26X
1046
-  //#define X2_IS_TMC26X
1047
-  //#define Y_IS_TMC26X
1048
-  //#define Y2_IS_TMC26X
1049
-  //#define Z_IS_TMC26X
1050
-  //#define Z2_IS_TMC26X
1051
-  //#define E0_IS_TMC26X
1052
-  //#define E1_IS_TMC26X
1053
-  //#define E2_IS_TMC26X
1054
-  //#define E3_IS_TMC26X
1055
-  //#define E4_IS_TMC26X
1050
+#if HAS_DRIVER(TMC26X)
1056 1051
 
1057 1052
   #define X_MAX_CURRENT     1000 // in mA
1058 1053
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1098,62 +1093,29 @@
1098 1093
   #define E4_SENSE_RESISTOR   91
1099 1094
   #define E4_MICROSTEPS       16
1100 1095
 
1101
-#endif
1096
+#endif // TMC26X
1102 1097
 
1103 1098
 // @section tmc_smart
1104 1099
 
1105 1100
 /**
1106
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1107
- *
1108
- * You'll also need the TMC2130Stepper Arduino library
1109
- * (https://github.com/teemuatlut/TMC2130Stepper).
1110
- *
1111 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1112 1102
  * the hardware SPI interface on your board and define the required CS pins
1113 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1114 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1115
- */
1116
-//#define HAVE_TMC2130
1117
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1118
-  //#define X_IS_TMC2130
1119
-  //#define X2_IS_TMC2130
1120
-  //#define Y_IS_TMC2130
1121
-  //#define Y2_IS_TMC2130
1122
-  //#define Z_IS_TMC2130
1123
-  //#define Z2_IS_TMC2130
1124
-  //#define E0_IS_TMC2130
1125
-  //#define E1_IS_TMC2130
1126
-  //#define E2_IS_TMC2130
1127
-  //#define E3_IS_TMC2130
1128
-  //#define E4_IS_TMC2130
1129
-#endif
1130
-
1131
-/**
1132
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1133
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1134 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1135 1112
  * to PDN_UART without a resistor.
1136 1113
  * The drivers can also be used with hardware serial.
1137 1114
  *
1138
- * You'll also need the TMC2208Stepper Arduino library
1139
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1140 1117
  */
1141
-//#define HAVE_TMC2208
1142
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1143
-  //#define X_IS_TMC2208
1144
-  //#define X2_IS_TMC2208
1145
-  //#define Y_IS_TMC2208
1146
-  //#define Y2_IS_TMC2208
1147
-  //#define Z_IS_TMC2208
1148
-  //#define Z2_IS_TMC2208
1149
-  //#define E0_IS_TMC2208
1150
-  //#define E1_IS_TMC2208
1151
-  //#define E2_IS_TMC2208
1152
-  //#define E3_IS_TMC2208
1153
-  //#define E4_IS_TMC2208
1154
-#endif
1155
-
1156
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1157 1119
 
1158 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1159 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1308,25 +1270,12 @@
1308 1270
 // @section L6470
1309 1271
 
1310 1272
 /**
1311
- * Enable this section if you have L6470 motor drivers.
1312
- * You need to import the L6470 library into the Arduino IDE for this.
1313
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1314 1277
  */
1315
-
1316
-//#define HAVE_L6470DRIVER
1317
-#if ENABLED(HAVE_L6470DRIVER)
1318
-
1319
-  //#define X_IS_L6470
1320
-  //#define X2_IS_L6470
1321
-  //#define Y_IS_L6470
1322
-  //#define Y2_IS_L6470
1323
-  //#define Z_IS_L6470
1324
-  //#define Z2_IS_L6470
1325
-  //#define E0_IS_L6470
1326
-  //#define E1_IS_L6470
1327
-  //#define E2_IS_L6470
1328
-  //#define E3_IS_L6470
1329
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1330 1279
 
1331 1280
   #define X_MICROSTEPS      16 // number of microsteps
1332 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1372,7 +1321,7 @@
1372 1321
   #define E4_OVERCURRENT  2000
1373 1322
   #define E4_STALLCURRENT 1500
1374 1323
 
1375
-#endif
1324
+#endif // L6470
1376 1325
 
1377 1326
 /**
1378 1327
  * TWI/I2C BUS

+ 37
- 88
Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h View File

@@ -845,15 +845,17 @@
845 845
 
846 846
 /**
847 847
  * Minimum delay after setting the stepper DIR (in ns)
848
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
849
- *   20 : Minimum for TMC2xxx drivers
850
- *  200 : Minimum for A4988 drivers
851
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
852
- *  650 : Minimum for DRV8825 drivers
853
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
854
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
848
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
849
+ *    20 : Minimum for TMC2xxx drivers
850
+ *   200 : Minimum for A4988 drivers
851
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
852
+ *   650 : Minimum for DRV8825 drivers
853
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
854
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
855
+ *
856
+ * Override the default value based on the driver type set in Configuration.h.
855 857
  */
856
-#define MINIMUM_STEPPER_DIR_DELAY 0
858
+//#define MINIMUM_STEPPER_DIR_DELAY 650
857 859
 
858 860
 /**
859 861
  * Minimum stepper driver pulse width (in µs)
@@ -863,8 +865,10 @@
863 865
  *   2 : Minimum for DRV8825 stepper drivers
864 866
  *   3 : Minimum for TB6600 stepper drivers
865 867
  *  30 : Minimum for TB6560 stepper drivers
868
+ *
869
+ * Override the default value based on the driver type set in Configuration.h.
866 870
  */
867
-#define MINIMUM_STEPPER_PULSE 4
871
+//#define MINIMUM_STEPPER_PULSE 2
868 872
 
869 873
 /**
870 874
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -875,8 +879,10 @@
875 879
  *  150000 : Maximum for TB6600 stepper driver
876 880
  *  130000 : Maximum for LV8729 stepper driver
877 881
  *   15000 : Maximum for TB6560 stepper driver
882
+ *
883
+ * Override the default value based on the driver type set in Configuration.h.
878 884
  */
879
-#define MAXIMUM_STEPPER_RATE 250000
885
+//#define MAXIMUM_STEPPER_RATE 250000
880 886
 
881 887
 // @section temperature
882 888
 
@@ -1044,23 +1050,12 @@
1044 1050
 // @section tmc
1045 1051
 
1046 1052
 /**
1047
- * Enable this section if you have TMC26X motor drivers.
1048
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1049
- * (https://github.com/trinamic/TMC26XStepper.git)
1053
+ * TMC26X Stepper Driver options
1054
+ *
1055
+ * The TMC26XStepper library is required for this stepper driver.
1056
+ * https://github.com/trinamic/TMC26XStepper
1050 1057
  */
1051
-//#define HAVE_TMC26X
1052
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1053
-  //#define X_IS_TMC26X
1054
-  //#define X2_IS_TMC26X
1055
-  //#define Y_IS_TMC26X
1056
-  //#define Y2_IS_TMC26X
1057
-  //#define Z_IS_TMC26X
1058
-  //#define Z2_IS_TMC26X
1059
-  //#define E0_IS_TMC26X
1060
-  //#define E1_IS_TMC26X
1061
-  //#define E2_IS_TMC26X
1062
-  //#define E3_IS_TMC26X
1063
-  //#define E4_IS_TMC26X
1058
+#if HAS_DRIVER(TMC26X)
1064 1059
 
1065 1060
   #define X_MAX_CURRENT     1000 // in mA
1066 1061
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1106,62 +1101,29 @@
1106 1101
   #define E4_SENSE_RESISTOR   91
1107 1102
   #define E4_MICROSTEPS       16
1108 1103
 
1109
-#endif
1104
+#endif // TMC26X
1110 1105
 
1111 1106
 // @section tmc_smart
1112 1107
 
1113 1108
 /**
1114
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1115
- *
1116
- * You'll also need the TMC2130Stepper Arduino library
1117
- * (https://github.com/teemuatlut/TMC2130Stepper).
1118
- *
1119 1109
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1120 1110
  * the hardware SPI interface on your board and define the required CS pins
1121 1111
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1122 1112
  * You may also use software SPI if you wish to use general purpose IO pins.
1123
- */
1124
-//#define HAVE_TMC2130
1125
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1126
-  //#define X_IS_TMC2130
1127
-  //#define X2_IS_TMC2130
1128
-  //#define Y_IS_TMC2130
1129
-  //#define Y2_IS_TMC2130
1130
-  //#define Z_IS_TMC2130
1131
-  //#define Z2_IS_TMC2130
1132
-  //#define E0_IS_TMC2130
1133
-  //#define E1_IS_TMC2130
1134
-  //#define E2_IS_TMC2130
1135
-  //#define E3_IS_TMC2130
1136
-  //#define E4_IS_TMC2130
1137
-#endif
1138
-
1139
-/**
1140
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1141
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1113
+ *
1114
+ * The TMC2130Stepper library is required for this stepper driver.
1115
+ * https://github.com/teemuatlut/TMC2130Stepper
1116
+ *
1117
+ * To use TMC2208 stepper UART-configurable stepper drivers
1118
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1142 1119
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1143 1120
  * to PDN_UART without a resistor.
1144 1121
  * The drivers can also be used with hardware serial.
1145 1122
  *
1146
- * You'll also need the TMC2208Stepper Arduino library
1147
- * (https://github.com/teemuatlut/TMC2208Stepper).
1123
+ * The TMC2208Stepper library is required for this stepper driver.
1124
+ * https://github.com/teemuatlut/TMC2208Stepper
1148 1125
  */
1149
-//#define HAVE_TMC2208
1150
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1151
-  //#define X_IS_TMC2208
1152
-  //#define X2_IS_TMC2208
1153
-  //#define Y_IS_TMC2208
1154
-  //#define Y2_IS_TMC2208
1155
-  //#define Z_IS_TMC2208
1156
-  //#define Z2_IS_TMC2208
1157
-  //#define E0_IS_TMC2208
1158
-  //#define E1_IS_TMC2208
1159
-  //#define E2_IS_TMC2208
1160
-  //#define E3_IS_TMC2208
1161
-  //#define E4_IS_TMC2208
1162
-#endif
1163
-
1164
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1126
+#if HAS_TRINAMIC
1165 1127
 
1166 1128
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1167 1129
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1316,25 +1278,12 @@
1316 1278
 // @section L6470
1317 1279
 
1318 1280
 /**
1319
- * Enable this section if you have L6470 motor drivers.
1320
- * You need to import the L6470 library into the Arduino IDE for this.
1321
- * (https://github.com/ameyer/Arduino-L6470)
1281
+ * L6470 Stepper Driver options
1282
+ *
1283
+ * The Arduino-L6470 library is required for this stepper driver.
1284
+ * https://github.com/ameyer/Arduino-L6470
1322 1285
  */
1323
-
1324
-//#define HAVE_L6470DRIVER
1325
-#if ENABLED(HAVE_L6470DRIVER)
1326
-
1327
-  //#define X_IS_L6470
1328
-  //#define X2_IS_L6470
1329
-  //#define Y_IS_L6470
1330
-  //#define Y2_IS_L6470
1331
-  //#define Z_IS_L6470
1332
-  //#define Z2_IS_L6470
1333
-  //#define E0_IS_L6470
1334
-  //#define E1_IS_L6470
1335
-  //#define E2_IS_L6470
1336
-  //#define E3_IS_L6470
1337
-  //#define E4_IS_L6470
1286
+#if HAS_DRIVER(L6470)
1338 1287
 
1339 1288
   #define X_MICROSTEPS      16 // number of microsteps
1340 1289
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1380,7 +1329,7 @@
1380 1329
   #define E4_OVERCURRENT  2000
1381 1330
   #define E4_STALLCURRENT 1500
1382 1331
 
1383
-#endif
1332
+#endif // L6470
1384 1333
 
1385 1334
 /**
1386 1335
  * TWI/I2C BUS

+ 23
- 0
Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h View File

@@ -551,6 +551,29 @@
551 551
 #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
552 552
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
553 553
 
554
+/**
555
+ * Specify Stepper Driver types
556
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
557
+ * Stepper timing options can be overridden in Configuration_adv.h
558
+ *
559
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
560
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
561
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
562
+ *          TMC5130, TMC5130_STANDALONE
563
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
564
+ */
565
+#define X_DRIVER_TYPE  A4988
566
+#define Y_DRIVER_TYPE  A4988
567
+#define Z_DRIVER_TYPE  A4988
568
+#define X2_DRIVER_TYPE A4988
569
+#define Y2_DRIVER_TYPE A4988
570
+#define Z2_DRIVER_TYPE A4988
571
+#define E0_DRIVER_TYPE A4988
572
+#define E1_DRIVER_TYPE A4988
573
+#define E2_DRIVER_TYPE A4988
574
+#define E3_DRIVER_TYPE A4988
575
+#define E4_DRIVER_TYPE A4988
576
+
554 577
 // Enable this feature if all enabled endstop pins are interrupt-capable.
555 578
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
556 579
 //#define ENDSTOP_INTERRUPTS_FEATURE

+ 37
- 88
Marlin/src/config/examples/RigidBot/Configuration_adv.h View File

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 2
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 250000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,23 +1042,12 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-//#define HAVE_TMC26X
1044
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1045
-  //#define X_IS_TMC26X
1046
-  //#define X2_IS_TMC26X
1047
-  //#define Y_IS_TMC26X
1048
-  //#define Y2_IS_TMC26X
1049
-  //#define Z_IS_TMC26X
1050
-  //#define Z2_IS_TMC26X
1051
-  //#define E0_IS_TMC26X
1052
-  //#define E1_IS_TMC26X
1053
-  //#define E2_IS_TMC26X
1054
-  //#define E3_IS_TMC26X
1055
-  //#define E4_IS_TMC26X
1050
+#if HAS_DRIVER(TMC26X)
1056 1051
 
1057 1052
   #define X_MAX_CURRENT     1000 // in mA
1058 1053
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1098,62 +1093,29 @@
1098 1093
   #define E4_SENSE_RESISTOR   91
1099 1094
   #define E4_MICROSTEPS       16
1100 1095
 
1101
-#endif
1096
+#endif // TMC26X
1102 1097
 
1103 1098
 // @section tmc_smart
1104 1099
 
1105 1100
 /**
1106
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1107
- *
1108
- * You'll also need the TMC2130Stepper Arduino library
1109
- * (https://github.com/teemuatlut/TMC2130Stepper).
1110
- *
1111 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1112 1102
  * the hardware SPI interface on your board and define the required CS pins
1113 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1114 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1115
- */
1116
-//#define HAVE_TMC2130
1117
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1118
-  //#define X_IS_TMC2130
1119
-  //#define X2_IS_TMC2130
1120
-  //#define Y_IS_TMC2130
1121
-  //#define Y2_IS_TMC2130
1122
-  //#define Z_IS_TMC2130
1123
-  //#define Z2_IS_TMC2130
1124
-  //#define E0_IS_TMC2130
1125
-  //#define E1_IS_TMC2130
1126
-  //#define E2_IS_TMC2130
1127
-  //#define E3_IS_TMC2130
1128
-  //#define E4_IS_TMC2130
1129
-#endif
1130
-
1131
-/**
1132
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1133
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1134 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1135 1112
  * to PDN_UART without a resistor.
1136 1113
  * The drivers can also be used with hardware serial.
1137 1114
  *
1138
- * You'll also need the TMC2208Stepper Arduino library
1139
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1140 1117
  */
1141
-//#define HAVE_TMC2208
1142
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1143
-  //#define X_IS_TMC2208
1144
-  //#define X2_IS_TMC2208
1145
-  //#define Y_IS_TMC2208
1146
-  //#define Y2_IS_TMC2208
1147
-  //#define Z_IS_TMC2208
1148
-  //#define Z2_IS_TMC2208
1149
-  //#define E0_IS_TMC2208
1150
-  //#define E1_IS_TMC2208
1151
-  //#define E2_IS_TMC2208
1152
-  //#define E3_IS_TMC2208
1153
-  //#define E4_IS_TMC2208
1154
-#endif
1155
-
1156
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1157 1119
 
1158 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1159 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1308,25 +1270,12 @@
1308 1270
 // @section L6470
1309 1271
 
1310 1272
 /**
1311
- * Enable this section if you have L6470 motor drivers.
1312
- * You need to import the L6470 library into the Arduino IDE for this.
1313
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1314 1277
  */
1315
-
1316
-//#define HAVE_L6470DRIVER
1317
-#if ENABLED(HAVE_L6470DRIVER)
1318
-
1319
-  //#define X_IS_L6470
1320
-  //#define X2_IS_L6470
1321
-  //#define Y_IS_L6470
1322
-  //#define Y2_IS_L6470
1323
-  //#define Z_IS_L6470
1324
-  //#define Z2_IS_L6470
1325
-  //#define E0_IS_L6470
1326
-  //#define E1_IS_L6470
1327
-  //#define E2_IS_L6470
1328
-  //#define E3_IS_L6470
1329
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1330 1279
 
1331 1280
   #define X_MICROSTEPS      16 // number of microsteps
1332 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1372,7 +1321,7 @@
1372 1321
   #define E4_OVERCURRENT  2000
1373 1322
   #define E4_STALLCURRENT 1500
1374 1323
 
1375
-#endif
1324
+#endif // L6470
1376 1325
 
1377 1326
 /**
1378 1327
  * TWI/I2C BUS

+ 37
- 88
Marlin/src/config/examples/SCARA/Configuration_adv.h View File

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 2
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 250000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,23 +1042,12 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-//#define HAVE_TMC26X
1044
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1045
-  //#define X_IS_TMC26X
1046
-  //#define X2_IS_TMC26X
1047
-  //#define Y_IS_TMC26X
1048
-  //#define Y2_IS_TMC26X
1049
-  //#define Z_IS_TMC26X
1050
-  //#define Z2_IS_TMC26X
1051
-  //#define E0_IS_TMC26X
1052
-  //#define E1_IS_TMC26X
1053
-  //#define E2_IS_TMC26X
1054
-  //#define E3_IS_TMC26X
1055
-  //#define E4_IS_TMC26X
1050
+#if HAS_DRIVER(TMC26X)
1056 1051
 
1057 1052
   #define X_MAX_CURRENT     1000 // in mA
1058 1053
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1098,62 +1093,29 @@
1098 1093
   #define E4_SENSE_RESISTOR   91
1099 1094
   #define E4_MICROSTEPS       16
1100 1095
 
1101
-#endif
1096
+#endif // TMC26X
1102 1097
 
1103 1098
 // @section tmc_smart
1104 1099
 
1105 1100
 /**
1106
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1107
- *
1108
- * You'll also need the TMC2130Stepper Arduino library
1109
- * (https://github.com/teemuatlut/TMC2130Stepper).
1110
- *
1111 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1112 1102
  * the hardware SPI interface on your board and define the required CS pins
1113 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1114 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1115
- */
1116
-//#define HAVE_TMC2130
1117
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1118
-  //#define X_IS_TMC2130
1119
-  //#define X2_IS_TMC2130
1120
-  //#define Y_IS_TMC2130
1121
-  //#define Y2_IS_TMC2130
1122
-  //#define Z_IS_TMC2130
1123
-  //#define Z2_IS_TMC2130
1124
-  //#define E0_IS_TMC2130
1125
-  //#define E1_IS_TMC2130
1126
-  //#define E2_IS_TMC2130
1127
-  //#define E3_IS_TMC2130
1128
-  //#define E4_IS_TMC2130
1129
-#endif
1130
-
1131
-/**
1132
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1133
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1134 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1135 1112
  * to PDN_UART without a resistor.
1136 1113
  * The drivers can also be used with hardware serial.
1137 1114
  *
1138
- * You'll also need the TMC2208Stepper Arduino library
1139
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1140 1117
  */
1141
-//#define HAVE_TMC2208
1142
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1143
-  //#define X_IS_TMC2208
1144
-  //#define X2_IS_TMC2208
1145
-  //#define Y_IS_TMC2208
1146
-  //#define Y2_IS_TMC2208
1147
-  //#define Z_IS_TMC2208
1148
-  //#define Z2_IS_TMC2208
1149
-  //#define E0_IS_TMC2208
1150
-  //#define E1_IS_TMC2208
1151
-  //#define E2_IS_TMC2208
1152
-  //#define E3_IS_TMC2208
1153
-  //#define E4_IS_TMC2208
1154
-#endif
1155
-
1156
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1157 1119
 
1158 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1159 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1308,25 +1270,12 @@
1308 1270
 // @section L6470
1309 1271
 
1310 1272
 /**
1311
- * Enable this section if you have L6470 motor drivers.
1312
- * You need to import the L6470 library into the Arduino IDE for this.
1313
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1314 1277
  */
1315
-
1316
-//#define HAVE_L6470DRIVER
1317
-#if ENABLED(HAVE_L6470DRIVER)
1318
-
1319
-  //#define X_IS_L6470
1320
-  //#define X2_IS_L6470
1321
-  //#define Y_IS_L6470
1322
-  //#define Y2_IS_L6470
1323
-  //#define Z_IS_L6470
1324
-  //#define Z2_IS_L6470
1325
-  //#define E0_IS_L6470
1326
-  //#define E1_IS_L6470
1327
-  //#define E2_IS_L6470
1328
-  //#define E3_IS_L6470
1329
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1330 1279
 
1331 1280
   #define X_MICROSTEPS      16 // number of microsteps
1332 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1372,7 +1321,7 @@
1372 1321
   #define E4_OVERCURRENT  2000
1373 1322
   #define E4_STALLCURRENT 1500
1374 1323
 
1375
-#endif
1324
+#endif // L6470
1376 1325
 
1377 1326
 /**
1378 1327
  * TWI/I2C BUS

+ 23
- 0
Marlin/src/config/examples/STM32F10/Configuration.h View File

@@ -553,6 +553,29 @@
553 553
 #define Z_MAX_ENDSTOP_INVERTING true  // set to true to invert the logic of the endstop.
554 554
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
555 555
 
556
+/**
557
+ * Specify Stepper Driver types
558
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
559
+ * Stepper timing options can be overridden in Configuration_adv.h
560
+ *
561
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
562
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
563
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
564
+ *          TMC5130, TMC5130_STANDALONE
565
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
566
+ */
567
+#define X_DRIVER_TYPE  A4988
568
+#define Y_DRIVER_TYPE  A4988
569
+#define Z_DRIVER_TYPE  A4988
570
+#define X2_DRIVER_TYPE A4988
571
+#define Y2_DRIVER_TYPE A4988
572
+#define Z2_DRIVER_TYPE A4988
573
+#define E0_DRIVER_TYPE A4988
574
+#define E1_DRIVER_TYPE A4988
575
+#define E2_DRIVER_TYPE A4988
576
+#define E3_DRIVER_TYPE A4988
577
+#define E4_DRIVER_TYPE A4988
578
+
556 579
 // Enable this feature if all enabled endstop pins are interrupt-capable.
557 580
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
558 581
 //#define ENDSTOP_INTERRUPTS_FEATURE

+ 23
- 0
Marlin/src/config/examples/STM32F4/Configuration.h View File

@@ -551,6 +551,29 @@
551 551
 #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
552 552
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
553 553
 
554
+/**
555
+ * Specify Stepper Driver types
556
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
557
+ * Stepper timing options can be overridden in Configuration_adv.h
558
+ *
559
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
560
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
561
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
562
+ *          TMC5130, TMC5130_STANDALONE
563
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
564
+ */
565
+#define X_DRIVER_TYPE  A4988
566
+#define Y_DRIVER_TYPE  A4988
567
+#define Z_DRIVER_TYPE  A4988
568
+#define X2_DRIVER_TYPE A4988
569
+#define Y2_DRIVER_TYPE A4988
570
+#define Z2_DRIVER_TYPE A4988
571
+#define E0_DRIVER_TYPE A4988
572
+#define E1_DRIVER_TYPE A4988
573
+#define E2_DRIVER_TYPE A4988
574
+#define E3_DRIVER_TYPE A4988
575
+#define E4_DRIVER_TYPE A4988
576
+
554 577
 // Enable this feature if all enabled endstop pins are interrupt-capable.
555 578
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
556 579
 //#define ENDSTOP_INTERRUPTS_FEATURE

+ 23
- 0
Marlin/src/config/examples/Sanguinololu/Configuration.h View File

@@ -551,6 +551,29 @@
551 551
 #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
552 552
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
553 553
 
554
+/**
555
+ * Specify Stepper Driver types
556
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
557
+ * Stepper timing options can be overridden in Configuration_adv.h
558
+ *
559
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
560
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
561
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
562
+ *          TMC5130, TMC5130_STANDALONE
563
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
564
+ */
565
+#define X_DRIVER_TYPE  A4988
566
+#define Y_DRIVER_TYPE  A4988
567
+#define Z_DRIVER_TYPE  A4988
568
+#define X2_DRIVER_TYPE A4988
569
+#define Y2_DRIVER_TYPE A4988
570
+#define Z2_DRIVER_TYPE A4988
571
+#define E0_DRIVER_TYPE A4988
572
+#define E1_DRIVER_TYPE A4988
573
+#define E2_DRIVER_TYPE A4988
574
+#define E3_DRIVER_TYPE A4988
575
+#define E4_DRIVER_TYPE A4988
576
+
554 577
 // Enable this feature if all enabled endstop pins are interrupt-capable.
555 578
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
556 579
 //#define ENDSTOP_INTERRUPTS_FEATURE

+ 37
- 88
Marlin/src/config/examples/Sanguinololu/Configuration_adv.h View File

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 2
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 250000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,23 +1042,12 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-//#define HAVE_TMC26X
1044
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1045
-  //#define X_IS_TMC26X
1046
-  //#define X2_IS_TMC26X
1047
-  //#define Y_IS_TMC26X
1048
-  //#define Y2_IS_TMC26X
1049
-  //#define Z_IS_TMC26X
1050
-  //#define Z2_IS_TMC26X
1051
-  //#define E0_IS_TMC26X
1052
-  //#define E1_IS_TMC26X
1053
-  //#define E2_IS_TMC26X
1054
-  //#define E3_IS_TMC26X
1055
-  //#define E4_IS_TMC26X
1050
+#if HAS_DRIVER(TMC26X)
1056 1051
 
1057 1052
   #define X_MAX_CURRENT     1000 // in mA
1058 1053
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1098,62 +1093,29 @@
1098 1093
   #define E4_SENSE_RESISTOR   91
1099 1094
   #define E4_MICROSTEPS       16
1100 1095
 
1101
-#endif
1096
+#endif // TMC26X
1102 1097
 
1103 1098
 // @section tmc_smart
1104 1099
 
1105 1100
 /**
1106
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1107
- *
1108
- * You'll also need the TMC2130Stepper Arduino library
1109
- * (https://github.com/teemuatlut/TMC2130Stepper).
1110
- *
1111 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1112 1102
  * the hardware SPI interface on your board and define the required CS pins
1113 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1114 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1115
- */
1116
-//#define HAVE_TMC2130
1117
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1118
-  //#define X_IS_TMC2130
1119
-  //#define X2_IS_TMC2130
1120
-  //#define Y_IS_TMC2130
1121
-  //#define Y2_IS_TMC2130
1122
-  //#define Z_IS_TMC2130
1123
-  //#define Z2_IS_TMC2130
1124
-  //#define E0_IS_TMC2130
1125
-  //#define E1_IS_TMC2130
1126
-  //#define E2_IS_TMC2130
1127
-  //#define E3_IS_TMC2130
1128
-  //#define E4_IS_TMC2130
1129
-#endif
1130
-
1131
-/**
1132
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1133
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1134 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1135 1112
  * to PDN_UART without a resistor.
1136 1113
  * The drivers can also be used with hardware serial.
1137 1114
  *
1138
- * You'll also need the TMC2208Stepper Arduino library
1139
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1140 1117
  */
1141
-//#define HAVE_TMC2208
1142
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1143
-  //#define X_IS_TMC2208
1144
-  //#define X2_IS_TMC2208
1145
-  //#define Y_IS_TMC2208
1146
-  //#define Y2_IS_TMC2208
1147
-  //#define Z_IS_TMC2208
1148
-  //#define Z2_IS_TMC2208
1149
-  //#define E0_IS_TMC2208
1150
-  //#define E1_IS_TMC2208
1151
-  //#define E2_IS_TMC2208
1152
-  //#define E3_IS_TMC2208
1153
-  //#define E4_IS_TMC2208
1154
-#endif
1155
-
1156
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1157 1119
 
1158 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1159 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1308,25 +1270,12 @@
1308 1270
 // @section L6470
1309 1271
 
1310 1272
 /**
1311
- * Enable this section if you have L6470 motor drivers.
1312
- * You need to import the L6470 library into the Arduino IDE for this.
1313
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1314 1277
  */
1315
-
1316
-//#define HAVE_L6470DRIVER
1317
-#if ENABLED(HAVE_L6470DRIVER)
1318
-
1319
-  //#define X_IS_L6470
1320
-  //#define X2_IS_L6470
1321
-  //#define Y_IS_L6470
1322
-  //#define Y2_IS_L6470
1323
-  //#define Z_IS_L6470
1324
-  //#define Z2_IS_L6470
1325
-  //#define E0_IS_L6470
1326
-  //#define E1_IS_L6470
1327
-  //#define E2_IS_L6470
1328
-  //#define E3_IS_L6470
1329
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1330 1279
 
1331 1280
   #define X_MICROSTEPS      16 // number of microsteps
1332 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1372,7 +1321,7 @@
1372 1321
   #define E4_OVERCURRENT  2000
1373 1322
   #define E4_STALLCURRENT 1500
1374 1323
 
1375
-#endif
1324
+#endif // L6470
1376 1325
 
1377 1326
 /**
1378 1327
  * TWI/I2C BUS

+ 81
- 133
Marlin/src/config/examples/TheBorg/Configuration_adv.h View File

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 2
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 250000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,125 +1042,80 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-#define HAVE_TMC26X
1044
-
1045
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1046
-  #define X_IS_TMC26X
1047
-  //#define X2_IS_TMC26X
1048
-  #define Y_IS_TMC26X
1049
-  //#define Y2_IS_TMC26X
1050
-  #define Z_IS_TMC26X
1051
-  #define Z2_IS_TMC26X
1052
-  #define E0_IS_TMC26X
1053
-  //#define E1_IS_TMC26X
1054
-  //#define E2_IS_TMC26X
1055
-  //#define E3_IS_TMC26X
1056
-  //#define E4_IS_TMC26X
1057
-
1058
-  #define X_MAX_CURRENT     1200 // in mA
1059
-  #define X_SENSE_RESISTOR    50 // in mOhms
1060
-  #define X_MICROSTEPS        32 // number of microsteps
1061
-
1062
-  #define X2_MAX_CURRENT    1200
1063
-  #define X2_SENSE_RESISTOR   50
1064
-  #define X2_MICROSTEPS       32
1065
-
1066
-  #define Y_MAX_CURRENT     1200
1067
-  #define Y_SENSE_RESISTOR    50
1068
-  #define Y_MICROSTEPS        32
1069
-
1070
-  #define Y2_MAX_CURRENT    1200
1071
-  #define Y2_SENSE_RESISTOR   50
1072
-  #define Y2_MICROSTEPS       32
1073
-
1074
-  #define Z_MAX_CURRENT     1200
1075
-  #define Z_SENSE_RESISTOR    50
1076
-  #define Z_MICROSTEPS        32
1077
-
1078
-  #define Z2_MAX_CURRENT    1200
1079
-  #define Z2_SENSE_RESISTOR   50
1080
-  #define Z2_MICROSTEPS       32
1081
-
1082
-  #define E0_MAX_CURRENT    1200
1083
-  #define E0_SENSE_RESISTOR   50
1084
-  #define E0_MICROSTEPS       32
1085
-
1086
-  #define E1_MAX_CURRENT    1200
1087
-  #define E1_SENSE_RESISTOR   50
1088
-  #define E1_MICROSTEPS       32
1089
-
1090
-  #define E2_MAX_CURRENT    1200
1091
-  #define E2_SENSE_RESISTOR   50
1092
-  #define E2_MICROSTEPS       32
1093
-
1094
-  #define E3_MAX_CURRENT    1200
1095
-  #define E3_SENSE_RESISTOR   50
1096
-  #define E3_MICROSTEPS       32
1097
-
1098
-  #define E4_MAX_CURRENT    1200
1099
-  #define E4_SENSE_RESISTOR   50
1100
-  #define E4_MICROSTEPS       32
1050
+#if HAS_DRIVER(TMC26X)
1101 1051
 
1102
-#endif
1052
+  #define X_MAX_CURRENT     1000 // in mA
1053
+  #define X_SENSE_RESISTOR    91 // in mOhms
1054
+  #define X_MICROSTEPS        16 // number of microsteps
1055
+
1056
+  #define X2_MAX_CURRENT    1000
1057
+  #define X2_SENSE_RESISTOR   91
1058
+  #define X2_MICROSTEPS       16
1059
+
1060
+  #define Y_MAX_CURRENT     1000
1061
+  #define Y_SENSE_RESISTOR    91
1062
+  #define Y_MICROSTEPS        16
1063
+
1064
+  #define Y2_MAX_CURRENT    1000
1065
+  #define Y2_SENSE_RESISTOR   91
1066
+  #define Y2_MICROSTEPS       16
1067
+
1068
+  #define Z_MAX_CURRENT     1000
1069
+  #define Z_SENSE_RESISTOR    91
1070
+  #define Z_MICROSTEPS        16
1071
+
1072
+  #define Z2_MAX_CURRENT    1000
1073
+  #define Z2_SENSE_RESISTOR   91
1074
+  #define Z2_MICROSTEPS       16
1075
+
1076
+  #define E0_MAX_CURRENT    1000
1077
+  #define E0_SENSE_RESISTOR   91
1078
+  #define E0_MICROSTEPS       16
1079
+
1080
+  #define E1_MAX_CURRENT    1000
1081
+  #define E1_SENSE_RESISTOR   91
1082
+  #define E1_MICROSTEPS       16
1083
+
1084
+  #define E2_MAX_CURRENT    1000
1085
+  #define E2_SENSE_RESISTOR   91
1086
+  #define E2_MICROSTEPS       16
1087
+
1088
+  #define E3_MAX_CURRENT    1000
1089
+  #define E3_SENSE_RESISTOR   91
1090
+  #define E3_MICROSTEPS       16
1091
+
1092
+  #define E4_MAX_CURRENT    1000
1093
+  #define E4_SENSE_RESISTOR   91
1094
+  #define E4_MICROSTEPS       16
1095
+
1096
+#endif // TMC26X
1103 1097
 
1104 1098
 // @section tmc_smart
1105 1099
 
1106 1100
 /**
1107
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1108
- *
1109
- * You'll also need the TMC2130Stepper Arduino library
1110
- * (https://github.com/teemuatlut/TMC2130Stepper).
1111
- *
1112 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1113 1102
  * the hardware SPI interface on your board and define the required CS pins
1114 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1115 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1116
- */
1117
-//#define HAVE_TMC2130
1118
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1119
-  //#define X_IS_TMC2130
1120
-  //#define X2_IS_TMC2130
1121
-  //#define Y_IS_TMC2130
1122
-  //#define Y2_IS_TMC2130
1123
-  //#define Z_IS_TMC2130
1124
-  //#define Z2_IS_TMC2130
1125
-  //#define E0_IS_TMC2130
1126
-  //#define E1_IS_TMC2130
1127
-  //#define E2_IS_TMC2130
1128
-  //#define E3_IS_TMC2130
1129
-  //#define E4_IS_TMC2130
1130
-#endif
1131
-
1132
-/**
1133
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1134
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1135 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1136 1112
  * to PDN_UART without a resistor.
1137 1113
  * The drivers can also be used with hardware serial.
1138 1114
  *
1139
- * You'll also need the TMC2208Stepper Arduino library
1140
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1141 1117
  */
1142
-//#define HAVE_TMC2208
1143
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1144
-  //#define X_IS_TMC2208
1145
-  //#define X2_IS_TMC2208
1146
-  //#define Y_IS_TMC2208
1147
-  //#define Y2_IS_TMC2208
1148
-  //#define Z_IS_TMC2208
1149
-  //#define Z2_IS_TMC2208
1150
-  //#define E0_IS_TMC2208
1151
-  //#define E1_IS_TMC2208
1152
-  //#define E2_IS_TMC2208
1153
-  //#define E3_IS_TMC2208
1154
-  //#define E4_IS_TMC2208
1155
-#endif
1156
-
1157
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1158 1119
 
1159 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1160 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1309,25 +1270,12 @@
1309 1270
 // @section L6470
1310 1271
 
1311 1272
 /**
1312
- * Enable this section if you have L6470 motor drivers.
1313
- * You need to import the L6470 library into the Arduino IDE for this.
1314
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1315 1277
  */
1316
-
1317
-//#define HAVE_L6470DRIVER
1318
-#if ENABLED(HAVE_L6470DRIVER)
1319
-
1320
-  //#define X_IS_L6470
1321
-  //#define X2_IS_L6470
1322
-  //#define Y_IS_L6470
1323
-  //#define Y2_IS_L6470
1324
-  //#define Z_IS_L6470
1325
-  //#define Z2_IS_L6470
1326
-  //#define E0_IS_L6470
1327
-  //#define E1_IS_L6470
1328
-  //#define E2_IS_L6470
1329
-  //#define E3_IS_L6470
1330
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1331 1279
 
1332 1280
   #define X_MICROSTEPS      16 // number of microsteps
1333 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1373,7 +1321,7 @@
1373 1321
   #define E4_OVERCURRENT  2000
1374 1322
   #define E4_STALLCURRENT 1500
1375 1323
 
1376
-#endif
1324
+#endif // L6470
1377 1325
 
1378 1326
 /**
1379 1327
  * TWI/I2C BUS

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

@@ -602,9 +602,32 @@
602 602
 #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
603 603
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
604 604
 
605
+/**
606
+ * Specify Stepper Driver types
607
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
608
+ * Stepper timing options can be overridden in Configuration_adv.h
609
+ *
610
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
611
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
612
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
613
+ *          TMC5130, TMC5130_STANDALONE
614
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
615
+ */
616
+#define X_DRIVER_TYPE  A4988
617
+#define Y_DRIVER_TYPE  A4988
618
+#define Z_DRIVER_TYPE  A4988
619
+#define X2_DRIVER_TYPE A4988
620
+#define Y2_DRIVER_TYPE A4988
621
+#define Z2_DRIVER_TYPE A4988
622
+#define E0_DRIVER_TYPE A4988
623
+#define E1_DRIVER_TYPE A4988
624
+#define E2_DRIVER_TYPE A4988
625
+#define E3_DRIVER_TYPE A4988
626
+#define E4_DRIVER_TYPE A4988
627
+
605 628
 // Enable this feature if all enabled endstop pins are interrupt-capable.
606 629
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
607
-#define ENDSTOP_INTERRUPTS_FEATURE
630
+//#define ENDSTOP_INTERRUPTS_FEATURE
608 631
 
609 632
 /**
610 633
  * Endstop Noise Filter

+ 37
- 88
Marlin/src/config/examples/TinyBoy2/Configuration_adv.h View File

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 2
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 250000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,23 +1042,12 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-//#define HAVE_TMC26X
1044
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1045
-  //#define X_IS_TMC26X
1046
-  //#define X2_IS_TMC26X
1047
-  //#define Y_IS_TMC26X
1048
-  //#define Y2_IS_TMC26X
1049
-  //#define Z_IS_TMC26X
1050
-  //#define Z2_IS_TMC26X
1051
-  //#define E0_IS_TMC26X
1052
-  //#define E1_IS_TMC26X
1053
-  //#define E2_IS_TMC26X
1054
-  //#define E3_IS_TMC26X
1055
-  //#define E4_IS_TMC26X
1050
+#if HAS_DRIVER(TMC26X)
1056 1051
 
1057 1052
   #define X_MAX_CURRENT     1000 // in mA
1058 1053
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1098,62 +1093,29 @@
1098 1093
   #define E4_SENSE_RESISTOR   91
1099 1094
   #define E4_MICROSTEPS       16
1100 1095
 
1101
-#endif
1096
+#endif // TMC26X
1102 1097
 
1103 1098
 // @section tmc_smart
1104 1099
 
1105 1100
 /**
1106
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1107
- *
1108
- * You'll also need the TMC2130Stepper Arduino library
1109
- * (https://github.com/teemuatlut/TMC2130Stepper).
1110
- *
1111 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1112 1102
  * the hardware SPI interface on your board and define the required CS pins
1113 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1114 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1115
- */
1116
-//#define HAVE_TMC2130
1117
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1118
-  //#define X_IS_TMC2130
1119
-  //#define X2_IS_TMC2130
1120
-  //#define Y_IS_TMC2130
1121
-  //#define Y2_IS_TMC2130
1122
-  //#define Z_IS_TMC2130
1123
-  //#define Z2_IS_TMC2130
1124
-  //#define E0_IS_TMC2130
1125
-  //#define E1_IS_TMC2130
1126
-  //#define E2_IS_TMC2130
1127
-  //#define E3_IS_TMC2130
1128
-  //#define E4_IS_TMC2130
1129
-#endif
1130
-
1131
-/**
1132
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1133
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1134 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1135 1112
  * to PDN_UART without a resistor.
1136 1113
  * The drivers can also be used with hardware serial.
1137 1114
  *
1138
- * You'll also need the TMC2208Stepper Arduino library
1139
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1140 1117
  */
1141
-//#define HAVE_TMC2208
1142
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1143
-  //#define X_IS_TMC2208
1144
-  //#define X2_IS_TMC2208
1145
-  //#define Y_IS_TMC2208
1146
-  //#define Y2_IS_TMC2208
1147
-  //#define Z_IS_TMC2208
1148
-  //#define Z2_IS_TMC2208
1149
-  //#define E0_IS_TMC2208
1150
-  //#define E1_IS_TMC2208
1151
-  //#define E2_IS_TMC2208
1152
-  //#define E3_IS_TMC2208
1153
-  //#define E4_IS_TMC2208
1154
-#endif
1155
-
1156
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1157 1119
 
1158 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1159 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1308,25 +1270,12 @@
1308 1270
 // @section L6470
1309 1271
 
1310 1272
 /**
1311
- * Enable this section if you have L6470 motor drivers.
1312
- * You need to import the L6470 library into the Arduino IDE for this.
1313
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1314 1277
  */
1315
-
1316
-//#define HAVE_L6470DRIVER
1317
-#if ENABLED(HAVE_L6470DRIVER)
1318
-
1319
-  //#define X_IS_L6470
1320
-  //#define X2_IS_L6470
1321
-  //#define Y_IS_L6470
1322
-  //#define Y2_IS_L6470
1323
-  //#define Z_IS_L6470
1324
-  //#define Z2_IS_L6470
1325
-  //#define E0_IS_L6470
1326
-  //#define E1_IS_L6470
1327
-  //#define E2_IS_L6470
1328
-  //#define E3_IS_L6470
1329
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1330 1279
 
1331 1280
   #define X_MICROSTEPS      16 // number of microsteps
1332 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1372,7 +1321,7 @@
1372 1321
   #define E4_OVERCURRENT  2000
1373 1322
   #define E4_STALLCURRENT 1500
1374 1323
 
1375
-#endif
1324
+#endif // L6470
1376 1325
 
1377 1326
 /**
1378 1327
  * TWI/I2C BUS

+ 23
- 0
Marlin/src/config/examples/Tronxy/X1/Configuration.h View File

@@ -551,6 +551,29 @@
551 551
 #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
552 552
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
553 553
 
554
+/**
555
+ * Specify Stepper Driver types
556
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
557
+ * Stepper timing options can be overridden in Configuration_adv.h
558
+ *
559
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
560
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
561
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
562
+ *          TMC5130, TMC5130_STANDALONE
563
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
564
+ */
565
+#define X_DRIVER_TYPE  A4988
566
+#define Y_DRIVER_TYPE  A4988
567
+#define Z_DRIVER_TYPE  A4988
568
+#define X2_DRIVER_TYPE A4988
569
+#define Y2_DRIVER_TYPE A4988
570
+#define Z2_DRIVER_TYPE A4988
571
+#define E0_DRIVER_TYPE A4988
572
+#define E1_DRIVER_TYPE A4988
573
+#define E2_DRIVER_TYPE A4988
574
+#define E3_DRIVER_TYPE A4988
575
+#define E4_DRIVER_TYPE A4988
576
+
554 577
 // Enable this feature if all enabled endstop pins are interrupt-capable.
555 578
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
556 579
 //#define ENDSTOP_INTERRUPTS_FEATURE

+ 37
- 88
Marlin/src/config/examples/Tronxy/X3A/Configuration_adv.h View File

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 2
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 250000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,23 +1042,12 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-//#define HAVE_TMC26X
1044
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1045
-  //#define X_IS_TMC26X
1046
-  //#define X2_IS_TMC26X
1047
-  //#define Y_IS_TMC26X
1048
-  //#define Y2_IS_TMC26X
1049
-  //#define Z_IS_TMC26X
1050
-  //#define Z2_IS_TMC26X
1051
-  //#define E0_IS_TMC26X
1052
-  //#define E1_IS_TMC26X
1053
-  //#define E2_IS_TMC26X
1054
-  //#define E3_IS_TMC26X
1055
-  //#define E4_IS_TMC26X
1050
+#if HAS_DRIVER(TMC26X)
1056 1051
 
1057 1052
   #define X_MAX_CURRENT     1000 // in mA
1058 1053
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1098,62 +1093,29 @@
1098 1093
   #define E4_SENSE_RESISTOR   91
1099 1094
   #define E4_MICROSTEPS       16
1100 1095
 
1101
-#endif
1096
+#endif // TMC26X
1102 1097
 
1103 1098
 // @section tmc_smart
1104 1099
 
1105 1100
 /**
1106
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1107
- *
1108
- * You'll also need the TMC2130Stepper Arduino library
1109
- * (https://github.com/teemuatlut/TMC2130Stepper).
1110
- *
1111 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1112 1102
  * the hardware SPI interface on your board and define the required CS pins
1113 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1114 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1115
- */
1116
-//#define HAVE_TMC2130
1117
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1118
-  //#define X_IS_TMC2130
1119
-  //#define X2_IS_TMC2130
1120
-  //#define Y_IS_TMC2130
1121
-  //#define Y2_IS_TMC2130
1122
-  //#define Z_IS_TMC2130
1123
-  //#define Z2_IS_TMC2130
1124
-  //#define E0_IS_TMC2130
1125
-  //#define E1_IS_TMC2130
1126
-  //#define E2_IS_TMC2130
1127
-  //#define E3_IS_TMC2130
1128
-  //#define E4_IS_TMC2130
1129
-#endif
1130
-
1131
-/**
1132
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1133
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1134 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1135 1112
  * to PDN_UART without a resistor.
1136 1113
  * The drivers can also be used with hardware serial.
1137 1114
  *
1138
- * You'll also need the TMC2208Stepper Arduino library
1139
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1140 1117
  */
1141
-//#define HAVE_TMC2208
1142
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1143
-  //#define X_IS_TMC2208
1144
-  //#define X2_IS_TMC2208
1145
-  //#define Y_IS_TMC2208
1146
-  //#define Y2_IS_TMC2208
1147
-  //#define Z_IS_TMC2208
1148
-  //#define Z2_IS_TMC2208
1149
-  //#define E0_IS_TMC2208
1150
-  //#define E1_IS_TMC2208
1151
-  //#define E2_IS_TMC2208
1152
-  //#define E3_IS_TMC2208
1153
-  //#define E4_IS_TMC2208
1154
-#endif
1155
-
1156
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1157 1119
 
1158 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1159 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1308,25 +1270,12 @@
1308 1270
 // @section L6470
1309 1271
 
1310 1272
 /**
1311
- * Enable this section if you have L6470 motor drivers.
1312
- * You need to import the L6470 library into the Arduino IDE for this.
1313
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1314 1277
  */
1315
-
1316
-//#define HAVE_L6470DRIVER
1317
-#if ENABLED(HAVE_L6470DRIVER)
1318
-
1319
-  //#define X_IS_L6470
1320
-  //#define X2_IS_L6470
1321
-  //#define Y_IS_L6470
1322
-  //#define Y2_IS_L6470
1323
-  //#define Z_IS_L6470
1324
-  //#define Z2_IS_L6470
1325
-  //#define E0_IS_L6470
1326
-  //#define E1_IS_L6470
1327
-  //#define E2_IS_L6470
1328
-  //#define E3_IS_L6470
1329
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1330 1279
 
1331 1280
   #define X_MICROSTEPS      16 // number of microsteps
1332 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1372,7 +1321,7 @@
1372 1321
   #define E4_OVERCURRENT  2000
1373 1322
   #define E4_STALLCURRENT 1500
1374 1323
 
1375
-#endif
1324
+#endif // L6470
1376 1325
 
1377 1326
 /**
1378 1327
  * TWI/I2C BUS

+ 23
- 0
Marlin/src/config/examples/Tronxy/XY100/Configuration.h View File

@@ -562,6 +562,29 @@
562 562
 #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
563 563
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
564 564
 
565
+/**
566
+ * Specify Stepper Driver types
567
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
568
+ * Stepper timing options can be overridden in Configuration_adv.h
569
+ *
570
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
571
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
572
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
573
+ *          TMC5130, TMC5130_STANDALONE
574
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
575
+ */
576
+#define X_DRIVER_TYPE  A4988
577
+#define Y_DRIVER_TYPE  A4988
578
+#define Z_DRIVER_TYPE  A4988
579
+#define X2_DRIVER_TYPE A4988
580
+#define Y2_DRIVER_TYPE A4988
581
+#define Z2_DRIVER_TYPE A4988
582
+#define E0_DRIVER_TYPE A4988
583
+#define E1_DRIVER_TYPE A4988
584
+#define E2_DRIVER_TYPE A4988
585
+#define E3_DRIVER_TYPE A4988
586
+#define E4_DRIVER_TYPE A4988
587
+
565 588
 // Enable this feature if all enabled endstop pins are interrupt-capable.
566 589
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
567 590
 //#define ENDSTOP_INTERRUPTS_FEATURE

+ 23
- 0
Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h View File

@@ -551,6 +551,29 @@
551 551
 #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
552 552
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
553 553
 
554
+/**
555
+ * Specify Stepper Driver types
556
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
557
+ * Stepper timing options can be overridden in Configuration_adv.h
558
+ *
559
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
560
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
561
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
562
+ *          TMC5130, TMC5130_STANDALONE
563
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
564
+ */
565
+#define X_DRIVER_TYPE  TMC2130
566
+#define Y_DRIVER_TYPE  TMC2130
567
+#define Z_DRIVER_TYPE  TMC2130
568
+//#define X2_DRIVER_TYPE A4988
569
+//#define Y2_DRIVER_TYPE A4988
570
+//#define Z2_DRIVER_TYPE A4988
571
+#define E0_DRIVER_TYPE TMC2130
572
+//#define E1_DRIVER_TYPE A4988
573
+//#define E2_DRIVER_TYPE A4988
574
+//#define E3_DRIVER_TYPE A4988
575
+//#define E4_DRIVER_TYPE A4988
576
+
554 577
 // Enable this feature if all enabled endstop pins are interrupt-capable.
555 578
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
556 579
 //#define ENDSTOP_INTERRUPTS_FEATURE

+ 37
- 88
Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h View File

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 2
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 250000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,23 +1042,12 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-//#define HAVE_TMC26X
1044
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1045
-  //#define X_IS_TMC26X
1046
-  //#define X2_IS_TMC26X
1047
-  //#define Y_IS_TMC26X
1048
-  //#define Y2_IS_TMC26X
1049
-  //#define Z_IS_TMC26X
1050
-  //#define Z2_IS_TMC26X
1051
-  //#define E0_IS_TMC26X
1052
-  //#define E1_IS_TMC26X
1053
-  //#define E2_IS_TMC26X
1054
-  //#define E3_IS_TMC26X
1055
-  //#define E4_IS_TMC26X
1050
+#if HAS_DRIVER(TMC26X)
1056 1051
 
1057 1052
   #define X_MAX_CURRENT     1000 // in mA
1058 1053
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1098,62 +1093,29 @@
1098 1093
   #define E4_SENSE_RESISTOR   91
1099 1094
   #define E4_MICROSTEPS       16
1100 1095
 
1101
-#endif
1096
+#endif // TMC26X
1102 1097
 
1103 1098
 // @section tmc_smart
1104 1099
 
1105 1100
 /**
1106
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1107
- *
1108
- * You'll also need the TMC2130Stepper Arduino library
1109
- * (https://github.com/teemuatlut/TMC2130Stepper).
1110
- *
1111 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1112 1102
  * the hardware SPI interface on your board and define the required CS pins
1113 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1114 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1115
- */
1116
-//#define HAVE_TMC2130
1117
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1118
-  //#define X_IS_TMC2130
1119
-  //#define X2_IS_TMC2130
1120
-  //#define Y_IS_TMC2130
1121
-  //#define Y2_IS_TMC2130
1122
-  //#define Z_IS_TMC2130
1123
-  //#define Z2_IS_TMC2130
1124
-  //#define E0_IS_TMC2130
1125
-  //#define E1_IS_TMC2130
1126
-  //#define E2_IS_TMC2130
1127
-  //#define E3_IS_TMC2130
1128
-  //#define E4_IS_TMC2130
1129
-#endif
1130
-
1131
-/**
1132
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1133
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1134 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1135 1112
  * to PDN_UART without a resistor.
1136 1113
  * The drivers can also be used with hardware serial.
1137 1114
  *
1138
- * You'll also need the TMC2208Stepper Arduino library
1139
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1140 1117
  */
1141
-//#define HAVE_TMC2208
1142
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1143
-  //#define X_IS_TMC2208
1144
-  //#define X2_IS_TMC2208
1145
-  //#define Y_IS_TMC2208
1146
-  //#define Y2_IS_TMC2208
1147
-  //#define Z_IS_TMC2208
1148
-  //#define Z2_IS_TMC2208
1149
-  //#define E0_IS_TMC2208
1150
-  //#define E1_IS_TMC2208
1151
-  //#define E2_IS_TMC2208
1152
-  //#define E3_IS_TMC2208
1153
-  //#define E4_IS_TMC2208
1154
-#endif
1155
-
1156
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1157 1119
 
1158 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1159 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1308,25 +1270,12 @@
1308 1270
 // @section L6470
1309 1271
 
1310 1272
 /**
1311
- * Enable this section if you have L6470 motor drivers.
1312
- * You need to import the L6470 library into the Arduino IDE for this.
1313
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1314 1277
  */
1315
-
1316
-//#define HAVE_L6470DRIVER
1317
-#if ENABLED(HAVE_L6470DRIVER)
1318
-
1319
-  //#define X_IS_L6470
1320
-  //#define X2_IS_L6470
1321
-  //#define Y_IS_L6470
1322
-  //#define Y2_IS_L6470
1323
-  //#define Z_IS_L6470
1324
-  //#define Z2_IS_L6470
1325
-  //#define E0_IS_L6470
1326
-  //#define E1_IS_L6470
1327
-  //#define E2_IS_L6470
1328
-  //#define E3_IS_L6470
1329
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1330 1279
 
1331 1280
   #define X_MICROSTEPS      16 // number of microsteps
1332 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1372,7 +1321,7 @@
1372 1321
   #define E4_OVERCURRENT  2000
1373 1322
   #define E4_STALLCURRENT 1500
1374 1323
 
1375
-#endif
1324
+#endif // L6470
1376 1325
 
1377 1326
 /**
1378 1327
  * TWI/I2C BUS

+ 23
- 0
Marlin/src/config/examples/Velleman/K8200/Configuration.h View File

@@ -581,6 +581,29 @@
581 581
 #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
582 582
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
583 583
 
584
+/**
585
+ * Specify Stepper Driver types
586
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
587
+ * Stepper timing options can be overridden in Configuration_adv.h
588
+ *
589
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
590
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
591
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
592
+ *          TMC5130, TMC5130_STANDALONE
593
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
594
+ */
595
+#define X_DRIVER_TYPE  A4988
596
+#define Y_DRIVER_TYPE  A4988
597
+#define Z_DRIVER_TYPE  A4988
598
+#define X2_DRIVER_TYPE A4988
599
+#define Y2_DRIVER_TYPE A4988
600
+#define Z2_DRIVER_TYPE A4988
601
+#define E0_DRIVER_TYPE A4988
602
+#define E1_DRIVER_TYPE A4988
603
+#define E2_DRIVER_TYPE A4988
604
+#define E3_DRIVER_TYPE A4988
605
+#define E4_DRIVER_TYPE A4988
606
+
584 607
 // Enable this feature if all enabled endstop pins are interrupt-capable.
585 608
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
586 609
 //#define ENDSTOP_INTERRUPTS_FEATURE

+ 37
- 88
Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h View File

@@ -840,15 +840,17 @@
840 840
 
841 841
 /**
842 842
  * Minimum delay after setting the stepper DIR (in ns)
843
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
844
- *   20 : Minimum for TMC2xxx drivers
845
- *  200 : Minimum for A4988 drivers
846
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
847
- *  650 : Minimum for DRV8825 drivers
848
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
849
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
843
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
844
+ *    20 : Minimum for TMC2xxx drivers
845
+ *   200 : Minimum for A4988 drivers
846
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
847
+ *   650 : Minimum for DRV8825 drivers
848
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
849
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
850
+ *
851
+ * Override the default value based on the driver type set in Configuration.h.
850 852
  */
851
-#define MINIMUM_STEPPER_DIR_DELAY 0
853
+//#define MINIMUM_STEPPER_DIR_DELAY 650
852 854
 
853 855
 /**
854 856
  * Minimum stepper driver pulse width (in µs)
@@ -858,8 +860,10 @@
858 860
  *   2 : Minimum for DRV8825 stepper drivers
859 861
  *   3 : Minimum for TB6600 stepper drivers
860 862
  *  30 : Minimum for TB6560 stepper drivers
863
+ *
864
+ * Override the default value based on the driver type set in Configuration.h.
861 865
  */
862
-#define MINIMUM_STEPPER_PULSE 2
866
+//#define MINIMUM_STEPPER_PULSE 2
863 867
 
864 868
 /**
865 869
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -870,8 +874,10 @@
870 874
  *  150000 : Maximum for TB6600 stepper driver
871 875
  *  130000 : Maximum for LV8729 stepper driver
872 876
  *   15000 : Maximum for TB6560 stepper driver
877
+ *
878
+ * Override the default value based on the driver type set in Configuration.h.
873 879
  */
874
-#define MAXIMUM_STEPPER_RATE 250000
880
+//#define MAXIMUM_STEPPER_RATE 250000
875 881
 
876 882
 // @section temperature
877 883
 
@@ -1039,23 +1045,12 @@
1039 1045
 // @section tmc
1040 1046
 
1041 1047
 /**
1042
- * Enable this section if you have TMC26X motor drivers.
1043
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1044
- * (https://github.com/trinamic/TMC26XStepper.git)
1048
+ * TMC26X Stepper Driver options
1049
+ *
1050
+ * The TMC26XStepper library is required for this stepper driver.
1051
+ * https://github.com/trinamic/TMC26XStepper
1045 1052
  */
1046
-//#define HAVE_TMC26X
1047
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1048
-  //#define X_IS_TMC26X
1049
-  //#define X2_IS_TMC26X
1050
-  //#define Y_IS_TMC26X
1051
-  //#define Y2_IS_TMC26X
1052
-  //#define Z_IS_TMC26X
1053
-  //#define Z2_IS_TMC26X
1054
-  //#define E0_IS_TMC26X
1055
-  //#define E1_IS_TMC26X
1056
-  //#define E2_IS_TMC26X
1057
-  //#define E3_IS_TMC26X
1058
-  //#define E4_IS_TMC26X
1053
+#if HAS_DRIVER(TMC26X)
1059 1054
 
1060 1055
   #define X_MAX_CURRENT     1000 // in mA
1061 1056
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1101,62 +1096,29 @@
1101 1096
   #define E4_SENSE_RESISTOR   91
1102 1097
   #define E4_MICROSTEPS       16
1103 1098
 
1104
-#endif
1099
+#endif // TMC26X
1105 1100
 
1106 1101
 // @section tmc_smart
1107 1102
 
1108 1103
 /**
1109
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1110
- *
1111
- * You'll also need the TMC2130Stepper Arduino library
1112
- * (https://github.com/teemuatlut/TMC2130Stepper).
1113
- *
1114 1104
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1115 1105
  * the hardware SPI interface on your board and define the required CS pins
1116 1106
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1117 1107
  * You may also use software SPI if you wish to use general purpose IO pins.
1118
- */
1119
-//#define HAVE_TMC2130
1120
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1121
-  //#define X_IS_TMC2130
1122
-  //#define X2_IS_TMC2130
1123
-  //#define Y_IS_TMC2130
1124
-  //#define Y2_IS_TMC2130
1125
-  //#define Z_IS_TMC2130
1126
-  //#define Z2_IS_TMC2130
1127
-  //#define E0_IS_TMC2130
1128
-  //#define E1_IS_TMC2130
1129
-  //#define E2_IS_TMC2130
1130
-  //#define E3_IS_TMC2130
1131
-  //#define E4_IS_TMC2130
1132
-#endif
1133
-
1134
-/**
1135
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1136
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1108
+ *
1109
+ * The TMC2130Stepper library is required for this stepper driver.
1110
+ * https://github.com/teemuatlut/TMC2130Stepper
1111
+ *
1112
+ * To use TMC2208 stepper UART-configurable stepper drivers
1113
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1137 1114
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1138 1115
  * to PDN_UART without a resistor.
1139 1116
  * The drivers can also be used with hardware serial.
1140 1117
  *
1141
- * You'll also need the TMC2208Stepper Arduino library
1142
- * (https://github.com/teemuatlut/TMC2208Stepper).
1118
+ * The TMC2208Stepper library is required for this stepper driver.
1119
+ * https://github.com/teemuatlut/TMC2208Stepper
1143 1120
  */
1144
-//#define HAVE_TMC2208
1145
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1146
-  //#define X_IS_TMC2208
1147
-  //#define X2_IS_TMC2208
1148
-  //#define Y_IS_TMC2208
1149
-  //#define Y2_IS_TMC2208
1150
-  //#define Z_IS_TMC2208
1151
-  //#define Z2_IS_TMC2208
1152
-  //#define E0_IS_TMC2208
1153
-  //#define E1_IS_TMC2208
1154
-  //#define E2_IS_TMC2208
1155
-  //#define E3_IS_TMC2208
1156
-  //#define E4_IS_TMC2208
1157
-#endif
1158
-
1159
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1121
+#if HAS_TRINAMIC
1160 1122
 
1161 1123
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1162 1124
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1311,25 +1273,12 @@
1311 1273
 // @section L6470
1312 1274
 
1313 1275
 /**
1314
- * Enable this section if you have L6470 motor drivers.
1315
- * You need to import the L6470 library into the Arduino IDE for this.
1316
- * (https://github.com/ameyer/Arduino-L6470)
1276
+ * L6470 Stepper Driver options
1277
+ *
1278
+ * The Arduino-L6470 library is required for this stepper driver.
1279
+ * https://github.com/ameyer/Arduino-L6470
1317 1280
  */
1318
-
1319
-//#define HAVE_L6470DRIVER
1320
-#if ENABLED(HAVE_L6470DRIVER)
1321
-
1322
-  //#define X_IS_L6470
1323
-  //#define X2_IS_L6470
1324
-  //#define Y_IS_L6470
1325
-  //#define Y2_IS_L6470
1326
-  //#define Z_IS_L6470
1327
-  //#define Z2_IS_L6470
1328
-  //#define E0_IS_L6470
1329
-  //#define E1_IS_L6470
1330
-  //#define E2_IS_L6470
1331
-  //#define E3_IS_L6470
1332
-  //#define E4_IS_L6470
1281
+#if HAS_DRIVER(L6470)
1333 1282
 
1334 1283
   #define X_MICROSTEPS      16 // number of microsteps
1335 1284
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1375,7 +1324,7 @@
1375 1324
   #define E4_OVERCURRENT  2000
1376 1325
   #define E4_STALLCURRENT 1500
1377 1326
 
1378
-#endif
1327
+#endif // L6470
1379 1328
 
1380 1329
 /**
1381 1330
  * TWI/I2C BUS

+ 37
- 88
Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h View File

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 2
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 250000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,23 +1042,12 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-//#define HAVE_TMC26X
1044
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1045
-  //#define X_IS_TMC26X
1046
-  //#define X2_IS_TMC26X
1047
-  //#define Y_IS_TMC26X
1048
-  //#define Y2_IS_TMC26X
1049
-  //#define Z_IS_TMC26X
1050
-  //#define Z2_IS_TMC26X
1051
-  //#define E0_IS_TMC26X
1052
-  //#define E1_IS_TMC26X
1053
-  //#define E2_IS_TMC26X
1054
-  //#define E3_IS_TMC26X
1055
-  //#define E4_IS_TMC26X
1050
+#if HAS_DRIVER(TMC26X)
1056 1051
 
1057 1052
   #define X_MAX_CURRENT     1000 // in mA
1058 1053
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1098,62 +1093,29 @@
1098 1093
   #define E4_SENSE_RESISTOR   91
1099 1094
   #define E4_MICROSTEPS       16
1100 1095
 
1101
-#endif
1096
+#endif // TMC26X
1102 1097
 
1103 1098
 // @section tmc_smart
1104 1099
 
1105 1100
 /**
1106
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1107
- *
1108
- * You'll also need the TMC2130Stepper Arduino library
1109
- * (https://github.com/teemuatlut/TMC2130Stepper).
1110
- *
1111 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1112 1102
  * the hardware SPI interface on your board and define the required CS pins
1113 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1114 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1115
- */
1116
-//#define HAVE_TMC2130
1117
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1118
-  //#define X_IS_TMC2130
1119
-  //#define X2_IS_TMC2130
1120
-  //#define Y_IS_TMC2130
1121
-  //#define Y2_IS_TMC2130
1122
-  //#define Z_IS_TMC2130
1123
-  //#define Z2_IS_TMC2130
1124
-  //#define E0_IS_TMC2130
1125
-  //#define E1_IS_TMC2130
1126
-  //#define E2_IS_TMC2130
1127
-  //#define E3_IS_TMC2130
1128
-  //#define E4_IS_TMC2130
1129
-#endif
1130
-
1131
-/**
1132
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1133
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1134 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1135 1112
  * to PDN_UART without a resistor.
1136 1113
  * The drivers can also be used with hardware serial.
1137 1114
  *
1138
- * You'll also need the TMC2208Stepper Arduino library
1139
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1140 1117
  */
1141
-//#define HAVE_TMC2208
1142
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1143
-  //#define X_IS_TMC2208
1144
-  //#define X2_IS_TMC2208
1145
-  //#define Y_IS_TMC2208
1146
-  //#define Y2_IS_TMC2208
1147
-  //#define Z_IS_TMC2208
1148
-  //#define Z2_IS_TMC2208
1149
-  //#define E0_IS_TMC2208
1150
-  //#define E1_IS_TMC2208
1151
-  //#define E2_IS_TMC2208
1152
-  //#define E3_IS_TMC2208
1153
-  //#define E4_IS_TMC2208
1154
-#endif
1155
-
1156
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1157 1119
 
1158 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1159 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1308,25 +1270,12 @@
1308 1270
 // @section L6470
1309 1271
 
1310 1272
 /**
1311
- * Enable this section if you have L6470 motor drivers.
1312
- * You need to import the L6470 library into the Arduino IDE for this.
1313
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1314 1277
  */
1315
-
1316
-//#define HAVE_L6470DRIVER
1317
-#if ENABLED(HAVE_L6470DRIVER)
1318
-
1319
-  //#define X_IS_L6470
1320
-  //#define X2_IS_L6470
1321
-  //#define Y_IS_L6470
1322
-  //#define Y2_IS_L6470
1323
-  //#define Z_IS_L6470
1324
-  //#define Z2_IS_L6470
1325
-  //#define E0_IS_L6470
1326
-  //#define E1_IS_L6470
1327
-  //#define E2_IS_L6470
1328
-  //#define E3_IS_L6470
1329
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1330 1279
 
1331 1280
   #define X_MICROSTEPS      16 // number of microsteps
1332 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1372,7 +1321,7 @@
1372 1321
   #define E4_OVERCURRENT  2000
1373 1322
   #define E4_STALLCURRENT 1500
1374 1323
 
1375
-#endif
1324
+#endif // L6470
1376 1325
 
1377 1326
 /**
1378 1327
  * TWI/I2C BUS

+ 23
- 0
Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h View File

@@ -561,6 +561,29 @@
561 561
 #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
562 562
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
563 563
 
564
+/**
565
+ * Specify Stepper Driver types
566
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
567
+ * Stepper timing options can be overridden in Configuration_adv.h
568
+ *
569
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
570
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
571
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
572
+ *          TMC5130, TMC5130_STANDALONE
573
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
574
+ */
575
+#define X_DRIVER_TYPE  A4988
576
+#define Y_DRIVER_TYPE  A4988
577
+#define Z_DRIVER_TYPE  A4988
578
+#define X2_DRIVER_TYPE A4988
579
+#define Y2_DRIVER_TYPE A4988
580
+#define Z2_DRIVER_TYPE A4988
581
+#define E0_DRIVER_TYPE A4988
582
+#define E1_DRIVER_TYPE A4988
583
+#define E2_DRIVER_TYPE A4988
584
+#define E3_DRIVER_TYPE A4988
585
+#define E4_DRIVER_TYPE A4988
586
+
564 587
 // Enable this feature if all enabled endstop pins are interrupt-capable.
565 588
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
566 589
 //#define ENDSTOP_INTERRUPTS_FEATURE

+ 37
- 88
Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h View File

@@ -839,15 +839,17 @@
839 839
 
840 840
 /**
841 841
  * Minimum delay after setting the stepper DIR (in ns)
842
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
843
- *   20 : Minimum for TMC2xxx drivers
844
- *  200 : Minimum for A4988 drivers
845
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
846
- *  650 : Minimum for DRV8825 drivers
847
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
848
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
842
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
843
+ *    20 : Minimum for TMC2xxx drivers
844
+ *   200 : Minimum for A4988 drivers
845
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
846
+ *   650 : Minimum for DRV8825 drivers
847
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
848
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
849
+ *
850
+ * Override the default value based on the driver type set in Configuration.h.
849 851
  */
850
-#define MINIMUM_STEPPER_DIR_DELAY 0
852
+//#define MINIMUM_STEPPER_DIR_DELAY 650
851 853
 
852 854
 /**
853 855
  * Minimum stepper driver pulse width (in µs)
@@ -857,8 +859,10 @@
857 859
  *   2 : Minimum for DRV8825 stepper drivers
858 860
  *   3 : Minimum for TB6600 stepper drivers
859 861
  *  30 : Minimum for TB6560 stepper drivers
862
+ *
863
+ * Override the default value based on the driver type set in Configuration.h.
860 864
  */
861
-#define MINIMUM_STEPPER_PULSE 2
865
+//#define MINIMUM_STEPPER_PULSE 2
862 866
 
863 867
 /**
864 868
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -869,8 +873,10 @@
869 873
  *  150000 : Maximum for TB6600 stepper driver
870 874
  *  130000 : Maximum for LV8729 stepper driver
871 875
  *   15000 : Maximum for TB6560 stepper driver
876
+ *
877
+ * Override the default value based on the driver type set in Configuration.h.
872 878
  */
873
-#define MAXIMUM_STEPPER_RATE 250000
879
+//#define MAXIMUM_STEPPER_RATE 250000
874 880
 
875 881
 // @section temperature
876 882
 
@@ -1038,23 +1044,12 @@
1038 1044
 // @section tmc
1039 1045
 
1040 1046
 /**
1041
- * Enable this section if you have TMC26X motor drivers.
1042
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1043
- * (https://github.com/trinamic/TMC26XStepper.git)
1047
+ * TMC26X Stepper Driver options
1048
+ *
1049
+ * The TMC26XStepper library is required for this stepper driver.
1050
+ * https://github.com/trinamic/TMC26XStepper
1044 1051
  */
1045
-//#define HAVE_TMC26X
1046
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1047
-  //#define X_IS_TMC26X
1048
-  //#define X2_IS_TMC26X
1049
-  //#define Y_IS_TMC26X
1050
-  //#define Y2_IS_TMC26X
1051
-  //#define Z_IS_TMC26X
1052
-  //#define Z2_IS_TMC26X
1053
-  //#define E0_IS_TMC26X
1054
-  //#define E1_IS_TMC26X
1055
-  //#define E2_IS_TMC26X
1056
-  //#define E3_IS_TMC26X
1057
-  //#define E4_IS_TMC26X
1052
+#if HAS_DRIVER(TMC26X)
1058 1053
 
1059 1054
   #define X_MAX_CURRENT     1000 // in mA
1060 1055
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1100,62 +1095,29 @@
1100 1095
   #define E4_SENSE_RESISTOR   91
1101 1096
   #define E4_MICROSTEPS       16
1102 1097
 
1103
-#endif
1098
+#endif // TMC26X
1104 1099
 
1105 1100
 // @section tmc_smart
1106 1101
 
1107 1102
 /**
1108
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1109
- *
1110
- * You'll also need the TMC2130Stepper Arduino library
1111
- * (https://github.com/teemuatlut/TMC2130Stepper).
1112
- *
1113 1103
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1114 1104
  * the hardware SPI interface on your board and define the required CS pins
1115 1105
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1116 1106
  * You may also use software SPI if you wish to use general purpose IO pins.
1117
- */
1118
-//#define HAVE_TMC2130
1119
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1120
-  //#define X_IS_TMC2130
1121
-  //#define X2_IS_TMC2130
1122
-  //#define Y_IS_TMC2130
1123
-  //#define Y2_IS_TMC2130
1124
-  //#define Z_IS_TMC2130
1125
-  //#define Z2_IS_TMC2130
1126
-  //#define E0_IS_TMC2130
1127
-  //#define E1_IS_TMC2130
1128
-  //#define E2_IS_TMC2130
1129
-  //#define E3_IS_TMC2130
1130
-  //#define E4_IS_TMC2130
1131
-#endif
1132
-
1133
-/**
1134
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1135
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1107
+ *
1108
+ * The TMC2130Stepper library is required for this stepper driver.
1109
+ * https://github.com/teemuatlut/TMC2130Stepper
1110
+ *
1111
+ * To use TMC2208 stepper UART-configurable stepper drivers
1112
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1136 1113
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1137 1114
  * to PDN_UART without a resistor.
1138 1115
  * The drivers can also be used with hardware serial.
1139 1116
  *
1140
- * You'll also need the TMC2208Stepper Arduino library
1141
- * (https://github.com/teemuatlut/TMC2208Stepper).
1117
+ * The TMC2208Stepper library is required for this stepper driver.
1118
+ * https://github.com/teemuatlut/TMC2208Stepper
1142 1119
  */
1143
-//#define HAVE_TMC2208
1144
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1145
-  //#define X_IS_TMC2208
1146
-  //#define X2_IS_TMC2208
1147
-  //#define Y_IS_TMC2208
1148
-  //#define Y2_IS_TMC2208
1149
-  //#define Z_IS_TMC2208
1150
-  //#define Z2_IS_TMC2208
1151
-  //#define E0_IS_TMC2208
1152
-  //#define E1_IS_TMC2208
1153
-  //#define E2_IS_TMC2208
1154
-  //#define E3_IS_TMC2208
1155
-  //#define E4_IS_TMC2208
1156
-#endif
1157
-
1158
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1120
+#if HAS_TRINAMIC
1159 1121
 
1160 1122
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1161 1123
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1310,25 +1272,12 @@
1310 1272
 // @section L6470
1311 1273
 
1312 1274
 /**
1313
- * Enable this section if you have L6470 motor drivers.
1314
- * You need to import the L6470 library into the Arduino IDE for this.
1315
- * (https://github.com/ameyer/Arduino-L6470)
1275
+ * L6470 Stepper Driver options
1276
+ *
1277
+ * The Arduino-L6470 library is required for this stepper driver.
1278
+ * https://github.com/ameyer/Arduino-L6470
1316 1279
  */
1317
-
1318
-//#define HAVE_L6470DRIVER
1319
-#if ENABLED(HAVE_L6470DRIVER)
1320
-
1321
-  //#define X_IS_L6470
1322
-  //#define X2_IS_L6470
1323
-  //#define Y_IS_L6470
1324
-  //#define Y2_IS_L6470
1325
-  //#define Z_IS_L6470
1326
-  //#define Z2_IS_L6470
1327
-  //#define E0_IS_L6470
1328
-  //#define E1_IS_L6470
1329
-  //#define E2_IS_L6470
1330
-  //#define E3_IS_L6470
1331
-  //#define E4_IS_L6470
1280
+#if HAS_DRIVER(L6470)
1332 1281
 
1333 1282
   #define X_MICROSTEPS      16 // number of microsteps
1334 1283
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1374,7 +1323,7 @@
1374 1323
   #define E4_OVERCURRENT  2000
1375 1324
   #define E4_STALLCURRENT 1500
1376 1325
 
1377
-#endif
1326
+#endif // L6470
1378 1327
 
1379 1328
 /**
1380 1329
  * TWI/I2C BUS

+ 23
- 0
Marlin/src/config/examples/adafruit/ST7565/Configuration.h View File

@@ -551,6 +551,29 @@
551 551
 #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
552 552
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
553 553
 
554
+/**
555
+ * Specify Stepper Driver types
556
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
557
+ * Stepper timing options can be overridden in Configuration_adv.h
558
+ *
559
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
560
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
561
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
562
+ *          TMC5130, TMC5130_STANDALONE
563
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
564
+ */
565
+#define X_DRIVER_TYPE  A4988
566
+#define Y_DRIVER_TYPE  A4988
567
+#define Z_DRIVER_TYPE  A4988
568
+#define X2_DRIVER_TYPE A4988
569
+#define Y2_DRIVER_TYPE A4988
570
+#define Z2_DRIVER_TYPE A4988
571
+#define E0_DRIVER_TYPE A4988
572
+#define E1_DRIVER_TYPE A4988
573
+#define E2_DRIVER_TYPE A4988
574
+#define E3_DRIVER_TYPE A4988
575
+#define E4_DRIVER_TYPE A4988
576
+
554 577
 // Enable this feature if all enabled endstop pins are interrupt-capable.
555 578
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
556 579
 //#define ENDSTOP_INTERRUPTS_FEATURE

+ 37
- 88
Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h View File

@@ -839,15 +839,17 @@
839 839
 
840 840
 /**
841 841
  * Minimum delay after setting the stepper DIR (in ns)
842
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
843
- *   20 : Minimum for TMC2xxx drivers
844
- *  200 : Minimum for A4988 drivers
845
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
846
- *  650 : Minimum for DRV8825 drivers
847
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
848
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
842
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
843
+ *    20 : Minimum for TMC2xxx drivers
844
+ *   200 : Minimum for A4988 drivers
845
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
846
+ *   650 : Minimum for DRV8825 drivers
847
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
848
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
849
+ *
850
+ * Override the default value based on the driver type set in Configuration.h.
849 851
  */
850
-#define MINIMUM_STEPPER_DIR_DELAY 0
852
+//#define MINIMUM_STEPPER_DIR_DELAY 650
851 853
 
852 854
 /**
853 855
  * Minimum stepper driver pulse width (in µs)
@@ -857,8 +859,10 @@
857 859
  *   2 : Minimum for DRV8825 stepper drivers
858 860
  *   3 : Minimum for TB6600 stepper drivers
859 861
  *  30 : Minimum for TB6560 stepper drivers
862
+ *
863
+ * Override the default value based on the driver type set in Configuration.h.
860 864
  */
861
-#define MINIMUM_STEPPER_PULSE 2
865
+//#define MINIMUM_STEPPER_PULSE 2
862 866
 
863 867
 /**
864 868
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -869,8 +873,10 @@
869 873
  *  150000 : Maximum for TB6600 stepper driver
870 874
  *  130000 : Maximum for LV8729 stepper driver
871 875
  *   15000 : Maximum for TB6560 stepper driver
876
+ *
877
+ * Override the default value based on the driver type set in Configuration.h.
872 878
  */
873
-#define MAXIMUM_STEPPER_RATE 250000
879
+//#define MAXIMUM_STEPPER_RATE 250000
874 880
 
875 881
 // @section temperature
876 882
 
@@ -1038,23 +1044,12 @@
1038 1044
 // @section tmc
1039 1045
 
1040 1046
 /**
1041
- * Enable this section if you have TMC26X motor drivers.
1042
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1043
- * (https://github.com/trinamic/TMC26XStepper.git)
1047
+ * TMC26X Stepper Driver options
1048
+ *
1049
+ * The TMC26XStepper library is required for this stepper driver.
1050
+ * https://github.com/trinamic/TMC26XStepper
1044 1051
  */
1045
-//#define HAVE_TMC26X
1046
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1047
-  //#define X_IS_TMC26X
1048
-  //#define X2_IS_TMC26X
1049
-  //#define Y_IS_TMC26X
1050
-  //#define Y2_IS_TMC26X
1051
-  //#define Z_IS_TMC26X
1052
-  //#define Z2_IS_TMC26X
1053
-  //#define E0_IS_TMC26X
1054
-  //#define E1_IS_TMC26X
1055
-  //#define E2_IS_TMC26X
1056
-  //#define E3_IS_TMC26X
1057
-  //#define E4_IS_TMC26X
1052
+#if HAS_DRIVER(TMC26X)
1058 1053
 
1059 1054
   #define X_MAX_CURRENT     1000 // in mA
1060 1055
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1100,62 +1095,29 @@
1100 1095
   #define E4_SENSE_RESISTOR   91
1101 1096
   #define E4_MICROSTEPS       16
1102 1097
 
1103
-#endif
1098
+#endif // TMC26X
1104 1099
 
1105 1100
 // @section tmc_smart
1106 1101
 
1107 1102
 /**
1108
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1109
- *
1110
- * You'll also need the TMC2130Stepper Arduino library
1111
- * (https://github.com/teemuatlut/TMC2130Stepper).
1112
- *
1113 1103
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1114 1104
  * the hardware SPI interface on your board and define the required CS pins
1115 1105
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1116 1106
  * You may also use software SPI if you wish to use general purpose IO pins.
1117
- */
1118
-//#define HAVE_TMC2130
1119
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1120
-  //#define X_IS_TMC2130
1121
-  //#define X2_IS_TMC2130
1122
-  //#define Y_IS_TMC2130
1123
-  //#define Y2_IS_TMC2130
1124
-  //#define Z_IS_TMC2130
1125
-  //#define Z2_IS_TMC2130
1126
-  //#define E0_IS_TMC2130
1127
-  //#define E1_IS_TMC2130
1128
-  //#define E2_IS_TMC2130
1129
-  //#define E3_IS_TMC2130
1130
-  //#define E4_IS_TMC2130
1131
-#endif
1132
-
1133
-/**
1134
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1135
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1107
+ *
1108
+ * The TMC2130Stepper library is required for this stepper driver.
1109
+ * https://github.com/teemuatlut/TMC2130Stepper
1110
+ *
1111
+ * To use TMC2208 stepper UART-configurable stepper drivers
1112
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1136 1113
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1137 1114
  * to PDN_UART without a resistor.
1138 1115
  * The drivers can also be used with hardware serial.
1139 1116
  *
1140
- * You'll also need the TMC2208Stepper Arduino library
1141
- * (https://github.com/teemuatlut/TMC2208Stepper).
1117
+ * The TMC2208Stepper library is required for this stepper driver.
1118
+ * https://github.com/teemuatlut/TMC2208Stepper
1142 1119
  */
1143
-//#define HAVE_TMC2208
1144
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1145
-  //#define X_IS_TMC2208
1146
-  //#define X2_IS_TMC2208
1147
-  //#define Y_IS_TMC2208
1148
-  //#define Y2_IS_TMC2208
1149
-  //#define Z_IS_TMC2208
1150
-  //#define Z2_IS_TMC2208
1151
-  //#define E0_IS_TMC2208
1152
-  //#define E1_IS_TMC2208
1153
-  //#define E2_IS_TMC2208
1154
-  //#define E3_IS_TMC2208
1155
-  //#define E4_IS_TMC2208
1156
-#endif
1157
-
1158
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1120
+#if HAS_TRINAMIC
1159 1121
 
1160 1122
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1161 1123
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1310,25 +1272,12 @@
1310 1272
 // @section L6470
1311 1273
 
1312 1274
 /**
1313
- * Enable this section if you have L6470 motor drivers.
1314
- * You need to import the L6470 library into the Arduino IDE for this.
1315
- * (https://github.com/ameyer/Arduino-L6470)
1275
+ * L6470 Stepper Driver options
1276
+ *
1277
+ * The Arduino-L6470 library is required for this stepper driver.
1278
+ * https://github.com/ameyer/Arduino-L6470
1316 1279
  */
1317
-
1318
-//#define HAVE_L6470DRIVER
1319
-#if ENABLED(HAVE_L6470DRIVER)
1320
-
1321
-  //#define X_IS_L6470
1322
-  //#define X2_IS_L6470
1323
-  //#define Y_IS_L6470
1324
-  //#define Y2_IS_L6470
1325
-  //#define Z_IS_L6470
1326
-  //#define Z2_IS_L6470
1327
-  //#define E0_IS_L6470
1328
-  //#define E1_IS_L6470
1329
-  //#define E2_IS_L6470
1330
-  //#define E3_IS_L6470
1331
-  //#define E4_IS_L6470
1280
+#if HAS_DRIVER(L6470)
1332 1281
 
1333 1282
   #define X_MICROSTEPS      16 // number of microsteps
1334 1283
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1374,7 +1323,7 @@
1374 1323
   #define E4_OVERCURRENT  2000
1375 1324
   #define E4_STALLCURRENT 1500
1376 1325
 
1377
-#endif
1326
+#endif // L6470
1378 1327
 
1379 1328
 /**
1380 1329
  * TWI/I2C BUS

+ 37
- 88
Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h View File

@@ -839,15 +839,17 @@
839 839
 
840 840
 /**
841 841
  * Minimum delay after setting the stepper DIR (in ns)
842
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
843
- *   20 : Minimum for TMC2xxx drivers
844
- *  200 : Minimum for A4988 drivers
845
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
846
- *  650 : Minimum for DRV8825 drivers
847
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
848
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
842
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
843
+ *    20 : Minimum for TMC2xxx drivers
844
+ *   200 : Minimum for A4988 drivers
845
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
846
+ *   650 : Minimum for DRV8825 drivers
847
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
848
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
849
+ *
850
+ * Override the default value based on the driver type set in Configuration.h.
849 851
  */
850
-#define MINIMUM_STEPPER_DIR_DELAY 0
852
+//#define MINIMUM_STEPPER_DIR_DELAY 650
851 853
 
852 854
 /**
853 855
  * Minimum stepper driver pulse width (in µs)
@@ -857,8 +859,10 @@
857 859
  *   2 : Minimum for DRV8825 stepper drivers
858 860
  *   3 : Minimum for TB6600 stepper drivers
859 861
  *  30 : Minimum for TB6560 stepper drivers
862
+ *
863
+ * Override the default value based on the driver type set in Configuration.h.
860 864
  */
861
-#define MINIMUM_STEPPER_PULSE 2
865
+//#define MINIMUM_STEPPER_PULSE 2
862 866
 
863 867
 /**
864 868
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -869,8 +873,10 @@
869 873
  *  150000 : Maximum for TB6600 stepper driver
870 874
  *  130000 : Maximum for LV8729 stepper driver
871 875
  *   15000 : Maximum for TB6560 stepper driver
876
+ *
877
+ * Override the default value based on the driver type set in Configuration.h.
872 878
  */
873
-#define MAXIMUM_STEPPER_RATE 250000
879
+//#define MAXIMUM_STEPPER_RATE 250000
874 880
 
875 881
 // @section temperature
876 882
 
@@ -1038,23 +1044,12 @@
1038 1044
 // @section tmc
1039 1045
 
1040 1046
 /**
1041
- * Enable this section if you have TMC26X motor drivers.
1042
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1043
- * (https://github.com/trinamic/TMC26XStepper.git)
1047
+ * TMC26X Stepper Driver options
1048
+ *
1049
+ * The TMC26XStepper library is required for this stepper driver.
1050
+ * https://github.com/trinamic/TMC26XStepper
1044 1051
  */
1045
-//#define HAVE_TMC26X
1046
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1047
-  //#define X_IS_TMC26X
1048
-  //#define X2_IS_TMC26X
1049
-  //#define Y_IS_TMC26X
1050
-  //#define Y2_IS_TMC26X
1051
-  //#define Z_IS_TMC26X
1052
-  //#define Z2_IS_TMC26X
1053
-  //#define E0_IS_TMC26X
1054
-  //#define E1_IS_TMC26X
1055
-  //#define E2_IS_TMC26X
1056
-  //#define E3_IS_TMC26X
1057
-  //#define E4_IS_TMC26X
1052
+#if HAS_DRIVER(TMC26X)
1058 1053
 
1059 1054
   #define X_MAX_CURRENT     1000 // in mA
1060 1055
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1100,62 +1095,29 @@
1100 1095
   #define E4_SENSE_RESISTOR   91
1101 1096
   #define E4_MICROSTEPS       16
1102 1097
 
1103
-#endif
1098
+#endif // TMC26X
1104 1099
 
1105 1100
 // @section tmc_smart
1106 1101
 
1107 1102
 /**
1108
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1109
- *
1110
- * You'll also need the TMC2130Stepper Arduino library
1111
- * (https://github.com/teemuatlut/TMC2130Stepper).
1112
- *
1113 1103
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1114 1104
  * the hardware SPI interface on your board and define the required CS pins
1115 1105
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1116 1106
  * You may also use software SPI if you wish to use general purpose IO pins.
1117
- */
1118
-//#define HAVE_TMC2130
1119
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1120
-  //#define X_IS_TMC2130
1121
-  //#define X2_IS_TMC2130
1122
-  //#define Y_IS_TMC2130
1123
-  //#define Y2_IS_TMC2130
1124
-  //#define Z_IS_TMC2130
1125
-  //#define Z2_IS_TMC2130
1126
-  //#define E0_IS_TMC2130
1127
-  //#define E1_IS_TMC2130
1128
-  //#define E2_IS_TMC2130
1129
-  //#define E3_IS_TMC2130
1130
-  //#define E4_IS_TMC2130
1131
-#endif
1132
-
1133
-/**
1134
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1135
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1107
+ *
1108
+ * The TMC2130Stepper library is required for this stepper driver.
1109
+ * https://github.com/teemuatlut/TMC2130Stepper
1110
+ *
1111
+ * To use TMC2208 stepper UART-configurable stepper drivers
1112
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1136 1113
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1137 1114
  * to PDN_UART without a resistor.
1138 1115
  * The drivers can also be used with hardware serial.
1139 1116
  *
1140
- * You'll also need the TMC2208Stepper Arduino library
1141
- * (https://github.com/teemuatlut/TMC2208Stepper).
1117
+ * The TMC2208Stepper library is required for this stepper driver.
1118
+ * https://github.com/teemuatlut/TMC2208Stepper
1142 1119
  */
1143
-//#define HAVE_TMC2208
1144
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1145
-  //#define X_IS_TMC2208
1146
-  //#define X2_IS_TMC2208
1147
-  //#define Y_IS_TMC2208
1148
-  //#define Y2_IS_TMC2208
1149
-  //#define Z_IS_TMC2208
1150
-  //#define Z2_IS_TMC2208
1151
-  //#define E0_IS_TMC2208
1152
-  //#define E1_IS_TMC2208
1153
-  //#define E2_IS_TMC2208
1154
-  //#define E3_IS_TMC2208
1155
-  //#define E4_IS_TMC2208
1156
-#endif
1157
-
1158
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1120
+#if HAS_TRINAMIC
1159 1121
 
1160 1122
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1161 1123
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1310,25 +1272,12 @@
1310 1272
 // @section L6470
1311 1273
 
1312 1274
 /**
1313
- * Enable this section if you have L6470 motor drivers.
1314
- * You need to import the L6470 library into the Arduino IDE for this.
1315
- * (https://github.com/ameyer/Arduino-L6470)
1275
+ * L6470 Stepper Driver options
1276
+ *
1277
+ * The Arduino-L6470 library is required for this stepper driver.
1278
+ * https://github.com/ameyer/Arduino-L6470
1316 1279
  */
1317
-
1318
-//#define HAVE_L6470DRIVER
1319
-#if ENABLED(HAVE_L6470DRIVER)
1320
-
1321
-  //#define X_IS_L6470
1322
-  //#define X2_IS_L6470
1323
-  //#define Y_IS_L6470
1324
-  //#define Y2_IS_L6470
1325
-  //#define Z_IS_L6470
1326
-  //#define Z2_IS_L6470
1327
-  //#define E0_IS_L6470
1328
-  //#define E1_IS_L6470
1329
-  //#define E2_IS_L6470
1330
-  //#define E3_IS_L6470
1331
-  //#define E4_IS_L6470
1280
+#if HAS_DRIVER(L6470)
1332 1281
 
1333 1282
   #define X_MICROSTEPS      16 // number of microsteps
1334 1283
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1374,7 +1323,7 @@
1374 1323
   #define E4_OVERCURRENT  2000
1375 1324
   #define E4_STALLCURRENT 1500
1376 1325
 
1377
-#endif
1326
+#endif // L6470
1378 1327
 
1379 1328
 /**
1380 1329
  * TWI/I2C BUS

+ 23
- 0
Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h View File

@@ -627,6 +627,29 @@
627 627
 #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
628 628
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
629 629
 
630
+/**
631
+ * Specify Stepper Driver types
632
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
633
+ * Stepper timing options can be overridden in Configuration_adv.h
634
+ *
635
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
636
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
637
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
638
+ *          TMC5130, TMC5130_STANDALONE
639
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
640
+ */
641
+#define X_DRIVER_TYPE  A4988
642
+#define Y_DRIVER_TYPE  A4988
643
+#define Z_DRIVER_TYPE  A4988
644
+#define X2_DRIVER_TYPE A4988
645
+#define Y2_DRIVER_TYPE A4988
646
+#define Z2_DRIVER_TYPE A4988
647
+#define E0_DRIVER_TYPE A4988
648
+#define E1_DRIVER_TYPE A4988
649
+#define E2_DRIVER_TYPE A4988
650
+#define E3_DRIVER_TYPE A4988
651
+#define E4_DRIVER_TYPE A4988
652
+
630 653
 // Enable this feature if all enabled endstop pins are interrupt-capable.
631 654
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
632 655
 //#define ENDSTOP_INTERRUPTS_FEATURE

+ 37
- 88
Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h View File

@@ -839,15 +839,17 @@
839 839
 
840 840
 /**
841 841
  * Minimum delay after setting the stepper DIR (in ns)
842
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
843
- *   20 : Minimum for TMC2xxx drivers
844
- *  200 : Minimum for A4988 drivers
845
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
846
- *  650 : Minimum for DRV8825 drivers
847
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
848
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
842
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
843
+ *    20 : Minimum for TMC2xxx drivers
844
+ *   200 : Minimum for A4988 drivers
845
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
846
+ *   650 : Minimum for DRV8825 drivers
847
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
848
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
849
+ *
850
+ * Override the default value based on the driver type set in Configuration.h.
849 851
  */
850
-#define MINIMUM_STEPPER_DIR_DELAY 0
852
+//#define MINIMUM_STEPPER_DIR_DELAY 650
851 853
 
852 854
 /**
853 855
  * Minimum stepper driver pulse width (in µs)
@@ -857,8 +859,10 @@
857 859
  *   2 : Minimum for DRV8825 stepper drivers
858 860
  *   3 : Minimum for TB6600 stepper drivers
859 861
  *  30 : Minimum for TB6560 stepper drivers
862
+ *
863
+ * Override the default value based on the driver type set in Configuration.h.
860 864
  */
861
-#define MINIMUM_STEPPER_PULSE 2
865
+//#define MINIMUM_STEPPER_PULSE 2
862 866
 
863 867
 /**
864 868
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -869,8 +873,10 @@
869 873
  *  150000 : Maximum for TB6600 stepper driver
870 874
  *  130000 : Maximum for LV8729 stepper driver
871 875
  *   15000 : Maximum for TB6560 stepper driver
876
+ *
877
+ * Override the default value based on the driver type set in Configuration.h.
872 878
  */
873
-#define MAXIMUM_STEPPER_RATE 250000
879
+//#define MAXIMUM_STEPPER_RATE 250000
874 880
 
875 881
 // @section temperature
876 882
 
@@ -1038,23 +1044,12 @@
1038 1044
 // @section tmc
1039 1045
 
1040 1046
 /**
1041
- * Enable this section if you have TMC26X motor drivers.
1042
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1043
- * (https://github.com/trinamic/TMC26XStepper.git)
1047
+ * TMC26X Stepper Driver options
1048
+ *
1049
+ * The TMC26XStepper library is required for this stepper driver.
1050
+ * https://github.com/trinamic/TMC26XStepper
1044 1051
  */
1045
-//#define HAVE_TMC26X
1046
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1047
-  //#define X_IS_TMC26X
1048
-  //#define X2_IS_TMC26X
1049
-  //#define Y_IS_TMC26X
1050
-  //#define Y2_IS_TMC26X
1051
-  //#define Z_IS_TMC26X
1052
-  //#define Z2_IS_TMC26X
1053
-  //#define E0_IS_TMC26X
1054
-  //#define E1_IS_TMC26X
1055
-  //#define E2_IS_TMC26X
1056
-  //#define E3_IS_TMC26X
1057
-  //#define E4_IS_TMC26X
1052
+#if HAS_DRIVER(TMC26X)
1058 1053
 
1059 1054
   #define X_MAX_CURRENT     1000 // in mA
1060 1055
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1100,62 +1095,29 @@
1100 1095
   #define E4_SENSE_RESISTOR   91
1101 1096
   #define E4_MICROSTEPS       16
1102 1097
 
1103
-#endif
1098
+#endif // TMC26X
1104 1099
 
1105 1100
 // @section tmc_smart
1106 1101
 
1107 1102
 /**
1108
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1109
- *
1110
- * You'll also need the TMC2130Stepper Arduino library
1111
- * (https://github.com/teemuatlut/TMC2130Stepper).
1112
- *
1113 1103
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1114 1104
  * the hardware SPI interface on your board and define the required CS pins
1115 1105
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1116 1106
  * You may also use software SPI if you wish to use general purpose IO pins.
1117
- */
1118
-//#define HAVE_TMC2130
1119
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1120
-  //#define X_IS_TMC2130
1121
-  //#define X2_IS_TMC2130
1122
-  //#define Y_IS_TMC2130
1123
-  //#define Y2_IS_TMC2130
1124
-  //#define Z_IS_TMC2130
1125
-  //#define Z2_IS_TMC2130
1126
-  //#define E0_IS_TMC2130
1127
-  //#define E1_IS_TMC2130
1128
-  //#define E2_IS_TMC2130
1129
-  //#define E3_IS_TMC2130
1130
-  //#define E4_IS_TMC2130
1131
-#endif
1132
-
1133
-/**
1134
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1135
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1107
+ *
1108
+ * The TMC2130Stepper library is required for this stepper driver.
1109
+ * https://github.com/teemuatlut/TMC2130Stepper
1110
+ *
1111
+ * To use TMC2208 stepper UART-configurable stepper drivers
1112
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1136 1113
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1137 1114
  * to PDN_UART without a resistor.
1138 1115
  * The drivers can also be used with hardware serial.
1139 1116
  *
1140
- * You'll also need the TMC2208Stepper Arduino library
1141
- * (https://github.com/teemuatlut/TMC2208Stepper).
1117
+ * The TMC2208Stepper library is required for this stepper driver.
1118
+ * https://github.com/teemuatlut/TMC2208Stepper
1142 1119
  */
1143
-//#define HAVE_TMC2208
1144
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1145
-  //#define X_IS_TMC2208
1146
-  //#define X2_IS_TMC2208
1147
-  //#define Y_IS_TMC2208
1148
-  //#define Y2_IS_TMC2208
1149
-  //#define Z_IS_TMC2208
1150
-  //#define Z2_IS_TMC2208
1151
-  //#define E0_IS_TMC2208
1152
-  //#define E1_IS_TMC2208
1153
-  //#define E2_IS_TMC2208
1154
-  //#define E3_IS_TMC2208
1155
-  //#define E4_IS_TMC2208
1156
-#endif
1157
-
1158
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1120
+#if HAS_TRINAMIC
1159 1121
 
1160 1122
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1161 1123
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1310,25 +1272,12 @@
1310 1272
 // @section L6470
1311 1273
 
1312 1274
 /**
1313
- * Enable this section if you have L6470 motor drivers.
1314
- * You need to import the L6470 library into the Arduino IDE for this.
1315
- * (https://github.com/ameyer/Arduino-L6470)
1275
+ * L6470 Stepper Driver options
1276
+ *
1277
+ * The Arduino-L6470 library is required for this stepper driver.
1278
+ * https://github.com/ameyer/Arduino-L6470
1316 1279
  */
1317
-
1318
-//#define HAVE_L6470DRIVER
1319
-#if ENABLED(HAVE_L6470DRIVER)
1320
-
1321
-  //#define X_IS_L6470
1322
-  //#define X2_IS_L6470
1323
-  //#define Y_IS_L6470
1324
-  //#define Y2_IS_L6470
1325
-  //#define Z_IS_L6470
1326
-  //#define Z2_IS_L6470
1327
-  //#define E0_IS_L6470
1328
-  //#define E1_IS_L6470
1329
-  //#define E2_IS_L6470
1330
-  //#define E3_IS_L6470
1331
-  //#define E4_IS_L6470
1280
+#if HAS_DRIVER(L6470)
1332 1281
 
1333 1282
   #define X_MICROSTEPS      16 // number of microsteps
1334 1283
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1374,7 +1323,7 @@
1374 1323
   #define E4_OVERCURRENT  2000
1375 1324
   #define E4_STALLCURRENT 1500
1376 1325
 
1377
-#endif
1326
+#endif // L6470
1378 1327
 
1379 1328
 /**
1380 1329
  * TWI/I2C BUS

+ 37
- 88
Marlin/src/config/examples/delta/generic/Configuration_adv.h View File

@@ -839,15 +839,17 @@
839 839
 
840 840
 /**
841 841
  * Minimum delay after setting the stepper DIR (in ns)
842
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
843
- *   20 : Minimum for TMC2xxx drivers
844
- *  200 : Minimum for A4988 drivers
845
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
846
- *  650 : Minimum for DRV8825 drivers
847
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
848
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
842
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
843
+ *    20 : Minimum for TMC2xxx drivers
844
+ *   200 : Minimum for A4988 drivers
845
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
846
+ *   650 : Minimum for DRV8825 drivers
847
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
848
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
849
+ *
850
+ * Override the default value based on the driver type set in Configuration.h.
849 851
  */
850
-#define MINIMUM_STEPPER_DIR_DELAY 0
852
+//#define MINIMUM_STEPPER_DIR_DELAY 650
851 853
 
852 854
 /**
853 855
  * Minimum stepper driver pulse width (in µs)
@@ -857,8 +859,10 @@
857 859
  *   2 : Minimum for DRV8825 stepper drivers
858 860
  *   3 : Minimum for TB6600 stepper drivers
859 861
  *  30 : Minimum for TB6560 stepper drivers
862
+ *
863
+ * Override the default value based on the driver type set in Configuration.h.
860 864
  */
861
-#define MINIMUM_STEPPER_PULSE 2
865
+//#define MINIMUM_STEPPER_PULSE 2
862 866
 
863 867
 /**
864 868
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -869,8 +873,10 @@
869 873
  *  150000 : Maximum for TB6600 stepper driver
870 874
  *  130000 : Maximum for LV8729 stepper driver
871 875
  *   15000 : Maximum for TB6560 stepper driver
876
+ *
877
+ * Override the default value based on the driver type set in Configuration.h.
872 878
  */
873
-#define MAXIMUM_STEPPER_RATE 250000
879
+//#define MAXIMUM_STEPPER_RATE 250000
874 880
 
875 881
 // @section temperature
876 882
 
@@ -1038,23 +1044,12 @@
1038 1044
 // @section tmc
1039 1045
 
1040 1046
 /**
1041
- * Enable this section if you have TMC26X motor drivers.
1042
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1043
- * (https://github.com/trinamic/TMC26XStepper.git)
1047
+ * TMC26X Stepper Driver options
1048
+ *
1049
+ * The TMC26XStepper library is required for this stepper driver.
1050
+ * https://github.com/trinamic/TMC26XStepper
1044 1051
  */
1045
-//#define HAVE_TMC26X
1046
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1047
-  //#define X_IS_TMC26X
1048
-  //#define X2_IS_TMC26X
1049
-  //#define Y_IS_TMC26X
1050
-  //#define Y2_IS_TMC26X
1051
-  //#define Z_IS_TMC26X
1052
-  //#define Z2_IS_TMC26X
1053
-  //#define E0_IS_TMC26X
1054
-  //#define E1_IS_TMC26X
1055
-  //#define E2_IS_TMC26X
1056
-  //#define E3_IS_TMC26X
1057
-  //#define E4_IS_TMC26X
1052
+#if HAS_DRIVER(TMC26X)
1058 1053
 
1059 1054
   #define X_MAX_CURRENT     1000 // in mA
1060 1055
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1100,62 +1095,29 @@
1100 1095
   #define E4_SENSE_RESISTOR   91
1101 1096
   #define E4_MICROSTEPS       16
1102 1097
 
1103
-#endif
1098
+#endif // TMC26X
1104 1099
 
1105 1100
 // @section tmc_smart
1106 1101
 
1107 1102
 /**
1108
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1109
- *
1110
- * You'll also need the TMC2130Stepper Arduino library
1111
- * (https://github.com/teemuatlut/TMC2130Stepper).
1112
- *
1113 1103
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1114 1104
  * the hardware SPI interface on your board and define the required CS pins
1115 1105
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1116 1106
  * You may also use software SPI if you wish to use general purpose IO pins.
1117
- */
1118
-//#define HAVE_TMC2130
1119
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1120
-  //#define X_IS_TMC2130
1121
-  //#define X2_IS_TMC2130
1122
-  //#define Y_IS_TMC2130
1123
-  //#define Y2_IS_TMC2130
1124
-  //#define Z_IS_TMC2130
1125
-  //#define Z2_IS_TMC2130
1126
-  //#define E0_IS_TMC2130
1127
-  //#define E1_IS_TMC2130
1128
-  //#define E2_IS_TMC2130
1129
-  //#define E3_IS_TMC2130
1130
-  //#define E4_IS_TMC2130
1131
-#endif
1132
-
1133
-/**
1134
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1135
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1107
+ *
1108
+ * The TMC2130Stepper library is required for this stepper driver.
1109
+ * https://github.com/teemuatlut/TMC2130Stepper
1110
+ *
1111
+ * To use TMC2208 stepper UART-configurable stepper drivers
1112
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1136 1113
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1137 1114
  * to PDN_UART without a resistor.
1138 1115
  * The drivers can also be used with hardware serial.
1139 1116
  *
1140
- * You'll also need the TMC2208Stepper Arduino library
1141
- * (https://github.com/teemuatlut/TMC2208Stepper).
1117
+ * The TMC2208Stepper library is required for this stepper driver.
1118
+ * https://github.com/teemuatlut/TMC2208Stepper
1142 1119
  */
1143
-//#define HAVE_TMC2208
1144
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1145
-  //#define X_IS_TMC2208
1146
-  //#define X2_IS_TMC2208
1147
-  //#define Y_IS_TMC2208
1148
-  //#define Y2_IS_TMC2208
1149
-  //#define Z_IS_TMC2208
1150
-  //#define Z2_IS_TMC2208
1151
-  //#define E0_IS_TMC2208
1152
-  //#define E1_IS_TMC2208
1153
-  //#define E2_IS_TMC2208
1154
-  //#define E3_IS_TMC2208
1155
-  //#define E4_IS_TMC2208
1156
-#endif
1157
-
1158
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1120
+#if HAS_TRINAMIC
1159 1121
 
1160 1122
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1161 1123
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1310,25 +1272,12 @@
1310 1272
 // @section L6470
1311 1273
 
1312 1274
 /**
1313
- * Enable this section if you have L6470 motor drivers.
1314
- * You need to import the L6470 library into the Arduino IDE for this.
1315
- * (https://github.com/ameyer/Arduino-L6470)
1275
+ * L6470 Stepper Driver options
1276
+ *
1277
+ * The Arduino-L6470 library is required for this stepper driver.
1278
+ * https://github.com/ameyer/Arduino-L6470
1316 1279
  */
1317
-
1318
-//#define HAVE_L6470DRIVER
1319
-#if ENABLED(HAVE_L6470DRIVER)
1320
-
1321
-  //#define X_IS_L6470
1322
-  //#define X2_IS_L6470
1323
-  //#define Y_IS_L6470
1324
-  //#define Y2_IS_L6470
1325
-  //#define Z_IS_L6470
1326
-  //#define Z2_IS_L6470
1327
-  //#define E0_IS_L6470
1328
-  //#define E1_IS_L6470
1329
-  //#define E2_IS_L6470
1330
-  //#define E3_IS_L6470
1331
-  //#define E4_IS_L6470
1280
+#if HAS_DRIVER(L6470)
1332 1281
 
1333 1282
   #define X_MICROSTEPS      16 // number of microsteps
1334 1283
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1374,7 +1323,7 @@
1374 1323
   #define E4_OVERCURRENT  2000
1375 1324
   #define E4_STALLCURRENT 1500
1376 1325
 
1377
-#endif
1326
+#endif // L6470
1378 1327
 
1379 1328
 /**
1380 1329
  * TWI/I2C BUS

+ 23
- 0
Marlin/src/config/examples/delta/kossel_mini/Configuration.h View File

@@ -617,6 +617,29 @@
617 617
 #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
618 618
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
619 619
 
620
+/**
621
+ * Specify Stepper Driver types
622
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
623
+ * Stepper timing options can be overridden in Configuration_adv.h
624
+ *
625
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
626
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
627
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
628
+ *          TMC5130, TMC5130_STANDALONE
629
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
630
+ */
631
+#define X_DRIVER_TYPE  A4988
632
+#define Y_DRIVER_TYPE  A4988
633
+#define Z_DRIVER_TYPE  A4988
634
+#define X2_DRIVER_TYPE A4988
635
+#define Y2_DRIVER_TYPE A4988
636
+#define Z2_DRIVER_TYPE A4988
637
+#define E0_DRIVER_TYPE A4988
638
+#define E1_DRIVER_TYPE A4988
639
+#define E2_DRIVER_TYPE A4988
640
+#define E3_DRIVER_TYPE A4988
641
+#define E4_DRIVER_TYPE A4988
642
+
620 643
 // Enable this feature if all enabled endstop pins are interrupt-capable.
621 644
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
622 645
 //#define ENDSTOP_INTERRUPTS_FEATURE

+ 37
- 88
Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h View File

@@ -839,15 +839,17 @@
839 839
 
840 840
 /**
841 841
  * Minimum delay after setting the stepper DIR (in ns)
842
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
843
- *   20 : Minimum for TMC2xxx drivers
844
- *  200 : Minimum for A4988 drivers
845
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
846
- *  650 : Minimum for DRV8825 drivers
847
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
848
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
842
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
843
+ *    20 : Minimum for TMC2xxx drivers
844
+ *   200 : Minimum for A4988 drivers
845
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
846
+ *   650 : Minimum for DRV8825 drivers
847
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
848
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
849
+ *
850
+ * Override the default value based on the driver type set in Configuration.h.
849 851
  */
850
-#define MINIMUM_STEPPER_DIR_DELAY 0
852
+//#define MINIMUM_STEPPER_DIR_DELAY 650
851 853
 
852 854
 /**
853 855
  * Minimum stepper driver pulse width (in µs)
@@ -857,8 +859,10 @@
857 859
  *   2 : Minimum for DRV8825 stepper drivers
858 860
  *   3 : Minimum for TB6600 stepper drivers
859 861
  *  30 : Minimum for TB6560 stepper drivers
862
+ *
863
+ * Override the default value based on the driver type set in Configuration.h.
860 864
  */
861
-#define MINIMUM_STEPPER_PULSE 2
865
+//#define MINIMUM_STEPPER_PULSE 2
862 866
 
863 867
 /**
864 868
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -869,8 +873,10 @@
869 873
  *  150000 : Maximum for TB6600 stepper driver
870 874
  *  130000 : Maximum for LV8729 stepper driver
871 875
  *   15000 : Maximum for TB6560 stepper driver
876
+ *
877
+ * Override the default value based on the driver type set in Configuration.h.
872 878
  */
873
-#define MAXIMUM_STEPPER_RATE 250000
879
+//#define MAXIMUM_STEPPER_RATE 250000
874 880
 
875 881
 // @section temperature
876 882
 
@@ -1038,23 +1044,12 @@
1038 1044
 // @section tmc
1039 1045
 
1040 1046
 /**
1041
- * Enable this section if you have TMC26X motor drivers.
1042
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1043
- * (https://github.com/trinamic/TMC26XStepper.git)
1047
+ * TMC26X Stepper Driver options
1048
+ *
1049
+ * The TMC26XStepper library is required for this stepper driver.
1050
+ * https://github.com/trinamic/TMC26XStepper
1044 1051
  */
1045
-//#define HAVE_TMC26X
1046
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1047
-  //#define X_IS_TMC26X
1048
-  //#define X2_IS_TMC26X
1049
-  //#define Y_IS_TMC26X
1050
-  //#define Y2_IS_TMC26X
1051
-  //#define Z_IS_TMC26X
1052
-  //#define Z2_IS_TMC26X
1053
-  //#define E0_IS_TMC26X
1054
-  //#define E1_IS_TMC26X
1055
-  //#define E2_IS_TMC26X
1056
-  //#define E3_IS_TMC26X
1057
-  //#define E4_IS_TMC26X
1052
+#if HAS_DRIVER(TMC26X)
1058 1053
 
1059 1054
   #define X_MAX_CURRENT     1000 // in mA
1060 1055
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1100,62 +1095,29 @@
1100 1095
   #define E4_SENSE_RESISTOR   91
1101 1096
   #define E4_MICROSTEPS       16
1102 1097
 
1103
-#endif
1098
+#endif // TMC26X
1104 1099
 
1105 1100
 // @section tmc_smart
1106 1101
 
1107 1102
 /**
1108
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1109
- *
1110
- * You'll also need the TMC2130Stepper Arduino library
1111
- * (https://github.com/teemuatlut/TMC2130Stepper).
1112
- *
1113 1103
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1114 1104
  * the hardware SPI interface on your board and define the required CS pins
1115 1105
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1116 1106
  * You may also use software SPI if you wish to use general purpose IO pins.
1117
- */
1118
-//#define HAVE_TMC2130
1119
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1120
-  //#define X_IS_TMC2130
1121
-  //#define X2_IS_TMC2130
1122
-  //#define Y_IS_TMC2130
1123
-  //#define Y2_IS_TMC2130
1124
-  //#define Z_IS_TMC2130
1125
-  //#define Z2_IS_TMC2130
1126
-  //#define E0_IS_TMC2130
1127
-  //#define E1_IS_TMC2130
1128
-  //#define E2_IS_TMC2130
1129
-  //#define E3_IS_TMC2130
1130
-  //#define E4_IS_TMC2130
1131
-#endif
1132
-
1133
-/**
1134
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1135
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1107
+ *
1108
+ * The TMC2130Stepper library is required for this stepper driver.
1109
+ * https://github.com/teemuatlut/TMC2130Stepper
1110
+ *
1111
+ * To use TMC2208 stepper UART-configurable stepper drivers
1112
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1136 1113
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1137 1114
  * to PDN_UART without a resistor.
1138 1115
  * The drivers can also be used with hardware serial.
1139 1116
  *
1140
- * You'll also need the TMC2208Stepper Arduino library
1141
- * (https://github.com/teemuatlut/TMC2208Stepper).
1117
+ * The TMC2208Stepper library is required for this stepper driver.
1118
+ * https://github.com/teemuatlut/TMC2208Stepper
1142 1119
  */
1143
-//#define HAVE_TMC2208
1144
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1145
-  //#define X_IS_TMC2208
1146
-  //#define X2_IS_TMC2208
1147
-  //#define Y_IS_TMC2208
1148
-  //#define Y2_IS_TMC2208
1149
-  //#define Z_IS_TMC2208
1150
-  //#define Z2_IS_TMC2208
1151
-  //#define E0_IS_TMC2208
1152
-  //#define E1_IS_TMC2208
1153
-  //#define E2_IS_TMC2208
1154
-  //#define E3_IS_TMC2208
1155
-  //#define E4_IS_TMC2208
1156
-#endif
1157
-
1158
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1120
+#if HAS_TRINAMIC
1159 1121
 
1160 1122
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1161 1123
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1310,25 +1272,12 @@
1310 1272
 // @section L6470
1311 1273
 
1312 1274
 /**
1313
- * Enable this section if you have L6470 motor drivers.
1314
- * You need to import the L6470 library into the Arduino IDE for this.
1315
- * (https://github.com/ameyer/Arduino-L6470)
1275
+ * L6470 Stepper Driver options
1276
+ *
1277
+ * The Arduino-L6470 library is required for this stepper driver.
1278
+ * https://github.com/ameyer/Arduino-L6470
1316 1279
  */
1317
-
1318
-//#define HAVE_L6470DRIVER
1319
-#if ENABLED(HAVE_L6470DRIVER)
1320
-
1321
-  //#define X_IS_L6470
1322
-  //#define X2_IS_L6470
1323
-  //#define Y_IS_L6470
1324
-  //#define Y2_IS_L6470
1325
-  //#define Z_IS_L6470
1326
-  //#define Z2_IS_L6470
1327
-  //#define E0_IS_L6470
1328
-  //#define E1_IS_L6470
1329
-  //#define E2_IS_L6470
1330
-  //#define E3_IS_L6470
1331
-  //#define E4_IS_L6470
1280
+#if HAS_DRIVER(L6470)
1332 1281
 
1333 1282
   #define X_MICROSTEPS      16 // number of microsteps
1334 1283
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1374,7 +1323,7 @@
1374 1323
   #define E4_OVERCURRENT  2000
1375 1324
   #define E4_STALLCURRENT 1500
1376 1325
 
1377
-#endif
1326
+#endif // L6470
1378 1327
 
1379 1328
 /**
1380 1329
  * TWI/I2C BUS

+ 23
- 0
Marlin/src/config/examples/delta/kossel_pro/Configuration.h View File

@@ -603,6 +603,29 @@
603 603
 #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
604 604
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
605 605
 
606
+/**
607
+ * Specify Stepper Driver types
608
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
609
+ * Stepper timing options can be overridden in Configuration_adv.h
610
+ *
611
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
612
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
613
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
614
+ *          TMC5130, TMC5130_STANDALONE
615
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
616
+ */
617
+#define X_DRIVER_TYPE  A4988
618
+#define Y_DRIVER_TYPE  A4988
619
+#define Z_DRIVER_TYPE  A4988
620
+#define X2_DRIVER_TYPE A4988
621
+#define Y2_DRIVER_TYPE A4988
622
+#define Z2_DRIVER_TYPE A4988
623
+#define E0_DRIVER_TYPE A4988
624
+#define E1_DRIVER_TYPE A4988
625
+#define E2_DRIVER_TYPE A4988
626
+#define E3_DRIVER_TYPE A4988
627
+#define E4_DRIVER_TYPE A4988
628
+
606 629
 // Enable this feature if all enabled endstop pins are interrupt-capable.
607 630
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
608 631
 //#define ENDSTOP_INTERRUPTS_FEATURE

+ 37
- 88
Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h View File

@@ -844,15 +844,17 @@
844 844
 
845 845
 /**
846 846
  * Minimum delay after setting the stepper DIR (in ns)
847
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
848
- *   20 : Minimum for TMC2xxx drivers
849
- *  200 : Minimum for A4988 drivers
850
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
851
- *  650 : Minimum for DRV8825 drivers
852
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
853
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
848
+ *    20 : Minimum for TMC2xxx drivers
849
+ *   200 : Minimum for A4988 drivers
850
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
851
+ *   650 : Minimum for DRV8825 drivers
852
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
853
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
854
+ *
855
+ * Override the default value based on the driver type set in Configuration.h.
854 856
  */
855
-#define MINIMUM_STEPPER_DIR_DELAY 0
857
+//#define MINIMUM_STEPPER_DIR_DELAY 650
856 858
 
857 859
 /**
858 860
  * Minimum stepper driver pulse width (in µs)
@@ -862,8 +864,10 @@
862 864
  *   2 : Minimum for DRV8825 stepper drivers
863 865
  *   3 : Minimum for TB6600 stepper drivers
864 866
  *  30 : Minimum for TB6560 stepper drivers
867
+ *
868
+ * Override the default value based on the driver type set in Configuration.h.
865 869
  */
866
-#define MINIMUM_STEPPER_PULSE 2
870
+//#define MINIMUM_STEPPER_PULSE 2
867 871
 
868 872
 /**
869 873
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -874,8 +878,10 @@
874 878
  *  150000 : Maximum for TB6600 stepper driver
875 879
  *  130000 : Maximum for LV8729 stepper driver
876 880
  *   15000 : Maximum for TB6560 stepper driver
881
+ *
882
+ * Override the default value based on the driver type set in Configuration.h.
877 883
  */
878
-#define MAXIMUM_STEPPER_RATE 250000
884
+//#define MAXIMUM_STEPPER_RATE 250000
879 885
 
880 886
 // @section temperature
881 887
 
@@ -1043,23 +1049,12 @@
1043 1049
 // @section tmc
1044 1050
 
1045 1051
 /**
1046
- * Enable this section if you have TMC26X motor drivers.
1047
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1048
- * (https://github.com/trinamic/TMC26XStepper.git)
1052
+ * TMC26X Stepper Driver options
1053
+ *
1054
+ * The TMC26XStepper library is required for this stepper driver.
1055
+ * https://github.com/trinamic/TMC26XStepper
1049 1056
  */
1050
-//#define HAVE_TMC26X
1051
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1052
-  //#define X_IS_TMC26X
1053
-  //#define X2_IS_TMC26X
1054
-  //#define Y_IS_TMC26X
1055
-  //#define Y2_IS_TMC26X
1056
-  //#define Z_IS_TMC26X
1057
-  //#define Z2_IS_TMC26X
1058
-  //#define E0_IS_TMC26X
1059
-  //#define E1_IS_TMC26X
1060
-  //#define E2_IS_TMC26X
1061
-  //#define E3_IS_TMC26X
1062
-  //#define E4_IS_TMC26X
1057
+#if HAS_DRIVER(TMC26X)
1063 1058
 
1064 1059
   #define X_MAX_CURRENT     1000 // in mA
1065 1060
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1105,62 +1100,29 @@
1105 1100
   #define E4_SENSE_RESISTOR   91
1106 1101
   #define E4_MICROSTEPS       16
1107 1102
 
1108
-#endif
1103
+#endif // TMC26X
1109 1104
 
1110 1105
 // @section tmc_smart
1111 1106
 
1112 1107
 /**
1113
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1114
- *
1115
- * You'll also need the TMC2130Stepper Arduino library
1116
- * (https://github.com/teemuatlut/TMC2130Stepper).
1117
- *
1118 1108
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1119 1109
  * the hardware SPI interface on your board and define the required CS pins
1120 1110
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1121 1111
  * You may also use software SPI if you wish to use general purpose IO pins.
1122
- */
1123
-//#define HAVE_TMC2130
1124
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1125
-  //#define X_IS_TMC2130
1126
-  //#define X2_IS_TMC2130
1127
-  //#define Y_IS_TMC2130
1128
-  //#define Y2_IS_TMC2130
1129
-  //#define Z_IS_TMC2130
1130
-  //#define Z2_IS_TMC2130
1131
-  //#define E0_IS_TMC2130
1132
-  //#define E1_IS_TMC2130
1133
-  //#define E2_IS_TMC2130
1134
-  //#define E3_IS_TMC2130
1135
-  //#define E4_IS_TMC2130
1136
-#endif
1137
-
1138
-/**
1139
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1140
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1112
+ *
1113
+ * The TMC2130Stepper library is required for this stepper driver.
1114
+ * https://github.com/teemuatlut/TMC2130Stepper
1115
+ *
1116
+ * To use TMC2208 stepper UART-configurable stepper drivers
1117
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1141 1118
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1142 1119
  * to PDN_UART without a resistor.
1143 1120
  * The drivers can also be used with hardware serial.
1144 1121
  *
1145
- * You'll also need the TMC2208Stepper Arduino library
1146
- * (https://github.com/teemuatlut/TMC2208Stepper).
1122
+ * The TMC2208Stepper library is required for this stepper driver.
1123
+ * https://github.com/teemuatlut/TMC2208Stepper
1147 1124
  */
1148
-//#define HAVE_TMC2208
1149
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1150
-  //#define X_IS_TMC2208
1151
-  //#define X2_IS_TMC2208
1152
-  //#define Y_IS_TMC2208
1153
-  //#define Y2_IS_TMC2208
1154
-  //#define Z_IS_TMC2208
1155
-  //#define Z2_IS_TMC2208
1156
-  //#define E0_IS_TMC2208
1157
-  //#define E1_IS_TMC2208
1158
-  //#define E2_IS_TMC2208
1159
-  //#define E3_IS_TMC2208
1160
-  //#define E4_IS_TMC2208
1161
-#endif
1162
-
1163
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1125
+#if HAS_TRINAMIC
1164 1126
 
1165 1127
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1166 1128
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1315,25 +1277,12 @@
1315 1277
 // @section L6470
1316 1278
 
1317 1279
 /**
1318
- * Enable this section if you have L6470 motor drivers.
1319
- * You need to import the L6470 library into the Arduino IDE for this.
1320
- * (https://github.com/ameyer/Arduino-L6470)
1280
+ * L6470 Stepper Driver options
1281
+ *
1282
+ * The Arduino-L6470 library is required for this stepper driver.
1283
+ * https://github.com/ameyer/Arduino-L6470
1321 1284
  */
1322
-
1323
-//#define HAVE_L6470DRIVER
1324
-#if ENABLED(HAVE_L6470DRIVER)
1325
-
1326
-  //#define X_IS_L6470
1327
-  //#define X2_IS_L6470
1328
-  //#define Y_IS_L6470
1329
-  //#define Y2_IS_L6470
1330
-  //#define Z_IS_L6470
1331
-  //#define Z2_IS_L6470
1332
-  //#define E0_IS_L6470
1333
-  //#define E1_IS_L6470
1334
-  //#define E2_IS_L6470
1335
-  //#define E3_IS_L6470
1336
-  //#define E4_IS_L6470
1285
+#if HAS_DRIVER(L6470)
1337 1286
 
1338 1287
   #define X_MICROSTEPS      16 // number of microsteps
1339 1288
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1379,7 +1328,7 @@
1379 1328
   #define E4_OVERCURRENT  2000
1380 1329
   #define E4_STALLCURRENT 1500
1381 1330
 
1382
-#endif
1331
+#endif // L6470
1383 1332
 
1384 1333
 /**
1385 1334
  * TWI/I2C BUS

+ 23
- 0
Marlin/src/config/examples/delta/kossel_xl/Configuration.h View File

@@ -621,6 +621,29 @@
621 621
 #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
622 622
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
623 623
 
624
+/**
625
+ * Specify Stepper Driver types
626
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
627
+ * Stepper timing options can be overridden in Configuration_adv.h
628
+ *
629
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
630
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
631
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
632
+ *          TMC5130, TMC5130_STANDALONE
633
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
634
+ */
635
+#define X_DRIVER_TYPE  A4988
636
+#define Y_DRIVER_TYPE  A4988
637
+#define Z_DRIVER_TYPE  A4988
638
+#define X2_DRIVER_TYPE A4988
639
+#define Y2_DRIVER_TYPE A4988
640
+#define Z2_DRIVER_TYPE A4988
641
+#define E0_DRIVER_TYPE A4988
642
+#define E1_DRIVER_TYPE A4988
643
+#define E2_DRIVER_TYPE A4988
644
+#define E3_DRIVER_TYPE A4988
645
+#define E4_DRIVER_TYPE A4988
646
+
624 647
 // Enable this feature if all enabled endstop pins are interrupt-capable.
625 648
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
626 649
 //#define ENDSTOP_INTERRUPTS_FEATURE

+ 37
- 88
Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h View File

@@ -839,15 +839,17 @@
839 839
 
840 840
 /**
841 841
  * Minimum delay after setting the stepper DIR (in ns)
842
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
843
- *   20 : Minimum for TMC2xxx drivers
844
- *  200 : Minimum for A4988 drivers
845
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
846
- *  650 : Minimum for DRV8825 drivers
847
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
848
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
842
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
843
+ *    20 : Minimum for TMC2xxx drivers
844
+ *   200 : Minimum for A4988 drivers
845
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
846
+ *   650 : Minimum for DRV8825 drivers
847
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
848
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
849
+ *
850
+ * Override the default value based on the driver type set in Configuration.h.
849 851
  */
850
-#define MINIMUM_STEPPER_DIR_DELAY 0
852
+//#define MINIMUM_STEPPER_DIR_DELAY 650
851 853
 
852 854
 /**
853 855
  * Minimum stepper driver pulse width (in µs)
@@ -857,8 +859,10 @@
857 859
  *   2 : Minimum for DRV8825 stepper drivers
858 860
  *   3 : Minimum for TB6600 stepper drivers
859 861
  *  30 : Minimum for TB6560 stepper drivers
862
+ *
863
+ * Override the default value based on the driver type set in Configuration.h.
860 864
  */
861
-#define MINIMUM_STEPPER_PULSE 2
865
+//#define MINIMUM_STEPPER_PULSE 2
862 866
 
863 867
 /**
864 868
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -869,8 +873,10 @@
869 873
  *  150000 : Maximum for TB6600 stepper driver
870 874
  *  130000 : Maximum for LV8729 stepper driver
871 875
  *   15000 : Maximum for TB6560 stepper driver
876
+ *
877
+ * Override the default value based on the driver type set in Configuration.h.
872 878
  */
873
-#define MAXIMUM_STEPPER_RATE 250000
879
+//#define MAXIMUM_STEPPER_RATE 250000
874 880
 
875 881
 // @section temperature
876 882
 
@@ -1038,23 +1044,12 @@
1038 1044
 // @section tmc
1039 1045
 
1040 1046
 /**
1041
- * Enable this section if you have TMC26X motor drivers.
1042
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1043
- * (https://github.com/trinamic/TMC26XStepper.git)
1047
+ * TMC26X Stepper Driver options
1048
+ *
1049
+ * The TMC26XStepper library is required for this stepper driver.
1050
+ * https://github.com/trinamic/TMC26XStepper
1044 1051
  */
1045
-//#define HAVE_TMC26X
1046
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1047
-  //#define X_IS_TMC26X
1048
-  //#define X2_IS_TMC26X
1049
-  //#define Y_IS_TMC26X
1050
-  //#define Y2_IS_TMC26X
1051
-  //#define Z_IS_TMC26X
1052
-  //#define Z2_IS_TMC26X
1053
-  //#define E0_IS_TMC26X
1054
-  //#define E1_IS_TMC26X
1055
-  //#define E2_IS_TMC26X
1056
-  //#define E3_IS_TMC26X
1057
-  //#define E4_IS_TMC26X
1052
+#if HAS_DRIVER(TMC26X)
1058 1053
 
1059 1054
   #define X_MAX_CURRENT     1000 // in mA
1060 1055
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1100,62 +1095,29 @@
1100 1095
   #define E4_SENSE_RESISTOR   91
1101 1096
   #define E4_MICROSTEPS       16
1102 1097
 
1103
-#endif
1098
+#endif // TMC26X
1104 1099
 
1105 1100
 // @section tmc_smart
1106 1101
 
1107 1102
 /**
1108
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1109
- *
1110
- * You'll also need the TMC2130Stepper Arduino library
1111
- * (https://github.com/teemuatlut/TMC2130Stepper).
1112
- *
1113 1103
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1114 1104
  * the hardware SPI interface on your board and define the required CS pins
1115 1105
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1116 1106
  * You may also use software SPI if you wish to use general purpose IO pins.
1117
- */
1118
-//#define HAVE_TMC2130
1119
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1120
-  //#define X_IS_TMC2130
1121
-  //#define X2_IS_TMC2130
1122
-  //#define Y_IS_TMC2130
1123
-  //#define Y2_IS_TMC2130
1124
-  //#define Z_IS_TMC2130
1125
-  //#define Z2_IS_TMC2130
1126
-  //#define E0_IS_TMC2130
1127
-  //#define E1_IS_TMC2130
1128
-  //#define E2_IS_TMC2130
1129
-  //#define E3_IS_TMC2130
1130
-  //#define E4_IS_TMC2130
1131
-#endif
1132
-
1133
-/**
1134
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1135
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1107
+ *
1108
+ * The TMC2130Stepper library is required for this stepper driver.
1109
+ * https://github.com/teemuatlut/TMC2130Stepper
1110
+ *
1111
+ * To use TMC2208 stepper UART-configurable stepper drivers
1112
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1136 1113
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1137 1114
  * to PDN_UART without a resistor.
1138 1115
  * The drivers can also be used with hardware serial.
1139 1116
  *
1140
- * You'll also need the TMC2208Stepper Arduino library
1141
- * (https://github.com/teemuatlut/TMC2208Stepper).
1117
+ * The TMC2208Stepper library is required for this stepper driver.
1118
+ * https://github.com/teemuatlut/TMC2208Stepper
1142 1119
  */
1143
-//#define HAVE_TMC2208
1144
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1145
-  //#define X_IS_TMC2208
1146
-  //#define X2_IS_TMC2208
1147
-  //#define Y_IS_TMC2208
1148
-  //#define Y2_IS_TMC2208
1149
-  //#define Z_IS_TMC2208
1150
-  //#define Z2_IS_TMC2208
1151
-  //#define E0_IS_TMC2208
1152
-  //#define E1_IS_TMC2208
1153
-  //#define E2_IS_TMC2208
1154
-  //#define E3_IS_TMC2208
1155
-  //#define E4_IS_TMC2208
1156
-#endif
1157
-
1158
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1120
+#if HAS_TRINAMIC
1159 1121
 
1160 1122
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1161 1123
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1310,25 +1272,12 @@
1310 1272
 // @section L6470
1311 1273
 
1312 1274
 /**
1313
- * Enable this section if you have L6470 motor drivers.
1314
- * You need to import the L6470 library into the Arduino IDE for this.
1315
- * (https://github.com/ameyer/Arduino-L6470)
1275
+ * L6470 Stepper Driver options
1276
+ *
1277
+ * The Arduino-L6470 library is required for this stepper driver.
1278
+ * https://github.com/ameyer/Arduino-L6470
1316 1279
  */
1317
-
1318
-//#define HAVE_L6470DRIVER
1319
-#if ENABLED(HAVE_L6470DRIVER)
1320
-
1321
-  //#define X_IS_L6470
1322
-  //#define X2_IS_L6470
1323
-  //#define Y_IS_L6470
1324
-  //#define Y2_IS_L6470
1325
-  //#define Z_IS_L6470
1326
-  //#define Z2_IS_L6470
1327
-  //#define E0_IS_L6470
1328
-  //#define E1_IS_L6470
1329
-  //#define E2_IS_L6470
1330
-  //#define E3_IS_L6470
1331
-  //#define E4_IS_L6470
1280
+#if HAS_DRIVER(L6470)
1332 1281
 
1333 1282
   #define X_MICROSTEPS      16 // number of microsteps
1334 1283
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1374,7 +1323,7 @@
1374 1323
   #define E4_OVERCURRENT  2000
1375 1324
   #define E4_STALLCURRENT 1500
1376 1325
 
1377
-#endif
1326
+#endif // L6470
1378 1327
 
1379 1328
 /**
1380 1329
  * TWI/I2C BUS

+ 24
- 1
Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h View File

@@ -564,9 +564,32 @@
564 564
 #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
565 565
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
566 566
 
567
+/**
568
+ * Specify Stepper Driver types
569
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
570
+ * Stepper timing options can be overridden in Configuration_adv.h
571
+ *
572
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
573
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
574
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
575
+ *          TMC5130, TMC5130_STANDALONE
576
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
577
+ */
578
+#define X_DRIVER_TYPE  A4988
579
+#define Y_DRIVER_TYPE  A4988
580
+#define Z_DRIVER_TYPE  A4988
581
+#define X2_DRIVER_TYPE A4988
582
+#define Y2_DRIVER_TYPE A4988
583
+#define Z2_DRIVER_TYPE A4988
584
+#define E0_DRIVER_TYPE A4988
585
+#define E1_DRIVER_TYPE A4988
586
+#define E2_DRIVER_TYPE A4988
587
+#define E3_DRIVER_TYPE A4988
588
+#define E4_DRIVER_TYPE A4988
589
+
567 590
 // Enable this feature if all enabled endstop pins are interrupt-capable.
568 591
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
569
-#define ENDSTOP_INTERRUPTS_FEATURE
592
+//#define ENDSTOP_INTERRUPTS_FEATURE
570 593
 
571 594
 /**
572 595
  * Endstop Noise Filter

+ 37
- 88
Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h View File

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 2
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 250000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,23 +1042,12 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-//#define HAVE_TMC26X
1044
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1045
-  //#define X_IS_TMC26X
1046
-  //#define X2_IS_TMC26X
1047
-  //#define Y_IS_TMC26X
1048
-  //#define Y2_IS_TMC26X
1049
-  //#define Z_IS_TMC26X
1050
-  //#define Z2_IS_TMC26X
1051
-  //#define E0_IS_TMC26X
1052
-  //#define E1_IS_TMC26X
1053
-  //#define E2_IS_TMC26X
1054
-  //#define E3_IS_TMC26X
1055
-  //#define E4_IS_TMC26X
1050
+#if HAS_DRIVER(TMC26X)
1056 1051
 
1057 1052
   #define X_MAX_CURRENT     1000 // in mA
1058 1053
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1098,62 +1093,29 @@
1098 1093
   #define E4_SENSE_RESISTOR   91
1099 1094
   #define E4_MICROSTEPS       16
1100 1095
 
1101
-#endif
1096
+#endif // TMC26X
1102 1097
 
1103 1098
 // @section tmc_smart
1104 1099
 
1105 1100
 /**
1106
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1107
- *
1108
- * You'll also need the TMC2130Stepper Arduino library
1109
- * (https://github.com/teemuatlut/TMC2130Stepper).
1110
- *
1111 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1112 1102
  * the hardware SPI interface on your board and define the required CS pins
1113 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1114 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1115
- */
1116
-//#define HAVE_TMC2130
1117
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1118
-  //#define X_IS_TMC2130
1119
-  //#define X2_IS_TMC2130
1120
-  //#define Y_IS_TMC2130
1121
-  //#define Y2_IS_TMC2130
1122
-  //#define Z_IS_TMC2130
1123
-  //#define Z2_IS_TMC2130
1124
-  //#define E0_IS_TMC2130
1125
-  //#define E1_IS_TMC2130
1126
-  //#define E2_IS_TMC2130
1127
-  //#define E3_IS_TMC2130
1128
-  //#define E4_IS_TMC2130
1129
-#endif
1130
-
1131
-/**
1132
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1133
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1134 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1135 1112
  * to PDN_UART without a resistor.
1136 1113
  * The drivers can also be used with hardware serial.
1137 1114
  *
1138
- * You'll also need the TMC2208Stepper Arduino library
1139
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1140 1117
  */
1141
-//#define HAVE_TMC2208
1142
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1143
-  //#define X_IS_TMC2208
1144
-  //#define X2_IS_TMC2208
1145
-  //#define Y_IS_TMC2208
1146
-  //#define Y2_IS_TMC2208
1147
-  //#define Z_IS_TMC2208
1148
-  //#define Z2_IS_TMC2208
1149
-  //#define E0_IS_TMC2208
1150
-  //#define E1_IS_TMC2208
1151
-  //#define E2_IS_TMC2208
1152
-  //#define E3_IS_TMC2208
1153
-  //#define E4_IS_TMC2208
1154
-#endif
1155
-
1156
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1157 1119
 
1158 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1159 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1308,25 +1270,12 @@
1308 1270
 // @section L6470
1309 1271
 
1310 1272
 /**
1311
- * Enable this section if you have L6470 motor drivers.
1312
- * You need to import the L6470 library into the Arduino IDE for this.
1313
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1314 1277
  */
1315
-
1316
-//#define HAVE_L6470DRIVER
1317
-#if ENABLED(HAVE_L6470DRIVER)
1318
-
1319
-  //#define X_IS_L6470
1320
-  //#define X2_IS_L6470
1321
-  //#define Y_IS_L6470
1322
-  //#define Y2_IS_L6470
1323
-  //#define Z_IS_L6470
1324
-  //#define Z2_IS_L6470
1325
-  //#define E0_IS_L6470
1326
-  //#define E1_IS_L6470
1327
-  //#define E2_IS_L6470
1328
-  //#define E3_IS_L6470
1329
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1330 1279
 
1331 1280
   #define X_MICROSTEPS      16 // number of microsteps
1332 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1372,7 +1321,7 @@
1372 1321
   #define E4_OVERCURRENT  2000
1373 1322
   #define E4_STALLCURRENT 1500
1374 1323
 
1375
-#endif
1324
+#endif // L6470
1376 1325
 
1377 1326
 /**
1378 1327
  * TWI/I2C BUS

+ 23
- 0
Marlin/src/config/examples/makibox/Configuration.h View File

@@ -554,6 +554,29 @@
554 554
 #define Z_MAX_ENDSTOP_INVERTING true  // set to true to invert the logic of the endstop.
555 555
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
556 556
 
557
+/**
558
+ * Specify Stepper Driver types
559
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
560
+ * Stepper timing options can be overridden in Configuration_adv.h
561
+ *
562
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
563
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
564
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
565
+ *          TMC5130, TMC5130_STANDALONE
566
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
567
+ */
568
+#define X_DRIVER_TYPE  A4988
569
+#define Y_DRIVER_TYPE  A4988
570
+#define Z_DRIVER_TYPE  A4988
571
+#define X2_DRIVER_TYPE A4988
572
+#define Y2_DRIVER_TYPE A4988
573
+#define Z2_DRIVER_TYPE A4988
574
+#define E0_DRIVER_TYPE A4988
575
+#define E1_DRIVER_TYPE A4988
576
+#define E2_DRIVER_TYPE A4988
577
+#define E3_DRIVER_TYPE A4988
578
+#define E4_DRIVER_TYPE A4988
579
+
557 580
 // Enable this feature if all enabled endstop pins are interrupt-capable.
558 581
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
559 582
 //#define ENDSTOP_INTERRUPTS_FEATURE

+ 37
- 88
Marlin/src/config/examples/makibox/Configuration_adv.h View File

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 2
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 250000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,23 +1042,12 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-//#define HAVE_TMC26X
1044
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1045
-  //#define X_IS_TMC26X
1046
-  //#define X2_IS_TMC26X
1047
-  //#define Y_IS_TMC26X
1048
-  //#define Y2_IS_TMC26X
1049
-  //#define Z_IS_TMC26X
1050
-  //#define Z2_IS_TMC26X
1051
-  //#define E0_IS_TMC26X
1052
-  //#define E1_IS_TMC26X
1053
-  //#define E2_IS_TMC26X
1054
-  //#define E3_IS_TMC26X
1055
-  //#define E4_IS_TMC26X
1050
+#if HAS_DRIVER(TMC26X)
1056 1051
 
1057 1052
   #define X_MAX_CURRENT     1000 // in mA
1058 1053
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1098,62 +1093,29 @@
1098 1093
   #define E4_SENSE_RESISTOR   91
1099 1094
   #define E4_MICROSTEPS       16
1100 1095
 
1101
-#endif
1096
+#endif // TMC26X
1102 1097
 
1103 1098
 // @section tmc_smart
1104 1099
 
1105 1100
 /**
1106
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1107
- *
1108
- * You'll also need the TMC2130Stepper Arduino library
1109
- * (https://github.com/teemuatlut/TMC2130Stepper).
1110
- *
1111 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1112 1102
  * the hardware SPI interface on your board and define the required CS pins
1113 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1114 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1115
- */
1116
-//#define HAVE_TMC2130
1117
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1118
-  //#define X_IS_TMC2130
1119
-  //#define X2_IS_TMC2130
1120
-  //#define Y_IS_TMC2130
1121
-  //#define Y2_IS_TMC2130
1122
-  //#define Z_IS_TMC2130
1123
-  //#define Z2_IS_TMC2130
1124
-  //#define E0_IS_TMC2130
1125
-  //#define E1_IS_TMC2130
1126
-  //#define E2_IS_TMC2130
1127
-  //#define E3_IS_TMC2130
1128
-  //#define E4_IS_TMC2130
1129
-#endif
1130
-
1131
-/**
1132
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1133
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1134 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1135 1112
  * to PDN_UART without a resistor.
1136 1113
  * The drivers can also be used with hardware serial.
1137 1114
  *
1138
- * You'll also need the TMC2208Stepper Arduino library
1139
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1140 1117
  */
1141
-//#define HAVE_TMC2208
1142
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1143
-  //#define X_IS_TMC2208
1144
-  //#define X2_IS_TMC2208
1145
-  //#define Y_IS_TMC2208
1146
-  //#define Y2_IS_TMC2208
1147
-  //#define Z_IS_TMC2208
1148
-  //#define Z2_IS_TMC2208
1149
-  //#define E0_IS_TMC2208
1150
-  //#define E1_IS_TMC2208
1151
-  //#define E2_IS_TMC2208
1152
-  //#define E3_IS_TMC2208
1153
-  //#define E4_IS_TMC2208
1154
-#endif
1155
-
1156
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1157 1119
 
1158 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1159 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1308,25 +1270,12 @@
1308 1270
 // @section L6470
1309 1271
 
1310 1272
 /**
1311
- * Enable this section if you have L6470 motor drivers.
1312
- * You need to import the L6470 library into the Arduino IDE for this.
1313
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1314 1277
  */
1315
-
1316
-//#define HAVE_L6470DRIVER
1317
-#if ENABLED(HAVE_L6470DRIVER)
1318
-
1319
-  //#define X_IS_L6470
1320
-  //#define X2_IS_L6470
1321
-  //#define Y_IS_L6470
1322
-  //#define Y2_IS_L6470
1323
-  //#define Z_IS_L6470
1324
-  //#define Z2_IS_L6470
1325
-  //#define E0_IS_L6470
1326
-  //#define E1_IS_L6470
1327
-  //#define E2_IS_L6470
1328
-  //#define E3_IS_L6470
1329
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1330 1279
 
1331 1280
   #define X_MICROSTEPS      16 // number of microsteps
1332 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1372,7 +1321,7 @@
1372 1321
   #define E4_OVERCURRENT  2000
1373 1322
   #define E4_STALLCURRENT 1500
1374 1323
 
1375
-#endif
1324
+#endif // L6470
1376 1325
 
1377 1326
 /**
1378 1327
  * TWI/I2C BUS

+ 23
- 0
Marlin/src/config/examples/stm32f103ret6/Configuration.h View File

@@ -553,6 +553,29 @@
553 553
 #define Z_MAX_ENDSTOP_INVERTING true  // set to true to invert the logic of the endstop.
554 554
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
555 555
 
556
+/**
557
+ * Specify Stepper Driver types
558
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
559
+ * Stepper timing options can be overridden in Configuration_adv.h
560
+ *
561
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
562
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
563
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
564
+ *          TMC5130, TMC5130_STANDALONE
565
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
566
+ */
567
+#define X_DRIVER_TYPE  A4988
568
+#define Y_DRIVER_TYPE  A4988
569
+#define Z_DRIVER_TYPE  A4988
570
+#define X2_DRIVER_TYPE A4988
571
+#define Y2_DRIVER_TYPE A4988
572
+#define Z2_DRIVER_TYPE A4988
573
+#define E0_DRIVER_TYPE A4988
574
+#define E1_DRIVER_TYPE A4988
575
+#define E2_DRIVER_TYPE A4988
576
+#define E3_DRIVER_TYPE A4988
577
+#define E4_DRIVER_TYPE A4988
578
+
556 579
 // Enable this feature if all enabled endstop pins are interrupt-capable.
557 580
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
558 581
 //#define ENDSTOP_INTERRUPTS_FEATURE

+ 37
- 88
Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h View File

@@ -837,15 +837,17 @@
837 837
 
838 838
 /**
839 839
  * Minimum delay after setting the stepper DIR (in ns)
840
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
- *   20 : Minimum for TMC2xxx drivers
842
- *  200 : Minimum for A4988 drivers
843
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
- *  650 : Minimum for DRV8825 drivers
845
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
840
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
841
+ *    20 : Minimum for TMC2xxx drivers
842
+ *   200 : Minimum for A4988 drivers
843
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
844
+ *   650 : Minimum for DRV8825 drivers
845
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
846
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
847
+ *
848
+ * Override the default value based on the driver type set in Configuration.h.
847 849
  */
848
-#define MINIMUM_STEPPER_DIR_DELAY 0
850
+//#define MINIMUM_STEPPER_DIR_DELAY 650
849 851
 
850 852
 /**
851 853
  * Minimum stepper driver pulse width (in µs)
@@ -855,8 +857,10 @@
855 857
  *   2 : Minimum for DRV8825 stepper drivers
856 858
  *   3 : Minimum for TB6600 stepper drivers
857 859
  *  30 : Minimum for TB6560 stepper drivers
860
+ *
861
+ * Override the default value based on the driver type set in Configuration.h.
858 862
  */
859
-#define MINIMUM_STEPPER_PULSE 30
863
+//#define MINIMUM_STEPPER_PULSE 2
860 864
 
861 865
 /**
862 866
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -867,8 +871,10 @@
867 871
  *  150000 : Maximum for TB6600 stepper driver
868 872
  *  130000 : Maximum for LV8729 stepper driver
869 873
  *   15000 : Maximum for TB6560 stepper driver
874
+ *
875
+ * Override the default value based on the driver type set in Configuration.h.
870 876
  */
871
-#define MAXIMUM_STEPPER_RATE 15000
877
+//#define MAXIMUM_STEPPER_RATE 250000
872 878
 
873 879
 // @section temperature
874 880
 
@@ -1036,23 +1042,12 @@
1036 1042
 // @section tmc
1037 1043
 
1038 1044
 /**
1039
- * Enable this section if you have TMC26X motor drivers.
1040
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1041
- * (https://github.com/trinamic/TMC26XStepper.git)
1045
+ * TMC26X Stepper Driver options
1046
+ *
1047
+ * The TMC26XStepper library is required for this stepper driver.
1048
+ * https://github.com/trinamic/TMC26XStepper
1042 1049
  */
1043
-//#define HAVE_TMC26X
1044
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1045
-  //#define X_IS_TMC26X
1046
-  //#define X2_IS_TMC26X
1047
-  //#define Y_IS_TMC26X
1048
-  //#define Y2_IS_TMC26X
1049
-  //#define Z_IS_TMC26X
1050
-  //#define Z2_IS_TMC26X
1051
-  //#define E0_IS_TMC26X
1052
-  //#define E1_IS_TMC26X
1053
-  //#define E2_IS_TMC26X
1054
-  //#define E3_IS_TMC26X
1055
-  //#define E4_IS_TMC26X
1050
+#if HAS_DRIVER(TMC26X)
1056 1051
 
1057 1052
   #define X_MAX_CURRENT     1000 // in mA
1058 1053
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1098,62 +1093,29 @@
1098 1093
   #define E4_SENSE_RESISTOR   91
1099 1094
   #define E4_MICROSTEPS       16
1100 1095
 
1101
-#endif
1096
+#endif // TMC26X
1102 1097
 
1103 1098
 // @section tmc_smart
1104 1099
 
1105 1100
 /**
1106
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1107
- *
1108
- * You'll also need the TMC2130Stepper Arduino library
1109
- * (https://github.com/teemuatlut/TMC2130Stepper).
1110
- *
1111 1101
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1112 1102
  * the hardware SPI interface on your board and define the required CS pins
1113 1103
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1114 1104
  * You may also use software SPI if you wish to use general purpose IO pins.
1115
- */
1116
-//#define HAVE_TMC2130
1117
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1118
-  //#define X_IS_TMC2130
1119
-  //#define X2_IS_TMC2130
1120
-  //#define Y_IS_TMC2130
1121
-  //#define Y2_IS_TMC2130
1122
-  //#define Z_IS_TMC2130
1123
-  //#define Z2_IS_TMC2130
1124
-  //#define E0_IS_TMC2130
1125
-  //#define E1_IS_TMC2130
1126
-  //#define E2_IS_TMC2130
1127
-  //#define E3_IS_TMC2130
1128
-  //#define E4_IS_TMC2130
1129
-#endif
1130
-
1131
-/**
1132
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1133
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1105
+ *
1106
+ * The TMC2130Stepper library is required for this stepper driver.
1107
+ * https://github.com/teemuatlut/TMC2130Stepper
1108
+ *
1109
+ * To use TMC2208 stepper UART-configurable stepper drivers
1110
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1134 1111
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1135 1112
  * to PDN_UART without a resistor.
1136 1113
  * The drivers can also be used with hardware serial.
1137 1114
  *
1138
- * You'll also need the TMC2208Stepper Arduino library
1139
- * (https://github.com/teemuatlut/TMC2208Stepper).
1115
+ * The TMC2208Stepper library is required for this stepper driver.
1116
+ * https://github.com/teemuatlut/TMC2208Stepper
1140 1117
  */
1141
-//#define HAVE_TMC2208
1142
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1143
-  //#define X_IS_TMC2208
1144
-  //#define X2_IS_TMC2208
1145
-  //#define Y_IS_TMC2208
1146
-  //#define Y2_IS_TMC2208
1147
-  //#define Z_IS_TMC2208
1148
-  //#define Z2_IS_TMC2208
1149
-  //#define E0_IS_TMC2208
1150
-  //#define E1_IS_TMC2208
1151
-  //#define E2_IS_TMC2208
1152
-  //#define E3_IS_TMC2208
1153
-  //#define E4_IS_TMC2208
1154
-#endif
1155
-
1156
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1118
+#if HAS_TRINAMIC
1157 1119
 
1158 1120
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1159 1121
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1308,25 +1270,12 @@
1308 1270
 // @section L6470
1309 1271
 
1310 1272
 /**
1311
- * Enable this section if you have L6470 motor drivers.
1312
- * You need to import the L6470 library into the Arduino IDE for this.
1313
- * (https://github.com/ameyer/Arduino-L6470)
1273
+ * L6470 Stepper Driver options
1274
+ *
1275
+ * The Arduino-L6470 library is required for this stepper driver.
1276
+ * https://github.com/ameyer/Arduino-L6470
1314 1277
  */
1315
-
1316
-//#define HAVE_L6470DRIVER
1317
-#if ENABLED(HAVE_L6470DRIVER)
1318
-
1319
-  //#define X_IS_L6470
1320
-  //#define X2_IS_L6470
1321
-  //#define Y_IS_L6470
1322
-  //#define Y2_IS_L6470
1323
-  //#define Z_IS_L6470
1324
-  //#define Z2_IS_L6470
1325
-  //#define E0_IS_L6470
1326
-  //#define E1_IS_L6470
1327
-  //#define E2_IS_L6470
1328
-  //#define E3_IS_L6470
1329
-  //#define E4_IS_L6470
1278
+#if HAS_DRIVER(L6470)
1330 1279
 
1331 1280
   #define X_MICROSTEPS      16 // number of microsteps
1332 1281
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1372,7 +1321,7 @@
1372 1321
   #define E4_OVERCURRENT  2000
1373 1322
   #define E4_STALLCURRENT 1500
1374 1323
 
1375
-#endif
1324
+#endif // L6470
1376 1325
 
1377 1326
 /**
1378 1327
  * TWI/I2C BUS

+ 23
- 0
Marlin/src/config/examples/wt150/Configuration.h View File

@@ -556,6 +556,29 @@
556 556
 #define Z_MAX_ENDSTOP_INVERTING true  // set to true to invert the logic of the endstop.
557 557
 #define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
558 558
 
559
+/**
560
+ * Specify Stepper Driver types
561
+ * The options are used to determine driver pulse timings as well as more advanced functionality.
562
+ * Stepper timing options can be overridden in Configuration_adv.h
563
+ *
564
+ * Options: A4988, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
565
+ *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
566
+ *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
567
+ *          TMC5130, TMC5130_STANDALONE
568
+ * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
569
+ */
570
+#define X_DRIVER_TYPE  A4988
571
+#define Y_DRIVER_TYPE  A4988
572
+#define Z_DRIVER_TYPE  A4988
573
+#define X2_DRIVER_TYPE A4988
574
+#define Y2_DRIVER_TYPE A4988
575
+#define Z2_DRIVER_TYPE A4988
576
+#define E0_DRIVER_TYPE A4988
577
+#define E1_DRIVER_TYPE A4988
578
+#define E2_DRIVER_TYPE A4988
579
+#define E3_DRIVER_TYPE A4988
580
+#define E4_DRIVER_TYPE A4988
581
+
559 582
 // Enable this feature if all enabled endstop pins are interrupt-capable.
560 583
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
561 584
 //#define ENDSTOP_INTERRUPTS_FEATURE

+ 37
- 88
Marlin/src/config/examples/wt150/Configuration_adv.h View File

@@ -838,15 +838,17 @@
838 838
 
839 839
 /**
840 840
  * Minimum delay after setting the stepper DIR (in ns)
841
- *    0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
842
- *   20 : Minimum for TMC2xxx drivers
843
- *  200 : Minimum for A4988 drivers
844
- *  500 : Minimum for LV8729 drivers (guess, no info in datasheet)
845
- *  650 : Minimum for DRV8825 drivers
846
- * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
847
- *15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
841
+ *     0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
842
+ *    20 : Minimum for TMC2xxx drivers
843
+ *   200 : Minimum for A4988 drivers
844
+ *   500 : Minimum for LV8729 drivers (guess, no info in datasheet)
845
+ *   650 : Minimum for DRV8825 drivers
846
+ *  1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
847
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
848
+ *
849
+ * Override the default value based on the driver type set in Configuration.h.
848 850
  */
849
-#define MINIMUM_STEPPER_DIR_DELAY 0
851
+//#define MINIMUM_STEPPER_DIR_DELAY 650
850 852
 
851 853
 /**
852 854
  * Minimum stepper driver pulse width (in µs)
@@ -856,8 +858,10 @@
856 858
  *   2 : Minimum for DRV8825 stepper drivers
857 859
  *   3 : Minimum for TB6600 stepper drivers
858 860
  *  30 : Minimum for TB6560 stepper drivers
861
+ *
862
+ * Override the default value based on the driver type set in Configuration.h.
859 863
  */
860
-#define MINIMUM_STEPPER_PULSE 2
864
+//#define MINIMUM_STEPPER_PULSE 2
861 865
 
862 866
 /**
863 867
  * Maximum stepping rate (in Hz) the stepper driver allows
@@ -868,8 +872,10 @@
868 872
  *  150000 : Maximum for TB6600 stepper driver
869 873
  *  130000 : Maximum for LV8729 stepper driver
870 874
  *   15000 : Maximum for TB6560 stepper driver
875
+ *
876
+ * Override the default value based on the driver type set in Configuration.h.
871 877
  */
872
-#define MAXIMUM_STEPPER_RATE 250000
878
+//#define MAXIMUM_STEPPER_RATE 250000
873 879
 
874 880
 // @section temperature
875 881
 
@@ -1037,23 +1043,12 @@
1037 1043
 // @section tmc
1038 1044
 
1039 1045
 /**
1040
- * Enable this section if you have TMC26X motor drivers.
1041
- * You will need to import the TMC26XStepper library into the Arduino IDE for this
1042
- * (https://github.com/trinamic/TMC26XStepper.git)
1046
+ * TMC26X Stepper Driver options
1047
+ *
1048
+ * The TMC26XStepper library is required for this stepper driver.
1049
+ * https://github.com/trinamic/TMC26XStepper
1043 1050
  */
1044
-//#define HAVE_TMC26X
1045
-#if ENABLED(HAVE_TMC26X)  // Choose your axes here. This is mandatory!
1046
-  //#define X_IS_TMC26X
1047
-  //#define X2_IS_TMC26X
1048
-  //#define Y_IS_TMC26X
1049
-  //#define Y2_IS_TMC26X
1050
-  //#define Z_IS_TMC26X
1051
-  //#define Z2_IS_TMC26X
1052
-  //#define E0_IS_TMC26X
1053
-  //#define E1_IS_TMC26X
1054
-  //#define E2_IS_TMC26X
1055
-  //#define E3_IS_TMC26X
1056
-  //#define E4_IS_TMC26X
1051
+#if HAS_DRIVER(TMC26X)
1057 1052
 
1058 1053
   #define X_MAX_CURRENT     1000 // in mA
1059 1054
   #define X_SENSE_RESISTOR    91 // in mOhms
@@ -1099,62 +1094,29 @@
1099 1094
   #define E4_SENSE_RESISTOR   91
1100 1095
   #define E4_MICROSTEPS       16
1101 1096
 
1102
-#endif
1097
+#endif // TMC26X
1103 1098
 
1104 1099
 // @section tmc_smart
1105 1100
 
1106 1101
 /**
1107
- * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
1108
- *
1109
- * You'll also need the TMC2130Stepper Arduino library
1110
- * (https://github.com/teemuatlut/TMC2130Stepper).
1111
- *
1112 1102
  * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1113 1103
  * the hardware SPI interface on your board and define the required CS pins
1114 1104
  * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1115 1105
  * You may also use software SPI if you wish to use general purpose IO pins.
1116
- */
1117
-//#define HAVE_TMC2130
1118
-#if ENABLED(HAVE_TMC2130)  // Choose your axes here. This is mandatory!
1119
-  //#define X_IS_TMC2130
1120
-  //#define X2_IS_TMC2130
1121
-  //#define Y_IS_TMC2130
1122
-  //#define Y2_IS_TMC2130
1123
-  //#define Z_IS_TMC2130
1124
-  //#define Z2_IS_TMC2130
1125
-  //#define E0_IS_TMC2130
1126
-  //#define E1_IS_TMC2130
1127
-  //#define E2_IS_TMC2130
1128
-  //#define E3_IS_TMC2130
1129
-  //#define E4_IS_TMC2130
1130
-#endif
1131
-
1132
-/**
1133
- * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers.
1134
- * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1106
+ *
1107
+ * The TMC2130Stepper library is required for this stepper driver.
1108
+ * https://github.com/teemuatlut/TMC2130Stepper
1109
+ *
1110
+ * To use TMC2208 stepper UART-configurable stepper drivers
1111
+ * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1135 1112
  * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1136 1113
  * to PDN_UART without a resistor.
1137 1114
  * The drivers can also be used with hardware serial.
1138 1115
  *
1139
- * You'll also need the TMC2208Stepper Arduino library
1140
- * (https://github.com/teemuatlut/TMC2208Stepper).
1116
+ * The TMC2208Stepper library is required for this stepper driver.
1117
+ * https://github.com/teemuatlut/TMC2208Stepper
1141 1118
  */
1142
-//#define HAVE_TMC2208
1143
-#if ENABLED(HAVE_TMC2208)  // Choose your axes here. This is mandatory!
1144
-  //#define X_IS_TMC2208
1145
-  //#define X2_IS_TMC2208
1146
-  //#define Y_IS_TMC2208
1147
-  //#define Y2_IS_TMC2208
1148
-  //#define Z_IS_TMC2208
1149
-  //#define Z2_IS_TMC2208
1150
-  //#define E0_IS_TMC2208
1151
-  //#define E1_IS_TMC2208
1152
-  //#define E2_IS_TMC2208
1153
-  //#define E3_IS_TMC2208
1154
-  //#define E4_IS_TMC2208
1155
-#endif
1156
-
1157
-#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208)
1119
+#if HAS_TRINAMIC
1158 1120
 
1159 1121
   #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1160 1122
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
@@ -1309,25 +1271,12 @@
1309 1271
 // @section L6470
1310 1272
 
1311 1273
 /**
1312
- * Enable this section if you have L6470 motor drivers.
1313
- * You need to import the L6470 library into the Arduino IDE for this.
1314
- * (https://github.com/ameyer/Arduino-L6470)
1274
+ * L6470 Stepper Driver options
1275
+ *
1276
+ * The Arduino-L6470 library is required for this stepper driver.
1277
+ * https://github.com/ameyer/Arduino-L6470
1315 1278
  */
1316
-
1317
-//#define HAVE_L6470DRIVER
1318
-#if ENABLED(HAVE_L6470DRIVER)
1319
-
1320
-  //#define X_IS_L6470
1321
-  //#define X2_IS_L6470
1322
-  //#define Y_IS_L6470
1323
-  //#define Y2_IS_L6470
1324
-  //#define Z_IS_L6470
1325
-  //#define Z2_IS_L6470
1326
-  //#define E0_IS_L6470
1327
-  //#define E1_IS_L6470
1328
-  //#define E2_IS_L6470
1329
-  //#define E3_IS_L6470
1330
-  //#define E4_IS_L6470
1279
+#if HAS_DRIVER(L6470)
1331 1280
 
1332 1281
   #define X_MICROSTEPS      16 // number of microsteps
1333 1282
   #define X_OVERCURRENT   2000 // maxc current in mA. If the current goes over this value, the driver will switch off
@@ -1373,7 +1322,7 @@
1373 1322
   #define E4_OVERCURRENT  2000
1374 1323
   #define E4_STALLCURRENT 1500
1375 1324
 
1376
-#endif
1325
+#endif // L6470
1377 1326
 
1378 1327
 /**
1379 1328
  * TWI/I2C BUS

+ 57
- 0
Marlin/src/core/drivers.h View File

@@ -0,0 +1,57 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+#pragma once
23
+
24
+#define A4988               0x001
25
+#define DRV8825             0x002
26
+#define LV8729              0x003
27
+#define L6470               0x104
28
+#define TB6560              0x005
29
+#define TB6600              0x006
30
+#define TMC2100             0x007
31
+#define TMC2130             0x108
32
+#define TMC2130_STANDALONE  0x008
33
+#define TMC2208             0x109
34
+#define TMC2208_STANDALONE  0x009
35
+#define TMC26X              0x10A
36
+#define TMC26X_STANDALONE   0x00A
37
+#define TMC2660             0x10B
38
+#define TMC2660_STANDALONE  0x00B
39
+
40
+#define AXIS_DRIVER_TYPE(A, T) ( defined(A##_DRIVER_TYPE) && (A##_DRIVER_TYPE == T) )
41
+
42
+#define HAS_DRIVER(T)  (AXIS_DRIVER_TYPE( X,T) || AXIS_DRIVER_TYPE(X2,T) || \
43
+                        AXIS_DRIVER_TYPE( Y,T) || AXIS_DRIVER_TYPE(Y2,T) || \
44
+                        AXIS_DRIVER_TYPE( Z,T) || AXIS_DRIVER_TYPE(Z2,T) || \
45
+                        AXIS_DRIVER_TYPE(E0,T) || \
46
+                        AXIS_DRIVER_TYPE(E1,T) || \
47
+                        AXIS_DRIVER_TYPE(E2,T) || \
48
+                        AXIS_DRIVER_TYPE(E3,T) || \
49
+                        AXIS_DRIVER_TYPE(E4,T) )
50
+
51
+// Test for supported TMC drivers that require advanced configuration
52
+// Does not match standalone configurations
53
+#define HAS_TRINAMIC ( HAS_DRIVER(TMC2130) || HAS_DRIVER(TMC2208) || HAS_DRIVER(TMC2660) )
54
+
55
+#define AXIS_IS_TMC(A) ( AXIS_DRIVER_TYPE(A, TMC2130) || \
56
+                         AXIS_DRIVER_TYPE(A, TMC2208) || \
57
+                         AXIS_DRIVER_TYPE(A, TMC2660) )

+ 0
- 0
Marlin/src/core/macros.h View File


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save