Просмотр исходного кода

Split up MKS_RUMBA32 into two variants (#16781)

Bob Kuhn 4 лет назад
Родитель
Сommit
78fea4a9ca
Аккаунт пользователя с таким Email не найден

+ 14
- 13
Marlin/src/core/boards.h Просмотреть файл

@@ -310,19 +310,20 @@
310 310
 #define BOARD_BEAST                   4200  // STM32F4xxVxT6 Libmaple-based STM32F4 controller
311 311
 #define BOARD_GENERIC_STM32F4         4201  // STM32 STM32GENERIC-based STM32F4 controller
312 312
 #define BOARD_ARMED                   4202  // Arm'ed STM32F4-based controller
313
-#define BOARD_RUMBA32                 4203  // RUMBA32 STM32F4-based controller
314
-#define BOARD_BLACK_STM32F407VE       4204  // BLACK_STM32F407VE
315
-#define BOARD_BLACK_STM32F407ZE       4205  // BLACK_STM32F407ZE
316
-#define BOARD_STEVAL_3DP001V1         4206  // STEVAL-3DP001V1 3D PRINTER BOARD
317
-#define BOARD_BTT_SKR_PRO_V1_1        4207  // BigTreeTech SKR Pro v1.1 (STM32F407ZG)
318
-#define BOARD_BTT_BTT002_V1_0         4208  // BigTreeTech BTT002 v1.0 (STM32F407VE)
319
-#define BOARD_BTT_GTR_V1_0            4209  // BigTreeTech GTR v1.0 (STM32F407IGT)
320
-#define BOARD_LERDGE_K                4210  // Lerdge K (STM32F407ZG)
321
-#define BOARD_LERDGE_X                4211  // Lerdge X (STM32F407VE)
322
-#define BOARD_VAKE403D                4212  // VAkE 403D (STM32F446VET6)
323
-#define BOARD_FYSETC_S6               4213  // FYSETC S6 board
324
-#define BOARD_FLYF407ZG               4214  // FLYF407ZG board (STM32F407ZG)
325
-#define BOARD_MKS_ROBIN2              4215  // MKS_ROBIN2 (STM32F407ZE)
313
+#define BOARD_RUMBA32_AUS3D           4203  // RUMBA32 STM32F446VET6 based controller from Aus3D
314
+#define BOARD_RUMBA32_MKS             4204  // RUMBA32 STM32F446VET6 based controller from Makerbase
315
+#define BOARD_BLACK_STM32F407VE       4205  // BLACK_STM32F407VE
316
+#define BOARD_BLACK_STM32F407ZE       4206  // BLACK_STM32F407ZE
317
+#define BOARD_STEVAL_3DP001V1         4207  // STEVAL-3DP001V1 3D PRINTER BOARD
318
+#define BOARD_BTT_SKR_PRO_V1_1        4208  // BigTreeTech SKR Pro v1.1 (STM32F407ZG)
319
+#define BOARD_BTT_BTT002_V1_0         4209  // BigTreeTech BTT002 v1.0 (STM32F407VE)
320
+#define BOARD_BTT_GTR_V1_0            4210  // BigTreeTech GTR v1.0 (STM32F407IGT)
321
+#define BOARD_LERDGE_K                4211  // Lerdge K (STM32F407ZG)
322
+#define BOARD_LERDGE_X                4212  // Lerdge X (STM32F407VE)
323
+#define BOARD_VAKE403D                4213  // VAkE 403D (STM32F446VET6)
324
+#define BOARD_FYSETC_S6               4214  // FYSETC S6 board
325
+#define BOARD_FLYF407ZG               4215  // FLYF407ZG board (STM32F407ZG)
326
+#define BOARD_MKS_ROBIN2              4216  // MKS_ROBIN2 (STM32F407ZE)
326 327
 
327 328
 //
328 329
 // ARM Cortex M7

+ 1
- 1
Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h Просмотреть файл

@@ -230,4 +230,4 @@
230 230
 #endif
231 231
 
232 232
 // Include common SKR pins
233
-#include "pins_BTT_SKR.h"
233
+#include "pins_BTT_SKR_common.h"

+ 1
- 1
Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h Просмотреть файл

@@ -369,4 +369,4 @@
369 369
  */
370 370
 
371 371
 // Include common SKR pins
372
-#include "pins_BTT_SKR.h"
372
+#include "pins_BTT_SKR_common.h"

+ 1
- 1
Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h Просмотреть файл

@@ -153,7 +153,7 @@
153 153
 //
154 154
 // Include common SKR pins
155 155
 //
156
-#include "pins_BTT_SKR.h"
156
+#include "pins_BTT_SKR_common.h"
157 157
 
158 158
 //
159 159
 // Software SPI pins for TMC2130 stepper drivers

Marlin/src/pins/lpc1768/pins_BTT_SKR.h → Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h Просмотреть файл


+ 8
- 2
Marlin/src/pins/pins.h Просмотреть файл

@@ -528,8 +528,10 @@
528 528
   #include "stm32/pins_GENERIC_STM32F4.h"       // STM32F4                                env:STM32F4
529 529
 #elif MB(ARMED)
530 530
   #include "stm32/pins_ARMED.h"                 // STM32F4                                env:ARMED
531
-#elif MB(RUMBA32)
532
-  #include "stm32/pins_RUMBA32.h"               // STM32F4                                env:rumba32_f446ve env:mks_rumba32
531
+#elif MB(RUMBA32_AUS3D)
532
+  #include "stm32/pins_RUMBA32_AUS3D.h"         // STM32F4                                env:rumba32_f446ve
533
+#elif MB(RUMBA32_MKS)
534
+  #include "stm32/pins_RUMBA32_MKS.h"           // STM32F4                                env:rumba32_mks
533 535
 #elif MB(BLACK_STM32F407VE)
534 536
   #include "stm32/pins_BLACK_STM32F407VE.h"     // STM32F4                                env:STM32F407VE_black
535 537
 #elif MB(STEVAL_3DP001V1)
@@ -607,6 +609,7 @@
607 609
   #define BOARD_BIGTREE_SKR_MINI_V1_1   -1015
608 610
   #define BOARD_BIGTREE_SKR_MINI_E3     -1016
609 611
   #define BOARD_BIGTREE_SKR_E3_DIP      -1017
612
+  #define BOARD_RUMBA32                 -1018
610 613
 
611 614
   #if MB(MKS_13)
612 615
     #error "BOARD_MKS_13 has been renamed BOARD_MKS_GEN_13. Please update your configuration."
@@ -646,6 +649,8 @@
646 649
     #error "BOARD_ESP32 has been renamed BOARD_ESPRESSIF_ESP32. Please update your configuration."
647 650
   #elif MB(STEVAL)
648 651
     #error "BOARD_STEVAL has been renamed BOARD_STEVAL_3DP001V1. Please update your configuration."
652
+  #elif MB(RUMBA32)
653
+    #error "BOARD_RUMBA32 is now BOARD_RUMBA32_MKS or BOARD_RUMBA32_AUS3D. Please update your configuration."
649 654
   #else
650 655
     #error "Unknown MOTHERBOARD value set in Configuration.h"
651 656
   #endif
@@ -668,6 +673,7 @@
668 673
   #undef BOARD_BIGTREE_SKR_PRO_V1_1
669 674
   #undef BOARD_BIGTREE_SKR_MINI_V1_1
670 675
   #undef BOARD_BIGTREE_SKR_E3_DIP
676
+  #undef BOARD_RUMBA32
671 677
 
672 678
 #endif
673 679
 

+ 42
- 0
Marlin/src/pins/stm32/pins_RUMBA32_AUS3D.h Просмотреть файл

@@ -0,0 +1,42 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (c) 2020 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 <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+#pragma once
23
+
24
+/**
25
+ * Pin assignments for the MKS RUMBA32
26
+ *
27
+ * https://aus3d.com.au/rumba32
28
+ * https://github.com/Aus3D/RUMBA32
29
+ *
30
+ * The MKS and Aus3D versions have the same pinout but the MKS version
31
+ * has some added resistors and LEDs.  The resistors needed for the
32
+ * TMC2208/9 UART interface are among the additions.  Also added were
33
+ * connectors and resistors dedicated to the TMC2130 sensorless homing
34
+ * interface.
35
+ */
36
+
37
+#define BOARD_INFO_NAME "Aus3D RUMBA32"
38
+
39
+#define RUMBA32_V1_0
40
+//#define I2C_EEPROM
41
+
42
+#include "pins_RUMBA32_common.h"

+ 109
- 0
Marlin/src/pins/stm32/pins_RUMBA32_MKS.h Просмотреть файл

@@ -0,0 +1,109 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (c) 2020 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 <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+#pragma once
23
+
24
+/**
25
+ * Pin assignments for the MKS RUMBA32
26
+ *
27
+ * https://github.com/makerbase-mks/MKS-RUMBA32
28
+ *
29
+ * The MKS and Aus3D versions have the same pinout but the MKS version
30
+ * has some added resistors and LEDs.  The resistors needed for the
31
+ * TMC2208/9  UART interface are among the additions.  Also added were
32
+ * connectors and resistors dedicated to the TMC2130 sensorless homing
33
+ * interface.
34
+ */
35
+
36
+#define BOARD_INFO_NAME "MKS RUMBA32"
37
+
38
+#define RUMBA32_V1_0
39
+#define ENABLE_SPI1
40
+//#define I2C_EEPROM
41
+
42
+#include "pins_RUMBA32_common.h"
43
+
44
+//
45
+// Software SPI pins for TMC2130 stepper drivers
46
+//
47
+#if ENABLED(TMC_USE_SW_SPI)
48
+  #ifndef TMC_SW_MOSI
49
+    #define TMC_SW_MOSI    PA7
50
+  #endif
51
+  #ifndef TMC_SW_MISO
52
+    #define TMC_SW_MISO    PA6
53
+  #endif
54
+  #ifndef TMC_SW_SCK
55
+    #define TMC_SW_SCK     PA5
56
+  #endif
57
+#endif
58
+
59
+#if HAS_TMC220x
60
+  /**
61
+   * TMC2208/TMC2209 stepper drivers
62
+   *
63
+   * Hardware serial communication ports.
64
+   * If undefined software serial is used according to the pins below
65
+   */
66
+  //#define X_HARDWARE_SERIAL  Serial
67
+  //#define X2_HARDWARE_SERIAL Serial1
68
+  //#define Y_HARDWARE_SERIAL  Serial1
69
+  //#define Y2_HARDWARE_SERIAL Serial1
70
+  //#define Z_HARDWARE_SERIAL  Serial1
71
+  //#define Z2_HARDWARE_SERIAL Serial1
72
+  //#define E0_HARDWARE_SERIAL Serial1
73
+  //#define E1_HARDWARE_SERIAL Serial1
74
+  //#define E2_HARDWARE_SERIAL Serial1
75
+  //#define E3_HARDWARE_SERIAL Serial1
76
+  //#define E4_HARDWARE_SERIAL Serial1
77
+
78
+  //
79
+  // Software serial
80
+  //
81
+  #define X_SERIAL_TX_PIN  PA3
82
+  #define X_SERIAL_RX_PIN  PC14
83
+
84
+  #define Y_SERIAL_TX_PIN  PA4
85
+  #define Y_SERIAL_RX_PIN  PE4
86
+
87
+  #define Z_SERIAL_TX_PIN  PD13
88
+  #define Z_SERIAL_RX_PIN  PE0
89
+
90
+  #define E0_SERIAL_TX_PIN PD14
91
+  #define E0_SERIAL_RX_PIN PC13
92
+
93
+  #define E1_SERIAL_TX_PIN PD15
94
+  #define E1_SERIAL_RX_PIN PD5
95
+
96
+  #define E2_SERIAL_TX_PIN PD12
97
+  #define E2_SERIAL_RX_PIN PD1
98
+#endif
99
+
100
+//
101
+// LCD / Controller
102
+//
103
+
104
+// Alter timing for graphical display
105
+#if HAS_GRAPHICAL_LCD
106
+  #define BOARD_ST7920_DELAY_1 DELAY_NS(96)
107
+  #define BOARD_ST7920_DELAY_2 DELAY_NS(48)
108
+  #define BOARD_ST7920_DELAY_3 DELAY_NS(600)
109
+#endif

Marlin/src/pins/stm32/pins_RUMBA32.h → Marlin/src/pins/stm32/pins_RUMBA32_common.h Просмотреть файл

@@ -21,17 +21,23 @@
21 21
  */
22 22
 #pragma once
23 23
 
24
+/**
25
+ * Common pin assignments for all RUMBA32 boards
26
+ */
27
+
24 28
 #ifndef STM32F4
25 29
   #error "Oops! Select an STM32F4 board in 'Tools > Board.'"
26 30
 #elif HOTENDS > 3 || E_STEPPERS > 3
27
-  #error "RUMBA32 supports up to 3 hotends / E-steppers."
31
+  #error "RUMBA32 boards support up to 3 hotends / E-steppers."
28 32
 #endif
29 33
 
30 34
 #define RUMBA32_V1_0
31
-#define BOARD_INFO_NAME      "RUMBA32"
32 35
 #define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
33 36
 
34 37
 //#define I2C_EEPROM
38
+#ifdef E2END
39
+  #undef E2END
40
+#endif
35 41
 #define E2END 0xFFF // 4KB
36 42
 
37 43
 //
@@ -119,12 +125,25 @@
119 125
 //
120 126
 // LCD / Controller
121 127
 //
122
-#define LCD_PINS_RS        PE10
123
-#define LCD_PINS_ENABLE    PE9
124
-#define LCD_PINS_D4        PE12
125
-#define LCD_PINS_D5        PE13
126
-#define LCD_PINS_D6        PE14
127
-#define LCD_PINS_D7        PE15
128
-#define BTN_EN1            PB1
129
-#define BTN_EN2            PB2
130
-#define BTN_ENC            PE7
128
+#if HAS_SPI_LCD
129
+
130
+  #define BTN_EN1          PB2
131
+  #define BTN_EN2          PB1
132
+  #define BTN_ENC          PE7
133
+
134
+  #define LCD_PINS_RS      PE10
135
+  #define LCD_PINS_ENABLE  PE9
136
+  #define LCD_PINS_D4      PE12
137
+
138
+  #if ENABLED(MKS_MINI_12864)
139
+    #define DOGLCD_CS      PE13
140
+    #define DOGLCD_A0      PE14
141
+  #endif
142
+
143
+  #if ENABLED(ULTIPANEL)
144
+    #define LCD_PINS_D5    PE13
145
+    #define LCD_PINS_D6    PE14
146
+    #define LCD_PINS_D7    PE15
147
+  #endif
148
+
149
+#endif

+ 2
- 2
platformio.ini Просмотреть файл

@@ -822,9 +822,9 @@ monitor_speed = 500000
822 822
 upload_protocol = dfu
823 823
 
824 824
 #
825
-# MKS RUMBA32(add TMC2208/2209 UART interface and AUX-1)
825
+# MKS RUMBA32 (adds TMC2208/2209 UART interface and AUX-1)
826 826
 #
827
-[env:mks_rumba32]
827
+[env:rumba32_mks]
828 828
 platform      = ststm32
829 829
 board         = rumba32_f446ve
830 830
 build_flags   = ${common.build_flags}

Загрузка…
Отмена
Сохранить