Browse Source

Add SENSORLESS_HOMING to Archim 2.0 (#10500)

Marcio Teixeira 7 years ago
parent
commit
10a25f733e
1 changed files with 35 additions and 13 deletions
  1. 35
    13
      Marlin/src/pins/pins_ARCHIM2.h

+ 35
- 13
Marlin/src/pins/pins_ARCHIM2.h View File

@@ -43,15 +43,44 @@
43 43
 // Items marked * have been altered from Archim v1.0
44 44
 //
45 45
 
46
+// TMC2130 Diag Pins (currently just for reference)
47
+#define X_DIAG_PIN         59   // PA4 X_DIAG
48
+#define Y_DIAG_PIN         48   // PC15 Y_DIAG
49
+#define Z_DIAG_PIN         36   // PC4 Z_DIAG
50
+#define E0_DIAG_PIN        78   // PB23 E1_DIAG
51
+#define E1_DIAG_PIN        25   // PD0 E2_DIAG
52
+
46 53
 //
47 54
 // Limit Switches
48 55
 //
49
-#define X_MIN_PIN          14   // PD4 MIN ES1
50
-#define X_MAX_PIN          32   // PD10 MAX ES1
51
-#define Y_MIN_PIN          29   // PD6 MIN ES2
52
-#define Y_MAX_PIN          15   // PD5 MAX ES2
53
-#define Z_MIN_PIN          31   // PA7 MIN ES3
54
-#define Z_MAX_PIN          30   // PD9 MAX ES3
56
+// Only use Diag Pins when SENSORLESS_HOMING is enabled for the TMC2130 drivers.
57
+// Otherwise use a physical endstop based configuration.
58
+
59
+#if DISABLED(SENSORLESS_HOMING)
60
+ #define X_MIN_PIN          14   // PD4 MIN ES1
61
+ #define X_MAX_PIN          32   // PD10 MAX ES1
62
+ #define Y_MIN_PIN          29   // PD6 MIN ES2
63
+ #define Y_MAX_PIN          15   // PD5 MAX ES2
64
+#else
65
+  #if X_HOME_DIR == -1
66
+    #define X_MIN_PIN      X_DIAG_PIN
67
+    #define X_MAX_PIN      32
68
+  #else
69
+    #define X_MIN_PIN      14
70
+    #define X_MAX_PIN      X_DIAG_PIN
71
+  #endif
72
+
73
+  #if Y_HOME_DIR == -1
74
+    #define Y_MIN_PIN      Y_DIAG_PIN
75
+    #define Y_MAX_PIN      15
76
+  #else
77
+    #define Y_MIN_PIN      29
78
+    #define Y_MAX_PIN      Y_DIAG_PIN
79
+  #endif
80
+#endif
81
+
82
+ #define Z_MIN_PIN          31   // PA7 MIN ES3
83
+ #define Z_MAX_PIN          30   // PD9 MAX ES3
55 84
 
56 85
 //
57 86
 // Z Probe (when not Z_MIN_PIN)
@@ -69,7 +98,6 @@
69 98
 #ifndef X_CS_PIN
70 99
   #define X_CS_PIN         39   // PC7 X_nCS
71 100
 #endif
72
-#define X_DIAG_PIN         59   // PA4 X_DIAG
73 101
 
74 102
 #define Y_STEP_PIN         51   // PC12 Y-STEP *
75 103
 #define Y_DIR_PIN          92   // PC11 Y-DIR -AddOns *
@@ -77,7 +105,6 @@
77 105
 #ifndef Y_CS_PIN
78 106
   #define Y_CS_PIN         50   // PC13 Y_nCS
79 107
 #endif
80
-#define Y_DIAG_PIN         48   // PC15 Y_DIAG
81 108
 
82 109
 #define Z_STEP_PIN         46   // PC17 Z-STEP *
83 110
 #define Z_DIR_PIN          47   // PC16 Z-DIR *
@@ -85,7 +112,6 @@
85 112
 #ifndef Z_CS_PIN
86 113
   #define Z_CS_PIN         45   // PC18 Z_nCS
87 114
 #endif
88
-#define Z_DIAG_PIN         36   // PC4 Z_DIAG
89 115
 
90 116
 #define E0_STEP_PIN       107   // PB10 E1-STEP -AddOns *
91 117
 #define E0_DIR_PIN         96   // PC10 E1-DIR -AddOns *
@@ -93,7 +119,6 @@
93 119
 #ifndef E0_CS_PIN
94 120
   #define E0_CS_PIN       104   // PC20 E1_nCS -AddOns *
95 121
 #endif
96
-#define E0_DIAG_PIN        78   // PB23 E1_DIAG
97 122
 
98 123
 #define E1_STEP_PIN        22   // PB26 E2_STEP *
99 124
 #define E1_DIR_PIN         97   // PB24 E2_DIR -AddOns *
@@ -101,7 +126,6 @@
101 126
 #ifndef E1_CS_PIN
102 127
   #define E1_CS_PIN        19   // PA10 E2_nCS
103 128
 #endif
104
-#define E1_DIAG_PIN        25   // PD0 E2_DIAG
105 129
 
106 130
 //
107 131
 // Software SPI pins for TMC2130 stepper drivers.
@@ -132,13 +156,11 @@
132 156
 #define HEATER_2_PIN        8   // D8 PC22 FET_PWM5
133 157
 #define HEATER_BED_PIN      9   // D9 PC21 BED_PWM
134 158
 
135
-
136 159
 //
137 160
 // Misc. Functions
138 161
 //
139 162
 #define SDSS               87   // D87 PA29 CS
140 163
 
141
-
142 164
 //////////////////////////
143 165
 // LCDs and Controllers //
144 166
 //////////////////////////

Loading…
Cancel
Save