Browse Source

📌 Fix, extend Index Rev03 Mobo (#23851)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
GatCode 2 years ago
parent
commit
2d8ec4fe9e
No account linked to committer's email address
2 changed files with 72 additions and 28 deletions
  1. 2
    2
      Marlin/src/inc/SanityCheck.h
  2. 70
    26
      Marlin/src/pins/stm32f4/pins_INDEX_REV03.h

+ 2
- 2
Marlin/src/inc/SanityCheck.h View File

@@ -2183,9 +2183,9 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
2183 2183
  * Test Sensor & Heater pin combos.
2184 2184
  * Pins and Sensor IDs must be set for each heater
2185 2185
  */
2186
-#if !ANY_PIN(TEMP_0, TEMP_0_CS)
2186
+#if HAS_EXTRUDERS && !ANY_PIN(TEMP_0, TEMP_0_CS)
2187 2187
   #error "TEMP_0_PIN or TEMP_0_CS_PIN not defined for this board."
2188
-#elif !HAS_HEATER_0 && EXTRUDERS
2188
+#elif HAS_EXTRUDERS && !HAS_HEATER_0
2189 2189
   #error "HEATER_0_PIN not defined for this board."
2190 2190
 #elif TEMP_SENSOR_0_IS_MAX_TC && !PIN_EXISTS(TEMP_0_CS)
2191 2191
   #error "TEMP_SENSOR_0 MAX thermocouple requires TEMP_0_CS_PIN."

+ 70
- 26
Marlin/src/pins/stm32f4/pins_INDEX_REV03.h View File

@@ -60,12 +60,12 @@
60 60
 
61 61
 // None of these require limit switches by default, so we leave these commented
62 62
 // here for your reference.
63
-// #define I_MIN_PIN                           PA8
64
-// #define I_MAX_PIN                           PA8
65
-// #define J_MIN_PIN                           PD13
66
-// #define J_MAX_PIN                           PD13
67
-// #define K_MIN_PIN                           PC9
68
-// #define K_MAX_PIN                           PC9
63
+//#define I_MIN_PIN                         PA8
64
+//#define I_MAX_PIN                         PA8
65
+//#define J_MIN_PIN                         PD13
66
+//#define J_MAX_PIN                         PD13
67
+//#define K_MIN_PIN                         PC9
68
+//#define K_MAX_PIN                         PC9
69 69
 
70 70
 //
71 71
 // Steppers
@@ -73,47 +73,81 @@
73 73
 #define X_STEP_PIN                          PB15
74 74
 #define X_DIR_PIN                           PB14
75 75
 #define X_ENABLE_PIN                        PD9
76
-#define X_SERIAL_TX_PIN                     PD8
77
-#define X_SERIAL_RX_PIN                     PD8
78 76
 
79 77
 #define Y_STEP_PIN                          PE15
80 78
 #define Y_DIR_PIN                           PE14
81 79
 #define Y_ENABLE_PIN                        PB13
82
-#define Y_SERIAL_TX_PIN                     PB12
83
-#define Y_SERIAL_RX_PIN                     PB12
84 80
 
85 81
 #define Z_STEP_PIN                          PE7
86 82
 #define Z_DIR_PIN                           PB1
87 83
 #define Z_ENABLE_PIN                        PE9
88
-#define Z_SERIAL_TX_PIN                     PE8
89
-#define Z_SERIAL_RX_PIN                     PE8
90 84
 
91 85
 #define I_STEP_PIN                          PC4
92 86
 #define I_DIR_PIN                           PA4
93 87
 #define I_ENABLE_PIN                        PB0
94
-#define I_SERIAL_TX_PIN                     PC5
95
-#define I_SERIAL_RX_PIN                     PC5
96 88
 
97 89
 #define J_STEP_PIN                          PE11
98 90
 #define J_DIR_PIN                           PE10
99 91
 #define J_ENABLE_PIN                        PE13
100
-#define J_SERIAL_TX_PIN                     PE12
101
-#define J_SERIAL_RX_PIN                     PE12
102
-#define K_SERIAL_TX_PIN                     PA2
103
-#define K_SERIAL_RX_PIN                     PA2
104 92
 
105 93
 #define K_STEP_PIN                          PD6
106 94
 #define K_DIR_PIN                           PD7
107 95
 #define K_ENABLE_PIN                        PA3
108 96
 
109
-// Reduce baud rate to improve software serial reliability
110
-#define TMC_BAUD_RATE                      19200
97
+#if HAS_TMC_SPI
98
+  /**
99
+   * Make sure to configure the jumpers on the back side of the Mobo according to
100
+   * this diagram: https://github.com/MarlinFirmware/Marlin/pull/23851
101
+   */
102
+  #error "SPI drivers require a custom jumper configuration, see comment above! Comment out this line to continue."
103
+
104
+  #if AXIS_HAS_SPI(X)
105
+    #define X_CS_PIN                        PD8
106
+  #endif
107
+  #if AXIS_HAS_SPI(Y)
108
+    #define Y_CS_PIN                        PB12
109
+  #endif
110
+  #if AXIS_HAS_SPI(Z)
111
+    #define Z_CS_PIN                        PE8
112
+  #endif
113
+  #if AXIS_HAS_SPI(I)
114
+    #define I_CS_PIN                        PC5
115
+  #endif
116
+  #if AXIS_HAS_SPI(J)
117
+    #define J_CS_PIN                        PE12
118
+  #endif
119
+  #if AXIS_HAS_SPI(K)
120
+    #define K_CS_PIN                        PA2
121
+  #endif
122
+
123
+#elif HAS_TMC_UART
124
+
125
+  #define X_SERIAL_TX_PIN                   PD8
126
+  #define X_SERIAL_RX_PIN        X_SERIAL_TX_PIN
127
+
128
+  #define Y_SERIAL_TX_PIN                   PB12
129
+  #define Y_SERIAL_RX_PIN        Y_SERIAL_TX_PIN
130
+
131
+  #define Z_SERIAL_TX_PIN                   PE8
132
+  #define Z_SERIAL_RX_PIN        Z_SERIAL_TX_PIN
133
+
134
+  #define I_SERIAL_TX_PIN                   PC5
135
+  #define I_SERIAL_RX_PIN        I_SERIAL_TX_PIN
136
+
137
+  #define J_SERIAL_TX_PIN                   PE12
138
+  #define J_SERIAL_RX_PIN        J_SERIAL_TX_PIN
139
+
140
+  #define K_SERIAL_TX_PIN                   PA2
141
+  #define K_SERIAL_RX_PIN        K_SERIAL_TX_PIN
142
+
143
+  // Reduce baud rate to improve software serial reliability
144
+  #define TMC_BAUD_RATE                    19200
145
+
146
+#endif
111 147
 
112
-// Not required for this board. Fails to compile otherwise.
113
-// PD0 is not connected on this board.
114
-#define TEMP_0_PIN                          PD0
115
-
116
-// General use mosfets, useful for things like pumps and solenoids
148
+//
149
+// Heaters / Fans
150
+//
117 151
 #define FAN_PIN                             PE2
118 152
 #define FAN1_PIN                            PE3
119 153
 #define FAN2_PIN                            PE4
@@ -121,16 +155,26 @@
121 155
 
122 156
 #define FAN_SOFT_PWM_REQUIRED
123 157
 
124
-// Neopixel Rings
158
+//
159
+// Neopixel
160
+//
125 161
 #define NEOPIXEL_PIN                        PC7
126 162
 #define NEOPIXEL2_PIN                       PC8
127 163
 
164
+//
128 165
 // SPI
166
+//
129 167
 #define MISO_PIN                            PB4
130 168
 #define MOSI_PIN                            PB5
131 169
 #define SCK_PIN                             PB3
132 170
 
171
+#define TMC_SW_MISO                     MISO_PIN
172
+#define TMC_SW_MOSI                     MOSI_PIN
173
+#define TMC_SW_SCK                       SCK_PIN
174
+
175
+//
133 176
 // I2C
177
+//
134 178
 #define I2C_SDA_PIN                         PB7
135 179
 #define I2C_SCL_PIN                         PB6
136 180
 

Loading…
Cancel
Save