Pārlūkot izejas kodu

Add TMC2130 support

Moritz 7 gadus atpakaļ
vecāks
revīzija
d67c1d825f
24 mainītis faili ar 4226 papildinājumiem un 72 dzēšanām
  1. 209
    4
      Marlin/Configuration_adv.h
  2. 5
    0
      Marlin/Marlin.ino
  3. 45
    0
      Marlin/Marlin_main.cpp
  4. 215
    4
      Marlin/example_configurations/Cartesio/Configuration_adv.h
  5. 215
    4
      Marlin/example_configurations/Felix/Configuration_adv.h
  6. 215
    4
      Marlin/example_configurations/Hephestos/Configuration_adv.h
  7. 215
    4
      Marlin/example_configurations/Hephestos_2/Configuration_adv.h
  8. 215
    4
      Marlin/example_configurations/K8200/Configuration_adv.h
  9. 215
    4
      Marlin/example_configurations/K8400/Configuration_adv.h
  10. 215
    4
      Marlin/example_configurations/RigidBot/Configuration_adv.h
  11. 215
    4
      Marlin/example_configurations/SCARA/Configuration_adv.h
  12. 215
    4
      Marlin/example_configurations/TAZ4/Configuration_adv.h
  13. 214
    4
      Marlin/example_configurations/WITBOX/Configuration_adv.h
  14. 215
    4
      Marlin/example_configurations/delta/biv2.5/Configuration_adv.h
  15. 215
    4
      Marlin/example_configurations/delta/generic/Configuration_adv.h
  16. 215
    4
      Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h
  17. 215
    4
      Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h
  18. 215
    4
      Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h
  19. 215
    4
      Marlin/example_configurations/makibox/Configuration_adv.h
  20. 215
    4
      Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h
  21. 5
    0
      Marlin/pins_RAMPS.h
  22. 5
    0
      Marlin/stepper.cpp
  23. 266
    0
      Marlin/stepper_indirection.cpp
  24. 37
    0
      Marlin/stepper_indirection.h

+ 209
- 4
Marlin/Configuration_adv.h Parādīt failu

@@ -756,10 +756,215 @@
756 756
 
757 757
 #endif
758 758
 
759
-/******************************************************************************\
760
- * enable this section if you have L6470  motor drivers.
761
- * you need to import the L6470 library into the Arduino IDE for this
762
- ******************************************************************************/
759
+// @section TMC2130
760
+
761
+
762
+/**
763
+ * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
764
+ *
765
+ * To use TMC2130 drivers in SPI mode, you'll also need the TMC2130 Arduino library
766
+ * (https://github.com/makertum/Trinamic_TMC2130).
767
+ *
768
+ * To use TMC2130 stepper drivers in SPI mode connect your SPI2130 pins to
769
+ * the hardware SPI interface on your board and define the required CS pins
770
+ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
771
+ */
772
+
773
+//#define HAVE_TMC2130DRIVER
774
+
775
+#if ENABLED(HAVE_TMC2130DRIVER)
776
+
777
+  //#define TMC2130_ADVANCED_CONFIGURATION
778
+
779
+  // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
780
+  //#define X_IS_TMC2130
781
+  //#define X2_IS_TMC2130
782
+  //#define Y_IS_TMC2130
783
+  //#define Y2_IS_TMC2130
784
+  //#define Z_IS_TMC2130
785
+  //#define Z2_IS_TMC2130
786
+  //#define E0_IS_TMC2130
787
+  //#define E1_IS_TMC2130
788
+  //#define E2_IS_TMC2130
789
+  //#define E3_IS_TMC2130
790
+
791
+  #if ENABLED(TMC2130_ADVANCED_CONFIGURATION)
792
+
793
+    // If you have enabled TMC2130_ADVANCED_CONFIGURATION,
794
+    // you can define global settings here, but you still need
795
+    // to configure the tmc2130.init() method manually in the file
796
+    //
797
+    // stepper_indirection.cpp
798
+    //
799
+    // Please read the TMC2130 datasheet:
800
+    // http://www.trinamic.com/_articles/products/integrated-circuits/tmc2130/_datasheet/TMC2130_datasheet.pdf
801
+    // All settings here have the same (sometimes cryptic) names as in the datasheet.
802
+    //
803
+    // The following, uncommented settings are only suggestion.
804
+
805
+    /* GENERAL CONFIGURATION */
806
+
807
+    //#define GLOBAL_EN_PWM_MODE        0
808
+    #define GLOBAL_I_SCALE_ANALOG     1 // [0,1] 0: Normal, 1: AIN
809
+    //#define GLOBAL_INTERNAL_RSENSE    0 // [0,1] 0: Normal, 1: Internal
810
+    #define GLOBAL_EN_PWM_MODE        0 // [0,1] 0: Normal, 1: stealthChop with velocity threshold
811
+    //#define GLOBAL_ENC_COMMUTATION    0 // [0,1]
812
+    #define GLOBAL_SHAFT              0 // [0,1] 0: normal, 1: invert
813
+    //#define GLOBAL_DIAG0_ERROR        0 // [0,1]
814
+    //#define GLOBAL_DIAG0_OTPW         0 // [0,1]
815
+    //#define GLOBAL_DIAG0_STALL        0 // [0,1]
816
+    //#define GLOBAL_DIAG1_STALL        0 // [0,1]
817
+    //#define GLOBAL_DIAG1_INDEX        0 // [0,1]
818
+    //#define GLOBAL_DIAG1_ONSTATE      0 // [0,1]
819
+    //#define GLOBAL_DIAG1_ONSTATE      0 // [0,1]
820
+    //#define GLOBAL_DIAG0_INT_PUSHPULL 0 // [0,1]
821
+    //#define GLOBAL_DIAG1_INT_PUSHPULL 0 // [0,1]
822
+    //#define GLOBAL_SMALL_HYSTERESIS   0 // [0,1]
823
+    //#define GLOBAL_STOP_ENABLE        0 // [0,1]
824
+    //#define GLOBAL_DIRECT_MODE        0 // [0,1]
825
+
826
+    /* VELOCITY-DEPENDENT DRIVE FEATURES */
827
+
828
+    #define GLOBAL_IHOLD             22 // [0-31] 0: min, 31: max
829
+    #define GLOBAL_IRUN              31 // [0-31] 0: min, 31: max
830
+    #define GLOBAL_IHOLDDELAY        15 // [0-15] 0: min, 15: about 4 seconds
831
+    //#define GLOBAL_TPOWERDOWN         0 // [0-255] 0: min, 255: about 4 seconds
832
+    //#define GLOBAL_TPWMTHRS           0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
833
+    //#define GLOBAL_TCOOLTHRS          0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
834
+    #define GLOBAL_THIGH             10 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
835
+
836
+    /* SPI MODE CONFIGURATION */
837
+
838
+    //#define GLOBAL_XDIRECT            0
839
+
840
+    /* DCSTEP MINIMUM VELOCITY */
841
+
842
+    //#define GLOBAL_VDCMIN             0
843
+
844
+    /* MOTOR DRIVER CONFIGURATION*/
845
+
846
+    //#define GLOBAL_DEDGE              0
847
+    //#define GLOBAL_DISS2G             0
848
+    #define GLOBAL_INTPOL             1 // 0: off 1: 256 microstep interpolation
849
+    #define GLOBAL_MRES              16 // number of microsteps
850
+    #define GLOBAL_SYNC               1 // [0-15]
851
+    #define GLOBAL_VHIGHCHM           1 // [0,1] 0: normal, 1: high velocity stepper mode
852
+    #define GLOBAL_VHIGHFS            0 // [0,1] 0: normal, 1: switch to full steps for high velocities
853
+    // #define GLOBAL_VSENSE            0 // [0,1] 0: normal, 1: high sensitivity (not recommended)
854
+    #define GLOBAL_TBL                1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
855
+    #define GLOBAL_CHM                0 // [0,1] 0: spreadCycle, 1: Constant off time with fast decay time.
856
+    //#define GLOBAL_RNDTF              0
857
+    //#define GLOBAL_DISFDCC            0
858
+    //#define GLOBAL_FD                 0
859
+    //#define GLOBAL_HEND               0
860
+    //#define GLOBAL_HSTRT              0
861
+    #define GLOBAL_TOFF              10 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
862
+
863
+    //#define GLOBAL_SFILT              0
864
+    //#define GLOBAL_SGT                0
865
+    //#define GLOBAL_SEIMIN             0
866
+    //#define GLOBAL_SEDN               0
867
+    //#define GLOBAL_SEMAX              0
868
+    //#define GLOBAL_SEUP               0
869
+    //#define GLOBAL_SEMIN              0
870
+
871
+    //#define GLOBAL_DC_TIME            0
872
+    //#define GLOBAL_DC_SG              0
873
+
874
+    //#define GLOBAL_FREEWHEEL          0
875
+    //#define GLOBAL_PWM_SYMMETRIC      0
876
+    //#define GLOBAL_PWM_AUTOSCALE      0
877
+    //#define GLOBAL_PWM_FREQ           0
878
+    //#define GLOBAL_PWM_GRAD           0
879
+    //#define GLOBAL_PWM_AMPL           0
880
+
881
+    //#define GLOBAL_ENCM_CTRL          0
882
+
883
+  #else
884
+
885
+    #define X_IHOLD          31 // [0-31] 0: min, 31: max
886
+    #define X_IRUN           31 // [0-31] 0: min, 31: max
887
+    #define X_IHOLDDELAY     15 // [0-15] 0: min, 15: about 4 seconds
888
+    #define X_I_SCALE_ANALOG  1 // 0: Normal, 1: AIN
889
+    #define X_MRES           16 // number of microsteps
890
+    #define X_TBL             1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
891
+    #define X_TOFF            8 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
892
+
893
+    #define X2_IHOLD         31
894
+    #define X2_IRUN          31
895
+    #define X2_IHOLDDELAY    15
896
+    #define X2_I_SCALE_ANALOG 1
897
+    #define X2_MRES          16
898
+    #define X2_TBL            1
899
+    #define X2_TOFF           8
900
+
901
+    #define Y_IHOLD          31
902
+    #define Y_IRUN           31
903
+    #define Y_IHOLDDELAY     15
904
+    #define Y_I_SCALE_ANALOG  1
905
+    #define Y_MRES           16
906
+    #define Y_TBL             1
907
+    #define Y_TOFF            8
908
+
909
+    #define Y2_IHOLD         31
910
+    #define Y2_IRUN          31
911
+    #define Y2_IHOLDDELAY    15
912
+    #define Y2_I_SCALE_ANALOG 1
913
+    #define Y2_MRES          16
914
+    #define Y2_TBL            1
915
+    #define Y2_TOFF           8
916
+
917
+    #define Z_IHOLD          31
918
+    #define Z_IRUN           31
919
+    #define Z_IHOLDDELAY     15
920
+    #define Z_I_SCALE_ANALOG  1
921
+    #define Z_MRES           16
922
+    #define Z_TBL             1
923
+    #define Z_TOFF            8
924
+
925
+    #define Z2_IHOLD         31
926
+    #define Z2_IRUN          31
927
+    #define Z2_IHOLDDELAY    15
928
+    #define Z2_I_SCALE_ANALOG 1
929
+    #define Z2_MRES          16
930
+    #define Z2_TBL            1
931
+    #define Z2_TOFF           8
932
+
933
+    #define E0_IHOLD         31
934
+    #define E0_IRUN          31
935
+    #define E0_IHOLDDELAY    15
936
+    #define E0_I_SCALE_ANALOG 1
937
+    #define E0_MRES          16
938
+    #define E0_TBL            1
939
+    #define E0_TOFF           8
940
+
941
+    #define E1_IHOLD         31
942
+    #define E1_IRUN          31
943
+    #define E1_IHOLDDELAY    15
944
+    #define E1_I_SCALE_ANALOG 1
945
+    #define E1_MRES          16
946
+    #define E1_TBL            1
947
+    #define E1_TOFF           8
948
+
949
+    #define E2_IHOLD         31
950
+    #define E2_IRUN          31
951
+    #define E2_IHOLDDELAY    15
952
+    #define E2_I_SCALE_ANALOG 1
953
+    #define E2_MRES          16
954
+    #define E2_TBL            1
955
+    #define E2_TOFF           8
956
+
957
+    #define E3_IHOLD         31
958
+    #define E3_IRUN          31
959
+    #define E3_IHOLDDELAY    15
960
+    #define E3_I_SCALE_ANALOG 1
961
+    #define E3_MRES          16
962
+    #define E3_TBL            1
963
+    #define E3_TOFF           8
964
+
965
+  #endif // TMC2130_ADVANCED_CONFIGURATION
966
+
967
+#endif // HAVE_TMC2130DRIVER
763 968
 
764 969
 // @section l6470
765 970
 

+ 5
- 0
Marlin/Marlin.ino Parādīt failu

@@ -67,6 +67,11 @@
67 67
   #include <TMC26XStepper.h>
68 68
 #endif
69 69
 
70
+#if ENABLED(HAVE_TMC2130DRIVER)
71
+  #include <SPI.h>
72
+  #include <Trinamic_TMC2130.h>
73
+#endif
74
+
70 75
 #if ENABLED(HAVE_L6470DRIVER)
71 76
   #include <SPI.h>
72 77
   #include <L6470.h>

+ 45
- 0
Marlin/Marlin_main.cpp Parādīt failu

