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
  * Test Sensor & Heater pin combos.
2183
  * Test Sensor & Heater pin combos.
2184
  * Pins and Sensor IDs must be set for each heater
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
   #error "TEMP_0_PIN or TEMP_0_CS_PIN not defined for this board."
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
   #error "HEATER_0_PIN not defined for this board."
2189
   #error "HEATER_0_PIN not defined for this board."
2190
 #elif TEMP_SENSOR_0_IS_MAX_TC && !PIN_EXISTS(TEMP_0_CS)
2190
 #elif TEMP_SENSOR_0_IS_MAX_TC && !PIN_EXISTS(TEMP_0_CS)
2191
   #error "TEMP_SENSOR_0 MAX thermocouple requires TEMP_0_CS_PIN."
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
 
60
 
61
 // None of these require limit switches by default, so we leave these commented
61
 // None of these require limit switches by default, so we leave these commented
62
 // here for your reference.
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
 // Steppers
71
 // Steppers
73
 #define X_STEP_PIN                          PB15
73
 #define X_STEP_PIN                          PB15
74
 #define X_DIR_PIN                           PB14
74
 #define X_DIR_PIN                           PB14
75
 #define X_ENABLE_PIN                        PD9
75
 #define X_ENABLE_PIN                        PD9
76
-#define X_SERIAL_TX_PIN                     PD8
77
-#define X_SERIAL_RX_PIN                     PD8
78
 
76
 
79
 #define Y_STEP_PIN                          PE15
77
 #define Y_STEP_PIN                          PE15
80
 #define Y_DIR_PIN                           PE14
78
 #define Y_DIR_PIN                           PE14
81
 #define Y_ENABLE_PIN                        PB13
79
 #define Y_ENABLE_PIN                        PB13
82
-#define Y_SERIAL_TX_PIN                     PB12
83
-#define Y_SERIAL_RX_PIN                     PB12
84
 
80
 
85
 #define Z_STEP_PIN                          PE7
81
 #define Z_STEP_PIN                          PE7
86
 #define Z_DIR_PIN                           PB1
82
 #define Z_DIR_PIN                           PB1
87
 #define Z_ENABLE_PIN                        PE9
83
 #define Z_ENABLE_PIN                        PE9
88
-#define Z_SERIAL_TX_PIN                     PE8
89
-#define Z_SERIAL_RX_PIN                     PE8
90
 
84
 
91
 #define I_STEP_PIN                          PC4
85
 #define I_STEP_PIN                          PC4
92
 #define I_DIR_PIN                           PA4
86
 #define I_DIR_PIN                           PA4
93
 #define I_ENABLE_PIN                        PB0
87
 #define I_ENABLE_PIN                        PB0
94
-#define I_SERIAL_TX_PIN                     PC5
95
-#define I_SERIAL_RX_PIN                     PC5
96
 
88
 
97
 #define J_STEP_PIN                          PE11
89
 #define J_STEP_PIN                          PE11
98
 #define J_DIR_PIN                           PE10
90
 #define J_DIR_PIN                           PE10
99
 #define J_ENABLE_PIN                        PE13
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
 #define K_STEP_PIN                          PD6
93
 #define K_STEP_PIN                          PD6
106
 #define K_DIR_PIN                           PD7
94
 #define K_DIR_PIN                           PD7
107
 #define K_ENABLE_PIN                        PA3
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
 #define FAN_PIN                             PE2
151
 #define FAN_PIN                             PE2
118
 #define FAN1_PIN                            PE3
152
 #define FAN1_PIN                            PE3
119
 #define FAN2_PIN                            PE4
153
 #define FAN2_PIN                            PE4
121
 
155
 
122
 #define FAN_SOFT_PWM_REQUIRED
156
 #define FAN_SOFT_PWM_REQUIRED
123
 
157
 
124
-// Neopixel Rings
158
+//
159
+// Neopixel
160
+//
125
 #define NEOPIXEL_PIN                        PC7
161
 #define NEOPIXEL_PIN                        PC7
126
 #define NEOPIXEL2_PIN                       PC8
162
 #define NEOPIXEL2_PIN                       PC8
127
 
163
 
164
+//
128
 // SPI
165
 // SPI
166
+//
129
 #define MISO_PIN                            PB4
167
 #define MISO_PIN                            PB4
130
 #define MOSI_PIN                            PB5
168
 #define MOSI_PIN                            PB5
131
 #define SCK_PIN                             PB3
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
 // I2C
176
 // I2C
177
+//
134
 #define I2C_SDA_PIN                         PB7
178
 #define I2C_SDA_PIN                         PB7
135
 #define I2C_SCL_PIN                         PB6
179
 #define I2C_SCL_PIN                         PB6
136
 
180
 

Loading…
Cancel
Save