Skip to content

Commit 2d8ec4f

Browse files
GatCodethinkyhead
GatCode
andauthored
📌 Fix, extend Index Rev03 Mobo (MarlinFirmware#23851)
Co-authored-by: Scott Lahteine <[email protected]>
1 parent df4e022 commit 2d8ec4f

File tree

2 files changed

+72
-28
lines changed

2 files changed

+72
-28
lines changed

Marlin/src/inc/SanityCheck.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -2183,9 +2183,9 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
21832183
* Test Sensor & Heater pin combos.
21842184
* Pins and Sensor IDs must be set for each heater
21852185
*/
2186-
#if !ANY_PIN(TEMP_0, TEMP_0_CS)
2186+
#if HAS_EXTRUDERS && !ANY_PIN(TEMP_0, TEMP_0_CS)
21872187
#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
21892189
#error "HEATER_0_PIN not defined for this board."
21902190
#elif TEMP_SENSOR_0_IS_MAX_TC && !PIN_EXISTS(TEMP_0_CS)
21912191
#error "TEMP_SENSOR_0 MAX thermocouple requires TEMP_0_CS_PIN."

Marlin/src/pins/stm32f4/pins_INDEX_REV03.h

+70-26
Original file line numberDiff line numberDiff line change
@@ -60,77 +60,121 @@
6060

6161
// None of these require limit switches by default, so we leave these commented
6262
// 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
6969

7070
//
7171
// Steppers
7272
//
7373
#define X_STEP_PIN PB15
7474
#define X_DIR_PIN PB14
7575
#define X_ENABLE_PIN PD9
76-
#define X_SERIAL_TX_PIN PD8
77-
#define X_SERIAL_RX_PIN PD8
7876

7977
#define Y_STEP_PIN PE15
8078
#define Y_DIR_PIN PE14
8179
#define Y_ENABLE_PIN PB13
82-
#define Y_SERIAL_TX_PIN PB12
83-
#define Y_SERIAL_RX_PIN PB12
8480

8581
#define Z_STEP_PIN PE7
8682
#define Z_DIR_PIN PB1
8783
#define Z_ENABLE_PIN PE9
88-
#define Z_SERIAL_TX_PIN PE8
89-
#define Z_SERIAL_RX_PIN PE8
9084

9185
#define I_STEP_PIN PC4
9286
#define I_DIR_PIN PA4
9387
#define I_ENABLE_PIN PB0
94-
#define I_SERIAL_TX_PIN PC5
95-
#define I_SERIAL_RX_PIN PC5
9688

9789
#define J_STEP_PIN PE11
9890
#define J_DIR_PIN PE10
9991
#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
10492

10593
#define K_STEP_PIN PD6
10694
#define K_DIR_PIN PD7
10795
#define K_ENABLE_PIN PA3
10896

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
111147

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+
//
117151
#define FAN_PIN PE2
118152
#define FAN1_PIN PE3
119153
#define FAN2_PIN PE4
120154
#define FAN3_PIN PE5
121155

122156
#define FAN_SOFT_PWM_REQUIRED
123157

124-
// Neopixel Rings
158+
//
159+
// Neopixel
160+
//
125161
#define NEOPIXEL_PIN PC7
126162
#define NEOPIXEL2_PIN PC8
127163

164+
//
128165
// SPI
166+
//
129167
#define MISO_PIN PB4
130168
#define MOSI_PIN PB5
131169
#define SCK_PIN PB3
132170

171+
#define TMC_SW_MISO MISO_PIN
172+
#define TMC_SW_MOSI MOSI_PIN
173+
#define TMC_SW_SCK SCK_PIN
174+
175+
//
133176
// I2C
177+
//
134178
#define I2C_SDA_PIN PB7
135179
#define I2C_SCL_PIN PB6
136180

0 commit comments

Comments
 (0)