@@ -5884,6 +5884,45 @@ inline void gcode_M117() {
5884 5884
  */
5885 5885
 inline void gcode_M119() { endstops.M119(); }
5886 5886
 
5887
+#if ENABLED(HAVE_TMC2130DRIVER)
5888
+  /**
5889
+   * M122: Output Trinamic TMC2130 status to serial output. Very bad formatting.
5890
+   */
5891
+  inline void gcode_M122() {
5892
+    SERIAL_PROTOCOLLNPGM("REPORTING TMC2130 STATUS");
5893
+    #if ENABLED(HAVE_TMC2130DRIVER) && ENABLED(X_IS_TMC2130)
5894
+      stepperX.read_STAT();
5895
+      SERIAL_PROTOCOLLN("X-AXIS: ");
5896
+      SERIAL_PROTOCOLLN((stepperX.isReset() ? "RESET " : "----- "));
5897
+      SERIAL_PROTOCOLLN((stepperX.isError() ? "ERROR " : "----- "));
5898
+      SERIAL_PROTOCOLLN((stepperX.isStallguard() ? "SLGRD " : "----- "));
5899
+      SERIAL_PROTOCOLLN((stepperX.isStandstill() ? "STILL " : "----- "));
5900
+      SERIAL_PROTOCOLLN((stepperX.debug()));
5901
+      SERIAL_PROTOCOLLN("-----");
5902
+    #endif
5903
+    #if ENABLED(HAVE_TMC2130DRIVER) && ENABLED(Y_IS_TMC2130)
5904
+      stepperY.read_STAT();
5905
+      SERIAL_PROTOCOLLN("Y-AXIS: ");
5906
+      SERIAL_PROTOCOLLN((stepperY.isReset() ? "RESET " : "----- "));
5907
+      SERIAL_PROTOCOLLN((stepperY.isError() ? "ERROR " : "----- "));
5908
+      SERIAL_PROTOCOLLN((stepperY.isStallguard() ? "SLGRD " : "----- "));
5909
+      SERIAL_PROTOCOLLN((stepperY.isStandstill() ? "STILL " : "----- "));
5910
+      SERIAL_PROTOCOLLN((stepperY.debug()));
5911
+      SERIAL_PROTOCOLLN("-----");
5912
+    #endif
5913
+    #if ENABLED(HAVE_TMC2130DRIVER) && ENABLED(Z_IS_TMC2130)
5914
+      stepperZ.read_STAT();
5915
+      SERIAL_PROTOCOLLN("Z-AXIS: ");
5916
+      SERIAL_PROTOCOLLN((stepperZ.isReset() ? "RESET " : "----- "));
5917
+      SERIAL_PROTOCOLLN((stepperZ.isError() ? "ERROR " : "----- "));
5918
+      SERIAL_PROTOCOLLN((stepperZ.isStallguard() ? "SLGRD " : "----- "));
5919
+      SERIAL_PROTOCOLLN((stepperZ.isStandstill() ? "STILL " : "----- "));
5920
+      SERIAL_PROTOCOLLN((stepperZ.debug()));
5921
+      SERIAL_PROTOCOLLN("-----");
5922
+    #endif
5923
+  }
5924
+#endif // HAVE_TMC2130DRIVER
5925
+
5887 5926
 /**
5888 5927
  * M120: Enable endstops and set non-homing endstop state to "enabled"
5889 5928
  */
@@ -8057,6 +8096,12 @@ void process_next_command() {
8057 8096
         gcode_M119();
8058 8097
         break;
8059 8098
 
8099
+      #if ENABLED(HAVE_TMC2130DRIVER)
8100
+        case 122: // M122: Diagnose, used to debug TMC2130
8101
+          gcode_M122();
8102
+          break;
8103
+      #endif
8104
+
8060 8105
       #if ENABLED(ULTIPANEL)
8061 8106
 
8062 8107
         case 145: // M145: Set material heatup parameters

+ 215
- 4
Marlin/example_configurations/Cartesio/Configuration_adv.h Parādīt failu

@@ -756,13 +756,224 @@
756 756
 
757 757
 #endif
758 758
 
759
-/******************************************************************************\
760
- * enable this section if you have L6470  motor drivers.
761
- * you need to import the L6470 library into the Arduino IDE for this
762
- ******************************************************************************/
759
+// @section TMC2130
760
+
761
+
762
+/**
763
+ * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
764
+ *
765
+ * To use TMC2130 drivers in SPI mode, you'll also need the TMC2130 Arduino library
766
+ * (https://github.com/makertum/Trinamic_TMC2130).
767
+ *
768
+ * To use TMC2130 stepper drivers in SPI mode connect your SPI2130 pins to
769
+ * the hardware SPI interface on your board and define the required CS pins
770
+ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
771
+ */
772
+
773
+//#define HAVE_TMC2130DRIVER
774
+
775
+#if ENABLED(HAVE_TMC2130DRIVER)
776
+
777
+  //#define TMC2130_ADVANCED_CONFIGURATION
778
+
779
+  // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
780
+  //#define X_IS_TMC2130
781
+  //#define X2_IS_TMC2130
782
+  //#define Y_IS_TMC2130
783
+  //#define Y2_IS_TMC2130
784
+  //#define Z_IS_TMC2130
785
+  //#define Z2_IS_TMC2130
786
+  //#define E0_IS_TMC2130
787
+  //#define E1_IS_TMC2130
788
+  //#define E2_IS_TMC2130
789
+  //#define E3_IS_TMC2130
790
+
791
+  #if ENABLED(TMC2130_ADVANCED_CONFIGURATION)
792
+
793
+    // If you have enabled TMC2130_ADVANCED_CONFIGURATION,
794
+    // you can define global settings here, but you still need
795
+    // to configure the tmc2130.init() method manually in the file
796
+    //
797
+    // stepper_indirection.cpp
798
+    //
799
+    // Please read the TMC2130 datasheet:
800
+    // http://www.trinamic.com/_articles/products/integrated-circuits/tmc2130/_datasheet/TMC2130_datasheet.pdf
801
+    // All settings here have the same (sometimes cryptic) names as in the datasheet.
802
+    //
803
+    // The following, uncommented settings are only suggestion.
804
+
805
+    /* GENERAL CONFIGURATION */
806
+
807
+    //#define GLOBAL_EN_PWM_MODE        0
808
+    #define GLOBAL_I_SCALE_ANALOG     1 // [0,1] 0: Normal, 1: AIN
809
+    //#define GLOBAL_INTERNAL_RSENSE    0 // [0,1] 0: Normal, 1: Internal
810
+    #define GLOBAL_EN_PWM_MODE        0 // [0,1] 0: Normal, 1: stealthChop with velocity threshold
811
+    //#define GLOBAL_ENC_COMMUTATION    0 // [0,1]
812
+    #define GLOBAL_SHAFT              0 // [0,1] 0: normal, 1: invert
813
+    //#define GLOBAL_DIAG0_ERROR        0 // [0,1]
814
+    //#define GLOBAL_DIAG0_OTPW         0 // [0,1]
815
+    //#define GLOBAL_DIAG0_STALL        0 // [0,1]
816
+    //#define GLOBAL_DIAG1_STALL        0 // [0,1]
817
+    //#define GLOBAL_DIAG1_INDEX        0 // [0,1]
818
+    //#define GLOBAL_DIAG1_ONSTATE      0 // [0,1]
819
+    //#define GLOBAL_DIAG1_ONSTATE      0 // [0,1]
820
+    //#define GLOBAL_DIAG0_INT_PUSHPULL 0 // [0,1]
821
+    //#define GLOBAL_DIAG1_INT_PUSHPULL 0 // [0,1]
822
+    //#define GLOBAL_SMALL_HYSTERESIS   0 // [0,1]
823
+    //#define GLOBAL_STOP_ENABLE        0 // [0,1]
824
+    //#define GLOBAL_DIRECT_MODE        0 // [0,1]
825
+
826
+    /* VELOCITY-DEPENDENT DRIVE FEATURES */
827
+
828
+    #define GLOBAL_IHOLD             22 // [0-31] 0: min, 31: max
829
+    #define GLOBAL_IRUN              31 // [0-31] 0: min, 31: max
830
+    #define GLOBAL_IHOLDDELAY        15 // [0-15] 0: min, 15: about 4 seconds
831
+    //#define GLOBAL_TPOWERDOWN         0 // [0-255] 0: min, 255: about 4 seconds
832
+    //#define GLOBAL_TPWMTHRS           0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
833
+    //#define GLOBAL_TCOOLTHRS          0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
834
+    #define GLOBAL_THIGH             10 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
835
+
836
+    /* SPI MODE CONFIGURATION */
837
+
838
+    //#define GLOBAL_XDIRECT            0
839
+
840
+    /* DCSTEP MINIMUM VELOCITY */
841
+
842
+    //#define GLOBAL_VDCMIN             0
843
+
844
+    /* MOTOR DRIVER CONFIGURATION*/
845
+
846
+    //#define GLOBAL_DEDGE              0
847
+    //#define GLOBAL_DISS2G             0
848
+    #define GLOBAL_INTPOL             1 // 0: off 1: 256 microstep interpolation
849
+    #define GLOBAL_MRES              16 // number of microsteps
850
+    #define GLOBAL_SYNC               1 // [0-15]
851
+    #define GLOBAL_VHIGHCHM           1 // [0,1] 0: normal, 1: high velocity stepper mode
852
+    #define GLOBAL_VHIGHFS            0 // [0,1] 0: normal, 1: switch to full steps for high velocities
853
+    // #define GLOBAL_VSENSE            0 // [0,1] 0: normal, 1: high sensitivity (not recommended)
854
+    #define GLOBAL_TBL                1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
855
+    #define GLOBAL_CHM                0 // [0,1] 0: spreadCycle, 1: Constant off time with fast decay time.
856
+    //#define GLOBAL_RNDTF              0
857
+    //#define GLOBAL_DISFDCC            0
858
+    //#define GLOBAL_FD                 0
859
+    //#define GLOBAL_HEND               0
860
+    //#define GLOBAL_HSTRT              0
861
+    #define GLOBAL_TOFF              10 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
862
+
863
+    //#define GLOBAL_SFILT              0
864
+    //#define GLOBAL_SGT                0
865
+    //#define GLOBAL_SEIMIN             0
866
+    //#define GLOBAL_SEDN               0
867
+    //#define GLOBAL_SEMAX              0
868
+    //#define GLOBAL_SEUP               0
869
+    //#define GLOBAL_SEMIN              0
870
+
871
+    //#define GLOBAL_DC_TIME            0
872
+    //#define GLOBAL_DC_SG              0
873
+
874
+    //#define GLOBAL_FREEWHEEL          0
875
+    //#define GLOBAL_PWM_SYMMETRIC      0
876
+    //#define GLOBAL_PWM_AUTOSCALE      0
877
+    //#define GLOBAL_PWM_FREQ           0
878
+    //#define GLOBAL_PWM_GRAD           0
879
+    //#define GLOBAL_PWM_AMPL           0
880
+
881
+    //#define GLOBAL_ENCM_CTRL          0
882
+
883
+  #else
884
+
885
+    #define X_IHOLD          31 // [0-31] 0: min, 31: max
886
+    #define X_IRUN           31 // [0-31] 0: min, 31: max
887
+    #define X_IHOLDDELAY     15 // [0-15] 0: min, 15: about 4 seconds
888
+    #define X_I_SCALE_ANALOG  1 // 0: Normal, 1: AIN
889
+    #define X_MRES           16 // number of microsteps
890
+    #define X_TBL             1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
891
+    #define X_TOFF            8 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
892
+
893
+    #define X2_IHOLD         31
894
+    #define X2_IRUN          31
895
+    #define X2_IHOLDDELAY    15
896
+    #define X2_I_SCALE_ANALOG 1
897
+    #define X2_MRES          16
898
+    #define X2_TBL            1
899
+    #define X2_TOFF           8
900
+
901
+    #define Y_IHOLD          31
902
+    #define Y_IRUN           31
903
+    #define Y_IHOLDDELAY     15
904
+    #define Y_I_SCALE_ANALOG  1
905
+    #define Y_MRES           16
906
+    #define Y_TBL             1
907
+    #define Y_TOFF            8
908
+
909
+    #define Y2_IHOLD         31
910
+    #define Y2_IRUN          31
911
+    #define Y2_IHOLDDELAY    15
912
+    #define Y2_I_SCALE_ANALOG 1
913
+    #define Y2_MRES          16
914
+    #define Y2_TBL            1
915
+    #define Y2_TOFF           8
916
+
917
+    #define Z_IHOLD          31
918
+    #define Z_IRUN           31
919
+    #define Z_IHOLDDELAY     15
920
+    #define Z_I_SCALE_ANALOG  1
921
+    #define Z_MRES           16
922
+    #define Z_TBL             1
923
+    #define Z_TOFF            8
924
+
925
+    #define Z2_IHOLD         31
926
+    #define Z2_IRUN          31
927
+    #define Z2_IHOLDDELAY    15
928
+    #define Z2_I_SCALE_ANALOG 1
929
+    #define Z2_MRES          16
930
+    #define Z2_TBL            1
931
+    #define Z2_TOFF           8
932
+
933
+    #define E0_IHOLD         31
934
+    #define E0_IRUN          31
935
+    #define E0_IHOLDDELAY    15
936
+    #define E0_I_SCALE_ANALOG 1
937
+    #define E0_MRES          16
938
+    #define E0_TBL            1
939
+    #define E0_TOFF           8
940
+
941
+    #define E1_IHOLD         31
942
+    #define E1_IRUN          31
943
+    #define E1_IHOLDDELAY    15
944
+    #define E1_I_SCALE_ANALOG 1
945
+    #define E1_MRES          16
946
+    #define E1_TBL            1
947
+    #define E1_TOFF           8
948
+
949
+    #define E2_IHOLD         31
950
+    #define E2_IRUN          31
951
+    #define E2_IHOLDDELAY    15
952
+    #define E2_I_SCALE_ANALOG 1
953
+    #define E2_MRES          16
954
+    #define E2_TBL            1
955
+    #define E2_TOFF           8
956
+
957
+    #define E3_IHOLD         31
958
+    #define E3_IRUN          31
959
+    #define E3_IHOLDDELAY    15
960
+    #define E3_I_SCALE_ANALOG 1
961
+    #define E3_MRES          16
962
+    #define E3_TBL            1
963
+    #define E3_TOFF           8
964
+
965
+  #endif // TMC2130_ADVANCED_CONFIGURATION
966
+
967
+#endif // HAVE_TMC2130DRIVER
763 968
 
764 969
 // @section l6470
765 970
 
971
+/**
972
+ * Enable this section if you have L6470 motor drivers.
973
+ * You need to import the L6470 library into the Arduino IDE for this.
974
+ * (https://github.com/ameyer/Arduino-L6470)
975
+ */
976
+
766 977
 //#define HAVE_L6470DRIVER
767 978
 #if ENABLED(HAVE_L6470DRIVER)
768 979
 

+ 215
- 4
Marlin/example_configurations/Felix/Configuration_adv.h Parādīt failu

@@ -756,13 +756,224 @@
756 756
 
757 757
 #endif
758 758
 
759
-/******************************************************************************\
760
- * enable this section if you have L6470  motor drivers.
761
- * you need to import the L6470 library into the Arduino IDE for this
762
- ******************************************************************************/
759
+// @section TMC2130
760
+
761
+
762
+/**
763
+ * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
764
+ *
765
+ * To use TMC2130 drivers in SPI mode, you'll also need the TMC2130 Arduino library
766
+ * (https://github.com/makertum/Trinamic_TMC2130).
767
+ *
768
+ * To use TMC2130 stepper drivers in SPI mode connect your SPI2130 pins to
769
+ * the hardware SPI interface on your board and define the required CS pins
770
+ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
771
+ */
772
+
773
+//#define HAVE_TMC2130DRIVER
774
+
775
+#if ENABLED(HAVE_TMC2130DRIVER)
776
+
777
+  //#define TMC2130_ADVANCED_CONFIGURATION
778
+
779
+  // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
780
+  //#define X_IS_TMC2130
781
+  //#define X2_IS_TMC2130
782
+  //#define Y_IS_TMC2130
783
+  //#define Y2_IS_TMC2130
784
+  //#define Z_IS_TMC2130
785
+  //#define Z2_IS_TMC2130
786
+  //#define E0_IS_TMC2130
787
+  //#define E1_IS_TMC2130
788
+  //#define E2_IS_TMC2130
789
+  //#define E3_IS_TMC2130
790
+
791
+  #if ENABLED(TMC2130_ADVANCED_CONFIGURATION)
792
+
793
+    // If you have enabled TMC2130_ADVANCED_CONFIGURATION,
794
+    // you can define global settings here, but you still need
795
+    // to configure the tmc2130.init() method manually in the file
796
+    //
797
+    // stepper_indirection.cpp
798
+    //
799
+    // Please read the TMC2130 datasheet:
800
+    // http://www.trinamic.com/_articles/products/integrated-circuits/tmc2130/_datasheet/TMC2130_datasheet.pdf
801
+    // All settings here have the same (sometimes cryptic) names as in the datasheet.
802
+    //
803
+    // The following, uncommented settings are only suggestion.
804
+
805
+    /* GENERAL CONFIGURATION */
806
+
807
+    //#define GLOBAL_EN_PWM_MODE        0
808
+    #define GLOBAL_I_SCALE_ANALOG     1 // [0,1] 0: Normal, 1: AIN
809
+    //#define GLOBAL_INTERNAL_RSENSE    0 // [0,1] 0: Normal, 1: Internal
810
+    #define GLOBAL_EN_PWM_MODE        0 // [0,1] 0: Normal, 1: stealthChop with velocity threshold
811
+    //#define GLOBAL_ENC_COMMUTATION    0 // [0,1]
812
+    #define GLOBAL_SHAFT              0 // [0,1] 0: normal, 1: invert
813
+    //#define GLOBAL_DIAG0_ERROR        0 // [0,1]
814
+    //#define GLOBAL_DIAG0_OTPW         0 // [0,1]
815
+    //#define GLOBAL_DIAG0_STALL        0 // [0,1]
816
+    //#define GLOBAL_DIAG1_STALL        0 // [0,1]
817
+    //#define GLOBAL_DIAG1_INDEX        0 // [0,1]
818
+    //#define GLOBAL_DIAG1_ONSTATE      0 // [0,1]
819
+    //#define GLOBAL_DIAG1_ONSTATE      0 // [0,1]
820
+    //#define GLOBAL_DIAG0_INT_PUSHPULL 0 // [0,1]
821
+    //#define GLOBAL_DIAG1_INT_PUSHPULL 0 // [0,1]
822
+    //#define GLOBAL_SMALL_HYSTERESIS   0 // [0,1]
823
+    //#define GLOBAL_STOP_ENABLE        0 // [0,1]
824
+    //#define GLOBAL_DIRECT_MODE        0 // [0,1]
825
+
826
+    /* VELOCITY-DEPENDENT DRIVE FEATURES */
827
+
828
+    #define GLOBAL_IHOLD             22 // [0-31] 0: min, 31: max
829
+    #define GLOBAL_IRUN              31 // [0-31] 0: min, 31: max
830
+    #define GLOBAL_IHOLDDELAY        15 // [0-15] 0: min, 15: about 4 seconds
831
+    //#define GLOBAL_TPOWERDOWN         0 // [0-255] 0: min, 255: about 4 seconds
832
+    //#define GLOBAL_TPWMTHRS           0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
833
+    //#define GLOBAL_TCOOLTHRS          0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
834
+    #define GLOBAL_THIGH             10 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
835
+
836
+    /* SPI MODE CONFIGURATION */
837
+
838
+    //#define GLOBAL_XDIRECT            0
839
+
840
+    /* DCSTEP MINIMUM VELOCITY */
841
+
842
+    //#define GLOBAL_VDCMIN             0
843
+
844
+    /* MOTOR DRIVER CONFIGURATION*/
845
+
846
+    //#define GLOBAL_DEDGE              0
847
+    //#define GLOBAL_DISS2G             0
848
+    #define GLOBAL_INTPOL             1 // 0: off 1: 256 microstep interpolation
849
+    #define GLOBAL_MRES              16 // number of microsteps
850
+    #define GLOBAL_SYNC               1 // [0-15]
851
+    #define GLOBAL_VHIGHCHM           1 // [0,1] 0: normal, 1: high velocity stepper mode
852
+    #define GLOBAL_VHIGHFS            0 // [0,1] 0: normal, 1: switch to full steps for high velocities
853
+    // #define GLOBAL_VSENSE            0 // [0,1] 0: normal, 1: high sensitivity (not recommended)
854
+    #define GLOBAL_TBL                1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
855
+    #define GLOBAL_CHM                0 // [0,1] 0: spreadCycle, 1: Constant off time with fast decay time.
856
+    //#define GLOBAL_RNDTF              0
857
+    //#define GLOBAL_DISFDCC            0
858
+    //#define GLOBAL_FD                 0
859
+    //#define GLOBAL_HEND               0
860
+    //#define GLOBAL_HSTRT              0
861
+    #define GLOBAL_TOFF              10 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
862
+
863
+    //#define GLOBAL_SFILT              0
864
+    //#define GLOBAL_SGT                0
865
+    //#define GLOBAL_SEIMIN             0
866
+    //#define GLOBAL_SEDN               0
867
+    //#define GLOBAL_SEMAX              0
868
+    //#define GLOBAL_SEUP               0
869
+    //#define GLOBAL_SEMIN              0
870
+
871
+    //#define GLOBAL_DC_TIME            0
872
+    //#define GLOBAL_DC_SG              0
873
+
874
+    //#define GLOBAL_FREEWHEEL          0
875
+    //#define GLOBAL_PWM_SYMMETRIC      0
876
+    //#define GLOBAL_PWM_AUTOSCALE      0
877
+    //#define GLOBAL_PWM_FREQ           0
878
+    //#define GLOBAL_PWM_GRAD           0
879
+    //#define GLOBAL_PWM_AMPL           0
880
+
881
+    //#define GLOBAL_ENCM_CTRL          0
882
+
883
+  #else
884
+
885
+    #define X_IHOLD          31 // [0-31] 0: min, 31: max
886
+    #define X_IRUN           31 // [0-31] 0: min, 31: max
887
+    #define X_IHOLDDELAY     15 // [0-15] 0: min, 15: about 4 seconds
888
+    #define X_I_SCALE_ANALOG  1 // 0: Normal, 1: AIN
889
+    #define X_MRES           16 // number of microsteps
890
+    #define X_TBL             1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
891
+    #define X_TOFF            8 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
892
+
893
+    #define X2_IHOLD         31
894
+    #define X2_IRUN          31
895
+    #define X2_IHOLDDELAY    15
896
+    #define X2_I_SCALE_ANALOG 1
897
+    #define X2_MRES          16
898
+    #define X2_TBL            1
899
+    #define X2_TOFF           8
900
+
901
+    #define Y_IHOLD          31
902
+    #define Y_IRUN           31
903
+    #define Y_IHOLDDELAY     15
904
+    #define Y_I_SCALE_ANALOG  1
905
+    #define Y_MRES           16
906
+    #define Y_TBL             1
907
+    #define Y_TOFF            8
908
+
909
+    #define Y2_IHOLD         31
910
+    #define Y2_IRUN          31
911
+    #define Y2_IHOLDDELAY    15
912
+    #define Y2_I_SCALE_ANALOG 1
913
+    #define Y2_MRES          16
914
+    #define Y2_TBL            1
915
+    #define Y2_TOFF           8
916
+
917
+    #define Z_IHOLD          31
918
+    #define Z_IRUN           31
919
+    #define Z_IHOLDDELAY     15
920
+    #define Z_I_SCALE_ANALOG  1
921
+    #define Z_MRES           16
922
+    #define Z_TBL             1
923
+    #define Z_TOFF            8
924
+
925
+    #define Z2_IHOLD         31
926
+    #define Z2_IRUN          31
927
+    #define Z2_IHOLDDELAY    15
928
+    #define Z2_I_SCALE_ANALOG 1
929
+    #define Z2_MRES          16
930
+    #define Z2_TBL            1
931
+    #define Z2_TOFF           8
932
+
933
+    #define E0_IHOLD         31
934
+    #define E0_IRUN          31
935
+    #define E0_IHOLDDELAY    15
936
+    #define E0_I_SCALE_ANALOG 1
937
+    #define E0_MRES          16
938
+    #define E0_TBL            1
939
+    #define E0_TOFF           8
940
+
941
+    #define E1_IHOLD         31
942
+    #define E1_IRUN          31
943
+    #define E1_IHOLDDELAY    15
944
+    #define E1_I_SCALE_ANALOG 1
945
+    #define E1_MRES          16
946
+    #define E1_TBL            1
947
+    #define E1_TOFF           8
948
+
949
+    #define E2_IHOLD         31
950
+    #define E2_IRUN          31
951
+    #define E2_IHOLDDELAY    15
952
+    #define E2_I_SCALE_ANALOG 1
953
+    #define E2_MRES          16
954
+    #define E2_TBL            1
955
+    #define E2_TOFF           8
956
+
957
+    #define E3_IHOLD         31
958
+    #define E3_IRUN          31
959
+    #define E3_IHOLDDELAY    15
960
+    #define E3_I_SCALE_ANALOG 1
961
+    #define E3_MRES          16
962
+    #define E3_TBL            1
963
+    #define E3_TOFF           8
964
+
965
+  #endif // TMC2130_ADVANCED_CONFIGURATION
966
+
967
+#endif // HAVE_TMC2130DRIVER
763 968
 
764 969
 // @section l6470
765 970
 
971
+/**
972
+ * Enable this section if you have L6470 motor drivers.
973
+ * You need to import the L6470 library into the Arduino IDE for this.
974
+ * (https://github.com/ameyer/Arduino-L6470)
975
+ */
976
+
766 977
 //#define HAVE_L6470DRIVER
767 978
 #if ENABLED(HAVE_L6470DRIVER)
768 979
 

+ 215
- 4
Marlin/example_configurations/Hephestos/Configuration_adv.h Parādīt failu

@@ -756,13 +756,224 @@
756 756
 
757 757
 #endif
758 758
 
759
-/******************************************************************************\
760
- * enable this section if you have L6470  motor drivers.
761
- * you need to import the L6470 library into the Arduino IDE for this
762
- ******************************************************************************/
759
+// @section TMC2130
760
+
761
+
762
+/**
763
+ * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
764
+ *
765
+ * To use TMC2130 drivers in SPI mode, you'll also need the TMC2130 Arduino library
766
+ * (https://github.com/makertum/Trinamic_TMC2130).
767
+ *
768
+ * To use TMC2130 stepper drivers in SPI mode connect your SPI2130 pins to
769
+ * the hardware SPI interface on your board and define the required CS pins
770
+ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
771
+ */
772
+
773
+//#define HAVE_TMC2130DRIVER
774
+
775
+#if ENABLED(HAVE_TMC2130DRIVER)
776
+
777
+  //#define TMC2130_ADVANCED_CONFIGURATION
778
+
779
+  // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
780
+  //#define X_IS_TMC2130
781
+  //#define X2_IS_TMC2130
782
+  //#define Y_IS_TMC2130
783
+  //#define Y2_IS_TMC2130
784
+  //#define Z_IS_TMC2130
785
+  //#define Z2_IS_TMC2130
786
+  //#define E0_IS_TMC2130
787
+  //#define E1_IS_TMC2130
788
+  //#define E2_IS_TMC2130
789
+  //#define E3_IS_TMC2130
790
+
791
+  #if ENABLED(TMC2130_ADVANCED_CONFIGURATION)
792
+
793
+    // If you have enabled TMC2130_ADVANCED_CONFIGURATION,
794
+    // you can define global settings here, but you still need
795
+    // to configure the tmc2130.init() method manually in the file
796
+    //
797
+    // stepper_indirection.cpp
798
+    //
799
+    // Please read the TMC2130 datasheet:
800
+    // http://www.trinamic.com/_articles/products/integrated-circuits/tmc2130/_datasheet/TMC2130_datasheet.pdf
801
+    // All settings here have the same (sometimes cryptic) names as in the datasheet.
802
+    //
803
+    // The following, uncommented settings are only suggestion.
804
+
805
+    /* GENERAL CONFIGURATION */
806
+
807
+    //#define GLOBAL_EN_PWM_MODE        0
808
+    #define GLOBAL_I_SCALE_ANALOG     1 // [0,1] 0: Normal, 1: AIN
809
+    //#define GLOBAL_INTERNAL_RSENSE    0 // [0,1] 0: Normal, 1: Internal
810
+    #define GLOBAL_EN_PWM_MODE        0 // [0,1] 0: Normal, 1: stealthChop with velocity threshold
811
+    //#define GLOBAL_ENC_COMMUTATION    0 // [0,1]
812
+    #define GLOBAL_SHAFT              0 // [0,1] 0: normal, 1: invert
813
+    //#define GLOBAL_DIAG0_ERROR        0 // [0,1]
814
+    //#define GLOBAL_DIAG0_OTPW         0 // [0,1]
815
+    //#define GLOBAL_DIAG0_STALL        0 // [0,1]
816
+    //#define GLOBAL_DIAG1_STALL        0 // [0,1]
817
+    //#define GLOBAL_DIAG1_INDEX        0 // [0,1]
818
+    //#define GLOBAL_DIAG1_ONSTATE      0 // [0,1]
819
+    //#define GLOBAL_DIAG1_ONSTATE      0 // [0,1]
820
+    //#define GLOBAL_DIAG0_INT_PUSHPULL 0 // [0,1]
821
+    //#define GLOBAL_DIAG1_INT_PUSHPULL 0 // [0,1]
822
+    //#define GLOBAL_SMALL_HYSTERESIS   0 // [0,1]
823
+    //#define GLOBAL_STOP_ENABLE        0 // [0,1]
824
+    //#define GLOBAL_DIRECT_MODE        0 // [0,1]
825
+
826
+    /* VELOCITY-DEPENDENT DRIVE FEATURES */
827
+
828
+    #define GLOBAL_IHOLD             22 // [0-31] 0: min, 31: max
829
+    #define GLOBAL_IRUN              31 // [0-31] 0: min, 31: max
830
+    #define GLOBAL_IHOLDDELAY        15 // [0-15] 0: min, 15: about 4 seconds
831
+    //#define GLOBAL_TPOWERDOWN         0 // [0-255] 0: min, 255: about 4 seconds
832
+    //#define GLOBAL_TPWMTHRS           0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
833
+    //#define GLOBAL_TCOOLTHRS          0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
834
+    #define GLOBAL_THIGH             10 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
835
+
836
+    /* SPI MODE CONFIGURATION */
837
+
838
+    //#define GLOBAL_XDIRECT            0
839
+
840
+    /* DCSTEP MINIMUM VELOCITY */
841
+
842
+    //#define GLOBAL_VDCMIN             0
843
+
844
+    /* MOTOR DRIVER CONFIGURATION*/
845
+
846
+    //#define GLOBAL_DEDGE              0
847
+    //#define GLOBAL_DISS2G             0
848
+    #define GLOBAL_INTPOL             1 // 0: off 1: 256 microstep interpolation
849
+    #define GLOBAL_MRES              16 // number of microsteps
850
+    #define GLOBAL_SYNC               1 // [0-15]
851
+    #define GLOBAL_VHIGHCHM           1 // [0,1] 0: normal, 1: high velocity stepper mode
852
+    #define GLOBAL_VHIGHFS            0 // [0,1] 0: normal, 1: switch to full steps for high velocities
853
+    // #define GLOBAL_VSENSE            0 // [0,1] 0: normal, 1: high sensitivity (not recommended)
854
+    #define GLOBAL_TBL                1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
855
+    #define GLOBAL_CHM                0 // [0,1] 0: spreadCycle, 1: Constant off time with fast decay time.
856
+    //#define GLOBAL_RNDTF              0
857
+    //#define GLOBAL_DISFDCC            0
858
+    //#define GLOBAL_FD                 0
859
+    //#define GLOBAL_HEND               0
860
+    //#define GLOBAL_HSTRT              0
861
+    #define GLOBAL_TOFF              10 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
862
+
863
+    //#define GLOBAL_SFILT              0
864
+    //#define GLOBAL_SGT                0
865
+    //#define GLOBAL_SEIMIN             0
866
+    //#define GLOBAL_SEDN               0
867
+    //#define GLOBAL_SEMAX              0
868
+    //#define GLOBAL_SEUP               0
869
+    //#define GLOBAL_SEMIN              0
870
+
871
+    //#define GLOBAL_DC_TIME            0
872
+    //#define GLOBAL_DC_SG              0
873
+
874
+    //#define GLOBAL_FREEWHEEL          0
875
+    //#define GLOBAL_PWM_SYMMETRIC      0
876
+    //#define GLOBAL_PWM_AUTOSCALE      0
877
+    //#define GLOBAL_PWM_FREQ           0
878
+    //#define GLOBAL_PWM_GRAD           0
879
+    //#define GLOBAL_PWM_AMPL           0
880
+
881
+    //#define GLOBAL_ENCM_CTRL          0
882
+
883
+  #else
884
+
885
+    #define X_IHOLD          31 // [0-31] 0: min, 31: max
886
+    #define X_IRUN           31 // [0-31] 0: min, 31: max
887
+    #define X_IHOLDDELAY     15 // [0-15] 0: min, 15: about 4 seconds
888
+    #define X_I_SCALE_ANALOG  1 // 0: Normal, 1: AIN
889
+    #define X_MRES           16 // number of microsteps
890
+    #define X_TBL             1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
891
+    #define X_TOFF            8 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
892
+
893
+    #define X2_IHOLD         31
894
+    #define X2_IRUN          31
895
+    #define X2_IHOLDDELAY    15
896
+    #define X2_I_SCALE_ANALOG 1
897
+    #define X2_MRES          16
898
+    #define X2_TBL            1
899
+    #define X2_TOFF           8
900
+
901
+    #define Y_IHOLD          31
902
+    #define Y_IRUN           31
903
+    #define Y_IHOLDDELAY     15
904
+    #define Y_I_SCALE_ANALOG  1
905
+    #define Y_MRES           16
906
+    #define Y_TBL             1
907
+    #define Y_TOFF            8
908
+
909
+    #define Y2_IHOLD         31
910
+    #define Y2_IRUN          31
911
+    #define Y2_IHOLDDELAY    15
912
+    #define Y2_I_SCALE_ANALOG 1
913
+    #define Y2_MRES          16
914
+    #define Y2_TBL            1
915
+    #define Y2_TOFF           8
916
+
917
+    #define Z_IHOLD          31
918
+    #define Z_IRUN           31
919
+    #define Z_IHOLDDELAY     15
920
+    #define Z_I_SCALE_ANALOG  1
921
+    #define Z_MRES           16
922
+    #define Z_TBL             1
923
+    #define Z_TOFF            8
924
+
925
+    #define Z2_IHOLD         31
926
+    #define Z2_IRUN          31
927
+    #define Z2_IHOLDDELAY    15
928
+    #define Z2_I_SCALE_ANALOG 1
929
+    #define Z2_MRES          16
930
+    #define Z2_TBL            1
931
+    #define Z2_TOFF           8
932
+
933
+    #define E0_IHOLD         31
934
+    #define E0_IRUN          31
935
+    #define E0_IHOLDDELAY    15
936
+    #define E0_I_SCALE_ANALOG 1
937
+    #define E0_MRES          16
938
+    #define E0_TBL            1
939
+    #define E0_TOFF           8
940
+
941
+    #define E1_IHOLD         31
942
+    #define E1_IRUN          31
943
+    #define E1_IHOLDDELAY    15
944
+    #define E1_I_SCALE_ANALOG 1
945
+    #define E1_MRES          16
946
+    #define E1_TBL            1
947
+    #define E1_TOFF           8
948
+
949
+    #define E2_IHOLD         31
950
+    #define E2_IRUN          31
951
+    #define E2_IHOLDDELAY    15
952
+    #define E2_I_SCALE_ANALOG 1
953
+    #define E2_MRES          16
954
+    #define E2_TBL            1
955
+    #define E2_TOFF           8
956
+
957
+    #define E3_IHOLD         31
958
+    #define E3_IRUN          31
959
+    #define E3_IHOLDDELAY    15
960
+    #define E3_I_SCALE_ANALOG 1
961
+    #define E3_MRES          16
962
+    #define E3_TBL            1
963
+    #define E3_TOFF           8
964
+
965
+  #endif // TMC2130_ADVANCED_CONFIGURATION
966
+
967
+#endif // HAVE_TMC2130DRIVER
763 968
 
764 969
 // @section l6470
765 970
 
971
+/**
972
+ * Enable this section if you have L6470 motor drivers.
973
+ * You need to import the L6470 library into the Arduino IDE for this.
974
+ * (https://github.com/ameyer/Arduino-L6470)
975
+ */
976
+
766 977
 //#define HAVE_L6470DRIVER
767 978
 #if ENABLED(HAVE_L6470DRIVER)
768 979
 

+ 215
- 4
Marlin/example_configurations/Hephestos_2/Configuration_adv.h Parādīt failu

@@ -756,13 +756,224 @@
756 756
 
757 757
 #endif
758 758
 
759
-/******************************************************************************\
760
- * enable this section if you have L6470  motor drivers.
761
- * you need to import the L6470 library into the Arduino IDE for this
762
- ******************************************************************************/
759
+// @section TMC2130
760
+
761
+
762
+/**
763
+ * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
764
+ *
765
+ * To use TMC2130 drivers in SPI mode, you'll also need the TMC2130 Arduino library
766
+ * (https://github.com/makertum/Trinamic_TMC2130).
767
+ *
768
+ * To use TMC2130 stepper drivers in SPI mode connect your SPI2130 pins to
769
+ * the hardware SPI interface on your board and define the required CS pins
770
+ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
771
+ */
772
+
773
+//#define HAVE_TMC2130DRIVER
774
+
775
+#if ENABLED(HAVE_TMC2130DRIVER)
776
+
777
+  //#define TMC2130_ADVANCED_CONFIGURATION
778
+
779
+  // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
780
+  //#define X_IS_TMC2130
781
+  //#define X2_IS_TMC2130
782
+  //#define Y_IS_TMC2130
783
+  //#define Y2_IS_TMC2130
784
+  //#define Z_IS_TMC2130
785
+  //#define Z2_IS_TMC2130
786
+  //#define E0_IS_TMC2130
787
+  //#define E1_IS_TMC2130
788
+  //#define E2_IS_TMC2130
789
+  //#define E3_IS_TMC2130
790
+
791
+  #if ENABLED(TMC2130_ADVANCED_CONFIGURATION)
792
+
793
+    // If you have enabled TMC2130_ADVANCED_CONFIGURATION,
794
+    // you can define global settings here, but you still need
795
+    // to configure the tmc2130.init() method manually in the file
796
+    //
797
+    // stepper_indirection.cpp
798
+    //
799
+    // Please read the TMC2130 datasheet:
800
+    // http://www.trinamic.com/_articles/products/integrated-circuits/tmc2130/_datasheet/TMC2130_datasheet.pdf
801
+    // All settings here have the same (sometimes cryptic) names as in the datasheet.
802
+    //
803
+    // The following, uncommented settings are only suggestion.
804
+
805
+    /* GENERAL CONFIGURATION */
806
+
807
+    //#define GLOBAL_EN_PWM_MODE        0
808
+    #define GLOBAL_I_SCALE_ANALOG     1 // [0,1] 0: Normal, 1: AIN
809
+    //#define GLOBAL_INTERNAL_RSENSE    0 // [0,1] 0: Normal, 1: Internal
810
+    #define GLOBAL_EN_PWM_MODE        0 // [0,1] 0: Normal, 1: stealthChop with velocity threshold
811
+    //#define GLOBAL_ENC_COMMUTATION    0 // [0,1]
812
+    #define GLOBAL_SHAFT              0 // [0,1] 0: normal, 1: invert
813
+    //#define GLOBAL_DIAG0_ERROR        0 // [0,1]
814
+    //#define GLOBAL_DIAG0_OTPW         0 // [0,1]
815
+    //#define GLOBAL_DIAG0_STALL        0 // [0,1]
816
+    //#define GLOBAL_DIAG1_STALL        0 // [0,1]
817
+    //#define GLOBAL_DIAG1_INDEX        0 // [0,1]
818
+    //#define GLOBAL_DIAG1_ONSTATE      0 // [0,1]
819
+    //#define GLOBAL_DIAG1_ONSTATE      0 // [0,1]
820
+    //#define GLOBAL_DIAG0_INT_PUSHPULL 0 // [0,1]
821
+    //#define GLOBAL_DIAG1_INT_PUSHPULL 0 // [0,1]
822
+    //#define GLOBAL_SMALL_HYSTERESIS   0 // [0,1]
823
+    //#define GLOBAL_STOP_ENABLE        0 // [0,1]
824
+    //#define GLOBAL_DIRECT_MODE        0 // [0,1]
825
+
826
+    /* VELOCITY-DEPENDENT DRIVE FEATURES */
827
+
828
+    #define GLOBAL_IHOLD             22 // [0-31] 0: min, 31: max
829
+    #define GLOBAL_IRUN              31 // [0-31] 0: min, 31: max
830
+    #define GLOBAL_IHOLDDELAY        15 // [0-15] 0: min, 15: about 4 seconds
831
+    //#define GLOBAL_TPOWERDOWN         0 // [0-255] 0: min, 255: about 4 seconds
832
+    //#define GLOBAL_TPWMTHRS           0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
833
+    //#define GLOBAL_TCOOLTHRS          0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
834
+    #define GLOBAL_THIGH             10 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
835
+
836
+    /* SPI MODE CONFIGURATION */
837
+
838
+    //#define GLOBAL_XDIRECT            0
839
+
840
+    /* DCSTEP MINIMUM VELOCITY */
841
+
842
+    //#define GLOBAL_VDCMIN             0
843
+
844
+    /* MOTOR DRIVER CONFIGURATION*/
845
+
846
+    //#define GLOBAL_DEDGE              0
847
+    //#define GLOBAL_DISS2G             0
848
+    #define GLOBAL_INTPOL             1 // 0: off 1: 256 microstep interpolation
849
+    #define GLOBAL_MRES              16 // number of microsteps
850
+    #define GLOBAL_SYNC               1 // [0-15]
851
+    #define GLOBAL_VHIGHCHM           1 // [0,1] 0: normal, 1: high velocity stepper mode
852
+    #define GLOBAL_VHIGHFS            0 // [0,1] 0: normal, 1: switch to full steps for high velocities
853
+    // #define GLOBAL_VSENSE            0 // [0,1] 0: normal, 1: high sensitivity (not recommended)
854
+    #define GLOBAL_TBL                1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
855
+    #define GLOBAL_CHM                0 // [0,1] 0: spreadCycle, 1: Constant off time with fast decay time.
856
+    //#define GLOBAL_RNDTF              0
857
+    //#define GLOBAL_DISFDCC            0
858
+    //#define GLOBAL_FD                 0
859
+    //#define GLOBAL_HEND               0
860
+    //#define GLOBAL_HSTRT              0
861
+    #define GLOBAL_TOFF              10 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
862
+
863
+    //#define GLOBAL_SFILT              0
864
+    //#define GLOBAL_SGT                0
865
+    //#define GLOBAL_SEIMIN             0
866
+    //#define GLOBAL_SEDN               0
867
+    //#define GLOBAL_SEMAX              0
868
+    //#define GLOBAL_SEUP               0
869
+    //#define GLOBAL_SEMIN              0
870
+
871
+    //#define GLOBAL_DC_TIME            0
872
+    //#define GLOBAL_DC_SG              0
873
+
874
+    //#define GLOBAL_FREEWHEEL          0
875
+    //#define GLOBAL_PWM_SYMMETRIC      0
876
+    //#define GLOBAL_PWM_AUTOSCALE      0
877
+    //#define GLOBAL_PWM_FREQ           0
878
+    //#define GLOBAL_PWM_GRAD           0
879
+    //#define GLOBAL_PWM_AMPL           0
880
+
881
+    //#define GLOBAL_ENCM_CTRL          0
882
+
883
+  #else
884
+
885
+    #define X_IHOLD          31 // [0-31] 0: min, 31: max
886
+    #define X_IRUN           31 // [0-31] 0: min, 31: max
887
+    #define X_IHOLDDELAY     15 // [0-15] 0: min, 15: about 4 seconds
888
+    #define X_I_SCALE_ANALOG  1 // 0: Normal, 1: AIN
889
+    #define X_MRES           16 // number of microsteps
890
+    #define X_TBL             1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
891
+    #define X_TOFF            8 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
892
+
893
+    #define X2_IHOLD         31
894
+    #define X2_IRUN          31
895
+    #define X2_IHOLDDELAY    15
896
+    #define X2_I_SCALE_ANALOG 1
897
+    #define X2_MRES          16
898
+    #define X2_TBL            1
899
+    #define X2_TOFF           8
900
+
901
+    #define Y_IHOLD          31
902
+    #define Y_IRUN           31
903
+    #define Y_IHOLDDELAY     15
904
+    #define Y_I_SCALE_ANALOG  1
905
+    #define Y_MRES           16
906
+    #define Y_TBL             1
907
+    #define Y_TOFF            8
908
+
909
+    #define Y2_IHOLD         31
910
+    #define Y2_IRUN          31
911
+    #define Y2_IHOLDDELAY    15
912
+    #define Y2_I_SCALE_ANALOG 1
913
+    #define Y2_MRES          16
914
+    #define Y2_TBL            1
915
+    #define Y2_TOFF           8
916
+
917
+    #define Z_IHOLD          31
918
+    #define Z_IRUN           31
919
+    #define Z_IHOLDDELAY     15
920
+    #define Z_I_SCALE_ANALOG  1
921
+    #define Z_MRES           16
922
+    #define Z_TBL             1
923
+    #define Z_TOFF            8
924
+
925
+    #define Z2_IHOLD         31
926
+    #define Z2_IRUN          31
927
+    #define Z2_IHOLDDELAY    15
928
+    #define Z2_I_SCALE_ANALOG 1
929
+    #define Z2_MRES          16
930
+    #define Z2_TBL            1
931
+    #define Z2_TOFF           8
932
+
933
+    #define E0_IHOLD         31
934
+    #define E0_IRUN          31
935
+    #define E0_IHOLDDELAY    15
936
+    #define E0_I_SCALE_ANALOG 1
937
+    #define E0_MRES          16
938
+    #define E0_TBL            1
939
+    #define E0_TOFF           8
940
+
941
+    #define E1_IHOLD         31
942
+    #define E1_IRUN          31
943
+    #define E1_IHOLDDELAY    15
944
+    #define E1_I_SCALE_ANALOG 1
945
+    #define E1_MRES          16
946
+    #define E1_TBL            1
947
+    #define E1_TOFF           8
948
+
949
+    #define E2_IHOLD         31
950
+    #define E2_IRUN          31
951
+    #define E2_IHOLDDELAY    15
952
+    #define E2_I_SCALE_ANALOG 1
953
+    #define E2_MRES          16
954
+    #define E2_TBL            1
955
+    #define E2_TOFF           8
956
+
957
+    #define E3_IHOLD         31
958
+    #define E3_IRUN          31
959
+    #define E3_IHOLDDELAY    15
960
+    #define E3_I_SCALE_ANALOG 1
961
+    #define E3_MRES          16
962
+    #define E3_TBL            1
963
+    #define E3_TOFF           8
964
+
965
+  #endif // TMC2130_ADVANCED_CONFIGURATION
966
+
967
+#endif // HAVE_TMC2130DRIVER
763 968
 
764 969
 // @section l6470
765 970
 
971
+/**
972
+ * Enable this section if you have L6470 motor drivers.
973
+ * You need to import the L6470 library into the Arduino IDE for this.
974
+ * (https://github.com/ameyer/Arduino-L6470)
975
+ */
976
+
766 977
 //#define HAVE_L6470DRIVER
767 978
 #if ENABLED(HAVE_L6470DRIVER)
768 979
 

+ 215
- 4
Marlin/example_configurations/K8200/Configuration_adv.h Parādīt failu

@@ -769,13 +769,224 @@
769 769
 
770 770
 #endif
771 771
 
772
-/******************************************************************************\
773
- * enable this section if you have L6470  motor drivers.
774
- * you need to import the L6470 library into the Arduino IDE for this
775
- ******************************************************************************/
772
+// @section TMC2130
773
+
774
+
775
+/**
776
+ * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
777
+ *
778
+ * To use TMC2130 drivers in SPI mode, you'll also need the TMC2130 Arduino library
779
+ * (https://github.com/makertum/Trinamic_TMC2130).
780
+ *
781
+ * To use TMC2130 stepper drivers in SPI mode connect your SPI2130 pins to
782
+ * the hardware SPI interface on your board and define the required CS pins
783
+ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
784
+ */
785
+
786
+//#define HAVE_TMC2130DRIVER
787
+
788
+#if ENABLED(HAVE_TMC2130DRIVER)
789
+
790
+  //#define TMC2130_ADVANCED_CONFIGURATION
791
+
792
+  // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
793
+  //#define X_IS_TMC2130
794
+  //#define X2_IS_TMC2130
795
+  //#define Y_IS_TMC2130
796
+  //#define Y2_IS_TMC2130
797
+  //#define Z_IS_TMC2130
798
+  //#define Z2_IS_TMC2130
799
+  //#define E0_IS_TMC2130
800
+  //#define E1_IS_TMC2130
801
+  //#define E2_IS_TMC2130
802
+  //#define E3_IS_TMC2130
803
+
804
+  #if ENABLED(TMC2130_ADVANCED_CONFIGURATION)
805
+
806
+    // If you have enabled TMC2130_ADVANCED_CONFIGURATION,
807
+    // you can define global settings here, but you still need
808
+    // to configure the tmc2130.init() method manually in the file
809
+    //
810
+    // stepper_indirection.cpp
811
+    //
812
+    // Please read the TMC2130 datasheet:
813
+    // http://www.trinamic.com/_articles/products/integrated-circuits/tmc2130/_datasheet/TMC2130_datasheet.pdf
814
+    // All settings here have the same (sometimes cryptic) names as in the datasheet.
815
+    //
816
+    // The following, uncommented settings are only suggestion.
817
+
818
+    /* GENERAL CONFIGURATION */
819
+
820
+    //#define GLOBAL_EN_PWM_MODE        0
821
+    #define GLOBAL_I_SCALE_ANALOG     1 // [0,1] 0: Normal, 1: AIN
822
+    //#define GLOBAL_INTERNAL_RSENSE    0 // [0,1] 0: Normal, 1: Internal
823
+    #define GLOBAL_EN_PWM_MODE        0 // [0,1] 0: Normal, 1: stealthChop with velocity threshold
824
+    //#define GLOBAL_ENC_COMMUTATION    0 // [0,1]
825
+    #define GLOBAL_SHAFT              0 // [0,1] 0: normal, 1: invert
826
+    //#define GLOBAL_DIAG0_ERROR        0 // [0,1]
827
+    //#define GLOBAL_DIAG0_OTPW         0 // [0,1]
828
+    //#define GLOBAL_DIAG0_STALL        0 // [0,1]
829
+    //#define GLOBAL_DIAG1_STALL        0 // [0,1]
830
+    //#define GLOBAL_DIAG1_INDEX        0 // [0,1]
831
+    //#define GLOBAL_DIAG1_ONSTATE      0 // [0,1]
832
+    //#define GLOBAL_DIAG1_ONSTATE      0 // [0,1]
833
+    //#define GLOBAL_DIAG0_INT_PUSHPULL 0 // [0,1]
834
+    //#define GLOBAL_DIAG1_INT_PUSHPULL 0 // [0,1]
835
+    //#define GLOBAL_SMALL_HYSTERESIS   0 // [0,1]
836
+    //#define GLOBAL_STOP_ENABLE        0 // [0,1]
837
+    //#define GLOBAL_DIRECT_MODE        0 // [0,1]
838
+
839
+    /* VELOCITY-DEPENDENT DRIVE FEATURES */
840
+
841
+    #define GLOBAL_IHOLD             22 // [0-31] 0: min, 31: max
842
+    #define GLOBAL_IRUN              31 // [0-31] 0: min, 31: max
843
+    #define GLOBAL_IHOLDDELAY        15 // [0-15] 0: min, 15: about 4 seconds
844
+    //#define GLOBAL_TPOWERDOWN         0 // [0-255] 0: min, 255: about 4 seconds
845
+    //#define GLOBAL_TPWMTHRS           0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
846
+    //#define GLOBAL_TCOOLTHRS          0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
847
+    #define GLOBAL_THIGH             10 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
848
+
849
+    /* SPI MODE CONFIGURATION */
850
+
851
+    //#define GLOBAL_XDIRECT            0
852
+
853
+    /* DCSTEP MINIMUM VELOCITY */
854
+
855
+    //#define GLOBAL_VDCMIN             0
856
+
857
+    /* MOTOR DRIVER CONFIGURATION*/
858
+
859
+    //#define GLOBAL_DEDGE              0
860
+    //#define GLOBAL_DISS2G             0
861
+    #define GLOBAL_INTPOL             1 // 0: off 1: 256 microstep interpolation
862
+    #define GLOBAL_MRES              16 // number of microsteps
863
+    #define GLOBAL_SYNC               1 // [0-15]
864
+    #define GLOBAL_VHIGHCHM           1 // [0,1] 0: normal, 1: high velocity stepper mode
865
+    #define GLOBAL_VHIGHFS            0 // [0,1] 0: normal, 1: switch to full steps for high velocities
866
+    // #define GLOBAL_VSENSE            0 // [0,1] 0: normal, 1: high sensitivity (not recommended)
867
+    #define GLOBAL_TBL                1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
868
+    #define GLOBAL_CHM                0 // [0,1] 0: spreadCycle, 1: Constant off time with fast decay time.
869
+    //#define GLOBAL_RNDTF              0
870
+    //#define GLOBAL_DISFDCC            0
871
+    //#define GLOBAL_FD                 0
872
+    //#define GLOBAL_HEND               0
873
+    //#define GLOBAL_HSTRT              0
874
+    #define GLOBAL_TOFF              10 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
875
+
876
+    //#define GLOBAL_SFILT              0
877
+    //#define GLOBAL_SGT                0
878
+    //#define GLOBAL_SEIMIN             0
879
+    //#define GLOBAL_SEDN               0
880
+    //#define GLOBAL_SEMAX              0
881
+    //#define GLOBAL_SEUP               0
882
+    //#define GLOBAL_SEMIN              0
883
+
884
+    //#define GLOBAL_DC_TIME            0
885
+    //#define GLOBAL_DC_SG              0
886
+
887
+    //#define GLOBAL_FREEWHEEL          0
888
+    //#define GLOBAL_PWM_SYMMETRIC      0
889
+    //#define GLOBAL_PWM_AUTOSCALE      0
890
+    //#define GLOBAL_PWM_FREQ           0
891
+    //#define GLOBAL_PWM_GRAD           0
892
+    //#define GLOBAL_PWM_AMPL           0
893
+
894
+    //#define GLOBAL_ENCM_CTRL          0
895
+
896
+  #else
897
+
898
+    #define X_IHOLD          31 // [0-31] 0: min, 31: max
899
+    #define X_IRUN           31 // [0-31] 0: min, 31: max
900
+    #define X_IHOLDDELAY     15 // [0-15] 0: min, 15: about 4 seconds
901
+    #define X_I_SCALE_ANALOG  1 // 0: Normal, 1: AIN
902
+    #define X_MRES           16 // number of microsteps
903
+    #define X_TBL             1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
904
+    #define X_TOFF            8 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
905
+
906
+    #define X2_IHOLD         31
907
+    #define X2_IRUN          31
908
+    #define X2_IHOLDDELAY    15
909
+    #define X2_I_SCALE_ANALOG 1
910
+    #define X2_MRES          16
911
+    #define X2_TBL            1
912
+    #define X2_TOFF           8
913
+
914
+    #define Y_IHOLD          31
915
+    #define Y_IRUN           31
916
+    #define Y_IHOLDDELAY     15
917
+    #define Y_I_SCALE_ANALOG  1
918
+    #define Y_MRES           16
919
+    #define Y_TBL             1
920
+    #define Y_TOFF            8
921
+
922
+    #define Y2_IHOLD         31
923
+    #define Y2_IRUN          31
924
+    #define Y2_IHOLDDELAY    15
925
+    #define Y2_I_SCALE_ANALOG 1
926
+    #define Y2_MRES          16
927
+    #define Y2_TBL            1
928
+    #define Y2_TOFF           8
929
+
930
+    #define Z_IHOLD          31
931
+    #define Z_IRUN           31
932
+    #define Z_IHOLDDELAY     15
933
+    #define Z_I_SCALE_ANALOG  1
934
+    #define Z_MRES           16
935
+    #define Z_TBL             1
936
+    #define Z_TOFF            8
937
+
938
+    #define Z2_IHOLD         31
939
+    #define Z2_IRUN          31
940
+    #define Z2_IHOLDDELAY    15
941
+    #define Z2_I_SCALE_ANALOG 1
942
+    #define Z2_MRES          16
943
+    #define Z2_TBL            1
944
+    #define Z2_TOFF           8
945
+
946
+    #define E0_IHOLD         31
947
+    #define E0_IRUN          31
948
+    #define E0_IHOLDDELAY    15
949
+    #define E0_I_SCALE_ANALOG 1
950
+    #define E0_MRES          16
951
+    #define E0_TBL            1
952
+    #define E0_TOFF           8
953
+
954
+    #define E1_IHOLD         31
955
+    #define E1_IRUN          31
956
+    #define E1_IHOLDDELAY    15
957
+    #define E1_I_SCALE_ANALOG 1
958
+    #define E1_MRES          16
959
+    #define E1_TBL            1
960
+    #define E1_TOFF           8
961
+
962
+    #define E2_IHOLD         31
963
+    #define E2_IRUN          31
964
+    #define E2_IHOLDDELAY    15
965
+    #define E2_I_SCALE_ANALOG 1
966
+    #define E2_MRES          16
967
+    #define E2_TBL            1
968
+    #define E2_TOFF           8
969
+
970
+    #define E3_IHOLD         31
971
+    #define E3_IRUN          31
972
+    #define E3_IHOLDDELAY    15
973
+    #define E3_I_SCALE_ANALOG 1
974
+    #define E3_MRES          16
975
+    #define E3_TBL            1
976
+    #define E3_TOFF           8
977
+
978
+  #endif // TMC2130_ADVANCED_CONFIGURATION
979
+
980
+#endif // HAVE_TMC2130DRIVER
776 981
 
777 982
 // @section l6470
778 983
 
984
+/**
985
+ * Enable this section if you have L6470 motor drivers.
986
+ * You need to import the L6470 library into the Arduino IDE for this.
987
+ * (https://github.com/ameyer/Arduino-L6470)
988
+ */
989
+
779 990
 //#define HAVE_L6470DRIVER
780 991
 #if ENABLED(HAVE_L6470DRIVER)
781 992
 

+ 215
- 4
Marlin/example_configurations/K8400/Configuration_adv.h Parādīt failu

@@ -756,13 +756,224 @@
756 756
 
757 757
 #endif
758 758
 
759
-/******************************************************************************\
760
- * enable this section if you have L6470  motor drivers.
761
- * you need to import the L6470 library into the Arduino IDE for this
762
- ******************************************************************************/
759
+// @section TMC2130
760
+
761
+
762
+/**
763
+ * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
764
+ *
765
+ * To use TMC2130 drivers in SPI mode, you'll also need the TMC2130 Arduino library
766
+ * (https://github.com/makertum/Trinamic_TMC2130).
767
+ *
768
+ * To use TMC2130 stepper drivers in SPI mode connect your SPI2130 pins to
769
+ * the hardware SPI interface on your board and define the required CS pins
770
+ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
771
+ */
772
+
773
+//#define HAVE_TMC2130DRIVER
774
+
775
+#if ENABLED(HAVE_TMC2130DRIVER)
776
+
777
+  //#define TMC2130_ADVANCED_CONFIGURATION
778
+
779
+  // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
780
+  //#define X_IS_TMC2130
781
+  //#define X2_IS_TMC2130
782
+  //#define Y_IS_TMC2130
783
+  //#define Y2_IS_TMC2130
784
+  //#define Z_IS_TMC2130
785
+  //#define Z2_IS_TMC2130
786
+  //#define E0_IS_TMC2130
787
+  //#define E1_IS_TMC2130
788
+  //#define E2_IS_TMC2130
789
+  //#define E3_IS_TMC2130
790
+
791
+  #if ENABLED(TMC2130_ADVANCED_CONFIGURATION)
792
+
793
+    // If you have enabled TMC2130_ADVANCED_CONFIGURATION,
794
+    // you can define global settings here, but you still need
795
+    // to configure the tmc2130.init() method manually in the file
796
+    //
797
+    // stepper_indirection.cpp
798
+    //
799
+    // Please read the TMC2130 datasheet:
800
+    // http://www.trinamic.com/_articles/products/integrated-circuits/tmc2130/_datasheet/TMC2130_datasheet.pdf
801
+    // All settings here have the same (sometimes cryptic) names as in the datasheet.
802
+    //
803
+    // The following, uncommented settings are only suggestion.
804
+
805
+    /* GENERAL CONFIGURATION */
806
+
807
+    //#define GLOBAL_EN_PWM_MODE        0
808
+    #define GLOBAL_I_SCALE_ANALOG     1 // [0,1] 0: Normal, 1: AIN
809
+    //#define GLOBAL_INTERNAL_RSENSE    0 // [0,1] 0: Normal, 1: Internal
810
+    #define GLOBAL_EN_PWM_MODE        0 // [0,1] 0: Normal, 1: stealthChop with velocity threshold
811
+    //#define GLOBAL_ENC_COMMUTATION    0 // [0,1]
812
+    #define GLOBAL_SHAFT              0 // [0,1] 0: normal, 1: invert
813
+    //#define GLOBAL_DIAG0_ERROR        0 // [0,1]
814
+    //#define GLOBAL_DIAG0_OTPW         0 // [0,1]
815
+    //#define GLOBAL_DIAG0_STALL        0 // [0,1]
816
+    //#define GLOBAL_DIAG1_STALL        0 // [0,1]
817
+    //#define GLOBAL_DIAG1_INDEX        0 // [0,1]
818
+    //#define GLOBAL_DIAG1_ONSTATE      0 // [0,1]
819
+    //#define GLOBAL_DIAG1_ONSTATE      0 // [0,1]
820
+    //#define GLOBAL_DIAG0_INT_PUSHPULL 0 // [0,1]
821
+    //#define GLOBAL_DIAG1_INT_PUSHPULL 0 // [0,1]
822
+    //#define GLOBAL_SMALL_HYSTERESIS   0 // [0,1]
823
+    //#define GLOBAL_STOP_ENABLE        0 // [0,1]
824
+    //#define GLOBAL_DIRECT_MODE        0 // [0,1]
825
+
826
+    /* VELOCITY-DEPENDENT DRIVE FEATURES */
827
+
828
+    #define GLOBAL_IHOLD             22 // [0-31] 0: min, 31: max
829
+    #define GLOBAL_IRUN              31 // [0-31] 0: min, 31: max
830
+    #define GLOBAL_IHOLDDELAY        15 // [0-15] 0: min, 15: about 4 seconds
831
+    //#define GLOBAL_TPOWERDOWN         0 // [0-255] 0: min, 255: about 4 seconds
832
+    //#define GLOBAL_TPWMTHRS           0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
833
+    //#define GLOBAL_TCOOLTHRS          0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
834
+    #define GLOBAL_THIGH             10 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
835
+
836
+    /* SPI MODE CONFIGURATION */
837
+
838
+    //#define GLOBAL_XDIRECT            0
839
+
840
+    /* DCSTEP MINIMUM VELOCITY */
841
+
842
+    //#define GLOBAL_VDCMIN             0
843
+
844
+    /* MOTOR DRIVER CONFIGURATION*/
845
+
846
+    //#define GLOBAL_DEDGE              0
847
+    //#define GLOBAL_DISS2G             0
848
+    #define GLOBAL_INTPOL             1 // 0: off 1: 256 microstep interpolation
849
+    #define GLOBAL_MRES              16 // number of microsteps
850
+    #define GLOBAL_SYNC               1 // [0-15]
851
+    #define GLOBAL_VHIGHCHM           1 // [0,1] 0: normal, 1: high velocity stepper mode
852
+    #define GLOBAL_VHIGHFS            0 // [0,1] 0: normal, 1: switch to full steps for high velocities
853
+    // #define GLOBAL_VSENSE            0 // [0,1] 0: normal, 1: high sensitivity (not recommended)
854
+    #define GLOBAL_TBL                1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
855
+    #define GLOBAL_CHM                0 // [0,1] 0: spreadCycle, 1: Constant off time with fast decay time.
856
+    //#define GLOBAL_RNDTF              0
857
+    //#define GLOBAL_DISFDCC            0
858
+    //#define GLOBAL_FD                 0
859
+    //#define GLOBAL_HEND               0
860
+    //#define GLOBAL_HSTRT              0
861
+    #define GLOBAL_TOFF              10 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
862
+
863
+    //#define GLOBAL_SFILT              0
864
+    //#define GLOBAL_SGT                0
865
+    //#define GLOBAL_SEIMIN             0
866
+    //#define GLOBAL_SEDN               0
867
+    //#define GLOBAL_SEMAX              0
868
+    //#define GLOBAL_SEUP               0
869
+    //#define GLOBAL_SEMIN              0
870
+
871
+    //#define GLOBAL_DC_TIME            0
872
+    //#define GLOBAL_DC_SG              0
873
+
874
+    //#define GLOBAL_FREEWHEEL          0
875
+    //#define GLOBAL_PWM_SYMMETRIC      0
876
+    //#define GLOBAL_PWM_AUTOSCALE      0
877
+    //#define GLOBAL_PWM_FREQ           0
878
+    //#define GLOBAL_PWM_GRAD           0
879
+    //#define GLOBAL_PWM_AMPL           0
880
+
881
+    //#define GLOBAL_ENCM_CTRL          0
882
+
883
+  #else
884
+
885
+    #define X_IHOLD          31 // [0-31] 0: min, 31: max
886
+    #define X_IRUN           31 // [0-31] 0: min, 31: max
887
+    #define X_IHOLDDELAY     15 // [0-15] 0: min, 15: about 4 seconds
888
+    #define X_I_SCALE_ANALOG  1 // 0: Normal, 1: AIN
889
+    #define X_MRES           16 // number of microsteps
890
+    #define X_TBL             1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
891
+    #define X_TOFF            8 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
892
+
893
+    #define X2_IHOLD         31
894
+    #define X2_IRUN          31
895
+    #define X2_IHOLDDELAY    15
896
+    #define X2_I_SCALE_ANALOG 1
897
+    #define X2_MRES          16
898
+    #define X2_TBL            1
899
+    #define X2_TOFF           8
900
+
901
+    #define Y_IHOLD          31
902
+    #define Y_IRUN           31
903
+    #define Y_IHOLDDELAY     15
904
+    #define Y_I_SCALE_ANALOG  1
905
+    #define Y_MRES           16
906
+    #define Y_TBL             1
907
+    #define Y_TOFF            8
908
+
909
+    #define Y2_IHOLD         31
910
+    #define Y2_IRUN          31
911
+    #define Y2_IHOLDDELAY    15
912
+    #define Y2_I_SCALE_ANALOG 1
913
+    #define Y2_MRES          16
914
+    #define Y2_TBL            1
915
+    #define Y2_TOFF           8
916
+
917
+    #define Z_IHOLD          31
918
+    #define Z_IRUN           31
919
+    #define Z_IHOLDDELAY     15
920
+    #define Z_I_SCALE_ANALOG  1
921
+    #define Z_MRES           16
922
+    #define Z_TBL             1
923
+    #define Z_TOFF            8
924
+
925
+    #define Z2_IHOLD         31
926
+    #define Z2_IRUN          31
927
+    #define Z2_IHOLDDELAY    15
928
+    #define Z2_I_SCALE_ANALOG 1
929
+    #define Z2_MRES          16
930
+    #define Z2_TBL            1
931
+    #define Z2_TOFF           8
932
+
933
+    #define E0_IHOLD         31
934
+    #define E0_IRUN          31
935
+    #define E0_IHOLDDELAY    15
936
+    #define E0_I_SCALE_ANALOG 1
937
+    #define E0_MRES          16
938
+    #define E0_TBL            1
939
+    #define E0_TOFF           8
940
+
941
+    #define E1_IHOLD         31
942
+    #define E1_IRUN          31
943
+    #define E1_IHOLDDELAY    15
944
+    #define E1_I_SCALE_ANALOG 1
945
+    #define E1_MRES          16
946
+    #define E1_TBL            1
947
+    #define E1_TOFF           8
948
+
949
+    #define E2_IHOLD         31
950
+    #define E2_IRUN          31
951
+    #define E2_IHOLDDELAY    15
952
+    #define E2_I_SCALE_ANALOG 1
953
+    #define E2_MRES          16
954
+    #define E2_TBL            1
955
+    #define E2_TOFF           8
956
+
957
+    #define E3_IHOLD         31
958
+    #define E3_IRUN          31
959
+    #define E3_IHOLDDELAY    15
960
+    #define E3_I_SCALE_ANALOG 1
961
+    #define E3_MRES          16
962
+    #define E3_TBL            1
963
+    #define E3_TOFF           8
964
+
965
+  #endif // TMC2130_ADVANCED_CONFIGURATION
966
+
967
+#endif // HAVE_TMC2130DRIVER
763 968
 
764 969
 // @section l6470
765 970
 
971
+/**
972
+ * Enable this section if you have L6470 motor drivers.
973
+ * You need to import the L6470 library into the Arduino IDE for this.
974
+ * (https://github.com/ameyer/Arduino-L6470)
975
+ */
976
+
766 977
 //#define HAVE_L6470DRIVER
767 978
 #if ENABLED(HAVE_L6470DRIVER)
768 979
 

+ 215
- 4
Marlin/example_configurations/RigidBot/Configuration_adv.h Parādīt failu

@@ -756,13 +756,224 @@
756 756
 
757 757
 #endif
758 758
 
759
-/******************************************************************************\
760
- * enable this section if you have L6470  motor drivers.
761
- * you need to import the L6470 library into the Arduino IDE for this
762
- ******************************************************************************/
759
+// @section TMC2130
760
+
761
+
762
+/**
763
+ * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
764
+ *
765
+ * To use TMC2130 drivers in SPI mode, you'll also need the TMC2130 Arduino library
766
+ * (https://github.com/makertum/Trinamic_TMC2130).
767
+ *
768
+ * To use TMC2130 stepper drivers in SPI mode connect your SPI2130 pins to
769
+ * the hardware SPI interface on your board and define the required CS pins
770
+ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
771
+ */
772
+
773
+//#define HAVE_TMC2130DRIVER
774
+
775
+#if ENABLED(HAVE_TMC2130DRIVER)
776
+
777
+  //#define TMC2130_ADVANCED_CONFIGURATION
778
+
779
+  // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
780
+  //#define X_IS_TMC2130
781
+  //#define X2_IS_TMC2130
782
+  //#define Y_IS_TMC2130
783
+  //#define Y2_IS_TMC2130
784
+  //#define Z_IS_TMC2130
785
+  //#define Z2_IS_TMC2130
786
+  //#define E0_IS_TMC2130
787
+  //#define E1_IS_TMC2130
788
+  //#define E2_IS_TMC2130
789
+  //#define E3_IS_TMC2130
790
+
791
+  #if ENABLED(TMC2130_ADVANCED_CONFIGURATION)
792
+
793
+    // If you have enabled TMC2130_ADVANCED_CONFIGURATION,
794
+    // you can define global settings here, but you still need
795
+    // to configure the tmc2130.init() method manually in the file
796
+    //
797
+    // stepper_indirection.cpp
798
+    //
799
+    // Please read the TMC2130 datasheet:
800
+    // http://www.trinamic.com/_articles/products/integrated-circuits/tmc2130/_datasheet/TMC2130_datasheet.pdf
801
+    // All settings here have the same (sometimes cryptic) names as in the datasheet.
802
+    //
803
+    // The following, uncommented settings are only suggestion.
804
+
805
+    /* GENERAL CONFIGURATION */
806
+
807
+    //#define GLOBAL_EN_PWM_MODE        0
808
+    #define GLOBAL_I_SCALE_ANALOG     1 // [0,1] 0: Normal, 1: AIN
809
+    //#define GLOBAL_INTERNAL_RSENSE    0 // [0,1] 0: Normal, 1: Internal
810
+    #define GLOBAL_EN_PWM_MODE        0 // [0,1] 0: Normal, 1: stealthChop with velocity threshold
811
+    //#define GLOBAL_ENC_COMMUTATION    0 // [0,1]
812
+    #define GLOBAL_SHAFT              0 // [0,1] 0: normal, 1: invert
813
+    //#define GLOBAL_DIAG0_ERROR        0 // [0,1]
814
+    //#define GLOBAL_DIAG0_OTPW         0 // [0,1]
815
+    //#define GLOBAL_DIAG0_STALL        0 // [0,1]
816
+    //#define GLOBAL_DIAG1_STALL        0 // [0,1]
817
+    //#define GLOBAL_DIAG1_INDEX        0 // [0,1]
818
+    //#define GLOBAL_DIAG1_ONSTATE      0 // [0,1]
819
+    //#define GLOBAL_DIAG1_ONSTATE      0 // [0,1]
820
+    //#define GLOBAL_DIAG0_INT_PUSHPULL 0 // [0,1]
821
+    //#define GLOBAL_DIAG1_INT_PUSHPULL 0 // [0,1]
822
+    //#define GLOBAL_SMALL_HYSTERESIS   0 // [0,1]
823
+    //#define GLOBAL_STOP_ENABLE        0 // [0,1]
824
+    //#define GLOBAL_DIRECT_MODE        0 // [0,1]
825
+
826
+    /* VELOCITY-DEPENDENT DRIVE FEATURES */
827
+
828
+    #define GLOBAL_IHOLD             22 // [0-31] 0: min, 31: max
829
+    #define GLOBAL_IRUN              31 // [0-31] 0: min, 31: max
830
+    #define GLOBAL_IHOLDDELAY        15 // [0-15] 0: min, 15: about 4 seconds
831
+    //#define GLOBAL_TPOWERDOWN         0 // [0-255] 0: min, 255: about 4 seconds
832
+    //#define GLOBAL_TPWMTHRS           0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
833
+    //#define GLOBAL_TCOOLTHRS          0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
834
+    #define GLOBAL_THIGH             10 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
835
+
836
+    /* SPI MODE CONFIGURATION */
837
+
838
+    //#define GLOBAL_XDIRECT            0
839
+
840
+    /* DCSTEP MINIMUM VELOCITY */
841
+
842
+    //#define GLOBAL_VDCMIN             0
843
+
844
+    /* MOTOR DRIVER CONFIGURATION*/
845
+
846
+    //#define GLOBAL_DEDGE              0
847
+    //#define GLOBAL_DISS2G             0
848
+    #define GLOBAL_INTPOL             1 // 0: off 1: 256 microstep interpolation
849
+    #define GLOBAL_MRES              16 // number of microsteps
850
+    #define GLOBAL_SYNC               1 // [0-15]
851
+    #define GLOBAL_VHIGHCHM           1 // [0,1] 0: normal, 1: high velocity stepper mode
852
+    #define GLOBAL_VHIGHFS            0 // [0,1] 0: normal, 1: switch to full steps for high velocities
853
+    // #define GLOBAL_VSENSE            0 // [0,1] 0: normal, 1: high sensitivity (not recommended)
854
+    #define GLOBAL_TBL                1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
855
+    #define GLOBAL_CHM                0 // [0,1] 0: spreadCycle, 1: Constant off time with fast decay time.
856
+    //#define GLOBAL_RNDTF              0
857
+    //#define GLOBAL_DISFDCC            0
858
+    //#define GLOBAL_FD                 0
859
+    //#define GLOBAL_HEND               0
860
+    //#define GLOBAL_HSTRT              0
861
+    #define GLOBAL_TOFF              10 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
862
+
863
+    //#define GLOBAL_SFILT              0
864
+    //#define GLOBAL_SGT                0
865
+    //#define GLOBAL_SEIMIN             0
866
+    //#define GLOBAL_SEDN               0
867
+    //#define GLOBAL_SEMAX              0
868
+    //#define GLOBAL_SEUP               0
869
+    //#define GLOBAL_SEMIN              0
870
+
871
+    //#define GLOBAL_DC_TIME            0
872
+    //#define GLOBAL_DC_SG              0
873
+
874
+    //#define GLOBAL_FREEWHEEL          0
875
+    //#define GLOBAL_PWM_SYMMETRIC      0
876
+    //#define GLOBAL_PWM_AUTOSCALE      0
877
+    //#define GLOBAL_PWM_FREQ           0
878
+    //#define GLOBAL_PWM_GRAD           0
879
+    //#define GLOBAL_PWM_AMPL           0
880
+
881
+    //#define GLOBAL_ENCM_CTRL          0
882
+
883
+  #else
884
+
885
+    #define X_IHOLD          31 // [0-31] 0: min, 31: max
886
+    #define X_IRUN           31 // [0-31] 0: min, 31: max
887
+    #define X_IHOLDDELAY     15 // [0-15] 0: min, 15: about 4 seconds
888
+    #define X_I_SCALE_ANALOG  1 // 0: Normal, 1: AIN
889
+    #define X_MRES           16 // number of microsteps
890
+    #define X_TBL             1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
891
+    #define X_TOFF            8 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
892
+
893
+    #define X2_IHOLD         31
894
+    #define X2_IRUN          31
895
+    #define X2_IHOLDDELAY    15
896
+    #define X2_I_SCALE_ANALOG 1
897
+    #define X2_MRES          16
898
+    #define X2_TBL            1
899
+    #define X2_TOFF           8
900
+
901
+    #define Y_IHOLD          31
902
+    #define Y_IRUN           31
903
+    #define Y_IHOLDDELAY     15
904
+    #define Y_I_SCALE_ANALOG  1
905
+    #define Y_MRES           16
906
+    #define Y_TBL             1
907
+    #define Y_TOFF            8
908
+
909
+    #define Y2_IHOLD         31
910
+    #define Y2_IRUN          31
911
+    #define Y2_IHOLDDELAY    15
912
+    #define Y2_I_SCALE_ANALOG 1
913
+    #define Y2_MRES          16
914
+    #define Y2_TBL            1
915
+    #define Y2_TOFF           8
916
+
917
+    #define Z_IHOLD          31
918
+    #define Z_IRUN           31
919
+    #define Z_IHOLDDELAY     15
920
+    #define Z_I_SCALE_ANALOG  1
921
+    #define Z_MRES           16
922
+    #define Z_TBL             1
923
+    #define Z_TOFF            8
924
+
925
+    #define Z2_IHOLD         31
926
+    #define Z2_IRUN          31
927
+    #define Z2_IHOLDDELAY    15
928
+    #define Z2_I_SCALE_ANALOG 1
929
+    #define Z2_MRES          16
930
+    #define Z2_TBL            1
931
+    #define Z2_TOFF           8
932
+
933
+    #define E0_IHOLD         31
934
+    #define E0_IRUN          31
935
+    #define E0_IHOLDDELAY    15
936
+    #define E0_I_SCALE_ANALOG 1
937
+    #define E0_MRES          16
938
+    #define E0_TBL            1
939
+    #define E0_TOFF           8
940
+
941
+    #define E1_IHOLD         31
942
+    #define E1_IRUN          31
943
+    #define E1_IHOLDDELAY    15
944
+    #define E1_I_SCALE_ANALOG 1
945
+    #define E1_MRES          16
946
+    #define E1_TBL            1
947
+    #define E1_TOFF           8
948
+
949
+    #define E2_IHOLD         31
950
+    #define E2_IRUN          31
951
+    #define E2_IHOLDDELAY    15
952
+    #define E2_I_SCALE_ANALOG 1
953
+    #define E2_MRES          16
954
+    #define E2_TBL            1
955
+    #define E2_TOFF           8
956
+
957
+    #define E3_IHOLD         31
958
+    #define E3_IRUN          31
959
+    #define E3_IHOLDDELAY    15
960
+    #define E3_I_SCALE_ANALOG 1
961
+    #define E3_MRES          16
962
+    #define E3_TBL            1
963
+    #define E3_TOFF           8
964
+
965
+  #endif // TMC2130_ADVANCED_CONFIGURATION
966
+
967
+#endif // HAVE_TMC2130DRIVER
763 968
 
764 969
 // @section l6470
765 970
 
971
+/**
972
+ * Enable this section if you have L6470 motor drivers.
973
+ * You need to import the L6470 library into the Arduino IDE for this.
974
+ * (https://github.com/ameyer/Arduino-L6470)
975
+ */
976
+
766 977
 //#define HAVE_L6470DRIVER
767 978
 #if ENABLED(HAVE_L6470DRIVER)
768 979
 

+ 215
- 4
Marlin/example_configurations/SCARA/Configuration_adv.h Parādīt failu

@@ -756,13 +756,224 @@
756 756
 
757 757
 #endif
758 758
 
759
-/******************************************************************************\
760
- * enable this section if you have L6470  motor drivers.
761
- * you need to import the L6470 library into the Arduino IDE for this
762
- ******************************************************************************/
759
+// @section TMC2130
760
+
761
+
762
+/**
763
+ * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
764
+ *
765
+ * To use TMC2130 drivers in SPI mode, you'll also need the TMC2130 Arduino library
766
+ * (https://github.com/makertum/Trinamic_TMC2130).
767
+ *
768
+ * To use TMC2130 stepper drivers in SPI mode connect your SPI2130 pins to
769
+ * the hardware SPI interface on your board and define the required CS pins
770
+ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
771
+ */
772
+
773
+//#define HAVE_TMC2130DRIVER
774
+
775
+#if ENABLED(HAVE_TMC2130DRIVER)
776
+
777
+  //#define TMC2130_ADVANCED_CONFIGURATION
778
+
779
+  // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
780
+  //#define X_IS_TMC2130
781
+  //#define X2_IS_TMC2130
782
+  //#define Y_IS_TMC2130
783
+  //#define Y2_IS_TMC2130
784
+  //#define Z_IS_TMC2130
785
+  //#define Z2_IS_TMC2130
786
+  //#define E0_IS_TMC2130
787
+  //#define E1_IS_TMC2130
788
+  //#define E2_IS_TMC2130
789
+  //#define E3_IS_TMC2130
790
+
791
+  #if ENABLED(TMC2130_ADVANCED_CONFIGURATION)
792
+
793
+    // If you have enabled TMC2130_ADVANCED_CONFIGURATION,
794
+    // you can define global settings here, but you still need
795
+    // to configure the tmc2130.init() method manually in the file
796
+    //
797
+    // stepper_indirection.cpp
798
+    //
799
+    // Please read the TMC2130 datasheet:
800
+    // http://www.trinamic.com/_articles/products/integrated-circuits/tmc2130/_datasheet/TMC2130_datasheet.pdf
801
+    // All settings here have the same (sometimes cryptic) names as in the datasheet.
802
+    //
803
+    // The following, uncommented settings are only suggestion.
804
+
805
+    /* GENERAL CONFIGURATION */
806
+
807
+    //#define GLOBAL_EN_PWM_MODE        0
808
+    #define GLOBAL_I_SCALE_ANALOG     1 // [0,1] 0: Normal, 1: AIN
809
+    //#define GLOBAL_INTERNAL_RSENSE    0 // [0,1] 0: Normal, 1: Internal
810
+    #define GLOBAL_EN_PWM_MODE        0 // [0,1] 0: Normal, 1: stealthChop with velocity threshold
811
+    //#define GLOBAL_ENC_COMMUTATION    0 // [0,1]
812
+    #define GLOBAL_SHAFT              0 // [0,1] 0: normal, 1: invert
813
+    //#define GLOBAL_DIAG0_ERROR        0 // [0,1]
814
+    //#define GLOBAL_DIAG0_OTPW         0 // [0,1]
815
+    //#define GLOBAL_DIAG0_STALL        0 // [0,1]
816
+    //#define GLOBAL_DIAG1_STALL        0 // [0,1]
817
+    //#define GLOBAL_DIAG1_INDEX        0 // [0,1]
818
+    //#define GLOBAL_DIAG1_ONSTATE      0 // [0,1]
819
+    //#define GLOBAL_DIAG1_ONSTATE      0 // [0,1]
820
+    //#define GLOBAL_DIAG0_INT_PUSHPULL 0 // [0,1]
821
+    //#define GLOBAL_DIAG1_INT_PUSHPULL 0 // [0,1]
822
+    //#define GLOBAL_SMALL_HYSTERESIS   0 // [0,1]
823
+    //#define GLOBAL_STOP_ENABLE        0 // [0,1]
824
+    //#define GLOBAL_DIRECT_MODE        0 // [0,1]
825
+
826
+    /* VELOCITY-DEPENDENT DRIVE FEATURES */
827
+
828
+    #define GLOBAL_IHOLD             22 // [0-31] 0: min, 31: max
829
+    #define GLOBAL_IRUN              31 // [0-31] 0: min, 31: max
830
+    #define GLOBAL_IHOLDDELAY        15 // [0-15] 0: min, 15: about 4 seconds
831
+    //#define GLOBAL_TPOWERDOWN         0 // [0-255] 0: min, 255: about 4 seconds
832
+    //#define GLOBAL_TPWMTHRS           0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
833
+    //#define GLOBAL_TCOOLTHRS          0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
834
+    #define GLOBAL_THIGH             10 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
835
+
836
+    /* SPI MODE CONFIGURATION */
837
+
838
+    //#define GLOBAL_XDIRECT            0
839
+
840
+    /* DCSTEP MINIMUM VELOCITY */
841
+
842
+    //#define GLOBAL_VDCMIN             0
843
+
844
+    /* MOTOR DRIVER CONFIGURATION*/
845
+
846
+    //#define GLOBAL_DEDGE              0
847
+    //#define GLOBAL_DISS2G             0
848
+    #define GLOBAL_INTPOL             1 // 0: off 1: 256 microstep interpolation
849
+    #define GLOBAL_MRES              16 // number of microsteps
850
+    #define GLOBAL_SYNC               1 // [0-15]
851
+    #define GLOBAL_VHIGHCHM           1 // [0,1] 0: normal, 1: high velocity stepper mode
852
+    #define GLOBAL_VHIGHFS            0 // [0,1] 0: normal, 1: switch to full steps for high velocities
853
+    // #define GLOBAL_VSENSE            0 // [0,1] 0: normal, 1: high sensitivity (not recommended)
854
+    #define GLOBAL_TBL                1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
855
+    #define GLOBAL_CHM                0 // [0,1] 0: spreadCycle, 1: Constant off time with fast decay time.
856
+    //#define GLOBAL_RNDTF              0
857
+    //#define GLOBAL_DISFDCC            0
858
+    //#define GLOBAL_FD                 0
859
+    //#define GLOBAL_HEND               0
860
+    //#define GLOBAL_HSTRT              0
861
+    #define GLOBAL_TOFF              10 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
862
+
863
+    //#define GLOBAL_SFILT              0
864
+    //#define GLOBAL_SGT                0
865
+    //#define GLOBAL_SEIMIN             0
866
+    //#define GLOBAL_SEDN               0
867
+    //#define GLOBAL_SEMAX              0
868
+    //#define GLOBAL_SEUP               0
869
+    //#define GLOBAL_SEMIN              0
870
+
871
+    //#define GLOBAL_DC_TIME            0
872
+    //#define GLOBAL_DC_SG              0
873
+
874
+    //#define GLOBAL_FREEWHEEL          0
875
+    //#define GLOBAL_PWM_SYMMETRIC      0
876
+    //#define GLOBAL_PWM_AUTOSCALE      0
877
+    //#define GLOBAL_PWM_FREQ           0
878
+    //#define GLOBAL_PWM_GRAD           0
879
+    //#define GLOBAL_PWM_AMPL           0
880
+
881
+    //#define GLOBAL_ENCM_CTRL          0
882
+
883
+  #else
884
+
885
+    #define X_IHOLD          31 // [0-31] 0: min, 31: max
886
+    #define X_IRUN           31 // [0-31] 0: min, 31: max
887
+    #define X_IHOLDDELAY     15 // [0-15] 0: min, 15: about 4 seconds
888
+    #define X_I_SCALE_ANALOG  1 // 0: Normal, 1: AIN
889
+    #define X_MRES           16 // number of microsteps
890
+    #define X_TBL             1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
891
+    #define X_TOFF            8 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
892
+
893
+    #define X2_IHOLD         31
894
+    #define X2_IRUN          31
895
+    #define X2_IHOLDDELAY    15
896
+    #define X2_I_SCALE_ANALOG 1
897
+    #define X2_MRES          16
898
+    #define X2_TBL            1
899
+    #define X2_TOFF           8
900
+
901
+    #define Y_IHOLD          31
902
+    #define Y_IRUN           31
903
+    #define Y_IHOLDDELAY     15
904
+    #define Y_I_SCALE_ANALOG  1
905
+    #define Y_MRES           16
906
+    #define Y_TBL             1
907
+    #define Y_TOFF            8
908
+
909
+    #define Y2_IHOLD         31
910
+    #define Y2_IRUN          31
911
+    #define Y2_IHOLDDELAY    15
912
+    #define Y2_I_SCALE_ANALOG 1
913
+    #define Y2_MRES          16
914
+    #define Y2_TBL            1
915
+    #define Y2_TOFF           8
916
+
917
+    #define Z_IHOLD          31
918
+    #define Z_IRUN           31
919
+    #define Z_IHOLDDELAY     15
920
+    #define Z_I_SCALE_ANALOG  1
921
+    #define Z_MRES           16
922
+    #define Z_TBL             1
923
+    #define Z_TOFF            8
924
+
925
+    #define Z2_IHOLD         31
926
+    #define Z2_IRUN          31
927
+    #define Z2_IHOLDDELAY    15
928
+    #define Z2_I_SCALE_ANALOG 1
929
+    #define Z2_MRES          16
930
+    #define Z2_TBL            1
931
+    #define Z2_TOFF           8
932
+
933
+    #define E0_IHOLD         31
934
+    #define E0_IRUN          31
935
+    #define E0_IHOLDDELAY    15
936
+    #define E0_I_SCALE_ANALOG 1
937
+    #define E0_MRES          16
938
+    #define E0_TBL            1
939
+    #define E0_TOFF           8
940
+
941
+    #define E1_IHOLD         31
942
+    #define E1_IRUN          31
943
+    #define E1_IHOLDDELAY    15
944
+    #define E1_I_SCALE_ANALOG 1
945
+    #define E1_MRES          16
946
+    #define E1_TBL            1
947
+    #define E1_TOFF           8
948
+
949
+    #define E2_IHOLD         31
950
+    #define E2_IRUN          31
951
+    #define E2_IHOLDDELAY    15
952
+    #define E2_I_SCALE_ANALOG 1
953
+    #define E2_MRES          16
954
+    #define E2_TBL            1
955
+    #define E2_TOFF           8
956
+
957
+    #define E3_IHOLD         31
958
+    #define E3_IRUN          31
959
+    #define E3_IHOLDDELAY    15
960
+    #define E3_I_SCALE_ANALOG 1
961
+    #define E3_MRES          16
962
+    #define E3_TBL            1
963
+    #define E3_TOFF           8
964
+
965
+  #endif // TMC2130_ADVANCED_CONFIGURATION
966
+
967
+#endif // HAVE_TMC2130DRIVER
763 968
 
764 969
 // @section l6470
765 970
 
971
+/**
972
+ * Enable this section if you have L6470 motor drivers.
973
+ * You need to import the L6470 library into the Arduino IDE for this.
974
+ * (https://github.com/ameyer/Arduino-L6470)
975
+ */
976
+
766 977
 //#define HAVE_L6470DRIVER
767 978
 #if ENABLED(HAVE_L6470DRIVER)
768 979
 

+ 215
- 4
Marlin/example_configurations/TAZ4/Configuration_adv.h Parādīt failu

@@ -764,13 +764,224 @@
764 764
 
765 765
 #endif
766 766
 
767
-/******************************************************************************\
768
- * enable this section if you have L6470  motor drivers.
769
- * you need to import the L6470 library into the Arduino IDE for this
770
- ******************************************************************************/
767
+// @section TMC2130
768
+
769
+
770
+/**
771
+ * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
772
+ *
773
+ * To use TMC2130 drivers in SPI mode, you'll also need the TMC2130 Arduino library
774
+ * (https://github.com/makertum/Trinamic_TMC2130).
775
+ *
776
+ * To use TMC2130 stepper drivers in SPI mode connect your SPI2130 pins to
777
+ * the hardware SPI interface on your board and define the required CS pins
778
+ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
779
+ */
780
+
781
+//#define HAVE_TMC2130DRIVER
782
+
783
+#if ENABLED(HAVE_TMC2130DRIVER)
784
+
785
+  //#define TMC2130_ADVANCED_CONFIGURATION
786
+
787
+  // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
788
+  //#define X_IS_TMC2130
789
+  //#define X2_IS_TMC2130
790
+  //#define Y_IS_TMC2130
791
+  //#define Y2_IS_TMC2130
792
+  //#define Z_IS_TMC2130
793
+  //#define Z2_IS_TMC2130
794
+  //#define E0_IS_TMC2130
795
+  //#define E1_IS_TMC2130
796
+  //#define E2_IS_TMC2130
797
+  //#define E3_IS_TMC2130
798
+
799
+  #if ENABLED(TMC2130_ADVANCED_CONFIGURATION)
800
+
801
+    // If you have enabled TMC2130_ADVANCED_CONFIGURATION,
802
+    // you can define global settings here, but you still need
803
+    // to configure the tmc2130.init() method manually in the file
804
+    //
805
+    // stepper_indirection.cpp
806
+    //
807
+    // Please read the TMC2130 datasheet:
808
+    // http://www.trinamic.com/_articles/products/integrated-circuits/tmc2130/_datasheet/TMC2130_datasheet.pdf
809
+    // All settings here have the same (sometimes cryptic) names as in the datasheet.
810
+    //
811
+    // The following, uncommented settings are only suggestion.
812
+
813
+    /* GENERAL CONFIGURATION */
814
+
815
+    //#define GLOBAL_EN_PWM_MODE        0
816
+    #define GLOBAL_I_SCALE_ANALOG     1 // [0,1] 0: Normal, 1: AIN
817
+    //#define GLOBAL_INTERNAL_RSENSE    0 // [0,1] 0: Normal, 1: Internal
818
+    #define GLOBAL_EN_PWM_MODE        0 // [0,1] 0: Normal, 1: stealthChop with velocity threshold
819
+    //#define GLOBAL_ENC_COMMUTATION    0 // [0,1]
820
+    #define GLOBAL_SHAFT              0 // [0,1] 0: normal, 1: invert
821
+    //#define GLOBAL_DIAG0_ERROR        0 // [0,1]
822
+    //#define GLOBAL_DIAG0_OTPW         0 // [0,1]
823
+    //#define GLOBAL_DIAG0_STALL        0 // [0,1]
824
+    //#define GLOBAL_DIAG1_STALL        0 // [0,1]
825
+    //#define GLOBAL_DIAG1_INDEX        0 // [0,1]
826
+    //#define GLOBAL_DIAG1_ONSTATE      0 // [0,1]
827
+    //#define GLOBAL_DIAG1_ONSTATE      0 // [0,1]
828
+    //#define GLOBAL_DIAG0_INT_PUSHPULL 0 // [0,1]
829
+    //#define GLOBAL_DIAG1_INT_PUSHPULL 0 // [0,1]
830
+    //#define GLOBAL_SMALL_HYSTERESIS   0 // [0,1]
831
+    //#define GLOBAL_STOP_ENABLE        0 // [0,1]
832
+    //#define GLOBAL_DIRECT_MODE        0 // [0,1]
833
+
834
+    /* VELOCITY-DEPENDENT DRIVE FEATURES */
835
+
836
+    #define GLOBAL_IHOLD             22 // [0-31] 0: min, 31: max
837
+    #define GLOBAL_IRUN              31 // [0-31] 0: min, 31: max
838
+    #define GLOBAL_IHOLDDELAY        15 // [0-15] 0: min, 15: about 4 seconds
839
+    //#define GLOBAL_TPOWERDOWN         0 // [0-255] 0: min, 255: about 4 seconds
840
+    //#define GLOBAL_TPWMTHRS           0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
841
+    //#define GLOBAL_TCOOLTHRS          0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
842
+    #define GLOBAL_THIGH             10 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
843
+
844
+    /* SPI MODE CONFIGURATION */
845
+
846
+    //#define GLOBAL_XDIRECT            0
847
+
848
+    /* DCSTEP MINIMUM VELOCITY */
849
+
850
+    //#define GLOBAL_VDCMIN             0
851
+
852
+    /* MOTOR DRIVER CONFIGURATION*/
853
+
854
+    //#define GLOBAL_DEDGE              0
855
+    //#define GLOBAL_DISS2G             0
856
+    #define GLOBAL_INTPOL             1 // 0: off 1: 256 microstep interpolation
857
+    #define GLOBAL_MRES              16 // number of microsteps
858
+    #define GLOBAL_SYNC               1 // [0-15]
859
+    #define GLOBAL_VHIGHCHM           1 // [0,1] 0: normal, 1: high velocity stepper mode
860
+    #define GLOBAL_VHIGHFS            0 // [0,1] 0: normal, 1: switch to full steps for high velocities
861
+    // #define GLOBAL_VSENSE            0 // [0,1] 0: normal, 1: high sensitivity (not recommended)
862
+    #define GLOBAL_TBL                1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
863
+    #define GLOBAL_CHM                0 // [0,1] 0: spreadCycle, 1: Constant off time with fast decay time.
864
+    //#define GLOBAL_RNDTF              0
865
+    //#define GLOBAL_DISFDCC            0
866
+    //#define GLOBAL_FD                 0
867
+    //#define GLOBAL_HEND               0
868
+    //#define GLOBAL_HSTRT              0
869
+    #define GLOBAL_TOFF              10 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
870
+
871
+    //#define GLOBAL_SFILT              0
872
+    //#define GLOBAL_SGT                0
873
+    //#define GLOBAL_SEIMIN             0
874
+    //#define GLOBAL_SEDN               0
875
+    //#define GLOBAL_SEMAX              0
876
+    //#define GLOBAL_SEUP               0
877
+    //#define GLOBAL_SEMIN              0
878
+
879
+    //#define GLOBAL_DC_TIME            0
880
+    //#define GLOBAL_DC_SG              0
881
+
882
+    //#define GLOBAL_FREEWHEEL          0
883
+    //#define GLOBAL_PWM_SYMMETRIC      0
884
+    //#define GLOBAL_PWM_AUTOSCALE      0
885
+    //#define GLOBAL_PWM_FREQ           0
886
+    //#define GLOBAL_PWM_GRAD           0
887
+    //#define GLOBAL_PWM_AMPL           0
888
+
889
+    //#define GLOBAL_ENCM_CTRL          0
890
+
891
+  #else
892
+
893
+    #define X_IHOLD          31 // [0-31] 0: min, 31: max
894
+    #define X_IRUN           31 // [0-31] 0: min, 31: max
895
+    #define X_IHOLDDELAY     15 // [0-15] 0: min, 15: about 4 seconds
896
+    #define X_I_SCALE_ANALOG  1 // 0: Normal, 1: AIN
897
+    #define X_MRES           16 // number of microsteps
898
+    #define X_TBL             1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
899
+    #define X_TOFF            8 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
900
+
901
+    #define X2_IHOLD         31
902
+    #define X2_IRUN          31
903
+    #define X2_IHOLDDELAY    15
904
+    #define X2_I_SCALE_ANALOG 1
905
+    #define X2_MRES          16
906
+    #define X2_TBL            1
907
+    #define X2_TOFF           8
908
+
909
+    #define Y_IHOLD          31
910
+    #define Y_IRUN           31
911
+    #define Y_IHOLDDELAY     15
912
+    #define Y_I_SCALE_ANALOG  1
913
+    #define Y_MRES           16
914
+    #define Y_TBL             1
915
+    #define Y_TOFF            8
916
+
917
+    #define Y2_IHOLD         31
918
+    #define Y2_IRUN          31
919
+    #define Y2_IHOLDDELAY    15
920
+    #define Y2_I_SCALE_ANALOG 1
921
+    #define Y2_MRES          16
922
+    #define Y2_TBL            1
923
+    #define Y2_TOFF           8
924
+
925
+    #define Z_IHOLD          31
926
+    #define Z_IRUN           31
927
+    #define Z_IHOLDDELAY     15
928
+    #define Z_I_SCALE_ANALOG  1
929
+    #define Z_MRES           16
930
+    #define Z_TBL             1
931
+    #define Z_TOFF            8
932
+
933
+    #define Z2_IHOLD         31
934
+    #define Z2_IRUN          31
935
+    #define Z2_IHOLDDELAY    15
936
+    #define Z2_I_SCALE_ANALOG 1
937
+    #define Z2_MRES          16
938
+    #define Z2_TBL            1
939
+    #define Z2_TOFF           8
940
+
941
+    #define E0_IHOLD         31
942
+    #define E0_IRUN          31
943
+    #define E0_IHOLDDELAY    15
944
+    #define E0_I_SCALE_ANALOG 1
945
+    #define E0_MRES          16
946
+    #define E0_TBL            1
947
+    #define E0_TOFF           8
948
+
949
+    #define E1_IHOLD         31
950
+    #define E1_IRUN          31
951
+    #define E1_IHOLDDELAY    15
952
+    #define E1_I_SCALE_ANALOG 1
953
+    #define E1_MRES          16
954
+    #define E1_TBL            1
955
+    #define E1_TOFF           8
956
+
957
+    #define E2_IHOLD         31
958
+    #define E2_IRUN          31
959
+    #define E2_IHOLDDELAY    15
960
+    #define E2_I_SCALE_ANALOG 1
961
+    #define E2_MRES          16
962
+    #define E2_TBL            1
963
+    #define E2_TOFF           8
964
+
965
+    #define E3_IHOLD         31
966
+    #define E3_IRUN          31
967
+    #define E3_IHOLDDELAY    15
968
+    #define E3_I_SCALE_ANALOG 1
969
+    #define E3_MRES          16
970
+    #define E3_TBL            1
971
+    #define E3_TOFF           8
972
+
973
+  #endif // TMC2130_ADVANCED_CONFIGURATION
974
+
975
+#endif // HAVE_TMC2130DRIVER
771 976
 
772 977
 // @section l6470
773 978
 
979
+/**
980
+ * Enable this section if you have L6470 motor drivers.
981
+ * You need to import the L6470 library into the Arduino IDE for this.
982
+ * (https://github.com/ameyer/Arduino-L6470)
983
+ */
984
+
774 985
 //#define HAVE_L6470DRIVER
775 986
 #if ENABLED(HAVE_L6470DRIVER)
776 987
 

+ 214
- 4
Marlin/example_configurations/WITBOX/Configuration_adv.h Parādīt failu

@@ -756,13 +756,223 @@
756 756
 
757 757
 #endif
758 758
 
759
-/******************************************************************************\
760
- * enable this section if you have L6470  motor drivers.
761
- * you need to import the L6470 library into the Arduino IDE for this
762
- ******************************************************************************/
759
+// @section TMC2130
760
+
761
+/**
762
+ * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
763
+ *
764
+ * To use TMC2130 drivers in SPI mode, you'll also need the TMC2130 Arduino library
765
+ * (https://github.com/makertum/Trinamic_TMC2130).
766
+ *
767
+ * To use TMC2130 stepper drivers in SPI mode connect your SPI2130 pins to
768
+ * the hardware SPI interface on your board and define the required CS pins
769
+ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
770
+ */
771
+
772
+//#define HAVE_TMC2130DRIVER
773
+
774
+#if ENABLED(HAVE_TMC2130DRIVER)
775
+
776
+  //#define TMC2130_ADVANCED_CONFIGURATION
777
+
778
+  // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
779
+  //#define X_IS_TMC2130
780
+  //#define X2_IS_TMC2130
781
+  //#define Y_IS_TMC2130
782
+  //#define Y2_IS_TMC2130
783
+  //#define Z_IS_TMC2130
784
+  //#define Z2_IS_TMC2130
785
+  //#define E0_IS_TMC2130
786
+  //#define E1_IS_TMC2130
787
+  //#define E2_IS_TMC2130
788
+  //#define E3_IS_TMC2130
789
+
790
+  #if ENABLED(TMC2130_ADVANCED_CONFIGURATION)
791
+
792
+    // If you have enabled TMC2130_ADVANCED_CONFIGURATION,
793
+    // you can define global settings here, but you still need
794
+    // to configure the tmc2130.init() method manually in the file
795
+    //
796
+    // stepper_indirection.cpp
797
+    //
798
+    // Please read the TMC2130 datasheet:
799
+    // http://www.trinamic.com/_articles/products/integrated-circuits/tmc2130/_datasheet/TMC2130_datasheet.pdf
800
+    // All settings here have the same (sometimes cryptic) names as in the datasheet.
801
+    //
802
+    // The following, uncommented settings are only suggestion.
803
+
804
+    /* GENERAL CONFIGURATION */
805
+
806
+    //#define GLOBAL_EN_PWM_MODE        0
807
+    #define GLOBAL_I_SCALE_ANALOG     1 // [0,1] 0: Normal, 1: AIN
808
+    //#define GLOBAL_INTERNAL_RSENSE    0 // [0,1] 0: Normal, 1: Internal
809
+    #define GLOBAL_EN_PWM_MODE        0 // [0,1] 0: Normal, 1: stealthChop with velocity threshold
810
+    //#define GLOBAL_ENC_COMMUTATION    0 // [0,1]
811
+    #define GLOBAL_SHAFT              0 // [0,1] 0: normal, 1: invert
812
+    //#define GLOBAL_DIAG0_ERROR        0 // [0,1]
813
+    //#define GLOBAL_DIAG0_OTPW         0 // [0,1]
814
+    //#define GLOBAL_DIAG0_STALL        0 // [0,1]
815
+    //#define GLOBAL_DIAG1_STALL        0 // [0,1]
816
+    //#define GLOBAL_DIAG1_INDEX        0 // [0,1]
817
+    //#define GLOBAL_DIAG1_ONSTATE      0 // [0,1]
818
+    //#define GLOBAL_DIAG1_ONSTATE      0 // [0,1]
819
+    //#define GLOBAL_DIAG0_INT_PUSHPULL 0 // [0,1]
820
+    //#define GLOBAL_DIAG1_INT_PUSHPULL 0 // [0,1]
821
+    //#define GLOBAL_SMALL_HYSTERESIS   0 // [0,1]
822
+    //#define GLOBAL_STOP_ENABLE        0 // [0,1]
823
+    //#define GLOBAL_DIRECT_MODE        0 // [0,1]
824
+
825
+    /* VELOCITY-DEPENDENT DRIVE FEATURES */
826
+
827
+    #define GLOBAL_IHOLD             22 // [0-31] 0: min, 31: max
828
+    #define GLOBAL_IRUN              31 // [0-31] 0: min, 31: max
829
+    #define GLOBAL_IHOLDDELAY        15 // [0-15] 0: min, 15: about 4 seconds
830
+    //#define GLOBAL_TPOWERDOWN         0 // [0-255] 0: min, 255: about 4 seconds
831
+    //#define GLOBAL_TPWMTHRS           0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
832
+    //#define GLOBAL_TCOOLTHRS          0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
833
+    #define GLOBAL_THIGH             10 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
834
+
835
+    /* SPI MODE CONFIGURATION */
836
+
837
+    //#define GLOBAL_XDIRECT            0
838
+
839
+    /* DCSTEP MINIMUM VELOCITY */
840
+
841
+    //#define GLOBAL_VDCMIN             0
842
+
843
+    /* MOTOR DRIVER CONFIGURATION*/
844
+
845
+    //#define GLOBAL_DEDGE              0
846
+    //#define GLOBAL_DISS2G             0
847
+    #define GLOBAL_INTPOL             1 // 0: off 1: 256 microstep interpolation
848
+    #define GLOBAL_MRES              16 // number of microsteps
849
+    #define GLOBAL_SYNC               1 // [0-15]
850
+    #define GLOBAL_VHIGHCHM           1 // [0,1] 0: normal, 1: high velocity stepper mode
851
+    #define GLOBAL_VHIGHFS            0 // [0,1] 0: normal, 1: switch to full steps for high velocities
852
+    // #define GLOBAL_VSENSE            0 // [0,1] 0: normal, 1: high sensitivity (not recommended)
853
+    #define GLOBAL_TBL                1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
854
+    #define GLOBAL_CHM                0 // [0,1] 0: spreadCycle, 1: Constant off time with fast decay time.
855
+    //#define GLOBAL_RNDTF              0
856
+    //#define GLOBAL_DISFDCC            0
857
+    //#define GLOBAL_FD                 0
858
+    //#define GLOBAL_HEND               0
859
+    //#define GLOBAL_HSTRT              0
860
+    #define GLOBAL_TOFF              10 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
861
+
862
+    //#define GLOBAL_SFILT              0
863
+    //#define GLOBAL_SGT                0
864
+    //#define GLOBAL_SEIMIN             0
865
+    //#define GLOBAL_SEDN               0
866
+    //#define GLOBAL_SEMAX              0
867
+    //#define GLOBAL_SEUP               0
868
+    //#define GLOBAL_SEMIN              0
869
+
870
+    //#define GLOBAL_DC_TIME            0
871
+    //#define GLOBAL_DC_SG              0
872
+
873
+    //#define GLOBAL_FREEWHEEL          0
874
+    //#define GLOBAL_PWM_SYMMETRIC      0
875
+    //#define GLOBAL_PWM_AUTOSCALE      0
876
+    //#define GLOBAL_PWM_FREQ           0
877
+    //#define GLOBAL_PWM_GRAD           0
878
+    //#define GLOBAL_PWM_AMPL           0
879
+
880
+    //#define GLOBAL_ENCM_CTRL          0
881
+
882
+  #else
883
+
884
+    #define X_IHOLD          31 // [0-31] 0: min, 31: max
885
+    #define X_IRUN           31 // [0-31] 0: min, 31: max
886
+    #define X_IHOLDDELAY     15 // [0-15] 0: min, 15: about 4 seconds
887
+    #define X_I_SCALE_ANALOG  1 // 0: Normal, 1: AIN
888
+    #define X_MRES           16 // number of microsteps
889
+    #define X_TBL             1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
890
+    #define X_TOFF            8 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
891
+
892
+    #define X2_IHOLD         31
893
+    #define X2_IRUN          31
894
+    #define X2_IHOLDDELAY    15
895
+    #define X2_I_SCALE_ANALOG 1
896
+    #define X2_MRES          16
897
+    #define X2_TBL            1
898
+    #define X2_TOFF           8
899
+
900
+    #define Y_IHOLD          31
901
+    #define Y_IRUN           31
902
+    #define Y_IHOLDDELAY     15
903
+    #define Y_I_SCALE_ANALOG  1
904
+    #define Y_MRES           16
905
+    #define Y_TBL             1
906
+    #define Y_TOFF            8
907
+
908
+    #define Y2_IHOLD         31
909
+    #define Y2_IRUN          31
910
+    #define Y2_IHOLDDELAY    15
911
+    #define Y2_I_SCALE_ANALOG 1
912
+    #define Y2_MRES          16
913
+    #define Y2_TBL            1
914
+    #define Y2_TOFF           8
915
+
916
+    #define Z_IHOLD          31
917
+    #define Z_IRUN           31
918
+    #define Z_IHOLDDELAY     15
919
+    #define Z_I_SCALE_ANALOG  1
920
+    #define Z_MRES           16
921
+    #define Z_TBL             1
922
+    #define Z_TOFF            8
923
+
924
+    #define Z2_IHOLD         31
925
+    #define Z2_IRUN          31
926
+    #define Z2_IHOLDDELAY    15
927
+    #define Z2_I_SCALE_ANALOG 1
928
+    #define Z2_MRES          16
929
+    #define Z2_TBL            1
930
+    #define Z2_TOFF           8
931
+
932
+    #define E0_IHOLD         31
933
+    #define E0_IRUN          31
934
+    #define E0_IHOLDDELAY    15
935
+    #define E0_I_SCALE_ANALOG 1
936
+    #define E0_MRES          16
937
+    #define E0_TBL            1
938
+    #define E0_TOFF           8
939
+
940
+    #define E1_IHOLD         31
941
+    #define E1_IRUN          31
942
+    #define E1_IHOLDDELAY    15
943
+    #define E1_I_SCALE_ANALOG 1
944
+    #define E1_MRES          16
945
+    #define E1_TBL            1
946
+    #define E1_TOFF           8
947
+
948
+    #define E2_IHOLD         31
949
+    #define E2_IRUN          31
950
+    #define E2_IHOLDDELAY    15
951
+    #define E2_I_SCALE_ANALOG 1
952
+    #define E2_MRES          16
953
+    #define E2_TBL            1
954
+    #define E2_TOFF           8
955
+
956
+    #define E3_IHOLD         31
957
+    #define E3_IRUN          31
958
+    #define E3_IHOLDDELAY    15
959
+    #define E3_I_SCALE_ANALOG 1
960
+    #define E3_MRES          16
961
+    #define E3_TBL            1
962
+    #define E3_TOFF           8
963
+
964
+  #endif // TMC2130_ADVANCED_CONFIGURATION
965
+
966
+#endif // HAVE_TMC2130DRIVER
763 967
 
764 968
 // @section l6470
765 969
 
970
+/**
971
+ * Enable this section if you have L6470 motor drivers.
972
+ * You need to import the L6470 library into the Arduino IDE for this.
973
+ * (https://github.com/ameyer/Arduino-L6470)
974
+ */
975
+
766 976
 //#define HAVE_L6470DRIVER
767 977
 #if ENABLED(HAVE_L6470DRIVER)
768 978
 

+ 215
- 4
Marlin/example_configurations/delta/biv2.5/Configuration_adv.h Parādīt failu

@@ -758,13 +758,224 @@
758 758
 
759 759
 #endif
760 760
 
761
-/******************************************************************************\
762
- * enable this section if you have L6470  motor drivers.
763
- * you need to import the L6470 library into the Arduino IDE for this
764
- ******************************************************************************/
761
+// @section TMC2130
762
+
763
+
764
+/**
765
+ * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
766
+ *
767
+ * To use TMC2130 drivers in SPI mode, you'll also need the TMC2130 Arduino library
768
+ * (https://github.com/makertum/Trinamic_TMC2130).
769
+ *
770
+ * To use TMC2130 stepper drivers in SPI mode connect your SPI2130 pins to
771
+ * the hardware SPI interface on your board and define the required CS pins
772
+ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
773
+ */
774
+
775
+//#define HAVE_TMC2130DRIVER
776
+
777
+#if ENABLED(HAVE_TMC2130DRIVER)
778
+
779
+  //#define TMC2130_ADVANCED_CONFIGURATION
780
+
781
+  // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
782
+  //#define X_IS_TMC2130
783
+  //#define X2_IS_TMC2130
784
+  //#define Y_IS_TMC2130
785
+  //#define Y2_IS_TMC2130
786
+  //#define Z_IS_TMC2130
787
+  //#define Z2_IS_TMC2130
788
+  //#define E0_IS_TMC2130
789
+  //#define E1_IS_TMC2130
790
+  //#define E2_IS_TMC2130
791
+  //#define E3_IS_TMC2130
792
+
793
+  #if ENABLED(TMC2130_ADVANCED_CONFIGURATION)
794
+
795
+    // If you have enabled TMC2130_ADVANCED_CONFIGURATION,
796
+    // you can define global settings here, but you still need
797
+    // to configure the tmc2130.init() method manually in the file
798
+    //
799
+    // stepper_indirection.cpp
800
+    //
801
+    // Please read the TMC2130 datasheet:
802
+    // http://www.trinamic.com/_articles/products/integrated-circuits/tmc2130/_datasheet/TMC2130_datasheet.pdf
803
+    // All settings here have the same (sometimes cryptic) names as in the datasheet.
804
+    //
805
+    // The following, uncommented settings are only suggestion.
806
+
807
+    /* GENERAL CONFIGURATION */
808
+
809
+    //#define GLOBAL_EN_PWM_MODE        0
810
+    #define GLOBAL_I_SCALE_ANALOG     1 // [0,1] 0: Normal, 1: AIN
811
+    //#define GLOBAL_INTERNAL_RSENSE    0 // [0,1] 0: Normal, 1: Internal
812
+    #define GLOBAL_EN_PWM_MODE        0 // [0,1] 0: Normal, 1: stealthChop with velocity threshold
813
+    //#define GLOBAL_ENC_COMMUTATION    0 // [0,1]
814
+    #define GLOBAL_SHAFT              0 // [0,1] 0: normal, 1: invert
815
+    //#define GLOBAL_DIAG0_ERROR        0 // [0,1]
816
+    //#define GLOBAL_DIAG0_OTPW         0 // [0,1]
817
+    //#define GLOBAL_DIAG0_STALL        0 // [0,1]
818
+    //#define GLOBAL_DIAG1_STALL        0 // [0,1]
819
+    //#define GLOBAL_DIAG1_INDEX        0 // [0,1]
820
+    //#define GLOBAL_DIAG1_ONSTATE      0 // [0,1]
821
+    //#define GLOBAL_DIAG1_ONSTATE      0 // [0,1]
822
+    //#define GLOBAL_DIAG0_INT_PUSHPULL 0 // [0,1]
823
+    //#define GLOBAL_DIAG1_INT_PUSHPULL 0 // [0,1]
824
+    //#define GLOBAL_SMALL_HYSTERESIS   0 // [0,1]
825
+    //#define GLOBAL_STOP_ENABLE        0 // [0,1]
826
+    //#define GLOBAL_DIRECT_MODE        0 // [0,1]
827
+
828
+    /* VELOCITY-DEPENDENT DRIVE FEATURES */
829
+
830
+    #define GLOBAL_IHOLD             22 // [0-31] 0: min, 31: max
831
+    #define GLOBAL_IRUN              31 // [0-31] 0: min, 31: max
832
+    #define GLOBAL_IHOLDDELAY        15 // [0-15] 0: min, 15: about 4 seconds
833
+    //#define GLOBAL_TPOWERDOWN         0 // [0-255] 0: min, 255: about 4 seconds
834
+    //#define GLOBAL_TPWMTHRS           0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
835
+    //#define GLOBAL_TCOOLTHRS          0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
836
+    #define GLOBAL_THIGH             10 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
837
+
838
+    /* SPI MODE CONFIGURATION */
839
+
840
+    //#define GLOBAL_XDIRECT            0
841
+
842
+    /* DCSTEP MINIMUM VELOCITY */
843
+
844
+    //#define GLOBAL_VDCMIN             0
845
+
846
+    /* MOTOR DRIVER CONFIGURATION*/
847
+
848
+    //#define GLOBAL_DEDGE              0
849
+    //#define GLOBAL_DISS2G             0
850
+    #define GLOBAL_INTPOL             1 // 0: off 1: 256 microstep interpolation
851
+    #define GLOBAL_MRES              16 // number of microsteps
852
+    #define GLOBAL_SYNC               1 // [0-15]
853
+    #define GLOBAL_VHIGHCHM           1 // [0,1] 0: normal, 1: high velocity stepper mode
854
+    #define GLOBAL_VHIGHFS            0 // [0,1] 0: normal, 1: switch to full steps for high velocities
855
+    // #define GLOBAL_VSENSE            0 // [0,1] 0: normal, 1: high sensitivity (not recommended)
856
+    #define GLOBAL_TBL                1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
857
+    #define GLOBAL_CHM                0 // [0,1] 0: spreadCycle, 1: Constant off time with fast decay time.
858
+    //#define GLOBAL_RNDTF              0
859
+    //#define GLOBAL_DISFDCC            0
860
+    //#define GLOBAL_FD                 0
861
+    //#define GLOBAL_HEND               0
862
+    //#define GLOBAL_HSTRT              0
863
+    #define GLOBAL_TOFF              10 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
864
+
865
+    //#define GLOBAL_SFILT              0
866
+    //#define GLOBAL_SGT                0
867
+    //#define GLOBAL_SEIMIN             0
868
+    //#define GLOBAL_SEDN               0
869
+    //#define GLOBAL_SEMAX              0
870
+    //#define GLOBAL_SEUP               0
871
+    //#define GLOBAL_SEMIN              0
872
+
873
+    //#define GLOBAL_DC_TIME            0
874
+    //#define GLOBAL_DC_SG              0
875
+
876
+    //#define GLOBAL_FREEWHEEL          0
877
+    //#define GLOBAL_PWM_SYMMETRIC      0
878
+    //#define GLOBAL_PWM_AUTOSCALE      0
879
+    //#define GLOBAL_PWM_FREQ           0
880
+    //#define GLOBAL_PWM_GRAD           0
881
+    //#define GLOBAL_PWM_AMPL           0
882
+
883
+    //#define GLOBAL_ENCM_CTRL          0
884
+
885
+  #else
886
+
887
+    #define X_IHOLD          31 // [0-31] 0: min, 31: max
888
+    #define X_IRUN           31 // [0-31] 0: min, 31: max
889
+    #define X_IHOLDDELAY     15 // [0-15] 0: min, 15: about 4 seconds
890
+    #define X_I_SCALE_ANALOG  1 // 0: Normal, 1: AIN
891
+    #define X_MRES           16 // number of microsteps
892
+    #define X_TBL             1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
893
+    #define X_TOFF            8 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
894
+
895
+    #define X2_IHOLD         31
896
+    #define X2_IRUN          31
897
+    #define X2_IHOLDDELAY    15
898
+    #define X2_I_SCALE_ANALOG 1
899
+    #define X2_MRES          16
900
+    #define X2_TBL            1
901
+    #define X2_TOFF           8
902
+
903
+    #define Y_IHOLD          31
904
+    #define Y_IRUN           31
905
+    #define Y_IHOLDDELAY     15
906
+    #define Y_I_SCALE_ANALOG  1
907
+    #define Y_MRES           16
908
+    #define Y_TBL             1
909
+    #define Y_TOFF            8
910
+
911
+    #define Y2_IHOLD         31
912
+    #define Y2_IRUN          31
913
+    #define Y2_IHOLDDELAY    15
914
+    #define Y2_I_SCALE_ANALOG 1
915
+    #define Y2_MRES          16
916
+    #define Y2_TBL            1
917
+    #define Y2_TOFF           8
918
+
919
+    #define Z_IHOLD          31
920
+    #define Z_IRUN           31
921
+    #define Z_IHOLDDELAY     15
922
+    #define Z_I_SCALE_ANALOG  1
923
+    #define Z_MRES           16
924
+    #define Z_TBL             1
925
+    #define Z_TOFF            8
926
+
927
+    #define Z2_IHOLD         31
928
+    #define Z2_IRUN          31
929
+    #define Z2_IHOLDDELAY    15
930
+    #define Z2_I_SCALE_ANALOG 1
931
+    #define Z2_MRES          16
932
+    #define Z2_TBL            1
933
+    #define Z2_TOFF           8
934
+
935
+    #define E0_IHOLD         31
936
+    #define E0_IRUN          31
937
+    #define E0_IHOLDDELAY    15
938
+    #define E0_I_SCALE_ANALOG 1
939
+    #define E0_MRES          16
940
+    #define E0_TBL            1
941
+    #define E0_TOFF           8
942
+
943
+    #define E1_IHOLD         31
944
+    #define E1_IRUN          31
945
+    #define E1_IHOLDDELAY    15
946
+    #define E1_I_SCALE_ANALOG 1
947
+    #define E1_MRES          16
948
+    #define E1_TBL            1
949
+    #define E1_TOFF           8
950
+
951
+    #define E2_IHOLD         31
952
+    #define E2_IRUN          31
953
+    #define E2_IHOLDDELAY    15
954
+    #define E2_I_SCALE_ANALOG 1
955
+    #define E2_MRES          16
956
+    #define E2_TBL            1
957
+    #define E2_TOFF           8
958
+
959
+    #define E3_IHOLD         31
960
+    #define E3_IRUN          31
961
+    #define E3_IHOLDDELAY    15
962
+    #define E3_I_SCALE_ANALOG 1
963
+    #define E3_MRES          16
964
+    #define E3_TBL            1
965
+    #define E3_TOFF           8
966
+
967
+  #endif // TMC2130_ADVANCED_CONFIGURATION
968
+
969
+#endif // HAVE_TMC2130DRIVER
765 970
 
766 971
 // @section l6470
767 972
 
973
+/**
974
+ * Enable this section if you have L6470 motor drivers.
975
+ * You need to import the L6470 library into the Arduino IDE for this.
976
+ * (https://github.com/ameyer/Arduino-L6470)
977
+ */
978
+
768 979
 //#define HAVE_L6470DRIVER
769 980
 #if ENABLED(HAVE_L6470DRIVER)
770 981
 

+ 215
- 4
Marlin/example_configurations/delta/generic/Configuration_adv.h Parādīt failu

@@ -758,13 +758,224 @@
758 758
 
759 759
 #endif
760 760
 
761
-/******************************************************************************\
762
- * enable this section if you have L6470  motor drivers.
763
- * you need to import the L6470 library into the Arduino IDE for this
764
- ******************************************************************************/
761
+// @section TMC2130
762
+
763
+
764
+/**
765
+ * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
766
+ *
767
+ * To use TMC2130 drivers in SPI mode, you'll also need the TMC2130 Arduino library
768
+ * (https://github.com/makertum/Trinamic_TMC2130).
769
+ *
770
+ * To use TMC2130 stepper drivers in SPI mode connect your SPI2130 pins to
771
+ * the hardware SPI interface on your board and define the required CS pins
772
+ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
773
+ */
774
+
775
+//#define HAVE_TMC2130DRIVER
776
+
777
+#if ENABLED(HAVE_TMC2130DRIVER)
778
+
779
+  //#define TMC2130_ADVANCED_CONFIGURATION
780
+
781
+  // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
782
+  //#define X_IS_TMC2130
783
+  //#define X2_IS_TMC2130
784
+  //#define Y_IS_TMC2130
785
+  //#define Y2_IS_TMC2130
786
+  //#define Z_IS_TMC2130
787
+  //#define Z2_IS_TMC2130
788
+  //#define E0_IS_TMC2130
789
+  //#define E1_IS_TMC2130
790
+  //#define E2_IS_TMC2130
791
+  //#define E3_IS_TMC2130
792
+
793
+  #if ENABLED(TMC2130_ADVANCED_CONFIGURATION)
794
+
795
+    // If you have enabled TMC2130_ADVANCED_CONFIGURATION,
796
+    // you can define global settings here, but you still need
797
+    // to configure the tmc2130.init() method manually in the file
798
+    //
799
+    // stepper_indirection.cpp
800
+    //
801
+    // Please read the TMC2130 datasheet:
802
+    // http://www.trinamic.com/_articles/products/integrated-circuits/tmc2130/_datasheet/TMC2130_datasheet.pdf
803
+    // All settings here have the same (sometimes cryptic) names as in the datasheet.
804
+    //
805
+    // The following, uncommented settings are only suggestion.
806
+
807
+    /* GENERAL CONFIGURATION */
808
+
809
+    //#define GLOBAL_EN_PWM_MODE        0
810
+    #define GLOBAL_I_SCALE_ANALOG     1 // [0,1] 0: Normal, 1: AIN
811
+    //#define GLOBAL_INTERNAL_RSENSE    0 // [0,1] 0: Normal, 1: Internal
812
+    #define GLOBAL_EN_PWM_MODE        0 // [0,1] 0: Normal, 1: stealthChop with velocity threshold
813
+    //#define GLOBAL_ENC_COMMUTATION    0 // [0,1]
814
+    #define GLOBAL_SHAFT              0 // [0,1] 0: normal, 1: invert
815
+    //#define GLOBAL_DIAG0_ERROR        0 // [0,1]
816
+    //#define GLOBAL_DIAG0_OTPW         0 // [0,1]
817
+    //#define GLOBAL_DIAG0_STALL        0 // [0,1]
818
+    //#define GLOBAL_DIAG1_STALL        0 // [0,1]
819
+    //#define GLOBAL_DIAG1_INDEX        0 // [0,1]
820
+    //#define GLOBAL_DIAG1_ONSTATE      0 // [0,1]
821
+    //#define GLOBAL_DIAG1_ONSTATE      0 // [0,1]
822
+    //#define GLOBAL_DIAG0_INT_PUSHPULL 0 // [0,1]
823
+    //#define GLOBAL_DIAG1_INT_PUSHPULL 0 // [0,1]
824
+    //#define GLOBAL_SMALL_HYSTERESIS   0 // [0,1]
825
+    //#define GLOBAL_STOP_ENABLE        0 // [0,1]
826
+    //#define GLOBAL_DIRECT_MODE        0 // [0,1]
827
+
828
+    /* VELOCITY-DEPENDENT DRIVE FEATURES */
829
+
830
+    #define GLOBAL_IHOLD             22 // [0-31] 0: min, 31: max
831
+    #define GLOBAL_IRUN              31 // [0-31] 0: min, 31: max
832
+    #define GLOBAL_IHOLDDELAY        15 // [0-15] 0: min, 15: about 4 seconds
833
+    //#define GLOBAL_TPOWERDOWN         0 // [0-255] 0: min, 255: about 4 seconds
834
+    //#define GLOBAL_TPWMTHRS           0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
835
+    //#define GLOBAL_TCOOLTHRS          0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
836
+    #define GLOBAL_THIGH             10 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
837
+
838
+    /* SPI MODE CONFIGURATION */
839
+
840
+    //#define GLOBAL_XDIRECT            0
841
+
842
+    /* DCSTEP MINIMUM VELOCITY */
843
+
844
+    //#define GLOBAL_VDCMIN             0
845
+
846
+    /* MOTOR DRIVER CONFIGURATION*/
847
+
848
+    //#define GLOBAL_DEDGE              0
849
+    //#define GLOBAL_DISS2G             0
850
+    #define GLOBAL_INTPOL             1 // 0: off 1: 256 microstep interpolation
851
+    #define GLOBAL_MRES              16 // number of microsteps
852
+    #define GLOBAL_SYNC               1 // [0-15]
853
+    #define GLOBAL_VHIGHCHM           1 // [0,1] 0: normal, 1: high velocity stepper mode
854
+    #define GLOBAL_VHIGHFS            0 // [0,1] 0: normal, 1: switch to full steps for high velocities
855
+    // #define GLOBAL_VSENSE            0 // [0,1] 0: normal, 1: high sensitivity (not recommended)
856
+    #define GLOBAL_TBL                1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
857
+    #define GLOBAL_CHM                0 // [0,1] 0: spreadCycle, 1: Constant off time with fast decay time.
858
+    //#define GLOBAL_RNDTF              0
859
+    //#define GLOBAL_DISFDCC            0
860
+    //#define GLOBAL_FD                 0
861
+    //#define GLOBAL_HEND               0
862
+    //#define GLOBAL_HSTRT              0
863
+    #define GLOBAL_TOFF              10 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
864
+
865
+    //#define GLOBAL_SFILT              0
866
+    //#define GLOBAL_SGT                0
867
+    //#define GLOBAL_SEIMIN             0
868
+    //#define GLOBAL_SEDN               0
869
+    //#define GLOBAL_SEMAX              0
870
+    //#define GLOBAL_SEUP               0
871
+    //#define GLOBAL_SEMIN              0
872
+
873
+    //#define GLOBAL_DC_TIME            0
874
+    //#define GLOBAL_DC_SG              0
875
+
876
+    //#define GLOBAL_FREEWHEEL          0
877
+    //#define GLOBAL_PWM_SYMMETRIC      0
878
+    //#define GLOBAL_PWM_AUTOSCALE      0
879
+    //#define GLOBAL_PWM_FREQ           0
880
+    //#define GLOBAL_PWM_GRAD           0
881
+    //#define GLOBAL_PWM_AMPL           0
882
+
883
+    //#define GLOBAL_ENCM_CTRL          0
884
+
885
+  #else
886
+
887
+    #define X_IHOLD          31 // [0-31] 0: min, 31: max
888
+    #define X_IRUN           31 // [0-31] 0: min, 31: max
889
+    #define X_IHOLDDELAY     15 // [0-15] 0: min, 15: about 4 seconds
890
+    #define X_I_SCALE_ANALOG  1 // 0: Normal, 1: AIN
891
+    #define X_MRES           16 // number of microsteps
892
+    #define X_TBL             1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
893
+    #define X_TOFF            8 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
894
+
895
+    #define X2_IHOLD         31
896
+    #define X2_IRUN          31
897
+    #define X2_IHOLDDELAY    15
898
+    #define X2_I_SCALE_ANALOG 1
899
+    #define X2_MRES          16
900
+    #define X2_TBL            1
901
+    #define X2_TOFF           8
902
+
903
+    #define Y_IHOLD          31
904
+    #define Y_IRUN           31
905
+    #define Y_IHOLDDELAY     15
906
+    #define Y_I_SCALE_ANALOG  1
907
+    #define Y_MRES           16
908
+    #define Y_TBL             1
909
+    #define Y_TOFF            8
910
+
911
+    #define Y2_IHOLD         31
912
+    #define Y2_IRUN          31
913
+    #define Y2_IHOLDDELAY    15
914
+    #define Y2_I_SCALE_ANALOG 1
915
+    #define Y2_MRES          16
916
+    #define Y2_TBL            1
917
+    #define Y2_TOFF           8
918
+
919
+    #define Z_IHOLD          31
920
+    #define Z_IRUN           31
921
+    #define Z_IHOLDDELAY     15
922
+    #define Z_I_SCALE_ANALOG  1
923
+    #define Z_MRES           16
924
+    #define Z_TBL             1
925
+    #define Z_TOFF            8
926
+
927
+    #define Z2_IHOLD         31
928
+    #define Z2_IRUN          31
929
+    #define Z2_IHOLDDELAY    15
930
+    #define Z2_I_SCALE_ANALOG 1
931
+    #define Z2_MRES          16
932
+    #define Z2_TBL            1
933
+    #define Z2_TOFF           8
934
+
935
+    #define E0_IHOLD         31
936
+    #define E0_IRUN          31
937
+    #define E0_IHOLDDELAY    15
938
+    #define E0_I_SCALE_ANALOG 1
939
+    #define E0_MRES          16
940
+    #define E0_TBL            1
941
+    #define E0_TOFF           8
942
+
943
+    #define E1_IHOLD         31
944
+    #define E1_IRUN          31
945
+    #define E1_IHOLDDELAY    15
946
+    #define E1_I_SCALE_ANALOG 1
947
+    #define E1_MRES          16
948
+    #define E1_TBL            1
949
+    #define E1_TOFF           8
950
+
951
+    #define E2_IHOLD         31
952
+    #define E2_IRUN          31
953
+    #define E2_IHOLDDELAY    15
954
+    #define E2_I_SCALE_ANALOG 1
955
+    #define E2_MRES          16
956
+    #define E2_TBL            1
957
+    #define E2_TOFF           8
958
+
959
+    #define E3_IHOLD         31
960
+    #define E3_IRUN          31
961
+    #define E3_IHOLDDELAY    15
962
+    #define E3_I_SCALE_ANALOG 1
963
+    #define E3_MRES          16
964
+    #define E3_TBL            1
965
+    #define E3_TOFF           8
966
+
967
+  #endif // TMC2130_ADVANCED_CONFIGURATION
968
+
969
+#endif // HAVE_TMC2130DRIVER
765 970
 
766 971
 // @section l6470
767 972
 
973
+/**
974
+ * Enable this section if you have L6470 motor drivers.
975
+ * You need to import the L6470 library into the Arduino IDE for this.
976
+ * (https://github.com/ameyer/Arduino-L6470)
977
+ */
978
+
768 979
 //#define HAVE_L6470DRIVER
769 980
 #if ENABLED(HAVE_L6470DRIVER)
770 981
 

+ 215
- 4
Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h Parādīt failu

@@ -758,13 +758,224 @@
758 758
 
759 759
 #endif
760 760
 
761
-/******************************************************************************\
762
- * enable this section if you have L6470  motor drivers.
763
- * you need to import the L6470 library into the Arduino IDE for this
764
- ******************************************************************************/
761
+// @section TMC2130
762
+
763
+
764
+/**
765
+ * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
766
+ *
767
+ * To use TMC2130 drivers in SPI mode, you'll also need the TMC2130 Arduino library
768
+ * (https://github.com/makertum/Trinamic_TMC2130).
769
+ *
770
+ * To use TMC2130 stepper drivers in SPI mode connect your SPI2130 pins to
771
+ * the hardware SPI interface on your board and define the required CS pins
772
+ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
773
+ */
774
+
775
+//#define HAVE_TMC2130DRIVER
776
+
777
+#if ENABLED(HAVE_TMC2130DRIVER)
778
+
779
+  //#define TMC2130_ADVANCED_CONFIGURATION
780
+
781
+  // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
782
+  //#define X_IS_TMC2130
783
+  //#define X2_IS_TMC2130
784
+  //#define Y_IS_TMC2130
785
+  //#define Y2_IS_TMC2130
786
+  //#define Z_IS_TMC2130
787
+  //#define Z2_IS_TMC2130
788
+  //#define E0_IS_TMC2130
789
+  //#define E1_IS_TMC2130
790
+  //#define E2_IS_TMC2130
791
+  //#define E3_IS_TMC2130
792
+
793
+  #if ENABLED(TMC2130_ADVANCED_CONFIGURATION)
794
+
795
+    // If you have enabled TMC2130_ADVANCED_CONFIGURATION,
796
+    // you can define global settings here, but you still need
797
+    // to configure the tmc2130.init() method manually in the file
798
+    //
799
+    // stepper_indirection.cpp
800
+    //
801
+    // Please read the TMC2130 datasheet:
802
+    // http://www.trinamic.com/_articles/products/integrated-circuits/tmc2130/_datasheet/TMC2130_datasheet.pdf
803
+    // All settings here have the same (sometimes cryptic) names as in the datasheet.
804
+    //
805
+    // The following, uncommented settings are only suggestion.
806
+
807
+    /* GENERAL CONFIGURATION */
808
+
809
+    //#define GLOBAL_EN_PWM_MODE        0
810
+    #define GLOBAL_I_SCALE_ANALOG     1 // [0,1] 0: Normal, 1: AIN
811
+    //#define GLOBAL_INTERNAL_RSENSE    0 // [0,1] 0: Normal, 1: Internal
812
+    #define GLOBAL_EN_PWM_MODE        0 // [0,1] 0: Normal, 1: stealthChop with velocity threshold
813
+    //#define GLOBAL_ENC_COMMUTATION    0 // [0,1]
814
+    #define GLOBAL_SHAFT              0 // [0,1] 0: normal, 1: invert
815
+    //#define GLOBAL_DIAG0_ERROR        0 // [0,1]
816
+    //#define GLOBAL_DIAG0_OTPW         0 // [0,1]
817
+    //#define GLOBAL_DIAG0_STALL        0 // [0,1]
818
+    //#define GLOBAL_DIAG1_STALL        0 // [0,1]
819
+    //#define GLOBAL_DIAG1_INDEX        0 // [0,1]
820
+    //#define GLOBAL_DIAG1_ONSTATE      0 // [0,1]
821
+    //#define GLOBAL_DIAG1_ONSTATE      0 // [0,1]
822
+    //#define GLOBAL_DIAG0_INT_PUSHPULL 0 // [0,1]
823
+    //#define GLOBAL_DIAG1_INT_PUSHPULL 0 // [0,1]
824
+    //#define GLOBAL_SMALL_HYSTERESIS   0 // [0,1]
825
+    //#define GLOBAL_STOP_ENABLE        0 // [0,1]
826
+    //#define GLOBAL_DIRECT_MODE        0 // [0,1]
827
+
828
+    /* VELOCITY-DEPENDENT DRIVE FEATURES */
829
+
830
+    #define GLOBAL_IHOLD             22 // [0-31] 0: min, 31: max
831
+    #define GLOBAL_IRUN              31 // [0-31] 0: min, 31: max
832
+    #define GLOBAL_IHOLDDELAY        15 // [0-15] 0: min, 15: about 4 seconds
833
+    //#define GLOBAL_TPOWERDOWN         0 // [0-255] 0: min, 255: about 4 seconds
834
+    //#define GLOBAL_TPWMTHRS           0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
835
+    //#define GLOBAL_TCOOLTHRS          0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
836
+    #define GLOBAL_THIGH             10 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
837
+
838
+    /* SPI MODE CONFIGURATION */
839
+
840
+    //#define GLOBAL_XDIRECT            0
841
+
842
+    /* DCSTEP MINIMUM VELOCITY */
843
+
844
+    //#define GLOBAL_VDCMIN             0
845
+
846
+    /* MOTOR DRIVER CONFIGURATION*/
847
+
848
+    //#define GLOBAL_DEDGE              0
849
+    //#define GLOBAL_DISS2G             0
850
+    #define GLOBAL_INTPOL             1 // 0: off 1: 256 microstep interpolation
851
+    #define GLOBAL_MRES              16 // number of microsteps
852
+    #define GLOBAL_SYNC               1 // [0-15]
853
+    #define GLOBAL_VHIGHCHM           1 // [0,1] 0: normal, 1: high velocity stepper mode
854
+    #define GLOBAL_VHIGHFS            0 // [0,1] 0: normal, 1: switch to full steps for high velocities
855
+    // #define GLOBAL_VSENSE            0 // [0,1] 0: normal, 1: high sensitivity (not recommended)
856
+    #define GLOBAL_TBL                1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
857
+    #define GLOBAL_CHM                0 // [0,1] 0: spreadCycle, 1: Constant off time with fast decay time.
858
+    //#define GLOBAL_RNDTF              0
859
+    //#define GLOBAL_DISFDCC            0
860
+    //#define GLOBAL_FD                 0
861
+    //#define GLOBAL_HEND               0
862
+    //#define GLOBAL_HSTRT              0
863
+    #define GLOBAL_TOFF              10 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
864
+
865
+    //#define GLOBAL_SFILT              0
866
+    //#define GLOBAL_SGT                0
867
+    //#define GLOBAL_SEIMIN             0
868
+    //#define GLOBAL_SEDN               0
869
+    //#define GLOBAL_SEMAX              0
870
+    //#define GLOBAL_SEUP               0
871
+    //#define GLOBAL_SEMIN              0
872
+
873
+    //#define GLOBAL_DC_TIME            0
874
+    //#define GLOBAL_DC_SG              0
875
+
876
+    //#define GLOBAL_FREEWHEEL          0
877
+    //#define GLOBAL_PWM_SYMMETRIC      0
878
+    //#define GLOBAL_PWM_AUTOSCALE      0
879
+    //#define GLOBAL_PWM_FREQ           0
880
+    //#define GLOBAL_PWM_GRAD           0
881
+    //#define GLOBAL_PWM_AMPL           0
882
+
883
+    //#define GLOBAL_ENCM_CTRL          0
884
+
885
+  #else
886
+
887
+    #define X_IHOLD          31 // [0-31] 0: min, 31: max
888
+    #define X_IRUN           31 // [0-31] 0: min, 31: max
889
+    #define X_IHOLDDELAY     15 // [0-15] 0: min, 15: about 4 seconds
890
+    #define X_I_SCALE_ANALOG  1 // 0: Normal, 1: AIN
891
+    #define X_MRES           16 // number of microsteps
892
+    #define X_TBL             1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
893
+    #define X_TOFF            8 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
894
+
895
+    #define X2_IHOLD         31
896
+    #define X2_IRUN          31
897
+    #define X2_IHOLDDELAY    15
898
+    #define X2_I_SCALE_ANALOG 1
899
+    #define X2_MRES          16
900
+    #define X2_TBL            1
901
+    #define X2_TOFF           8
902
+
903
+    #define Y_IHOLD          31
904
+    #define Y_IRUN           31
905
+    #define Y_IHOLDDELAY     15
906
+    #define Y_I_SCALE_ANALOG  1
907
+    #define Y_MRES           16
908
+    #define Y_TBL             1
909
+    #define Y_TOFF            8
910
+
911
+    #define Y2_IHOLD         31
912
+    #define Y2_IRUN          31
913
+    #define Y2_IHOLDDELAY    15
914
+    #define Y2_I_SCALE_ANALOG 1
915
+    #define Y2_MRES          16
916
+    #define Y2_TBL            1
917
+    #define Y2_TOFF           8
918
+
919
+    #define Z_IHOLD          31
920
+    #define Z_IRUN           31
921
+    #define Z_IHOLDDELAY     15
922
+    #define Z_I_SCALE_ANALOG  1
923
+    #define Z_MRES           16
924
+    #define Z_TBL             1
925
+    #define Z_TOFF            8
926
+
927
+    #define Z2_IHOLD         31
928
+    #define Z2_IRUN          31
929
+    #define Z2_IHOLDDELAY    15
930
+    #define Z2_I_SCALE_ANALOG 1
931
+    #define Z2_MRES          16
932
+    #define Z2_TBL            1
933
+    #define Z2_TOFF           8
934
+
935
+    #define E0_IHOLD         31
936
+    #define E0_IRUN          31
937
+    #define E0_IHOLDDELAY    15
938
+    #define E0_I_SCALE_ANALOG 1
939
+    #define E0_MRES          16
940
+    #define E0_TBL            1
941
+    #define E0_TOFF           8
942
+
943
+    #define E1_IHOLD         31
944
+    #define E1_IRUN          31
945
+    #define E1_IHOLDDELAY    15
946
+    #define E1_I_SCALE_ANALOG 1
947
+    #define E1_MRES          16
948
+    #define E1_TBL            1
949
+    #define E1_TOFF           8
950
+
951
+    #define E2_IHOLD         31
952
+    #define E2_IRUN          31
953
+    #define E2_IHOLDDELAY    15
954
+    #define E2_I_SCALE_ANALOG 1
955
+    #define E2_MRES          16
956
+    #define E2_TBL            1
957
+    #define E2_TOFF           8
958
+
959
+    #define E3_IHOLD         31
960
+    #define E3_IRUN          31
961
+    #define E3_IHOLDDELAY    15
962
+    #define E3_I_SCALE_ANALOG 1
963
+    #define E3_MRES          16
964
+    #define E3_TBL            1
965
+    #define E3_TOFF           8
966
+
967
+  #endif // TMC2130_ADVANCED_CONFIGURATION
968
+
969
+#endif // HAVE_TMC2130DRIVER
765 970
 
766 971
 // @section l6470
767 972
 
973
+/**
974
+ * Enable this section if you have L6470 motor drivers.
975
+ * You need to import the L6470 library into the Arduino IDE for this.
976
+ * (https://github.com/ameyer/Arduino-L6470)
977
+ */
978
+
768 979
 //#define HAVE_L6470DRIVER
769 980
 #if ENABLED(HAVE_L6470DRIVER)
770 981
 

+ 215
- 4
Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h Parādīt failu

@@ -763,13 +763,224 @@
763 763
 
764 764
 #endif
765 765
 
766
-/******************************************************************************\
767
- * enable this section if you have L6470  motor drivers.
768
- * you need to import the L6470 library into the Arduino IDE for this
769
- ******************************************************************************/
766
+// @section TMC2130
767
+
768
+
769
+/**
770
+ * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
771
+ *
772
+ * To use TMC2130 drivers in SPI mode, you'll also need the TMC2130 Arduino library
773
+ * (https://github.com/makertum/Trinamic_TMC2130).
774
+ *
775
+ * To use TMC2130 stepper drivers in SPI mode connect your SPI2130 pins to
776
+ * the hardware SPI interface on your board and define the required CS pins
777
+ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
778
+ */
779
+
780
+//#define HAVE_TMC2130DRIVER
781
+
782
+#if ENABLED(HAVE_TMC2130DRIVER)
783
+
784
+  //#define TMC2130_ADVANCED_CONFIGURATION
785
+
786
+  // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
787
+  //#define X_IS_TMC2130
788
+  //#define X2_IS_TMC2130
789
+  //#define Y_IS_TMC2130
790
+  //#define Y2_IS_TMC2130
791
+  //#define Z_IS_TMC2130
792
+  //#define Z2_IS_TMC2130
793
+  //#define E0_IS_TMC2130
794
+  //#define E1_IS_TMC2130
795
+  //#define E2_IS_TMC2130
796
+  //#define E3_IS_TMC2130
797
+
798
+  #if ENABLED(TMC2130_ADVANCED_CONFIGURATION)
799
+
800
+    // If you have enabled TMC2130_ADVANCED_CONFIGURATION,
801
+    // you can define global settings here, but you still need
802
+    // to configure the tmc2130.init() method manually in the file
803
+    //
804
+    // stepper_indirection.cpp
805
+    //
806
+    // Please read the TMC2130 datasheet:
807
+    // http://www.trinamic.com/_articles/products/integrated-circuits/tmc2130/_datasheet/TMC2130_datasheet.pdf
808
+    // All settings here have the same (sometimes cryptic) names as in the datasheet.
809
+    //
810
+    // The following, uncommented settings are only suggestion.
811
+
812
+    /* GENERAL CONFIGURATION */
813
+
814
+    //#define GLOBAL_EN_PWM_MODE        0
815
+    #define GLOBAL_I_SCALE_ANALOG     1 // [0,1] 0: Normal, 1: AIN
816
+    //#define GLOBAL_INTERNAL_RSENSE    0 // [0,1] 0: Normal, 1: Internal
817
+    #define GLOBAL_EN_PWM_MODE        0 // [0,1] 0: Normal, 1: stealthChop with velocity threshold
818
+    //#define GLOBAL_ENC_COMMUTATION    0 // [0,1]
819
+    #define GLOBAL_SHAFT              0 // [0,1] 0: normal, 1: invert
820
+    //#define GLOBAL_DIAG0_ERROR        0 // [0,1]
821
+    //#define GLOBAL_DIAG0_OTPW         0 // [0,1]
822
+    //#define GLOBAL_DIAG0_STALL        0 // [0,1]
823
+    //#define GLOBAL_DIAG1_STALL        0 // [0,1]
824
+    //#define GLOBAL_DIAG1_INDEX        0 // [0,1]
825
+    //#define GLOBAL_DIAG1_ONSTATE      0 // [0,1]
826
+    //#define GLOBAL_DIAG1_ONSTATE      0 // [0,1]
827
+    //#define GLOBAL_DIAG0_INT_PUSHPULL 0 // [0,1]
828
+    //#define GLOBAL_DIAG1_INT_PUSHPULL 0 // [0,1]
829
+    //#define GLOBAL_SMALL_HYSTERESIS   0 // [0,1]
830
+    //#define GLOBAL_STOP_ENABLE        0 // [0,1]
831
+    //#define GLOBAL_DIRECT_MODE        0 // [0,1]
832
+
833
+    /* VELOCITY-DEPENDENT DRIVE FEATURES */
834
+
835
+    #define GLOBAL_IHOLD             22 // [0-31] 0: min, 31: max
836
+    #define GLOBAL_IRUN              31 // [0-31] 0: min, 31: max
837
+    #define GLOBAL_IHOLDDELAY        15 // [0-15] 0: min, 15: about 4 seconds
838
+    //#define GLOBAL_TPOWERDOWN         0 // [0-255] 0: min, 255: about 4 seconds
839
+    //#define GLOBAL_TPWMTHRS           0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
840
+    //#define GLOBAL_TCOOLTHRS          0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
841
+    #define GLOBAL_THIGH             10 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
842
+
843
+    /* SPI MODE CONFIGURATION */
844
+
845
+    //#define GLOBAL_XDIRECT            0
846
+
847
+    /* DCSTEP MINIMUM VELOCITY */
848
+
849
+    //#define GLOBAL_VDCMIN             0
850
+
851
+    /* MOTOR DRIVER CONFIGURATION*/
852
+
853
+    //#define GLOBAL_DEDGE              0
854
+    //#define GLOBAL_DISS2G             0
855
+    #define GLOBAL_INTPOL             1 // 0: off 1: 256 microstep interpolation
856
+    #define GLOBAL_MRES              16 // number of microsteps
857
+    #define GLOBAL_SYNC               1 // [0-15]
858
+    #define GLOBAL_VHIGHCHM           1 // [0,1] 0: normal, 1: high velocity stepper mode
859
+    #define GLOBAL_VHIGHFS            0 // [0,1] 0: normal, 1: switch to full steps for high velocities
860
+    // #define GLOBAL_VSENSE            0 // [0,1] 0: normal, 1: high sensitivity (not recommended)
861
+    #define GLOBAL_TBL                1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
862
+    #define GLOBAL_CHM                0 // [0,1] 0: spreadCycle, 1: Constant off time with fast decay time.
863
+    //#define GLOBAL_RNDTF              0
864
+    //#define GLOBAL_DISFDCC            0
865
+    //#define GLOBAL_FD                 0
866
+    //#define GLOBAL_HEND               0
867
+    //#define GLOBAL_HSTRT              0
868
+    #define GLOBAL_TOFF              10 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
869
+
870
+    //#define GLOBAL_SFILT              0
871
+    //#define GLOBAL_SGT                0
872
+    //#define GLOBAL_SEIMIN             0
873
+    //#define GLOBAL_SEDN               0
874
+    //#define GLOBAL_SEMAX              0
875
+    //#define GLOBAL_SEUP               0
876
+    //#define GLOBAL_SEMIN              0
877
+
878
+    //#define GLOBAL_DC_TIME            0
879
+    //#define GLOBAL_DC_SG              0
880
+
881
+    //#define GLOBAL_FREEWHEEL          0
882
+    //#define GLOBAL_PWM_SYMMETRIC      0
883
+    //#define GLOBAL_PWM_AUTOSCALE      0
884
+    //#define GLOBAL_PWM_FREQ           0
885
+    //#define GLOBAL_PWM_GRAD           0
886
+    //#define GLOBAL_PWM_AMPL           0
887
+
888
+    //#define GLOBAL_ENCM_CTRL          0
889
+
890
+  #else
891
+
892
+    #define X_IHOLD          31 // [0-31] 0: min, 31: max
893
+    #define X_IRUN           31 // [0-31] 0: min, 31: max
894
+    #define X_IHOLDDELAY     15 // [0-15] 0: min, 15: about 4 seconds
895
+    #define X_I_SCALE_ANALOG  1 // 0: Normal, 1: AIN
896
+    #define X_MRES           16 // number of microsteps
897
+    #define X_TBL             1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
898
+    #define X_TOFF            8 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
899
+
900
+    #define X2_IHOLD         31
901
+    #define X2_IRUN          31
902
+    #define X2_IHOLDDELAY    15
903
+    #define X2_I_SCALE_ANALOG 1
904
+    #define X2_MRES          16
905
+    #define X2_TBL            1
906
+    #define X2_TOFF           8
907
+
908
+    #define Y_IHOLD          31
909
+    #define Y_IRUN           31
910
+    #define Y_IHOLDDELAY     15
911
+    #define Y_I_SCALE_ANALOG  1
912
+    #define Y_MRES           16
913
+    #define Y_TBL             1
914
+    #define Y_TOFF            8
915
+
916
+    #define Y2_IHOLD         31
917
+    #define Y2_IRUN          31
918
+    #define Y2_IHOLDDELAY    15
919
+    #define Y2_I_SCALE_ANALOG 1
920
+    #define Y2_MRES          16
921
+    #define Y2_TBL            1
922
+    #define Y2_TOFF           8
923
+
924
+    #define Z_IHOLD          31
925
+    #define Z_IRUN           31
926
+    #define Z_IHOLDDELAY     15
927
+    #define Z_I_SCALE_ANALOG  1
928
+    #define Z_MRES           16
929
+    #define Z_TBL             1
930
+    #define Z_TOFF            8
931
+
932
+    #define Z2_IHOLD         31
933
+    #define Z2_IRUN          31
934
+    #define Z2_IHOLDDELAY    15
935
+    #define Z2_I_SCALE_ANALOG 1
936
+    #define Z2_MRES          16
937
+    #define Z2_TBL            1
938
+    #define Z2_TOFF           8
939
+
940
+    #define E0_IHOLD         31
941
+    #define E0_IRUN          31
942
+    #define E0_IHOLDDELAY    15
943
+    #define E0_I_SCALE_ANALOG 1
944
+    #define E0_MRES          16
945
+    #define E0_TBL            1
946
+    #define E0_TOFF           8
947
+
948
+    #define E1_IHOLD         31
949
+    #define E1_IRUN          31
950
+    #define E1_IHOLDDELAY    15
951
+    #define E1_I_SCALE_ANALOG 1
952
+    #define E1_MRES          16
953
+    #define E1_TBL            1
954
+    #define E1_TOFF           8
955
+
956
+    #define E2_IHOLD         31
957
+    #define E2_IRUN          31
958
+    #define E2_IHOLDDELAY    15
959
+    #define E2_I_SCALE_ANALOG 1
960
+    #define E2_MRES          16
961
+    #define E2_TBL            1
962
+    #define E2_TOFF           8
963
+
964
+    #define E3_IHOLD         31
965
+    #define E3_IRUN          31
966
+    #define E3_IHOLDDELAY    15
967
+    #define E3_I_SCALE_ANALOG 1
968
+    #define E3_MRES          16
969
+    #define E3_TBL            1
970
+    #define E3_TOFF           8
971
+
972
+  #endif // TMC2130_ADVANCED_CONFIGURATION
973
+
974
+#endif // HAVE_TMC2130DRIVER
770 975
 
771 976
 // @section l6470
772 977
 
978
+/**
979
+ * Enable this section if you have L6470 motor drivers.
980
+ * You need to import the L6470 library into the Arduino IDE for this.
981
+ * (https://github.com/ameyer/Arduino-L6470)
982
+ */
983
+
773 984
 //#define HAVE_L6470DRIVER
774 985
 #if ENABLED(HAVE_L6470DRIVER)
775 986
 

+ 215
- 4
Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h Parādīt failu

@@ -758,13 +758,224 @@
758 758
 
759 759
 #endif
760 760
 
761
-/******************************************************************************\
762
- * enable this section if you have L6470  motor drivers.
763
- * you need to import the L6470 library into the Arduino IDE for this
764
- ******************************************************************************/
761
+// @section TMC2130
762
+
763
+
764
+/**
765
+ * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
766
+ *
767
+ * To use TMC2130 drivers in SPI mode, you'll also need the TMC2130 Arduino library
768
+ * (https://github.com/makertum/Trinamic_TMC2130).
769
+ *
770
+ * To use TMC2130 stepper drivers in SPI mode connect your SPI2130 pins to
771
+ * the hardware SPI interface on your board and define the required CS pins
772
+ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
773
+ */
774
+
775
+//#define HAVE_TMC2130DRIVER
776
+
777
+#if ENABLED(HAVE_TMC2130DRIVER)
778
+
779
+  //#define TMC2130_ADVANCED_CONFIGURATION
780
+
781
+  // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
782
+  //#define X_IS_TMC2130
783
+  //#define X2_IS_TMC2130
784
+  //#define Y_IS_TMC2130
785
+  //#define Y2_IS_TMC2130
786
+  //#define Z_IS_TMC2130
787
+  //#define Z2_IS_TMC2130
788
+  //#define E0_IS_TMC2130
789
+  //#define E1_IS_TMC2130
790
+  //#define E2_IS_TMC2130
791
+  //#define E3_IS_TMC2130
792
+
793
+  #if ENABLED(TMC2130_ADVANCED_CONFIGURATION)
794
+
795
+    // If you have enabled TMC2130_ADVANCED_CONFIGURATION,
796
+    // you can define global settings here, but you still need
797
+    // to configure the tmc2130.init() method manually in the file
798
+    //
799
+    // stepper_indirection.cpp
800
+    //
801
+    // Please read the TMC2130 datasheet:
802
+    // http://www.trinamic.com/_articles/products/integrated-circuits/tmc2130/_datasheet/TMC2130_datasheet.pdf
803
+    // All settings here have the same (sometimes cryptic) names as in the datasheet.
804
+    //
805
+    // The following, uncommented settings are only suggestion.
806
+
807
+    /* GENERAL CONFIGURATION */
808
+
809
+    //#define GLOBAL_EN_PWM_MODE        0
810
+    #define GLOBAL_I_SCALE_ANALOG     1 // [0,1] 0: Normal, 1: AIN
811
+    //#define GLOBAL_INTERNAL_RSENSE    0 // [0,1] 0: Normal, 1: Internal
812
+    #define GLOBAL_EN_PWM_MODE        0 // [0,1] 0: Normal, 1: stealthChop with velocity threshold
813
+    //#define GLOBAL_ENC_COMMUTATION    0 // [0,1]
814
+    #define GLOBAL_SHAFT              0 // [0,1] 0: normal, 1: invert
815
+    //#define GLOBAL_DIAG0_ERROR        0 // [0,1]
816
+    //#define GLOBAL_DIAG0_OTPW         0 // [0,1]
817
+    //#define GLOBAL_DIAG0_STALL        0 // [0,1]
818
+    //#define GLOBAL_DIAG1_STALL        0 // [0,1]
819
+    //#define GLOBAL_DIAG1_INDEX        0 // [0,1]
820
+    //#define GLOBAL_DIAG1_ONSTATE      0 // [0,1]
821
+    //#define GLOBAL_DIAG1_ONSTATE      0 // [0,1]
822
+    //#define GLOBAL_DIAG0_INT_PUSHPULL 0 // [0,1]
823
+    //#define GLOBAL_DIAG1_INT_PUSHPULL 0 // [0,1]
824
+    //#define GLOBAL_SMALL_HYSTERESIS   0 // [0,1]
825
+    //#define GLOBAL_STOP_ENABLE        0 // [0,1]
826
+    //#define GLOBAL_DIRECT_MODE        0 // [0,1]
827
+
828
+    /* VELOCITY-DEPENDENT DRIVE FEATURES */
829
+
830
+    #define GLOBAL_IHOLD             22 // [0-31] 0: min, 31: max
831
+    #define GLOBAL_IRUN              31 // [0-31] 0: min, 31: max
832
+    #define GLOBAL_IHOLDDELAY        15 // [0-15] 0: min, 15: about 4 seconds
833
+    //#define GLOBAL_TPOWERDOWN         0 // [0-255] 0: min, 255: about 4 seconds
834
+    //#define GLOBAL_TPWMTHRS           0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
835
+    //#define GLOBAL_TCOOLTHRS          0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
836
+    #define GLOBAL_THIGH             10 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
837
+
838
+    /* SPI MODE CONFIGURATION */
839
+
840
+    //#define GLOBAL_XDIRECT            0
841
+
842
+    /* DCSTEP MINIMUM VELOCITY */
843
+
844
+    //#define GLOBAL_VDCMIN             0
845
+
846
+    /* MOTOR DRIVER CONFIGURATION*/
847
+
848
+    //#define GLOBAL_DEDGE              0
849
+    //#define GLOBAL_DISS2G             0
850
+    #define GLOBAL_INTPOL             1 // 0: off 1: 256 microstep interpolation
851
+    #define GLOBAL_MRES              16 // number of microsteps
852
+    #define GLOBAL_SYNC               1 // [0-15]
853
+    #define GLOBAL_VHIGHCHM           1 // [0,1] 0: normal, 1: high velocity stepper mode
854
+    #define GLOBAL_VHIGHFS            0 // [0,1] 0: normal, 1: switch to full steps for high velocities
855
+    // #define GLOBAL_VSENSE            0 // [0,1] 0: normal, 1: high sensitivity (not recommended)
856
+    #define GLOBAL_TBL                1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
857
+    #define GLOBAL_CHM                0 // [0,1] 0: spreadCycle, 1: Constant off time with fast decay time.
858
+    //#define GLOBAL_RNDTF              0
859
+    //#define GLOBAL_DISFDCC            0
860
+    //#define GLOBAL_FD                 0
861
+    //#define GLOBAL_HEND               0
862
+    //#define GLOBAL_HSTRT              0
863
+    #define GLOBAL_TOFF              10 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
864
+
865
+    //#define GLOBAL_SFILT              0
866
+    //#define GLOBAL_SGT                0
867
+    //#define GLOBAL_SEIMIN             0
868
+    //#define GLOBAL_SEDN               0
869
+    //#define GLOBAL_SEMAX              0
870
+    //#define GLOBAL_SEUP               0
871
+    //#define GLOBAL_SEMIN              0
872
+
873
+    //#define GLOBAL_DC_TIME            0
874
+    //#define GLOBAL_DC_SG              0
875
+
876
+    //#define GLOBAL_FREEWHEEL          0
877
+    //#define GLOBAL_PWM_SYMMETRIC      0
878
+    //#define GLOBAL_PWM_AUTOSCALE      0
879
+    //#define GLOBAL_PWM_FREQ           0
880
+    //#define GLOBAL_PWM_GRAD           0
881
+    //#define GLOBAL_PWM_AMPL           0
882
+
883
+    //#define GLOBAL_ENCM_CTRL          0
884
+
885
+  #else
886
+
887
+    #define X_IHOLD          31 // [0-31] 0: min, 31: max
888
+    #define X_IRUN           31 // [0-31] 0: min, 31: max
889
+    #define X_IHOLDDELAY     15 // [0-15] 0: min, 15: about 4 seconds
890
+    #define X_I_SCALE_ANALOG  1 // 0: Normal, 1: AIN
891
+    #define X_MRES           16 // number of microsteps
892
+    #define X_TBL             1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
893
+    #define X_TOFF            8 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
894
+
895
+    #define X2_IHOLD         31
896
+    #define X2_IRUN          31
897
+    #define X2_IHOLDDELAY    15
898
+    #define X2_I_SCALE_ANALOG 1
899
+    #define X2_MRES          16
900
+    #define X2_TBL            1
901
+    #define X2_TOFF           8
902
+
903
+    #define Y_IHOLD          31
904
+    #define Y_IRUN           31
905
+    #define Y_IHOLDDELAY     15
906
+    #define Y_I_SCALE_ANALOG  1
907
+    #define Y_MRES           16
908
+    #define Y_TBL             1
909
+    #define Y_TOFF            8
910
+
911
+    #define Y2_IHOLD         31
912
+    #define Y2_IRUN          31
913
+    #define Y2_IHOLDDELAY    15
914
+    #define Y2_I_SCALE_ANALOG 1
915
+    #define Y2_MRES          16
916
+    #define Y2_TBL            1
917
+    #define Y2_TOFF           8
918
+
919
+    #define Z_IHOLD          31
920
+    #define Z_IRUN           31
921
+    #define Z_IHOLDDELAY     15
922
+    #define Z_I_SCALE_ANALOG  1
923
+    #define Z_MRES           16
924
+    #define Z_TBL             1
925
+    #define Z_TOFF            8
926
+
927
+    #define Z2_IHOLD         31
928
+    #define Z2_IRUN          31
929
+    #define Z2_IHOLDDELAY    15
930
+    #define Z2_I_SCALE_ANALOG 1
931
+    #define Z2_MRES          16
932
+    #define Z2_TBL            1
933
+    #define Z2_TOFF           8
934
+
935
+    #define E0_IHOLD         31
936
+    #define E0_IRUN          31
937
+    #define E0_IHOLDDELAY    15
938
+    #define E0_I_SCALE_ANALOG 1
939
+    #define E0_MRES          16
940
+    #define E0_TBL            1
941
+    #define E0_TOFF           8
942
+
943
+    #define E1_IHOLD         31
944
+    #define E1_IRUN          31
945
+    #define E1_IHOLDDELAY    15
946
+    #define E1_I_SCALE_ANALOG 1
947
+    #define E1_MRES          16
948
+    #define E1_TBL            1
949
+    #define E1_TOFF           8
950
+
951
+    #define E2_IHOLD         31
952
+    #define E2_IRUN          31
953
+    #define E2_IHOLDDELAY    15
954
+    #define E2_I_SCALE_ANALOG 1
955
+    #define E2_MRES          16
956
+    #define E2_TBL            1
957
+    #define E2_TOFF           8
958
+
959
+    #define E3_IHOLD         31
960
+    #define E3_IRUN          31
961
+    #define E3_IHOLDDELAY    15
962
+    #define E3_I_SCALE_ANALOG 1
963
+    #define E3_MRES          16
964
+    #define E3_TBL            1
965
+    #define E3_TOFF           8
966
+
967
+  #endif // TMC2130_ADVANCED_CONFIGURATION
968
+
969
+#endif // HAVE_TMC2130DRIVER
765 970
 
766 971
 // @section l6470
767 972
 
973
+/**
974
+ * Enable this section if you have L6470 motor drivers.
975
+ * You need to import the L6470 library into the Arduino IDE for this.
976
+ * (https://github.com/ameyer/Arduino-L6470)
977
+ */
978
+
768 979
 //#define HAVE_L6470DRIVER
769 980
 #if ENABLED(HAVE_L6470DRIVER)
770 981
 

+ 215
- 4
Marlin/example_configurations/makibox/Configuration_adv.h Parādīt failu

@@ -756,13 +756,224 @@
756 756
 
757 757
 #endif
758 758
 
759
-/******************************************************************************\
760
- * enable this section if you have L6470  motor drivers.
761
- * you need to import the L6470 library into the Arduino IDE for this
762
- ******************************************************************************/
759
+// @section TMC2130
760
+
761
+
762
+/**
763
+ * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
764
+ *
765
+ * To use TMC2130 drivers in SPI mode, you'll also need the TMC2130 Arduino library
766
+ * (https://github.com/makertum/Trinamic_TMC2130).
767
+ *
768
+ * To use TMC2130 stepper drivers in SPI mode connect your SPI2130 pins to
769
+ * the hardware SPI interface on your board and define the required CS pins
770
+ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
771
+ */
772
+
773
+//#define HAVE_TMC2130DRIVER
774
+
775
+#if ENABLED(HAVE_TMC2130DRIVER)
776
+
777
+  //#define TMC2130_ADVANCED_CONFIGURATION
778
+
779
+  // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
780
+  //#define X_IS_TMC2130
781
+  //#define X2_IS_TMC2130
782
+  //#define Y_IS_TMC2130
783
+  //#define Y2_IS_TMC2130
784
+  //#define Z_IS_TMC2130
785
+  //#define Z2_IS_TMC2130
786
+  //#define E0_IS_TMC2130
787
+  //#define E1_IS_TMC2130
788
+  //#define E2_IS_TMC2130
789
+  //#define E3_IS_TMC2130
790
+
791
+  #if ENABLED(TMC2130_ADVANCED_CONFIGURATION)
792
+
793
+    // If you have enabled TMC2130_ADVANCED_CONFIGURATION,
794
+    // you can define global settings here, but you still need
795
+    // to configure the tmc2130.init() method manually in the file
796
+    //
797
+    // stepper_indirection.cpp
798
+    //
799
+    // Please read the TMC2130 datasheet:
800
+    // http://www.trinamic.com/_articles/products/integrated-circuits/tmc2130/_datasheet/TMC2130_datasheet.pdf
801
+    // All settings here have the same (sometimes cryptic) names as in the datasheet.
802
+    //
803
+    // The following, uncommented settings are only suggestion.
804
+
805
+    /* GENERAL CONFIGURATION */
806
+
807
+    //#define GLOBAL_EN_PWM_MODE        0
808
+    #define GLOBAL_I_SCALE_ANALOG     1 // [0,1] 0: Normal, 1: AIN
809
+    //#define GLOBAL_INTERNAL_RSENSE    0 // [0,1] 0: Normal, 1: Internal
810
+    #define GLOBAL_EN_PWM_MODE        0 // [0,1] 0: Normal, 1: stealthChop with velocity threshold
811
+    //#define GLOBAL_ENC_COMMUTATION    0 // [0,1]
812
+    #define GLOBAL_SHAFT              0 // [0,1] 0: normal, 1: invert
813
+    //#define GLOBAL_DIAG0_ERROR        0 // [0,1]
814
+    //#define GLOBAL_DIAG0_OTPW         0 // [0,1]
815
+    //#define GLOBAL_DIAG0_STALL        0 // [0,1]
816
+    //#define GLOBAL_DIAG1_STALL        0 // [0,1]
817
+    //#define GLOBAL_DIAG1_INDEX        0 // [0,1]
818
+    //#define GLOBAL_DIAG1_ONSTATE      0 // [0,1]
819
+    //#define GLOBAL_DIAG1_ONSTATE      0 // [0,1]
820
+    //#define GLOBAL_DIAG0_INT_PUSHPULL 0 // [0,1]
821
+    //#define GLOBAL_DIAG1_INT_PUSHPULL 0 // [0,1]
822
+    //#define GLOBAL_SMALL_HYSTERESIS   0 // [0,1]
823
+    //#define GLOBAL_STOP_ENABLE        0 // [0,1]
824
+    //#define GLOBAL_DIRECT_MODE        0 // [0,1]
825
+
826
+    /* VELOCITY-DEPENDENT DRIVE FEATURES */
827
+
828
+    #define GLOBAL_IHOLD             22 // [0-31] 0: min, 31: max
829
+    #define GLOBAL_IRUN              31 // [0-31] 0: min, 31: max
830
+    #define GLOBAL_IHOLDDELAY        15 // [0-15] 0: min, 15: about 4 seconds
831
+    //#define GLOBAL_TPOWERDOWN         0 // [0-255] 0: min, 255: about 4 seconds
832
+    //#define GLOBAL_TPWMTHRS           0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
833
+    //#define GLOBAL_TCOOLTHRS          0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
834
+    #define GLOBAL_THIGH             10 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
835
+
836
+    /* SPI MODE CONFIGURATION */
837
+
838
+    //#define GLOBAL_XDIRECT            0
839
+
840
+    /* DCSTEP MINIMUM VELOCITY */
841
+
842
+    //#define GLOBAL_VDCMIN             0
843
+
844
+    /* MOTOR DRIVER CONFIGURATION*/
845
+
846
+    //#define GLOBAL_DEDGE              0
847
+    //#define GLOBAL_DISS2G             0
848
+    #define GLOBAL_INTPOL             1 // 0: off 1: 256 microstep interpolation
849
+    #define GLOBAL_MRES              16 // number of microsteps
850
+    #define GLOBAL_SYNC               1 // [0-15]
851
+    #define GLOBAL_VHIGHCHM           1 // [0,1] 0: normal, 1: high velocity stepper mode
852
+    #define GLOBAL_VHIGHFS            0 // [0,1] 0: normal, 1: switch to full steps for high velocities
853
+    // #define GLOBAL_VSENSE            0 // [0,1] 0: normal, 1: high sensitivity (not recommended)
854
+    #define GLOBAL_TBL                1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
855
+    #define GLOBAL_CHM                0 // [0,1] 0: spreadCycle, 1: Constant off time with fast decay time.
856
+    //#define GLOBAL_RNDTF              0
857
+    //#define GLOBAL_DISFDCC            0
858
+    //#define GLOBAL_FD                 0
859
+    //#define GLOBAL_HEND               0
860
+    //#define GLOBAL_HSTRT              0
861
+    #define GLOBAL_TOFF              10 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
862
+
863
+    //#define GLOBAL_SFILT              0
864
+    //#define GLOBAL_SGT                0
865
+    //#define GLOBAL_SEIMIN             0
866
+    //#define GLOBAL_SEDN               0
867
+    //#define GLOBAL_SEMAX              0
868
+    //#define GLOBAL_SEUP               0
869
+    //#define GLOBAL_SEMIN              0
870
+
871
+    //#define GLOBAL_DC_TIME            0
872
+    //#define GLOBAL_DC_SG              0
873
+
874
+    //#define GLOBAL_FREEWHEEL          0
875
+    //#define GLOBAL_PWM_SYMMETRIC      0
876
+    //#define GLOBAL_PWM_AUTOSCALE      0
877
+    //#define GLOBAL_PWM_FREQ           0
878
+    //#define GLOBAL_PWM_GRAD           0
879
+    //#define GLOBAL_PWM_AMPL           0
880
+
881
+    //#define GLOBAL_ENCM_CTRL          0
882
+
883
+  #else
884
+
885
+    #define X_IHOLD          31 // [0-31] 0: min, 31: max
886
+    #define X_IRUN           31 // [0-31] 0: min, 31: max
887
+    #define X_IHOLDDELAY     15 // [0-15] 0: min, 15: about 4 seconds
888
+    #define X_I_SCALE_ANALOG  1 // 0: Normal, 1: AIN
889
+    #define X_MRES           16 // number of microsteps
890
+    #define X_TBL             1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
891
+    #define X_TOFF            8 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
892
+
893
+    #define X2_IHOLD         31
894
+    #define X2_IRUN          31
895
+    #define X2_IHOLDDELAY    15
896
+    #define X2_I_SCALE_ANALOG 1
897
+    #define X2_MRES          16
898
+    #define X2_TBL            1
899
+    #define X2_TOFF           8
900
+
901
+    #define Y_IHOLD          31
902
+    #define Y_IRUN           31
903
+    #define Y_IHOLDDELAY     15
904
+    #define Y_I_SCALE_ANALOG  1
905
+    #define Y_MRES           16
906
+    #define Y_TBL             1
907
+    #define Y_TOFF            8
908
+
909
+    #define Y2_IHOLD         31
910
+    #define Y2_IRUN          31
911
+    #define Y2_IHOLDDELAY    15
912
+    #define Y2_I_SCALE_ANALOG 1
913
+    #define Y2_MRES          16
914
+    #define Y2_TBL            1
915
+    #define Y2_TOFF           8
916
+
917
+    #define Z_IHOLD          31
918
+    #define Z_IRUN           31
919
+    #define Z_IHOLDDELAY     15
920
+    #define Z_I_SCALE_ANALOG  1
921
+    #define Z_MRES           16
922
+    #define Z_TBL             1
923
+    #define Z_TOFF            8
924
+
925
+    #define Z2_IHOLD         31
926
+    #define Z2_IRUN          31
927
+    #define Z2_IHOLDDELAY    15
928
+    #define Z2_I_SCALE_ANALOG 1
929
+    #define Z2_MRES          16
930
+    #define Z2_TBL            1
931
+    #define Z2_TOFF           8
932
+
933
+    #define E0_IHOLD         31
934
+    #define E0_IRUN          31
935
+    #define E0_IHOLDDELAY    15
936
+    #define E0_I_SCALE_ANALOG 1
937
+    #define E0_MRES          16
938
+    #define E0_TBL            1
939
+    #define E0_TOFF           8
940
+
941
+    #define E1_IHOLD         31
942
+    #define E1_IRUN          31
943
+    #define E1_IHOLDDELAY    15
944
+    #define E1_I_SCALE_ANALOG 1
945
+    #define E1_MRES          16
946
+    #define E1_TBL            1
947
+    #define E1_TOFF           8
948
+
949
+    #define E2_IHOLD         31
950
+    #define E2_IRUN          31
951
+    #define E2_IHOLDDELAY    15
952
+    #define E2_I_SCALE_ANALOG 1
953
+    #define E2_MRES          16
954
+    #define E2_TBL            1
955
+    #define E2_TOFF           8
956
+
957
+    #define E3_IHOLD         31
958
+    #define E3_IRUN          31
959
+    #define E3_IHOLDDELAY    15
960
+    #define E3_I_SCALE_ANALOG 1
961
+    #define E3_MRES          16
962
+    #define E3_TBL            1
963
+    #define E3_TOFF           8
964
+
965
+  #endif // TMC2130_ADVANCED_CONFIGURATION
966
+
967
+#endif // HAVE_TMC2130DRIVER
763 968
 
764 969
 // @section l6470
765 970
 
971
+/**
972
+ * Enable this section if you have L6470 motor drivers.
973
+ * You need to import the L6470 library into the Arduino IDE for this.
974
+ * (https://github.com/ameyer/Arduino-L6470)
975
+ */
976
+
766 977
 //#define HAVE_L6470DRIVER
767 978
 #if ENABLED(HAVE_L6470DRIVER)
768 979
 

+ 215
- 4
Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h Parādīt failu

@@ -756,13 +756,224 @@
756 756
 
757 757
 #endif
758 758
 
759
-/******************************************************************************\
760
- * enable this section if you have L6470  motor drivers.
761
- * you need to import the L6470 library into the Arduino IDE for this
762
- ******************************************************************************/
759
+// @section TMC2130
760
+
761
+
762
+/**
763
+ * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.
764
+ *
765
+ * To use TMC2130 drivers in SPI mode, you'll also need the TMC2130 Arduino library
766
+ * (https://github.com/makertum/Trinamic_TMC2130).
767
+ *
768
+ * To use TMC2130 stepper drivers in SPI mode connect your SPI2130 pins to
769
+ * the hardware SPI interface on your board and define the required CS pins
770
+ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
771
+ */
772
+
773
+//#define HAVE_TMC2130DRIVER
774
+
775
+#if ENABLED(HAVE_TMC2130DRIVER)
776
+
777
+  //#define TMC2130_ADVANCED_CONFIGURATION
778
+
779
+  // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY
780
+  //#define X_IS_TMC2130
781
+  //#define X2_IS_TMC2130
782
+  //#define Y_IS_TMC2130
783
+  //#define Y2_IS_TMC2130
784
+  //#define Z_IS_TMC2130
785
+  //#define Z2_IS_TMC2130
786
+  //#define E0_IS_TMC2130
787
+  //#define E1_IS_TMC2130
788
+  //#define E2_IS_TMC2130
789
+  //#define E3_IS_TMC2130
790
+
791
+  #if ENABLED(TMC2130_ADVANCED_CONFIGURATION)
792
+
793
+    // If you have enabled TMC2130_ADVANCED_CONFIGURATION,
794
+    // you can define global settings here, but you still need
795
+    // to configure the tmc2130.init() method manually in the file
796
+    //
797
+    // stepper_indirection.cpp
798
+    //
799
+    // Please read the TMC2130 datasheet:
800
+    // http://www.trinamic.com/_articles/products/integrated-circuits/tmc2130/_datasheet/TMC2130_datasheet.pdf
801
+    // All settings here have the same (sometimes cryptic) names as in the datasheet.
802
+    //
803
+    // The following, uncommented settings are only suggestion.
804
+
805
+    /* GENERAL CONFIGURATION */
806
+
807
+    //#define GLOBAL_EN_PWM_MODE        0
808
+    #define GLOBAL_I_SCALE_ANALOG     1 // [0,1] 0: Normal, 1: AIN
809
+    //#define GLOBAL_INTERNAL_RSENSE    0 // [0,1] 0: Normal, 1: Internal
810
+    #define GLOBAL_EN_PWM_MODE        0 // [0,1] 0: Normal, 1: stealthChop with velocity threshold
811
+    //#define GLOBAL_ENC_COMMUTATION    0 // [0,1]
812
+    #define GLOBAL_SHAFT              0 // [0,1] 0: normal, 1: invert
813
+    //#define GLOBAL_DIAG0_ERROR        0 // [0,1]
814
+    //#define GLOBAL_DIAG0_OTPW         0 // [0,1]
815
+    //#define GLOBAL_DIAG0_STALL        0 // [0,1]
816
+    //#define GLOBAL_DIAG1_STALL        0 // [0,1]
817
+    //#define GLOBAL_DIAG1_INDEX        0 // [0,1]
818
+    //#define GLOBAL_DIAG1_ONSTATE      0 // [0,1]
819
+    //#define GLOBAL_DIAG1_ONSTATE      0 // [0,1]
820
+    //#define GLOBAL_DIAG0_INT_PUSHPULL 0 // [0,1]
821
+    //#define GLOBAL_DIAG1_INT_PUSHPULL 0 // [0,1]
822
+    //#define GLOBAL_SMALL_HYSTERESIS   0 // [0,1]
823
+    //#define GLOBAL_STOP_ENABLE        0 // [0,1]
824
+    //#define GLOBAL_DIRECT_MODE        0 // [0,1]
825
+
826
+    /* VELOCITY-DEPENDENT DRIVE FEATURES */
827
+
828
+    #define GLOBAL_IHOLD             22 // [0-31] 0: min, 31: max
829
+    #define GLOBAL_IRUN              31 // [0-31] 0: min, 31: max
830
+    #define GLOBAL_IHOLDDELAY        15 // [0-15] 0: min, 15: about 4 seconds
831
+    //#define GLOBAL_TPOWERDOWN         0 // [0-255] 0: min, 255: about 4 seconds
832
+    //#define GLOBAL_TPWMTHRS           0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
833
+    //#define GLOBAL_TCOOLTHRS          0 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
834
+    #define GLOBAL_THIGH             10 // [0-1048576] e.g. 20 corresponds with 2000 steps/s
835
+
836
+    /* SPI MODE CONFIGURATION */
837
+
838
+    //#define GLOBAL_XDIRECT            0
839
+
840
+    /* DCSTEP MINIMUM VELOCITY */
841
+
842
+    //#define GLOBAL_VDCMIN             0
843
+
844
+    /* MOTOR DRIVER CONFIGURATION*/
845
+
846
+    //#define GLOBAL_DEDGE              0
847
+    //#define GLOBAL_DISS2G             0
848
+    #define GLOBAL_INTPOL             1 // 0: off 1: 256 microstep interpolation
849
+    #define GLOBAL_MRES              16 // number of microsteps
850
+    #define GLOBAL_SYNC               1 // [0-15]
851
+    #define GLOBAL_VHIGHCHM           1 // [0,1] 0: normal, 1: high velocity stepper mode
852
+    #define GLOBAL_VHIGHFS            0 // [0,1] 0: normal, 1: switch to full steps for high velocities
853
+    // #define GLOBAL_VSENSE            0 // [0,1] 0: normal, 1: high sensitivity (not recommended)
854
+    #define GLOBAL_TBL                1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
855
+    #define GLOBAL_CHM                0 // [0,1] 0: spreadCycle, 1: Constant off time with fast decay time.
856
+    //#define GLOBAL_RNDTF              0
857
+    //#define GLOBAL_DISFDCC            0
858
+    //#define GLOBAL_FD                 0
859
+    //#define GLOBAL_HEND               0
860
+    //#define GLOBAL_HSTRT              0
861
+    #define GLOBAL_TOFF              10 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
862
+
863
+    //#define GLOBAL_SFILT              0
864
+    //#define GLOBAL_SGT                0
865
+    //#define GLOBAL_SEIMIN             0
866
+    //#define GLOBAL_SEDN               0
867
+    //#define GLOBAL_SEMAX              0
868
+    //#define GLOBAL_SEUP               0
869
+    //#define GLOBAL_SEMIN              0
870
+
871
+    //#define GLOBAL_DC_TIME            0
872
+    //#define GLOBAL_DC_SG              0
873
+
874
+    //#define GLOBAL_FREEWHEEL          0
875
+    //#define GLOBAL_PWM_SYMMETRIC      0
876
+    //#define GLOBAL_PWM_AUTOSCALE      0
877
+    //#define GLOBAL_PWM_FREQ           0
878
+    //#define GLOBAL_PWM_GRAD           0
879
+    //#define GLOBAL_PWM_AMPL           0
880
+
881
+    //#define GLOBAL_ENCM_CTRL          0
882
+
883
+  #else
884
+
885
+    #define X_IHOLD          31 // [0-31] 0: min, 31: max
886
+    #define X_IRUN           31 // [0-31] 0: min, 31: max
887
+    #define X_IHOLDDELAY     15 // [0-15] 0: min, 15: about 4 seconds
888
+    #define X_I_SCALE_ANALOG  1 // 0: Normal, 1: AIN
889
+    #define X_MRES           16 // number of microsteps
890
+    #define X_TBL             1 // 0-3: set comparator blank time to 16, 24, 36 or 54 clocks, 1 or 2 is recommended
891
+    #define X_TOFF            8 // 0: driver disable, 1: use only with TBL>2, 2-15: off time setting during slow decay phase
892
+
893
+    #define X2_IHOLD         31
894
+    #define X2_IRUN          31
895
+    #define X2_IHOLDDELAY    15
896
+    #define X2_I_SCALE_ANALOG 1
897
+    #define X2_MRES          16
898
+    #define X2_TBL            1
899
+    #define X2_TOFF           8
900
+
901
+    #define Y_IHOLD          31
902
+    #define Y_IRUN           31
903
+    #define Y_IHOLDDELAY     15
904
+    #define Y_I_SCALE_ANALOG  1
905
+    #define Y_MRES           16
906
+    #define Y_TBL             1
907
+    #define Y_TOFF            8
908
+
909
+    #define Y2_IHOLD         31
910
+    #define Y2_IRUN          31
911
+    #define Y2_IHOLDDELAY    15
912
+    #define Y2_I_SCALE_ANALOG 1
913
+    #define Y2_MRES          16
914
+    #define Y2_TBL            1
915
+    #define Y2_TOFF           8
916
+
917
+    #define Z_IHOLD          31
918
+    #define Z_IRUN           31
919
+    #define Z_IHOLDDELAY     15
920
+    #define Z_I_SCALE_ANALOG  1
921
+    #define Z_MRES           16
922
+    #define Z_TBL             1
923
+    #define Z_TOFF            8
924
+
925
+    #define Z2_IHOLD         31
926
+    #define Z2_IRUN          31
927
+    #define Z2_IHOLDDELAY    15
928
+    #define Z2_I_SCALE_ANALOG 1
929
+    #define Z2_MRES          16
930
+    #define Z2_TBL            1
931
+    #define Z2_TOFF           8
932
+
933
+    #define E0_IHOLD         31
934
+    #define E0_IRUN          31
935
+    #define E0_IHOLDDELAY    15
936
+    #define E0_I_SCALE_ANALOG 1
937
+    #define E0_MRES          16
938
+    #define E0_TBL            1
939
+    #define E0_TOFF           8
940
+
941
+    #define E1_IHOLD         31
942
+    #define E1_IRUN          31
943
+    #define E1_IHOLDDELAY    15
944
+    #define E1_I_SCALE_ANALOG 1
945
+    #define E1_MRES          16
946
+    #define E1_TBL            1
947
+    #define E1_TOFF           8
948
+
949
+    #define E2_IHOLD         31
950
+    #define E2_IRUN          31
951
+    #define E2_IHOLDDELAY    15
952
+    #define E2_I_SCALE_ANALOG 1
953
+    #define E2_MRES          16
954
+    #define E2_TBL            1
955
+    #define E2_TOFF           8
956
+
957
+    #define E3_IHOLD         31
958
+    #define E3_IRUN          31
959
+    #define E3_IHOLDDELAY    15
960
+    #define E3_I_SCALE_ANALOG 1
961
+    #define E3_MRES          16
962
+    #define E3_TBL            1
963
+    #define E3_TOFF           8
964
+
965
+  #endif // TMC2130_ADVANCED_CONFIGURATION
966
+
967
+#endif // HAVE_TMC2130DRIVER
763 968
 
764 969
 // @section l6470
765 970
 
971
+/**
972
+ * Enable this section if you have L6470 motor drivers.
973
+ * You need to import the L6470 library into the Arduino IDE for this.
974
+ * (https://github.com/ameyer/Arduino-L6470)
975
+ */
976
+
766 977
 //#define HAVE_L6470DRIVER
767 978
 #if ENABLED(HAVE_L6470DRIVER)
768 979
 

+ 5
- 0
Marlin/pins_RAMPS.h Parādīt failu

@@ -93,22 +93,27 @@
93 93
 #define X_STEP_PIN         54
94 94
 #define X_DIR_PIN          55
95 95
 #define X_ENABLE_PIN       38
96
+#define X_CS_PIN           53
96 97
 
97 98
 #define Y_STEP_PIN         60
98 99
 #define Y_DIR_PIN          61
99 100
 #define Y_ENABLE_PIN       56
101
+#define Y_CS_PIN           49
100 102
 
101 103
 #define Z_STEP_PIN         46
102 104
 #define Z_DIR_PIN          48
103 105
 #define Z_ENABLE_PIN       62
106
+#define Z_CS_PIN           40
104 107
 
105 108
 #define E0_STEP_PIN        26
106 109
 #define E0_DIR_PIN         28
107 110
 #define E0_ENABLE_PIN      24
111
+#define E0_CS_PIN          42
108 112
 
109 113
 #define E1_STEP_PIN        36
110 114
 #define E1_DIR_PIN         34
111 115
 #define E1_ENABLE_PIN      30
116
+#define E1_CS_PIN          44
112 117
 
113 118
 //
114 119
 // Temperature Sensors

+ 5
- 0
Marlin/stepper.cpp Parādīt failu

@@ -784,6 +784,11 @@ void Stepper::init() {
784 784
     tmc_init();
785 785
   #endif
786 786
 
787
+  // Init TMC2130 Steppers
788
+  #if ENABLED(HAVE_TMC2130DRIVER)
789
+    tmc2130_init();
790
+  #endif
791
+
787 792
   // Init L6470 Steppers
788 793
   #if ENABLED(HAVE_L6470DRIVER)
789 794
     L6470_init();

+ 266
- 0
Marlin/stepper_indirection.cpp Parādīt failu

@@ -127,6 +127,272 @@ void tmc_init() {
127 127
 }
128 128
 #endif
129 129
 
130
+#if ENABLED(HAVE_TMC2130DRIVER)
131
+  #include <SPI.h>
132
+  #include <Trinamic_TMC2130.h>
133
+#endif
134
+
135
+// Stepper objects of TMC2310 steppers used
136
+#if ENABLED(X_IS_TMC2130)
137
+  Trinamic_TMC2130 stepperX(X_CS_PIN);
138
+#endif
139
+#if ENABLED(X2_IS_TMC2130)
140
+  Trinamic_TMC2130 stepperX2(X2_CS_PIN);
141
+#endif
142
+#if ENABLED(Y_IS_TMC2130)
143
+  Trinamic_TMC2130 stepperY(Y_CS_PIN);
144
+#endif
145
+#if ENABLED(Y2_IS_TMC2130)
146
+  Trinamic_TMC2130 stepperY2(Y2_CS_PINR);
147
+#endif
148
+#if ENABLED(Z_IS_TMC2130)
149
+  Trinamic_TMC2130 stepperZ(Z_CS_PIN);
150
+#endif
151
+#if ENABLED(Z2_IS_TMC2130)
152
+  Trinamic_TMC2130 stepperZ2(Z2_CS_PIN);
153
+#endif
154
+#if ENABLED(E0_IS_TMC2130)
155
+  Trinamic_TMC2130 stepperE0(E0_CS_PIN);
156
+#endif
157
+#if ENABLED(E1_IS_TMC2130)
158
+  Trinamic_TMC2130 stepperE1(E1_CS_PIN);
159
+#endif
160
+#if ENABLED(E2_IS_TMC2130)
161
+  Trinamic_TMC2130 stepperE2(E2_CS_PIN);
162
+#endif
163
+#if ENABLED(E3_IS_TMC2130)
164
+  Trinamic_TMC2130 stepperE3(E3_CS_PIN);
165
+#endif
166
+
167
+#if ENABLED(HAVE_TMC2130DRIVER)
168
+
169
+  #if ENABLED(TMC2130_ADVANCED_CONFIGURATION)
170
+
171
+    void tmc2130_init() {
172
+
173
+      // If you've enabled TMC2130_ADVANCED_CONFIGURATION configure your
174
+      // steppers manually here. The ENABLED(XYZ_IS_TMC2130) is optional,
175
+
176
+      #if ENABLED(X_IS_TMC2130)
177
+        stepperX.init();
178
+        stepperX.set_I_scale_analog(GLOBAL_I_SCALE_ANALOG);
179
+        //stepperX.set_internal_Rsense(GLOBAL_INTERNAL_RSENSE);
180
+        stepperX.set_en_pwm_mode(GLOBAL_EN_PWM_MODE);
181
+        //stepperX.set_enc_commutation(GLOBAL_ENC_COMMUTATION);
182
+        stepperX.set_shaft(GLOBAL_SHAFT);
183
+        //stepperX.set_diag0_error(GLOBAL_DIAG0_ERROR);
184
+        //stepperX.set_diag0_otpw(GLOBAL_DIAG0_OTPW);
185
+        //stepperX.set_diag0_stall(GLOBAL_DIAG0_STALL);
186
+        //stepperX.set_diag1_stall(GLOBAL_DIAG1_STALL);
187
+        //stepperX.set_diag1_index(GLOBAL_DIAG1_INDEX);
188
+        //stepperX.set_diag1_onstate(GLOBAL_DIAG1_ONSTATE);
189
+        //stepperX.set_diag1_steps_skipped(GLOBAL_DIAG1_ONSTATE);
190
+        //stepperX.set_diag0_int_pushpull(GLOBAL_DIAG0_INT_PUSHPULL);
191
+        //stepperX.set_diag1_int_pushpull(GLOBAL_DIAG1_INT_PUSHPULL);
192
+        //stepperX.set_small_hysteresis(GLOBAL_SMALL_HYSTERESIS);
193
+        //stepperX.set_stop_enable(GLOBAL_STOP_ENABLE);
194
+        //stepperX.set_direct_mode(GLOBAL_DIRECT_MODE);
195
+
196
+        stepperX.set_IHOLD_IRUN(GLOBAL_IHOLD,GLOBAL_IRUN,GLOBAL_IHOLDDELAY);
197
+        //stepperX.set_TPOWERDOWN(GLOBAL_TPOWERDOWN);
198
+        //stepperX.set_TPWMTHRS(GLOBAL_TPWMTHRS);
199
+        //stepperX.set_TCOOLTHRS(GLOBAL_TCOOLTHRS);
200
+        stepperX.set_THIGH(GLOBAL_THIGH);
201
+        //stepperX.set_XDIRECT(GLOBAL_XDIRECT);
202
+        //stepperX.set_VDCMIN(GLOBAL_VDCMIN);
203
+
204
+        //stepperX.set_dedge(GLOBAL_DEDGE);
205
+        //stepperX.set_diss2g(GLOBAL_DISS2G);
206
+        stepperX.set_intpol(GLOBAL_INTPOL);
207
+        stepperX.set_mres(GLOBAL_MRES);
208
+        stepperX.set_sync(GLOBAL_SYNC);
209
+        stepperX.set_vhighchm(GLOBAL_VHIGHCHM);
210
+        stepperX.set_vhighfs(GLOBAL_VHIGHFS);
211
+        //stepperX.set_vsense(GLOBAL_VSENSE);
212
+        stepperX.set_tbl(GLOBAL_TBL);
213
+        stepperX.set_chm(GLOBAL_CHM);
214
+        //stepperX.set_rndtf(GLOBAL_RNDTF);
215
+        //stepperX.set_disfdcc(GLOBAL_DISFDCC);
216
+        //stepperX.set_fd(GLOBAL_FD);
217
+        //stepperX.set_hend(GLOBAL_HEND);
218
+        //stepperX.set_hstrt(GLOBAL_HSTRT);
219
+        stepperX.set_toff(GLOBAL_TOFF);
220
+
221
+        //stepperX.set_sfilt(GLOBAL_SFILT);
222
+        //stepperX.set_sgt(GLOBAL_SGT);
223
+        //stepperX.set_seimin(GLOBAL_SEIMIN);
224
+        //stepperX.set_sedn(GLOBAL_SEDN);
225
+        //stepperX.set_semax(GLOBAL_SEMAX);
226
+        //stepperX.set_seup(GLOBAL_SEUP);
227
+        //stepperX.set_semin(GLOBAL_SEMIN);
228
+
229
+        //stepperX.set_DCCTRL(GLOBAL_DC_TIME, GLOBAL_DC_SG);
230
+
231
+        //stepperX.set_freewheel(GLOBAL_FREEWHEEL);
232
+        //stepperX.set_pwm_symmetric(GLOBAL_PWM_SYMMETRIC);
233
+        //stepperX.set_pwm_autoscale(GLOBAL_PWM_AUTOSCALE);
234
+        //stepperX.set_pwm_freq(GLOBAL_PWM_FREQ);
235
+        //stepperX.set_PWM_GRAD(GLOBAL_PWM_GRAD);
236
+        //stepperX.set_PWM_AMPL(GLOBAL_PWM_AMPL);
237
+
238
+        //stepperX.set_ENCM_CTRL(GLOBAL_ENCM_CTRL);
239
+      #endif
240
+
241
+      #if ENABLED(Y_IS_TMC2130)
242
+        stepperY.init();
243
+        stepperY.set_I_scale_analog(GLOBAL_I_SCALE_ANALOG);
244
+        //stepperY.set_internal_Rsense(GLOBAL_INTERNAL_RSENSE);
245
+        stepperY.set_en_pwm_mode(GLOBAL_EN_PWM_MODE);
246
+        //stepperY.set_enc_commutation(GLOBAL_ENC_COMMUTATION);
247
+        stepperY.set_shaft(GLOBAL_SHAFT);
248
+        //stepperY.set_diag0_error(GLOBAL_DIAG0_ERROR);
249
+        //stepperY.set_diag0_otpw(GLOBAL_DIAG0_OTPW);
250
+        //stepperY.set_diag0_stall(GLOBAL_DIAG0_STALL);
251
+        //stepperY.set_diag1_stall(GLOBAL_DIAG1_STALL);
252
+        //stepperY.set_diag1_index(GLOBAL_DIAG1_INDEX);
253
+        //stepperY.set_diag1_onstate(GLOBAL_DIAG1_ONSTATE);
254
+        //stepperY.set_diag1_steps_skipped(GLOBAL_DIAG1_ONSTATE);
255
+        //stepperY.set_diag0_int_pushpull(GLOBAL_DIAG0_INT_PUSHPULL);
256
+        //stepperY.set_diag1_int_pushpull(GLOBAL_DIAG1_INT_PUSHPULL);
257
+        //stepperY.set_small_hysteresis(GLOBAL_SMALL_HYSTERESIS);
258
+        //stepperY.set_stop_enable(GLOBAL_STOP_ENABLE);
259
+        //stepperY.set_direct_mode(GLOBAL_DIRECT_MODE);
260
+
261
+        stepperY.set_IHOLD_IRUN(GLOBAL_IHOLD,GLOBAL_IRUN,GLOBAL_IHOLDDELAY);
262
+        //stepperY.set_TPOWERDOWN(GLOBAL_TPOWERDOWN);
263
+        //stepperY.set_TPWMTHRS(GLOBAL_TPWMTHRS);
264
+        //stepperY.set_TCOOLTHRS(GLOBAL_TCOOLTHRS);
265
+        stepperY.set_THIGH(GLOBAL_THIGH);
266
+        //stepperY.set_XDIRECT(GLOBAL_XDIRECT);
267
+        //stepperY.set_VDCMIN(GLOBAL_VDCMIN);
268
+
269
+        //stepperY.set_dedge(GLOBAL_DEDGE);
270
+        //stepperY.set_diss2g(GLOBAL_DISS2G);
271
+        stepperY.set_intpol(GLOBAL_INTPOL);
272
+        stepperY.set_mres(GLOBAL_MRES);
273
+        stepperY.set_sync(GLOBAL_SYNC);
274
+        stepperY.set_vhighchm(GLOBAL_VHIGHCHM);
275
+        stepperY.set_vhighfs(GLOBAL_VHIGHFS);
276
+        //stepperY.set_vsense(GLOBAL_VSENSE);
277
+        stepperY.set_tbl(GLOBAL_TBL);
278
+        stepperY.set_chm(GLOBAL_CHM);
279
+        //stepperY.set_rndtf(GLOBAL_RNDTF);
280
+        //stepperY.set_disfdcc(GLOBAL_DISFDCC);
281
+        //stepperY.set_fd(GLOBAL_FD);
282
+        //stepperY.set_hend(GLOBAL_HEND);
283
+        //stepperY.set_hstrt(GLOBAL_HSTRT);
284
+        stepperY.set_toff(GLOBAL_TOFF);
285
+
286
+        //stepperY.set_sfilt(GLOBAL_SFILT);
287
+        //stepperY.set_sgt(GLOBAL_SGT);
288
+        //stepperY.set_seimin(GLOBAL_SEIMIN);
289
+        //stepperY.set_sedn(GLOBAL_SEDN);
290
+        //stepperY.set_semax(GLOBAL_SEMAX);
291
+        //stepperY.set_seup(GLOBAL_SEUP);
292
+        //stepperY.set_semin(GLOBAL_SEMIN);
293
+
294
+        //stepperY.set_DCCTRL(GLOBAL_DC_TIME, GLOBAL_DC_SG);
295
+
296
+        //stepperY.set_freewheel(GLOBAL_FREEWHEEL);
297
+        //stepperY.set_pwm_symmetric(GLOBAL_PWM_SYMMETRIC);
298
+        //stepperY.set_pwm_autoscale(GLOBAL_PWM_AUTOSCALE);
299
+        //stepperY.set_pwm_freq(GLOBAL_PWM_FREQ);
300
+        //stepperY.set_PWM_GRAD(GLOBAL_PWM_GRAD);
301
+        //stepperY.set_PWM_AMPL(GLOBAL_PWM_AMPL);
302
+
303
+        //stepperY.set_ENCM_CTRL(GLOBAL_ENCM_CTRL);
304
+      #endif
305
+    }
306
+
307
+  #else // !TMC2130_ADVANCED_CONFIGURATION
308
+
309
+    void tmc2130_init() {
310
+      #if ENABLED(X_IS_TMC2130)
311
+        stepperX.init();
312
+        stepperX.set_mres(X_MRES);
313
+        stepperX.set_IHOLD_IRUN(X_IHOLD,X_IRUN,X_IHOLDDELAY);
314
+        stepperX.set_I_scale_analog(X_ISCALE);
315
+        stepperX.set_tbl(X_TBL);
316
+        stepperX.set_toff(X_TOFF);
317
+      #endif
318
+      #if ENABLED(X2_IS_TMC2130)
319
+        stepperX2.init();
320
+        stepperX2.set_mres(X2_MRES);
321
+        stepperX2.set_IHOLD_IRUN(X2_IHOLD,X2_IRUN,X2_IHOLDDELAY);
322
+        stepperX2.set_I_scale_analog(X2_ISCALE);
323
+        stepperX2.set_tbl(X2_TBL);
324
+        stepperX2.set_toff(X2_TOFF);
325
+      #endif
326
+      #if ENABLED(Y_IS_TMC2130)
327
+        stepperY.init();
328
+        stepperY.set_mres(Y_MRES);
329
+        stepperY.set_IHOLD_IRUN(Y_IHOLD,Y_IRUN,Y_IHOLDDELAY);
330
+        stepperY.set_I_scale_analog(Y_ISCALE);
331
+        stepperY.set_tbl(Y_TBL);
332
+        stepperY.set_toff(Y_TOFF);
333
+      #endif
334
+      #if ENABLED(Y2_IS_TMC2130)
335
+        stepperY2.init();
336
+        stepperY2.set_mres(Y2_MRES);
337
+        stepperY2.set_IHOLD_IRUN(Y2_IHOLD,Y2_IRUN,Y2_IHOLDDELAY);
338
+        stepperY2.set_I_scale_analog(Y2_ISCALE);
339
+        stepperY2.set_tbl(Y2_TBL);
340
+        stepperY2.set_toff(Y2_TOFF);
341
+      #endif
342
+      #if ENABLED(Z_IS_TMC2130)
343
+        stepperZ.init();
344
+        stepperZ.set_mres(Z_MRES);
345
+        stepperZ.set_IHOLD_IRUN(Z_IHOLD,Z_IRUN,Z_IHOLDDELAY);
346
+        stepperZ.set_I_scale_analog(Z_ISCALE);
347
+        stepperZ.set_tbl(Z_TBL);
348
+        stepperZ.set_toff(Z_TOFF);
349
+      #endif
350
+      #if ENABLED(Z2_IS_TMC2130)
351
+        stepperZ2.init();
352
+        stepperZ2.set_mres(Z2_MRES);
353
+        stepperZ2.set_IHOLD_IRUN(Z2_IHOLD,Z2_IRUN,Z2_IHOLDDELAY);
354
+        stepperZ2.set_I_scale_analog(Z2_ISCALE);
355
+        stepperZ2.set_tbl(Z2_TBL);
356
+        stepperZ2.set_toff(Z2_TOFF);
357
+      #endif
358
+      #if ENABLED(E0_IS_TMC2130)
359
+        stepperE0.init();
360
+        stepperE0.set_mres(E0_MRES);
361
+        stepperE0.set_IHOLD_IRUN(E0_IHOLD,E0_IRUN,E0_IHOLDDELAY);
362
+        stepperE0.set_I_scale_analog(E0_ISCALE);
363
+        stepperE0.set_tbl(E0_TBL);
364
+        stepperE0.set_toff(E0_TOFF);
365
+      #endif
366
+      #if ENABLED(E1_IS_TMC2130)
367
+        stepperE1.init();
368
+        stepperE1.set_mres(E1_MRES);
369
+        stepperE1.set_IHOLD_IRUN(E1_IHOLD,E1_IRUN,E1_IHOLDDELAY);
370
+        stepperE1.set_I_scale_analog(E1_ISCALE);
371
+        stepperE1.set_tbl(E1_TBL);
372
+        stepperE1.set_toff(E1_TOFF);
373
+      #endif
374
+      #if ENABLED(E2_IS_TMC2130)
375
+        stepperE2.init();
376
+        stepperE2.set_mres(E2_MRES);
377
+        stepperE2.set_IHOLD_IRUN(E2_IHOLD,E2_IRUN,E2_IHOLDDELAY);
378
+        stepperE2.set_I_scale_analog(E2_ISCALE);
379
+        stepperE2.set_tbl(E2_TBL);
380
+        stepperE2.set_toff(E2_TOFF);
381
+      #endif
382
+      #if ENABLED(E3_IS_TMC2130)
383
+        stepperE3.init();
384
+        stepperE3.set_mres(E3_MRES);
385
+        stepperE3.set_IHOLD_IRUN(E3_IHOLD,E3_IRUN,E3_IHOLDDELAY);
386
+        stepperE3.set_I_scale_analog(E3_ISCALE);
387
+        stepperE3.set_tbl(E3_TBL);
388
+        stepperE3.set_toff(E3_TOFF);
389
+      #endif
390
+    }
391
+
392
+  #endif // TMC2130_ADVANCED_CONFIGURATION
393
+
394
+#endif // HAVE_TMC2130DRIVER
395
+
130 396
 // L6470 Driver objects and inits
131 397
 
132 398
 #if ENABLED(HAVE_L6470DRIVER)

+ 37
- 0
Marlin/stepper_indirection.h Parādīt failu

@@ -53,6 +53,13 @@
53 53
   void tmc_init();
54 54
 #endif
55 55
 
56
+// TMC130 drivers have STEP/DIR/ENABLE on normal pins
57
+#if ENABLED(HAVE_TMC2130DRIVER)
58
+  #include <SPI.h>
59
+  #include <Trinamic_TMC2130.h>
60
+  void tmc2130_init();
61
+#endif
62
+
56 63
 // L6470 has STEP on normal pins, but DIR/ENABLE via SPI
57 64
 #if ENABLED(HAVE_L6470DRIVER)
58 65
   #include <SPI.h>
@@ -76,6 +83,9 @@
76 83
     #define X_ENABLE_WRITE(STATE) stepperX.setEnabled(STATE)
77 84
     #define X_ENABLE_READ stepperX.isEnabled()
78 85
   #else
86
+    #if ENABLED(HAVE_TMC2130DRIVER) && ENABLED(X_IS_TMC2130)
87
+      extern Trinamic_TMC2130 stepperX;
88
+    #endif
79 89
     #define X_ENABLE_INIT SET_OUTPUT(X_ENABLE_PIN)
80 90
     #define X_ENABLE_WRITE(STATE) WRITE(X_ENABLE_PIN,STATE)
81 91
     #define X_ENABLE_READ READ(X_ENABLE_PIN)
@@ -104,6 +114,9 @@
104 114
     #define Y_ENABLE_WRITE(STATE) stepperY.setEnabled(STATE)
105 115
     #define Y_ENABLE_READ stepperY.isEnabled()
106 116
   #else
117
+    #if ENABLED(HAVE_TMC2130DRIVER) && ENABLED(Y_IS_TMC2130)
118
+      extern Trinamic_TMC2130 stepperY;
119
+    #endif
107 120
     #define Y_ENABLE_INIT SET_OUTPUT(Y_ENABLE_PIN)
108 121
     #define Y_ENABLE_WRITE(STATE) WRITE(Y_ENABLE_PIN,STATE)
109 122
     #define Y_ENABLE_READ READ(Y_ENABLE_PIN)
@@ -132,6 +145,9 @@
132 145
     #define Z_ENABLE_WRITE(STATE) stepperZ.setEnabled(STATE)
133 146
     #define Z_ENABLE_READ stepperZ.isEnabled()
134 147
   #else
148
+    #if ENABLED(HAVE_TMC2130DRIVER) && ENABLED(Z_IS_TMC2130)
149
+      extern Trinamic_TMC2130 stepperZ;
150
+    #endif
135 151
     #define Z_ENABLE_INIT SET_OUTPUT(Z_ENABLE_PIN)
136 152
     #define Z_ENABLE_WRITE(STATE) WRITE(Z_ENABLE_PIN,STATE)
137 153
     #define Z_ENABLE_READ READ(Z_ENABLE_PIN)
@@ -161,6 +177,9 @@
161 177
       #define X2_ENABLE_WRITE(STATE) stepperX2.setEnabled(STATE)
162 178
       #define X2_ENABLE_READ stepperX2.isEnabled()
163 179
     #else
180
+      #if ENABLED(HAVE_TMC2130DRIVER) && ENABLED(X2_IS_TMC2130)
181
+        extern Trinamic_TMC2130 stepperX2;
182
+      #endif
164 183
       #define X2_ENABLE_INIT SET_OUTPUT(X2_ENABLE_PIN)
165 184
       #define X2_ENABLE_WRITE(STATE) WRITE(X2_ENABLE_PIN,STATE)
166 185
       #define X2_ENABLE_READ READ(X2_ENABLE_PIN)
@@ -191,6 +210,9 @@
191 210
       #define Y2_ENABLE_WRITE(STATE) stepperY2.setEnabled(STATE)
192 211
       #define Y2_ENABLE_READ stepperY2.isEnabled()
193 212
     #else
213
+      #if ENABLED(HAVE_TMC2130DRIVER) && ENABLED(Y2_IS_TMC2130)
214
+        extern Trinamic_TMC2130 stepperY2;
215
+      #endif
194 216
       #define Y2_ENABLE_INIT SET_OUTPUT(Y2_ENABLE_PIN)
195 217
       #define Y2_ENABLE_WRITE(STATE) WRITE(Y2_ENABLE_PIN,STATE)
196 218
       #define Y2_ENABLE_READ READ(Y2_ENABLE_PIN)
@@ -221,6 +243,9 @@
221 243
       #define Z2_ENABLE_WRITE(STATE) stepperZ2.setEnabled(STATE)
222 244
       #define Z2_ENABLE_READ stepperZ2.isEnabled()
223 245
     #else
246
+      #if ENABLED(HAVE_TMC2130DRIVER) && ENABLED(Z2_IS_TMC2130)
247
+        extern Trinamic_TMC2130 stepperZ2;
248
+      #endif
224 249
       #define Z2_ENABLE_INIT SET_OUTPUT(Z2_ENABLE_PIN)
225 250
       #define Z2_ENABLE_WRITE(STATE) WRITE(Z2_ENABLE_PIN,STATE)
226 251
       #define Z2_ENABLE_READ READ(Z2_ENABLE_PIN)
@@ -250,6 +275,9 @@
250 275
     #define E0_ENABLE_WRITE(STATE) stepperE0.setEnabled(STATE)
251 276
     #define E0_ENABLE_READ stepperE0.isEnabled()
252 277
   #else
278
+    #if ENABLED(HAVE_TMC2130DRIVER) && ENABLED(E0_IS_TMC2130)
279
+      extern Trinamic_TMC2130 stepperE0;
280
+    #endif
253 281
     #define E0_ENABLE_INIT SET_OUTPUT(E0_ENABLE_PIN)
254 282
     #define E0_ENABLE_WRITE(STATE) WRITE(E0_ENABLE_PIN,STATE)
255 283
     #define E0_ENABLE_READ READ(E0_ENABLE_PIN)
@@ -278,6 +306,9 @@
278 306
     #define E1_ENABLE_WRITE(STATE) stepperE1.setEnabled(STATE)
279 307
     #define E1_ENABLE_READ stepperE1.isEnabled()
280 308
   #else
309
+    #if ENABLED(HAVE_TMC2130DRIVER) && ENABLED(E1_IS_TMC2130)
310
+      extern Trinamic_TMC2130 stepperE1;
311
+    #endif
281 312
     #define E1_ENABLE_INIT SET_OUTPUT(E1_ENABLE_PIN)
282 313
     #define E1_ENABLE_WRITE(STATE) WRITE(E1_ENABLE_PIN,STATE)
283 314
     #define E1_ENABLE_READ READ(E1_ENABLE_PIN)
@@ -306,6 +337,9 @@
306 337
     #define E2_ENABLE_WRITE(STATE) stepperE2.setEnabled(STATE)
307 338
     #define E2_ENABLE_READ stepperE2.isEnabled()
308 339
   #else
340
+    #if ENABLED(HAVE_TMC2130DRIVER) && ENABLED(E2_IS_TMC2130)
341
+      extern Trinamic_TMC2130 stepperE2;
342
+    #endif
309 343
     #define E2_ENABLE_INIT SET_OUTPUT(E2_ENABLE_PIN)
310 344
     #define E2_ENABLE_WRITE(STATE) WRITE(E2_ENABLE_PIN,STATE)
311 345
     #define E2_ENABLE_READ READ(E2_ENABLE_PIN)
@@ -334,6 +368,9 @@
334 368
     #define E3_ENABLE_WRITE(STATE) stepperE3.setEnabled(STATE)
335 369
     #define E3_ENABLE_READ stepperE3.isEnabled()
336 370
   #else
371
+    #if ENABLED(HAVE_TMC2130DRIVER) && ENABLED(E3_IS_TMC2130)
372
+      extern Trinamic_TMC2130 stepperE3;
373
+    #endif
337 374
     #define E3_ENABLE_INIT SET_OUTPUT(E3_ENABLE_PIN)
338 375
     #define E3_ENABLE_WRITE(STATE) WRITE(E3_ENABLE_PIN,STATE)
339 376
     #define E3_ENABLE_READ READ(E3_ENABLE_PIN)

Notiek ielāde…
Atcelt
Saglabāt