Skip to content

Commit 505f0a6

Browse files
EvilGremlinthinkyhead
authored andcommitted
✨ MKS SKIPR board (#24791)
1 parent 62b7db9 commit 505f0a6

File tree

12 files changed

+1929
-93
lines changed

12 files changed

+1929
-93
lines changed

Marlin/src/core/boards.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,7 @@
425425
#define BOARD_CREALITY_V24S1_301F4 4240 // Creality v2.4.S1_301F4 (STM32F401RC) as found in the Ender-3 S1 F4
426426
#define BOARD_OPULO_LUMEN_REV4 4241 // Opulo Lumen PnP Controller REV4 (STM32F407VE / STM32F407VG)
427427
#define BOARD_FYSETC_SPIDER_KING407 4242 // FYSETC Spider King407 (STM32F407ZG)
428+
#define BOARD_MKS_SKIPR_V1 4243 // MKS SKIPR v1.0 all-in-one board (STM32F407VE)
428429

429430
//
430431
// ARM Cortex M7

Marlin/src/pins/pins.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,8 @@
709709
#include "stm32f4/pins_OPULO_LUMEN_REV4.h" // STM32F4 env:Opulo_Lumen_REV4
710710
#elif MB(FYSETC_SPIDER_KING407)
711711
#include "stm32f4/pins_FYSETC_SPIDER_KING407.h" // STM32F4 env:FYSETC_SPIDER_KING407
712+
#elif MB(MKS_SKIPR_V1)
713+
#include "stm32f4/pins_MKS_SKIPR_V1_0.h" // STM32F4 env:mks_skipr_v1 env:mks_skipr_v1_nobootloader
712714

713715
//
714716
// ARM Cortex M7
Lines changed: 381 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,381 @@
1+
/**
2+
* Marlin 3D Printer Firmware
3+
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4+
*
5+
* Based on Sprinter and grbl.
6+
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7+
*
8+
* This program is free software: you can redistribute it and/or modify
9+
* it under the terms of the GNU General Public License as published by
10+
* the Free Software Foundation, either version 3 of the License, or
11+
* (at your option) any later version.
12+
*
13+
* This program is distributed in the hope that it will be useful,
14+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
* GNU General Public License for more details.
17+
*
18+
* You should have received a copy of the GNU General Public License
19+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
20+
*
21+
*/
22+
#pragma once
23+
24+
#include "env_validate.h"
25+
26+
#if HOTENDS > 4 || E_STEPPERS > 4
27+
#error "MKS SKIPR supports up to 4 hotends / E steppers."
28+
#endif
29+
30+
#define BOARD_INFO_NAME "MKS SKIPR V1.0"
31+
32+
// Valid SERIAL_PORT values: -1 (USB-C), 1 (direct to RK3328), 3 (USART3 header)
33+
34+
#define USES_DIAG_JUMPERS
35+
36+
// Onboard I2C EEPROM
37+
#define I2C_EEPROM
38+
#define MARLIN_EEPROM_SIZE 0x1000 // 4KB (AT24C32)
39+
#define I2C_SCL_PIN PB8
40+
#define I2C_SDA_PIN PB9
41+
42+
//
43+
// Servos
44+
//
45+
#define SERVO0_PIN PA8
46+
47+
//
48+
// Trinamic Stallguard pins // Connector labels
49+
#define X_DIAG_PIN PA14 // X-
50+
#define Y_DIAG_PIN PA15 // Y-
51+
#define Z_DIAG_PIN PB15 // Z-
52+
#define E0_DIAG_PIN PA13 // MT-DET
53+
#define E1_DIAG_PIN PC5 // NEOPIXEL
54+
#define E2_DIAG_PIN PB14 // Z+
55+
56+
//
57+
// Check for additional used endstop pins
58+
//
59+
#if HAS_EXTRA_ENDSTOPS
60+
#define _ENDSTOP_IS_ANY(ES) X2_USE_ENDSTOP == ES || Y2_USE_ENDSTOP == ES || Z2_USE_ENDSTOP == ES || Z3_USE_ENDSTOP == ES || Z4_USE_ENDSTOP == ES
61+
#if _ENDSTOP_IS_ANY(_XMIN_) || _ENDSTOP_IS_ANY(_XMAX_)
62+
#define NEEDS_X_MINMAX 1
63+
#endif
64+
#if _ENDSTOP_IS_ANY(_YMIN_) || _ENDSTOP_IS_ANY(_YMAX_)
65+
#define NEEDS_Y_MINMAX 1
66+
#endif
67+
#if _ENDSTOP_IS_ANY(_ZMIN_) || _ENDSTOP_IS_ANY(_ZMAX_)
68+
#define NEEDS_Z_MINMAX 1
69+
#endif
70+
#undef _ENDSTOP_IS_ANY
71+
#endif
72+
73+
//
74+
// Limit Switches
75+
//
76+
#ifdef X_STALL_SENSITIVITY
77+
#define X_STOP_PIN X_DIAG_PIN // X-
78+
#elif EITHER(DUAL_X_CARRIAGE, NEEDS_X_MINMAX)
79+
#ifndef X_MIN_PIN
80+
#define X_MIN_PIN X_DIAG_PIN // X-
81+
#endif
82+
#ifndef X_MAX_PIN
83+
#define X_MAX_PIN E0_DIAG_PIN // MT-DET
84+
#endif
85+
#else
86+
#define X_STOP_PIN X_DIAG_PIN // X-
87+
#endif
88+
89+
#ifdef Y_STALL_SENSITIVITY
90+
#define Y_STOP_PIN Y_DIAG_PIN // Y-
91+
#elif NEEDS_Y_MINMAX
92+
#ifndef Y_MIN_PIN
93+
#define Y_MIN_PIN Y_DIAG_PIN // Y-
94+
#endif
95+
#ifndef Y_MAX_PIN
96+
#define Y_MAX_PIN E1_DIAG_PIN // NEOPIXEL
97+
#endif
98+
#else
99+
#define Y_STOP_PIN Y_DIAG_PIN // Y-
100+
#endif
101+
102+
#ifdef Z_STALL_SENSITIVITY
103+
#define Z_STOP_PIN Z_DIAG_PIN // Z-
104+
#elif NEEDS_Z_MINMAX
105+
#ifndef Z_MIN_PIN
106+
#define Z_MIN_PIN Z_DIAG_PIN // Z-
107+
#endif
108+
#ifndef Z_MAX_PIN
109+
#define Z_MAX_PIN E2_DIAG_PIN // Z+
110+
#endif
111+
#else
112+
#define Z_STOP_PIN Z_DIAG_PIN // Z-
113+
#endif
114+
115+
#if DISABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) || ENABLED(USE_PROBE_FOR_Z_HOMING)
116+
#ifndef Z_MIN_PROBE
117+
#define Z_MIN_PROBE_PIN E2_DIAG_PIN // defaults to 'Z+' connector
118+
#endif
119+
#endif
120+
121+
#undef NEEDS_X_MINMAX
122+
#undef NEEDS_Y_MINMAX
123+
#undef NEEDS_Z_MINMAX
124+
125+
//
126+
// Steppers
127+
//
128+
#define X_STEP_PIN PC14
129+
#define X_DIR_PIN PC13
130+
#define X_ENABLE_PIN PC15
131+
#ifndef X_CS_PIN
132+
#define X_CS_PIN PE6
133+
#endif
134+
135+
#define Y_STEP_PIN PE5
136+
#define Y_DIR_PIN PE4
137+
#define Y_ENABLE_PIN PD14
138+
#ifndef Y_CS_PIN
139+
#define Y_CS_PIN PE3
140+
#endif
141+
142+
#define Z_STEP_PIN PE1 // "Z1"
143+
#define Z_DIR_PIN PE0
144+
#define Z_ENABLE_PIN PE2
145+
#ifndef Z_CS_PIN
146+
#define Z_CS_PIN PB7
147+
#endif
148+
149+
#define E0_STEP_PIN PB5
150+
#define E0_DIR_PIN PB4
151+
#define E0_ENABLE_PIN PB6
152+
#ifndef E0_CS_PIN
153+
#define E0_CS_PIN PB3
154+
#endif
155+
156+
#define E1_STEP_PIN PD6 // "Z2"
157+
#define E1_DIR_PIN PD5
158+
#define E1_ENABLE_PIN PD7
159+
#ifndef E1_CS_PIN
160+
#define E1_CS_PIN PD4
161+
#endif
162+
163+
#define E2_STEP_PIN PD2 // "Z3"
164+
#define E2_DIR_PIN PD1
165+
#define E2_ENABLE_PIN PD3
166+
#ifndef E2_CS_PIN
167+
#define E2_CS_PIN PD0
168+
#endif
169+
170+
#define E3_STEP_PIN PC7 // "Z4"
171+
#define E3_DIR_PIN PC6
172+
#define E3_ENABLE_PIN PC8
173+
#ifndef E3_CS_PIN
174+
#define E3_CS_PIN PD15
175+
#endif
176+
177+
//
178+
// Temperature Sensors
179+
//
180+
#define TEMP_BED_PIN PC0 // TB
181+
#define TEMP_0_PIN PC1 // TH0
182+
#define TEMP_1_PIN PC2 // TH1
183+
#define TEMP_2_PIN PC3 // TH2
184+
185+
//
186+
// Heaters / Fans
187+
//
188+
#define HEATER_BED_PIN PD12 // Hotbed
189+
#define HEATER_0_PIN PB1 // Heater0
190+
#define HEATER_1_PIN PB0 // Heater1
191+
#define HEATER_2_PIN PA3 // Heater2
192+
193+
#define FAN_PIN PA2 // Fan0
194+
#define FAN1_PIN PA1 // Fan1
195+
#define FAN2_PIN PA0 // Fan2
196+
197+
//
198+
// Software SPI pins for TMC2130 stepper drivers
199+
// This board doesn't support hardware SPI there
200+
//
201+
#if HAS_TMC_SPI
202+
#define TMC_USE_SW_SPI
203+
#define TMC_SW_MOSI PE14
204+
#define TMC_SW_MISO PE13
205+
#define TMC_SW_SCK PE12
206+
#endif
207+
208+
//
209+
// TMC2208/TMC2209 stepper drivers
210+
// This board is routed for one-wire software serial
211+
//
212+
#if HAS_TMC_UART
213+
#define X_SERIAL_TX_PIN PE6
214+
#define X_SERIAL_RX_PIN X_SERIAL_TX_PIN
215+
216+
#define Y_SERIAL_TX_PIN PE3
217+
#define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN
218+
219+
#define Z_SERIAL_TX_PIN PB7
220+
#define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN
221+
222+
#define E0_SERIAL_TX_PIN PB3
223+
#define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
224+
225+
#define E1_SERIAL_TX_PIN PD4
226+
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
227+
228+
#define E2_SERIAL_TX_PIN PD0
229+
#define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN
230+
231+
#define E3_SERIAL_TX_PIN PD15
232+
#define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN
233+
234+
// Reduce baud rate to improve software serial reliability
235+
#define TMC_BAUD_RATE 19200
236+
#endif
237+
238+
/** ------ ------
239+
* (BEEPER) PB2 | 1 2 | PE10 (BTN_ENC) (MISO) PA6 | 1 2 | PA5 (SCK)
240+
* (LCD_EN) PE11 | 3 4 | PD10 (LCD_RS) (BTN_EN1) PE9 | 3 4 | PA4 (SD_SS)
241+
* (LCD_D4) PD9 | 5 6 PD8 (LCD_D5) (BTN_EN2) PE8 | 5 6 PA7 (MOSI)
242+
* (LCD_D6) PE15 | 7 8 | PE7 (LCD_D7) (SD_DETECT) PD13 | 7 8 | RESET
243+
* GND | 9 10 | 5V GND | 9 10 | --
244+
* ------ ------
245+
* EXP1 EXP2
246+
*/
247+
#define EXP1_01_PIN PB2
248+
#define EXP1_02_PIN PE10
249+
#define EXP1_03_PIN PE11
250+
#define EXP1_04_PIN PD10
251+
#define EXP1_05_PIN PD9
252+
#define EXP1_06_PIN PD8
253+
#define EXP1_07_PIN PE15
254+
#define EXP1_08_PIN PE7
255+
256+
#define EXP2_01_PIN PA6
257+
#define EXP2_02_PIN PA5
258+
#define EXP2_03_PIN PE9
259+
#define EXP2_04_PIN PA4
260+
#define EXP2_05_PIN PE8
261+
#define EXP2_06_PIN PA7
262+
#define EXP2_07_PIN PD13
263+
#define EXP2_08_PIN -1 // connected to MCU reset
264+
265+
//
266+
// SD Support
267+
// Onboard SD card use hardware SPI3 (defined in variant), LCD SD card use hardware SPI1
268+
//
269+
#if ENABLED(SDSUPPORT)
270+
#ifndef SDCARD_CONNECTION
271+
#define SDCARD_CONNECTION LCD
272+
#endif
273+
#if SD_CONNECTION_IS(ONBOARD)
274+
//#define SOFTWARE_SPI
275+
//#define SD_SPI_SPEED SPI_HALF_SPEED
276+
#undef SD_DETECT_STATE
277+
#define SD_DETECT_STATE LOW
278+
#define SD_DETECT_PIN PC4
279+
#elif SD_CONNECTION_IS(LCD)
280+
//#define SOFTWARE_SPI
281+
//#define SD_SPI_SPEED SPI_QUARTER_SPEED
282+
#define SD_SS_PIN EXP2_04_PIN
283+
#define SD_SCK_PIN EXP2_02_PIN
284+
#define SD_MISO_PIN EXP2_01_PIN
285+
#define SD_MOSI_PIN EXP2_06_PIN
286+
#define SD_DETECT_PIN EXP2_07_PIN
287+
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
288+
#error "CUSTOM_CABLE is not a supported SDCARD_CONNECTION for this board"
289+
#endif
290+
#define SDSS SD_SS_PIN
291+
#endif
292+
293+
//
294+
// LCDs and Controllers
295+
//
296+
#if IS_TFTGLCD_PANEL
297+
298+
#if ENABLED(TFTGLCD_PANEL_SPI)
299+
#define TFTGLCD_CS EXP2_03_PIN
300+
#endif
301+
302+
#elif HAS_WIRED_LCD
303+
304+
#define BEEPER_PIN EXP1_01_PIN
305+
#define BTN_ENC EXP1_02_PIN
306+
307+
#if ENABLED(CR10_STOCKDISPLAY)
308+
309+
#define LCD_PINS_RS EXP1_07_PIN
310+
311+
#define BTN_EN1 EXP1_03_PIN
312+
#define BTN_EN2 EXP1_05_PIN
313+
314+
#define LCD_PINS_ENABLE EXP1_08_PIN
315+
#define LCD_PINS_D4 EXP1_06_PIN
316+
317+
#else
318+
319+
#define LCD_PINS_RS EXP1_04_PIN
320+
321+
#define BTN_EN1 EXP2_03_PIN
322+
#define BTN_EN2 EXP2_05_PIN
323+
324+
#define LCD_PINS_ENABLE EXP1_03_PIN
325+
#define LCD_PINS_D4 EXP1_05_PIN
326+
327+
#if ENABLED(FYSETC_MINI_12864)
328+
#define DOGLCD_CS EXP1_03_PIN
329+
#define DOGLCD_A0 EXP1_04_PIN
330+
//#define LCD_BACKLIGHT_PIN -1
331+
#define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally.
332+
#if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
333+
#ifndef RGB_LED_R_PIN
334+
#define RGB_LED_R_PIN EXP1_06_PIN
335+
#endif
336+
#ifndef RGB_LED_G_PIN
337+
#define RGB_LED_G_PIN EXP1_07_PIN
338+
#endif
339+
#ifndef RGB_LED_B_PIN
340+
#define RGB_LED_B_PIN EXP1_08_PIN
341+
#endif
342+
#elif ENABLED(FYSETC_MINI_12864_2_1)
343+
#define NEOPIXEL_PIN EXP1_06_PIN
344+
#endif
345+
#endif // !FYSETC_MINI_12864
346+
347+
#if IS_ULTIPANEL
348+
#define LCD_PINS_D5 EXP1_06_PIN
349+
#define LCD_PINS_D6 EXP1_07_PIN
350+
#define LCD_PINS_D7 EXP1_08_PIN
351+
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
352+
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
353+
#endif
354+
#endif
355+
356+
#endif
357+
#endif // HAS_WIRED_LCD
358+
359+
// Alter timing for graphical display
360+
#if IS_U8GLIB_ST7920
361+
#define BOARD_ST7920_DELAY_1 120
362+
#define BOARD_ST7920_DELAY_2 80
363+
#define BOARD_ST7920_DELAY_3 580
364+
#endif
365+
366+
//
367+
// NeoPixel LED
368+
//
369+
#ifndef NEOPIXEL_PIN
370+
#define NEOPIXEL_PIN PC5
371+
#endif
372+
373+
//
374+
// MAX31865
375+
//
376+
#if HAS_MAX31865
377+
#define TEMP_0_CS_PIN PD11
378+
#define TEMP_0_SCK_PIN PE12
379+
#define TEMP_0_MISO_PIN PE13
380+
#define TEMP_0_MOSI_PIN PE14
381+
#endif

0 commit comments

Comments
 (0)