ソースを参照

✨ MKS TinyBee board support (#23340)

Co-Authored-By: Sola <42537573+solawc@users.noreply.github.com>
Sola 3年前
コミット
21cd715506
コミッターのメールアドレスに関連付けられたアカウントが存在しません
4個のファイルの変更215行の追加0行の削除
  1. 1
    0
      Marlin/src/core/boards.h
  2. 207
    0
      Marlin/src/pins/esp32/pins_MKS_TINYBEE.h
  3. 2
    0
      Marlin/src/pins/pins.h
  4. 5
    0
      ini/esp32.ini

+ 1
- 0
Marlin/src/core/boards.h ファイルの表示

@@ -433,6 +433,7 @@
433 433
 #define BOARD_FYSETC_E4               6005  // FYSETC E4
434 434
 #define BOARD_PANDA_ZHU               6006  // Panda_ZHU
435 435
 #define BOARD_PANDA_M4                6007  // Panda_M4
436
+#define BOARD_MKS_TINYBEE             6008  // MKS TinyBee based on ESP32 (with I2S stepper stream)
436 437
 
437 438
 //
438 439
 // SAMD51 ARM Cortex M4

+ 207
- 0
Marlin/src/pins/esp32/pins_MKS_TINYBEE.h ファイルの表示

@@ -0,0 +1,207 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (c) 2021 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
+/**
25
+ * MRR ESPE pin assignments
26
+ * MRR ESPE is a 3D printer control board based on the ESP32 microcontroller.
27
+ * Supports 5 stepper drivers (using I2S stepper stream), heated bed,
28
+ * single hotend, and LCD controller.
29
+ */
30
+
31
+#include "env_validate.h"
32
+
33
+#if EXTRUDERS > 2 || E_STEPPERS > 2
34
+  #error "MKS ESP Nano only supports two E Steppers. Comment out this line to continue."
35
+#elif HOTENDS > 2
36
+  #error "MKS ESP Nano only supports two hotend / E-stepper. Comment out this line to continue."
37
+#endif
38
+
39
+#define BOARD_INFO_NAME      "MKS TinyBee"
40
+#define BOARD_WEBSITE_URL    "https://github.com/makerbase-mks"
41
+#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
42
+
43
+//
44
+// Servos
45
+//
46
+#define SERVO0_PIN                             2
47
+
48
+//
49
+// Limit Switches
50
+//
51
+#define X_STOP_PIN                            33
52
+#define Y_STOP_PIN                            32
53
+#define Z_STOP_PIN                            22
54
+//#define FIL_RUNOUT_PIN                      35
55
+
56
+//
57
+// Enable I2S stepper stream
58
+//
59
+#define I2S_STEPPER_STREAM
60
+#if ENABLED(I2S_STEPPER_STREAM)
61
+  #define I2S_WS                              26
62
+  #define I2S_BCK                             25
63
+  #define I2S_DATA                            27
64
+  #if ENABLED(LIN_ADVANCE)
65
+    #error "I2S stream is currently incompatible with LIN_ADVANCE."
66
+  #endif
67
+#endif
68
+
69
+//
70
+// Steppers
71
+//
72
+#define X_STEP_PIN                           129
73
+#define X_DIR_PIN                            130
74
+#define X_ENABLE_PIN                         128
75
+
76
+#define Y_STEP_PIN                           132
77
+#define Y_DIR_PIN                            133
78
+#define Y_ENABLE_PIN                         131
79
+
80
+#define Z_STEP_PIN                           135
81
+#define Z_DIR_PIN                            136
82
+#define Z_ENABLE_PIN                         134
83
+
84
+#define E0_STEP_PIN                          138
85
+#define E0_DIR_PIN                           139
86
+#define E0_ENABLE_PIN                        137
87
+
88
+#define E1_STEP_PIN                          141
89
+#define E1_DIR_PIN                           142
90
+#define E1_ENABLE_PIN                        140
91
+
92
+#define Z2_STEP_PIN                          141
93
+#define Z2_DIR_PIN                           142
94
+#define Z2_ENABLE_PIN                        140
95
+
96
+//
97
+// Temperature Sensors
98
+//
99
+#define TEMP_0_PIN                            36  // Analog Input
100
+#define TEMP_1_PIN                            34  // Analog Input, you need set R6=0Ω and R7=NC
101
+#define TEMP_BED_PIN                          39  // Analog Input
102
+
103
+//
104
+// Heaters / Fans
105
+//
106
+#define HEATER_0_PIN                         145
107
+#define HEATER_1_PIN                         146
108
+#define FAN_PIN                              147
109
+#define FAN1_PIN                             148
110
+#define HEATER_BED_PIN                       144
111
+
112
+//#define CONTROLLER_FAN_PIN                 148
113
+//#define E0_AUTO_FAN_PIN                    148  // need to update Configuration_adv.h @section extruder
114
+//#define E1_AUTO_FAN_PIN                    149  // need to update Configuration_adv.h @section extruder
115
+
116
+//
117
+// MicroSD card
118
+//
119
+#define SD_MOSI_PIN                           23
120
+#define SD_MISO_PIN                           19
121
+#define SD_SCK_PIN                            18
122
+#define SDSS                                   5
123
+#define SD_DETECT_PIN                         34  // IO34 default is SD_DET signal(Jump to SDDET)
124
+#define USES_SHARED_SPI                           // SPI is shared by SD card with TMC SPI drivers
125
+
126
+/**
127
+ *                ------                                 ------
128
+ *  (BEEPER) 149 |10  9 | 13 (BTN_ENC)    (SPI MISO) 19 |10  9 | 18 (SPI SCK)
129
+ *  (LCD_EN)  21 | 8  7 |  4 (LCD_RS)      (BTN_EN1) 14 | 8  7 |  5 (SPI CS)
130
+ *  (LCD_D4)   0 | 6  5   16 (LCD_D5)      (BTN_EN2) 12 | 6  5   23 (SPI MOSI)
131
+ *  (LCD_D6)  15 | 4  3 | 17 (LCD_D7)      (SPI_DET) 34 | 4  3 | RESET
132
+ *           GND | 2  1 | 5V                        GND | 2  1 | 3.3V
133
+ *                ------                                 ------
134
+ *                 EXP1                                   EXP2
135
+ */
136
+
137
+#define EXP1_03_PIN                           17
138
+#define EXP1_04_PIN                           15
139
+#define EXP1_05_PIN                           16
140
+#define EXP1_06_PIN                            0
141
+#define EXP1_07_PIN                            4
142
+#define EXP1_08_PIN                           21
143
+#define EXP1_09_PIN                           13
144
+#define EXP1_10_PIN                          149
145
+
146
+#define EXP2_03_PIN                           -1  // RESET
147
+#define EXP2_04_PIN                           34
148
+#define EXP2_05_PIN                           23
149
+#define EXP2_06_PIN                           12
150
+#define EXP2_07_PIN                            5
151
+#define EXP2_08_PIN                           14
152
+#define EXP2_09_PIN                           18
153
+#define EXP2_10_PIN                           19
154
+
155
+#if HAS_WIRED_LCD
156
+
157
+  #define BEEPER_PIN                         149
158
+  #define BTN_ENC                             13
159
+  #define LCD_PINS_ENABLE                     21
160
+  #define LCD_PINS_RS                          4
161
+  #define BTN_EN1                             14
162
+  #define BTN_EN2                             12
163
+  #define LCD_BACKLIGHT_PIN                   -1
164
+
165
+  // MKS MINI12864 and MKS LCD12864B; If using MKS LCD12864A (Need to remove RPK2 resistor)
166
+  #if ENABLED(MKS_MINI_12864)
167
+
168
+    //#define LCD_BACKLIGHT_PIN               -1
169
+    //#define LCD_RESET_PIN                   -1
170
+    #define DOGLCD_A0                         15
171
+    #define DOGLCD_CS                         16
172
+    //#define DOGLCD_SCK                      19
173
+    //#define DOGLCD_MOSI                     23
174
+
175
+    // Required for MKS_MINI_12864 with this board
176
+    //#define MKS_LCD12864B
177
+
178
+  #elif ENABLED(MKS_MINI_12864_V3)
179
+
180
+    #define DOGLCD_CS                EXP1_08_PIN
181
+    #define DOGLCD_A0                EXP1_07_PIN
182
+    #define LCD_PINS_DC                DOGLCD_A0
183
+    #define LCD_BACKLIGHT_PIN                 -1
184
+    #define LCD_RESET_PIN            EXP1_06_PIN
185
+    #define NEOPIXEL_PIN             EXP1_05_PIN
186
+    #define DOGLCD_MOSI              EXP2_05_PIN
187
+    #define DOGLCD_SCK               EXP2_09_PIN
188
+    #if SD_CONNECTION_IS(ONBOARD)
189
+      #define FORCE_SOFT_SPI
190
+    #endif
191
+
192
+  #else // !MKS_MINI_12864
193
+
194
+    #define LCD_PINS_D4                        0
195
+    #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
196
+      #define LCD_PINS_D5                     16
197
+      #define LCD_PINS_D6                     15
198
+      #define LCD_PINS_D7                     17
199
+    #endif
200
+
201
+    #define BOARD_ST7920_DELAY_1              96
202
+    #define BOARD_ST7920_DELAY_2              48
203
+    #define BOARD_ST7920_DELAY_3             600
204
+
205
+  #endif // !MKS_MINI_12864
206
+
207
+#endif // HAS_WIRED_LCD

+ 2
- 0
Marlin/src/pins/pins.h ファイルの表示

@@ -711,6 +711,8 @@
711 711
   #include "esp32/pins_PANDA_ZHU.h"             // ESP32                                  env:PANDA
712 712
 #elif MB(PANDA_M4)
713 713
   #include "esp32/pins_PANDA_M4.h"              // ESP32                                  env:PANDA
714
+#elif MB(MKS_TINYBEE)
715
+  #include "esp32/pins_MKS_TINYBEE.h"           // ESP32                                  env:mks_tinybee
714 716
 
715 717
 //
716 718
 // Adafruit Grand Central M4 (SAMD51 ARM Cortex-M4)

+ 5
- 0
ini/esp32.ini ファイルの表示

@@ -37,3 +37,8 @@ lib_deps      = ${common.lib_deps}
37 37
 board_build.partitions = Marlin/src/HAL/ESP32/esp32.csv
38 38
 upload_speed  = 115200
39 39
 monitor_speed = 115200
40
+
41
+[env:mks_tinybee]
42
+extends                = env:esp32
43
+platform               = espressif32@2.1.0
44
+board_build.partitions = default_8MB.csv

読み込み中…
キャンセル
保存