瀏覽代碼

✨ Zonestar ZM3E2, ZM3E4 V1, ZM3E4 V2 (#22498)

ellensp 2 年之前
父節點
當前提交
5756f8898e
沒有連結到貢獻者的電子郵件帳戶。

+ 5
- 4
.github/workflows/test-builds.yml 查看文件

@@ -58,15 +58,16 @@ jobs:
58 58
 
59 59
         #- STM32F103RC_btt_maple
60 60
         - STM32F103RC_btt_USB_maple
61
-        - STM32F103RC_fysetc
61
+        - STM32F103RC_fysetc_maple
62 62
         - STM32F103RC_meeb
63
-        - jgaurora_a5s_a1
63
+        - jgaurora_a5s_a1_maple
64 64
         - STM32F103VE_longer_maple
65 65
         #- mks_robin_maple
66
-        - mks_robin_lite
67
-        - mks_robin_pro
66
+        - mks_robin_lite_maple
67
+        - mks_robin_pro_maple
68 68
         #- mks_robin_nano35_maple
69 69
         #- STM32F103RET6_creality_maple
70
+        - STM32F103VE_ZM3E4V2_USB_maple
70 71
 
71 72
         # STM32 (ST) Environments
72 73
 

+ 3
- 0
Marlin/src/core/boards.h 查看文件

@@ -346,6 +346,9 @@
346 346
 #define BOARD_BEAST                   4048  // STM32F103RET6 Libmaple-based controller
347 347
 #define BOARD_MINGDA_MPX_ARM_MINI     4049  // STM32F103ZET6 Mingda MD-16
348 348
 #define BOARD_GTM32_PRO_VD            4050  // STM32F103VET6 controller
349
+#define BOARD_ZONESTAR_ZM3E2          4051  // Zonestar ZM3E2    (STM32F103RCT6)
350
+#define BOARD_ZONESTAR_ZM3E4          4052  // Zonestar ZM3E4 V1 (STM32F103VCT6)
351
+#define BOARD_ZONESTAR_ZM3E4V2        4053  // Zonestar ZM3E4 V2 (STM32F103VCT6)
349 352
 
350 353
 //
351 354
 // ARM Cortex-M4F

+ 1
- 1
Marlin/src/lcd/tft_io/touch_calibration.cpp 查看文件

@@ -1,6 +1,6 @@
1 1
 /**
2 2
  * Marlin 3D Printer Firmware
3
- * Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
3
+ * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 4
  *
5 5
  * This program is free software: you can redistribute it and/or modify
6 6
  * it under the terms of the GNU General Public License as published by

+ 1
- 1
Marlin/src/lcd/tft_io/touch_calibration.h 查看文件

@@ -1,6 +1,6 @@
1 1
 /**
2 2
  * Marlin 3D Printer Firmware
3
- * Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
3
+ * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 4
  *
5 5
  * This program is free software: you can redistribute it and/or modify
6 6
  * it under the terms of the GNU General Public License as published by

+ 1
- 1
Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h 查看文件

@@ -212,7 +212,7 @@
212 212
   *        BEEPER | 5  6   ENT (BTN_ENC)      (LCD_D4) P0_15 | 5  6   P0_20 (BTN_EN2)
213 213
   *  (SKR_RX1) TX | 7  8 | RX  (SKR_TX1)               Reset | 7  8 | P0_19 (BTN_EN1)
214 214
   *            NC | 9 10 | NC                (BTN_ENC) P0_16 | 9 10 | P2_08 (BEEPER)
215
-  *                ------					                            ------
215
+  *                ------                                     ------
216 216
   */
217 217
 
218 218
   #define BEEPER_PIN                 EXP1_10_PIN

+ 6
- 0
Marlin/src/pins/pins.h 查看文件

@@ -561,6 +561,12 @@
561 561
   #include "stm32f1/pins_BEAST.h"               // STM32F103VE?                           env:STM32F103VE env:STM32F103RE_maple
562 562
 #elif MB(MINGDA_MPX_ARM_MINI)
563 563
   #include "stm32f1/pins_MINGDA_MPX_ARM_MINI.h" // STM32F1                                env:mingda_mpx_arm_mini
564
+#elif MB(ZONESTAR_ZM3E2)
565
+  #include "stm32f1/pins_ZM3E2_V1_0.h"       	  // STM32F1                            	  env:STM32F103RC_ZM3E2_USB env:STM32F103RC_ZM3E2_USB_maple
566
+#elif MB(ZONESTAR_ZM3E4)
567
+  #include "stm32f1/pins_ZM3E4_V1_0.h"      	  // STM32F1                           	    env:STM32F103VC_ZM3E4_USB env:STM32F103VC_ZM3E4_USB_maple
568
+#elif MB(ZONESTAR_ZM3E4V2)
569
+  #include "stm32f1/pins_ZM3E4_V2_0.h"      	  // STM32F1                           	    env:STM32F103VE_ZM3E4V2_USB env:STM32F103VE_ZM3E4V2_USB_maple
564 570
 
565 571
 //
566 572
 // ARM Cortex-M4F

+ 1
- 1
Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h 查看文件

@@ -23,7 +23,7 @@
23 23
 
24 24
 #define SKR_MINI_E3_V2
25 25
 
26
-#define BOARD_CUSTOM_BUILD_FLAGS -DTONE_CHANNEL=4 -DTONE_TIMER=4
26
+#define BOARD_CUSTOM_BUILD_FLAGS -DTONE_CHANNEL=4 -DTONE_TIMER=4 -DTIMER_TONE=4
27 27
 
28 28
 // Onboard I2C EEPROM
29 29
 #if NO_EEPROM_SELECTED

+ 11
- 6
Marlin/src/pins/stm32f1/pins_JGAURORA_A5S_A1.h 查看文件

@@ -45,14 +45,19 @@
45 45
 #endif
46 46
 
47 47
 //#define MCU_STM32F103ZE // not yet required
48
-// Enable EEPROM Emulation for this board, so that we don't overwrite factory data
49 48
 
50
-//#define I2C_EEPROM                              // AT24C64
51
-//#define MARLIN_EEPROM_SIZE            0x8000UL  // 64KB
49
+// Enable EEPROM Emulation for this board, so that we don't overwrite factory data
50
+#if NO_EEPROM_SELECTED
51
+  //#define I2C_EEPROM                            // AT24C64
52
+  //#define FLASH_EEPROM_EMULATION
53
+#endif
52 54
 
53
-//#define FLASH_EEPROM_EMULATION
54
-//#define MARLIN_EEPROM_SIZE            0x1000UL  // 4KB
55
-//#define MARLIN_EEPROM_SIZE (EEPROM_START_ADDRESS + (EEPROM_PAGE_SIZE) * 2UL)
55
+#if ENABLED(I2C_EEPROM)
56
+  //#define MARLIN_EEPROM_SIZE          0x8000UL  // 32KB
57
+#elif ENABLED(FLASH_EEPROM_EMULATION)
58
+  //#define MARLIN_EEPROM_SIZE          0x1000UL  // 4KB
59
+  //#define MARLIN_EEPROM_SIZE (EEPROM_START_ADDRESS + (EEPROM_PAGE_SIZE) * 2UL)
60
+#endif
56 61
 
57 62
 //
58 63
 // Limit Switches

+ 1
- 1
Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h 查看文件

@@ -22,7 +22,7 @@
22 22
 #pragma once
23 23
 
24 24
 /**
25
- * MKS Robin mini (STM32F130VET6) board pin assignments
25
+ * MKS Robin mini (STM32F103VET6) board pin assignments
26 26
  */
27 27
 
28 28
 #if NOT_TARGET(STM32F1, STM32F1xx)

+ 1
- 1
Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h 查看文件

@@ -22,7 +22,7 @@
22 22
 #pragma once
23 23
 
24 24
 /**
25
- * MKS Robin (STM32F130ZET6) board pin assignments
25
+ * MKS Robin (STM32F103ZET6) board pin assignments
26 26
  * https://github.com/makerbase-mks/MKS-Robin/tree/master/MKS%20Robin/Hardware
27 27
  */
28 28
 

+ 1
- 1
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h 查看文件

@@ -22,7 +22,7 @@
22 22
 #pragma once
23 23
 
24 24
 /**
25
- * MKS Robin nano (STM32F130VET6) board pin assignments
25
+ * MKS Robin nano (STM32F103VET6) board pin assignments
26 26
  */
27 27
 
28 28
 #include "env_validate.h"

+ 1
- 1
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h 查看文件

@@ -22,7 +22,7 @@
22 22
 #pragma once
23 23
 
24 24
 /**
25
- * MKS Robin mini (STM32F130VET6) board pin assignments
25
+ * MKS Robin mini (STM32F103VET6) board pin assignments
26 26
  */
27 27
 
28 28
 #include "env_validate.h"

+ 1
- 1
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h 查看文件

@@ -22,7 +22,7 @@
22 22
 #pragma once
23 23
 
24 24
 /**
25
- * MKS Robin nano (STM32F130VET6) board pin assignments
25
+ * MKS Robin nano (STM32F103VET6) board pin assignments
26 26
  * https://github.com/makerbase-mks/MKS-Robin-Nano-V1.X/tree/master/hardware
27 27
  */
28 28
 

+ 1
- 1
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h 查看文件

@@ -22,7 +22,7 @@
22 22
 #pragma once
23 23
 
24 24
 /**
25
- * MKS Robin nano (STM32F130VET6) board pin assignments
25
+ * MKS Robin nano (STM32F103VET6) board pin assignments
26 26
  */
27 27
 
28 28
 #if NOT_TARGET(__STM32F1__, STM32F1)

+ 1
- 1
Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h 查看文件

@@ -22,7 +22,7 @@
22 22
 #pragma once
23 23
 
24 24
 /**
25
- * ANYCUBIC Trigorilla Pro (STM32F130ZET6) board pin assignments.
25
+ * ANYCUBIC Trigorilla Pro (STM32F103ZET6) board pin assignments.
26 26
  * It is the same used by the Tronxy X5SA thanks to ftoz1 for sharing it
27 27
  * https://github.com/MarlinFirmware/Marlin/issues/14655
28 28
  * https://github.com/MarlinFirmware/Marlin/files/3401484/x5sa-main_board-2.pdf

+ 235
- 0
Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h 查看文件

@@ -0,0 +1,235 @@
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 <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+#pragma once
23
+
24
+#include "env_validate.h"
25
+
26
+#define BOARD_INFO_NAME "ZONESTAR ZM3E2 V1.0"
27
+
28
+#define DISABLE_DEBUG
29
+//#define DISABLE_JTAG
30
+
31
+#if NO_EEPROM_SELECTED
32
+  #define FLASH_EEPROM_EMULATION
33
+  #define EEPROM_PAGE_SIZE      (0x800) // 2KB
34
+  #define EEPROM_START_ADDRESS  (0x08000000 + (STM32_FLASH_SIZE) * 1024 - 2 * EEPROM_PAGE_SIZE)
35
+  #define MARLIN_EEPROM_SIZE    EEPROM_PAGE_SIZE  // 2KB
36
+#endif
37
+
38
+//=============================================================================
39
+// Zonestar ZM3E2 V1.0 (STM32F103RCT6) board pin assignments
40
+//=============================================================================
41
+//  PA0     PWR_HOLD    |  PB0     BEEP            |  PC0     HEATER_0
42
+//  PA1     FAN_PIN     |  PB1     KILL            |  PC1     HEATER_BED
43
+//  PA2     TX2         |  PB2     LCD_SDA         |  PC2     TEMP_BED
44
+//  PA3     RX2         |  PB3     E1_EN           |  PC3     TEMP_E0
45
+//  PA4     SD_CS       |  PB4     Z_STOP          |  PC4     SD_DETECT
46
+//  PA5     SD_SCK      |  PB5     Z_DIR           |  PC5     BTN_EN2
47
+//  PA6     SD_MISO     |  PB6     Z_STEP          |  PC6     FAN1
48
+//  PA7     SD_MOSI     |  PB7     Z_EN            |  PC7     FIL_RUNOUT
49
+//  PA8     X_DIR       |  PB8     Y_STEP          |  PC8     X_EN
50
+//  PA9     LCD_RS      |  PB9     Y_DIR           |  PC9     X_STEP
51
+//  PA10    LCD_SCK     |  PB10    BTN_ENC         |  PC10    Z_MIN_PROBE_PIN
52
+//  PA11    USB_D-      |  PB11    BTN_EN1         |  PC11    FIL_RUNOUT2
53
+//  PA12    USB_D+      |  PB12    LED             |  PC12    E1_DIR
54
+//  PA13    MS1         |  PB13    E0_EN           |  PC13    Y_STOP
55
+//  PA14    MS2         |  PB14    E0_STEP         |  PC14    Y_EN
56
+//  PA15    PWM         |  PB15    E0_DIR          |  PC15    X_STOP
57
+//  PD0     NC
58
+//  PD1     NC
59
+//  PD2     E1_STEP
60
+
61
+//=============================================================================
62
+// EXP1 connector
63
+//     MARK     I/O     ZONESTAR_12864LCD      ZONESTAR_12864OLED
64
+//  10 MOSI     PB1     KILL                   SDA
65
+//   9 SCK      PB0     BEEP                   SCK
66
+//   8 TX1      PA9     DOGLCD_CS              CS
67
+//   7 RX1      PA10    DOGLCD_SCK             DC
68
+//   6 ENA      PC5     BTN_EN2                KNOB_ENB
69
+//   5 DAT      PB2     DOGLCD_MOSI            RESET
70
+//   4 TX3      PB10    BTN_ENC                KNOB_ENC
71
+//   3 RX3      PB11    BTN_EN1                KNOB_ENA
72
+//   2 +5V
73
+//   1 GND
74
+
75
+#define EXP1_03_PIN                         PB11
76
+#define EXP1_04_PIN                         PB10
77
+#define EXP1_05_PIN                         PB2
78
+#define EXP1_06_PIN                         PC5
79
+#define EXP1_07_PIN                         PA10
80
+#define EXP1_08_PIN                         PA9
81
+#define EXP1_09_PIN                         PB0
82
+#define EXP1_10_PIN                         PB1
83
+
84
+// AUX1 connector
85
+//  1 +5V
86
+//  2 TX2   PA2   UART2_TX
87
+//  3 RX2   PA3   UART2_RX
88
+//  4 GND
89
+
90
+// AUX2 connector to BLTouch
91
+//  1 +5V
92
+//  2 SEN   PC10
93
+//  3 PWM   PA15
94
+//  4 GND
95
+//=============================================================================
96
+
97
+//
98
+// Servos
99
+//
100
+#define SERVO0_PIN                          PA15
101
+
102
+//
103
+// Limit Switches
104
+//
105
+#define X_STOP_PIN                          PC15
106
+#define Y_STOP_PIN                          PC13
107
+#define Z_STOP_PIN                          PB4
108
+
109
+#ifndef Z_MIN_PROBE_PIN
110
+  #define Z_MIN_PROBE_PIN                   PC10  // BLTouch (3DTouch)
111
+#endif
112
+
113
+//
114
+// Filament Runout Sensor
115
+//
116
+#define FIL_RUNOUT_PIN                      PC7   // E0_SW
117
+//#define FIL_RUNOUT2_PIN                   PC11  // E1_SW
118
+
119
+//
120
+// Steppers
121
+//
122
+#define MS1_PIN                             PA13
123
+#define MS2_PIN                             PA14
124
+
125
+#define X_STEP_PIN                          PC9
126
+#define X_DIR_PIN                           PA8
127
+#define X_ENABLE_PIN                        PC8
128
+
129
+#define Y_STEP_PIN                          PB8
130
+#define Y_DIR_PIN                           PB9
131
+#define Y_ENABLE_PIN                        PC14
132
+
133
+#define Z_STEP_PIN                          PB6
134
+#define Z_DIR_PIN                           PB5
135
+#define Z_ENABLE_PIN                        PB7
136
+
137
+#define E0_STEP_PIN                         PB14
138
+#define E0_DIR_PIN                          PB15
139
+#define E0_ENABLE_PIN                       PB13
140
+
141
+#define E1_STEP_PIN                         PD2
142
+#define E1_DIR_PIN                          PC12
143
+#define E1_ENABLE_PIN                       PB3
144
+
145
+//
146
+// Heaters / Fans
147
+//
148
+#define HEATER_0_PIN                        PC0   // EXTRUDER 1
149
+#define HEATER_BED_PIN                      PC1   // BED
150
+
151
+#define FAN1_PIN                            PC6
152
+#define FAN_PIN                             PA1
153
+
154
+//
155
+// Temperature Sensors
156
+//
157
+#define TEMP_BED_PIN                        PC2   // Analog Input
158
+#define TEMP_0_PIN                          PC3   // Analog Input
159
+
160
+#define LED_PIN                             PB12
161
+//#define KILL_PIN                          PB1   // @EXP1
162
+#define SUICIDE_PIN                         PA0
163
+
164
+//
165
+// SD card
166
+//
167
+#define ENABLE_SPI1
168
+#define SD_DETECT_PIN                       PC4
169
+#define SD_SCK_PIN                          PA5
170
+#define SD_MISO_PIN                         PA6
171
+#define SD_MOSI_PIN                         PA7
172
+#define SD_SS_PIN                           PA4
173
+
174
+//
175
+// LCD Pins
176
+//
177
+#if ENABLED(ZONESTAR_12864LCD)
178
+
179
+  //================================================================================
180
+  // LCD 128x64
181
+  //================================================================================
182
+  // EXP1 connector
183
+  //     MARK     I/O     ZONESTAR_12864LCD
184
+  //  10 MOSI     PB1     KILL
185
+  //   9 SCK      PB0     BEEP
186
+  //   8 TX1      PA9     LCD_PINS_RS
187
+  //   7 RX1      PA10    LCD_PINS_D4
188
+  //   6 ENA      PC5     BTN_EN2
189
+  //   5 DAT      PB2     LCD_PINS_ENABLE
190
+  //   4 TX3      PB10    BTN_ENC
191
+  //   3 RX3      PB11    BTN_EN1
192
+  //   2 +5V
193
+  //   1 GND
194
+
195
+  #define LCDSCREEN_NAME "ZONESTAR LCD12864"
196
+  #define LCD_PINS_RS                EXP1_08_PIN
197
+  #define LCD_PINS_ENABLE            EXP1_05_PIN
198
+  #define LCD_PINS_D4                EXP1_07_PIN
199
+  //#define KILL_PIN                 EXP1_10_PIN
200
+  #define BEEPER_PIN                 EXP1_09_PIN
201
+  #define BTN_EN1                    EXP1_03_PIN
202
+  #define BTN_EN2                    EXP1_06_PIN
203
+  #define BTN_ENC                    EXP1_04_PIN
204
+  #define BOARD_ST7920_DELAY_1 DELAY_NS(125)
205
+  #define BOARD_ST7920_DELAY_2 DELAY_NS(200)
206
+  #define BOARD_ST7920_DELAY_3 DELAY_NS(125)
207
+
208
+#elif EITHER(ZONESTAR_12864OLED, ZONESTAR_12864OLED_SSD1306)
209
+
210
+  //================================================================================
211
+  // OLED 128x64
212
+  //================================================================================
213
+  //  10 MOSI   PB1   OLED_SDA
214
+  //   9 SCK    PB0   OLED_SCK
215
+  //   8 TX1    PA9   OLED_CS
216
+  //   7 RX1    PA10  OLED_DC
217
+  //   6 ENA    PC5   KNOB_ENA
218
+  //   5 DAT    PB2   OLED_RESET
219
+  //   4 TX3    PB10  KNOB_ENC
220
+  //   3 RX3    PB11  KNOB_ENB
221
+
222
+  #define FORCE_SOFT_SPI
223
+  #define LCDSCREEN_NAME "ZONESTAR 12864OLED"
224
+  #define LCD_PINS_RS                EXP1_05_PIN  // = LCD_RESET_PIN
225
+  #define LCD_PINS_DC                EXP1_07_PIN  // DC
226
+  #define DOGLCD_CS                  EXP1_08_PIN  // CS
227
+  #define DOGLCD_A0                  LCD_PINS_DC  // A0 = DC
228
+  #define DOGLCD_MOSI                EXP1_10_PIN  // SDA
229
+  #define DOGLCD_SCK                 EXP1_09_PIN  // SCK
230
+  // Encoder
231
+  #define BTN_EN1                    EXP1_03_PIN
232
+  #define BTN_EN2                    EXP1_06_PIN
233
+  #define BTN_ENC                    EXP1_04_PIN
234
+
235
+#endif

+ 355
- 0
Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h 查看文件

@@ -0,0 +1,355 @@
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 <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+#pragma once
23
+
24
+#include "env_validate.h"
25
+
26
+#define BOARD_INFO_NAME "ZONESTAR ZM3E4 V1.0"
27
+
28
+//#define DISABLE_DEBUG
29
+#define DISABLE_JTAG
30
+
31
+#if NO_EEPROM_SELECTED
32
+  #define FLASH_EEPROM_EMULATION
33
+  #define EEPROM_PAGE_SIZE      (0x800) // 2KB
34
+  #define EEPROM_START_ADDRESS  (0x08000000 + (STM32_FLASH_SIZE) * 1024 - 2 * EEPROM_PAGE_SIZE)
35
+  #define MARLIN_EEPROM_SIZE    EEPROM_PAGE_SIZE  // 2KB
36
+#endif
37
+
38
+//#define OPTION_DUALZ_DRIVE
39
+//#define OPTION_Z2_ENDSTOP
40
+//#define SWITCH_EXTRUDER_SEQUENCE
41
+
42
+//=============================================================================
43
+// Zonestar ZM3E4 V1.0 (STM32F103VCT6) board pin assignments
44
+//=============================================================================
45
+//  PA0                 |  PB0     HEAT_1          |  PC0         AXU_SDA
46
+//  PA1                 |  PB1     FAN1            |  PC1         TEMP_E1
47
+//  PA2     HEAT_BED    |  PB2     BOOT1           |  PC2         TEMP_E0
48
+//  PA3     PWR_HOLD    |  PB3     SPI3_SCK        |  PC3         TEMP_BED
49
+//  PA4     SD_CS       |  PB4     SPI3_MISO       |  PC4         SD_DETECT
50
+//  PA5     SD_SCK      |  PB5     SPI3_MOSI       |  PC5         HEAT_0
51
+//  PA6     SD_MISO     |  PB6     SERVO3          |  PC6         E1_STEP
52
+//  PA7     SD_MOSI     |  PB7     SERVO2          |  PC7         E1_EN
53
+//  PA8     X_DIR       |  PB8     FAN2/SERVO1     |  PC8         FIL_RUNOUT_PIN
54
+//  PA9     UART1_RX    |  PB9     SERVO0          |  PC9         E0_DIR
55
+//  PA10    UART1_TX    |  PB10    TX3             |  PC10        E0_EN
56
+//  PA11    USB_D-      |  PB11    RX3             |  PC11        Z2_EN
57
+//  PA12    USB_D+      |  PB12    LED             |  PC12        Z2_STEP
58
+//  PA13    SWD_SDO     |  PB13    Z1_MAX          |  PC13        X_MIN
59
+//  PA14    SWD_SCK     |  PB14    Y_MAX           |  PC14        WIFI_RST
60
+//  PA15    SPI3_CS     |  PB15    PWR_DET         |  PC15        WIFI_CS
61
+//  PD0     Z2_DIR      |  PE0     Y_EN
62
+//  PD1     Z2_MIN      |  PE1     Y_STEP
63
+//  PD2     Z1_EN       |  PE2     Y_DIR
64
+//  PD3     Z1_STEP     |  PE3     Y_MIN
65
+//  PD4     Z1_DIR      |  PE4     X_DIR
66
+//  PD5     WIFI_RXD    |  PE5     X_STEP
67
+//  PD6     WIFI_TXD    |  PE6     X_EN
68
+//  PD7     Z1_MIN      |  PE7     AXU_SCL
69
+//  PD8     X_MAX       |  PE8     BTN_EN1
70
+//  PD9     E3_DIR      |  PE9     LCD_SCK
71
+//  PD10    E3_STEP     |  PE10    LCD_MOSI
72
+//  PD11    E3_EN       |  PE11    BEEPER
73
+//  PD12    E2_DIR      |  PE12    LCD_EN
74
+//  PD13    E2_STEP     |  PE13    KILL
75
+//  PD14    E2_EN       |  PE14    BTN_EN2
76
+//  PD15    E1_DIR      |  PE15    BTN_ENC
77
+//=============================================================================
78
+
79
+// EXP1 connector
80
+//     MARK     I/O     ZONESTAR_LCD12864   REPRAPDISCOUNT_LCD12864
81
+//  10 RS       PE13    KILL                BTN_ENC
82
+//   9 BP       PE11    BEEP                BEEP
83
+//   8 EN       PE12    DOGLCD_CS           LCDRS
84
+//   7 MOSI     PE10    DOGLCD_SCK          LCDE
85
+//   6 EN1      PE8     BTN_EN1             NC
86
+//   5 SCK      PE9     DOGLCD_MOSI         LCD4
87
+//   4 ENC      PE15    BTN_ENC             NC
88
+//   3 EN2      PE14    BTN_EN2             NC
89
+//   2 +5V                    +5V
90
+//   1 GND                    GND
91
+
92
+#define EXP1_03_PIN                         PE14
93
+#define EXP1_04_PIN                         PE15
94
+#define EXP1_05_PIN                         PE9
95
+#define EXP1_06_PIN                         PE8
96
+#define EXP1_07_PIN                         PE10
97
+#define EXP1_08_PIN                         PE12
98
+#define EXP1_09_PIN                         PE11
99
+#define EXP1_10_PIN                         PE13
100
+
101
+// EXP2 connector
102
+//     MARK     I/O     ZONESTAR_LCD12864   REPRAPDISCOUNT_LCD12864
103
+//  10
104
+//   9
105
+//   8 RX0      PA9     UART1_RX
106
+//   7 TX0      PA10    UART1_TX            BTN_EN2
107
+//   6 CS3      PA15
108
+//   5 MISO3    PB4                         BTN_EN1
109
+//   4 MOSI3    PB5                         KILL
110
+//   3 SCK3     PB3
111
+//   2 +5V                    +5V
112
+//   1 GND                    GND
113
+
114
+#define EXP2_03_PIN                         PB3
115
+#define EXP2_04_PIN                         PB5
116
+#define EXP2_05_PIN                         PB4
117
+#define EXP2_06_PIN                         PA15
118
+#define EXP2_07_PIN                         PA10
119
+#define EXP2_08_PIN                         PA9
120
+
121
+// AUX1 connector
122
+//  1 +5V
123
+//  2 GND
124
+//  3 RX3       PB11    UART3_RX
125
+//  4 TX3       PB10    UART3_TX
126
+//  5 SCL       PE7
127
+//  6 SDA       PC0
128
+
129
+// WiFi
130
+//  1 +5V
131
+//  2 GND
132
+//  3 WIFI_TXD  PD5     UART2_RX
133
+//  4 WIFI_RXD  PD6     UART2_TX
134
+//  5 WIFI_RST  PC14
135
+//  6 WIFI_CS   PC15
136
+//=============================================================================
137
+
138
+//
139
+// Servos
140
+//
141
+#define SERVO0_PIN                          PB9
142
+#define SERVO2_PIN                          PB7
143
+#define SERVO3_PIN                          PB6
144
+
145
+//
146
+// Limit Switches
147
+//
148
+#define X_MIN_PIN                           PC13
149
+#define X_MAX_PIN                           PD8
150
+#define Y_MIN_PIN                           PE3
151
+#define Y_MAX_PIN                           PB14
152
+#define Z_MIN_PIN                           PD7
153
+#define Z_MAX_PIN                           PB13
154
+
155
+//
156
+// Filament Runout Sensor
157
+//
158
+#ifndef FIL_RUNOUT_PIN
159
+  #define FIL_RUNOUT_PIN                    PC8
160
+#endif
161
+
162
+//
163
+// Steppers
164
+//
165
+#if ENABLED(COREXY)
166
+  #define X_ENABLE_PIN                      PE0
167
+  #define X_STEP_PIN                        PE1
168
+  #define X_DIR_PIN                         PE2
169
+
170
+  #define Y_ENABLE_PIN                      PE6
171
+  #define Y_STEP_PIN                        PE5
172
+  #define Y_DIR_PIN                         PE4
173
+#else
174
+  #define X_ENABLE_PIN                      PE6
175
+  #define X_STEP_PIN                        PE5
176
+  #define X_DIR_PIN                         PE4
177
+
178
+  #define Y_ENABLE_PIN                      PE0
179
+  #define Y_STEP_PIN                        PE1
180
+  #define Y_DIR_PIN                         PE2
181
+#endif
182
+
183
+#define Z_ENABLE_PIN                        PD2
184
+#define Z_STEP_PIN                          PD3
185
+#define Z_DIR_PIN                           PD4
186
+
187
+#ifdef OPTION_DUALZ_DRIVE
188
+  #define Z2_ENABLE_PIN                     PC11
189
+  #define Z2_STEP_PIN                       PC12
190
+  #define Z2_DIR_PIN                        PD0
191
+#endif
192
+
193
+#ifdef OPTION_Z2_ENDSTOP
194
+  #define Z2_MIN_PIN                        PD1
195
+  #define Z2_MAX_PIN                        PB12
196
+#endif
197
+
198
+#ifdef SWITCH_EXTRUDER_SEQUENCE
199
+  #define E3_ENABLE_PIN                     PC10
200
+  #define E3_STEP_PIN                       PA8
201
+  #define E3_DIR_PIN                        PC9
202
+
203
+  #define E2_STEP_PIN                       PC6
204
+  #define E2_DIR_PIN                        PD15
205
+  #define E2_ENABLE_PIN                     PC7
206
+
207
+  #define E1_STEP_PIN                       PD13
208
+  #define E1_DIR_PIN                        PD12
209
+  #define E1_ENABLE_PIN                     PD14
210
+
211
+  #define E0_STEP_PIN                       PD10
212
+  #define E0_DIR_PIN                        PD9
213
+  #define E0_ENABLE_PIN                     PD11
214
+#else
215
+  #define E0_ENABLE_PIN                     PC10
216
+  #define E0_STEP_PIN                       PA8
217
+  #define E0_DIR_PIN                        PC9
218
+
219
+  #define E1_STEP_PIN                       PC6
220
+  #define E1_DIR_PIN                        PD15
221
+  #define E1_ENABLE_PIN                     PC7
222
+
223
+  #define E2_STEP_PIN                       PD13
224
+  #define E2_DIR_PIN                        PD12
225
+  #define E2_ENABLE_PIN                     PD14
226
+
227
+  #define E3_STEP_PIN                       PD10
228
+  #define E3_DIR_PIN                        PD9
229
+  #define E3_ENABLE_PIN                     PD11
230
+#endif
231
+
232
+//
233
+// Temperature Sensors
234
+//
235
+#define TEMP_0_PIN                          PC2   // TH0
236
+#define TEMP_BED_PIN                        PC3   // TB1
237
+
238
+//
239
+// Heaters / Fans
240
+//
241
+#define HEATER_0_PIN                        PC5   // HEATER0
242
+#define HEATER_BED_PIN                      PA2   // HOT BED
243
+
244
+#if ENABLED(OPTION_CHAMBER)
245
+  #define TEMP_CHAMBER_PIN                  PC1
246
+  #define HEATER_CHAMBER_PIN                PB0
247
+#else
248
+  #define TEMP_1_PIN                        PC1   // TH1
249
+  #define HEATER_1_PIN                      PB0   // HEATER1
250
+#endif
251
+
252
+#define FAN_PIN                             PB1   // FAN1
253
+#define FAN1_PIN                            PB8   // FAN2
254
+
255
+//
256
+// Misc. Functions
257
+//
258
+
259
+//#define POWER_LOSS_PIN                    PB15
260
+#define LED_PIN                             PA0
261
+#define SUICIDE_PIN                         PA3
262
+
263
+//
264
+// SD card
265
+//
266
+#define ENABLE_SPI1
267
+#define SD_DETECT_PIN                       PC4
268
+#define SD_SCK_PIN                          PA5
269
+#define SD_MISO_PIN                         PA6
270
+#define SD_MOSI_PIN                         PA7
271
+#define SD_SS_PIN                           PA4
272
+
273
+// WiFi Functions
274
+#define WIFI_RST                            PC15
275
+#define WIFI_EN                             PC14
276
+
277
+//
278
+// LCD / Controller
279
+//
280
+#if ENABLED(ZONESTAR_12864LCD)
281
+  #define LCDSCREEN_NAME "ZONESTAR LCD12864"
282
+  #define LCD_PINS_RS                EXP1_08_PIN  // 7 CS make sure for zonestar zm3e4!
283
+  #define LCD_PINS_ENABLE            EXP1_05_PIN  // 6 DATA make sure for zonestar zm3e4!
284
+  #define LCD_PINS_D4                EXP1_07_PIN  // 8 SCK make sure for zonestar zm3e4!
285
+  #define BEEPER_PIN                 EXP1_09_PIN
286
+  #define KILL_PIN                          -1    // EXP1_10_PIN
287
+  #define BTN_EN1                    EXP1_06_PIN
288
+  #define BTN_EN2                    EXP1_03_PIN
289
+  #define BTN_ENC                    EXP1_04_PIN
290
+#elif ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
291
+  #define LCDSCREEN_NAME "REPRAPDISCOUNT LCD12864"
292
+  #define LCD_PINS_RS                EXP1_08_PIN  // 7 CS make sure for zonestar zm3e4!
293
+  #define LCD_PINS_ENABLE            EXP1_07_PIN  // 6 DATA make sure for zonestar zm3e4!
294
+  #define LCD_PINS_D4                EXP1_05_PIN  // 8 SCK make sure for zonestar zm3e4!
295
+  #define BEEPER_PIN                 EXP1_09_PIN
296
+  #define KILL_PIN                   EXP2_04_PIN
297
+  #define BTN_EN1                    EXP2_05_PIN
298
+  #define BTN_EN2                    EXP2_07_PIN
299
+  #define BTN_ENC                    EXP1_10_PIN
300
+#elif ENABLED(ZONESTAR_DWIN_LCD)
301
+  // Connect to EXP2 connector
302
+  #define LCDSCREEN_NAME "ZONESTAR DWIN LCD"
303
+  #define BEEPER_PIN                 EXP2_06_PIN
304
+  #define KILL_PIN                          PC0
305
+  #define BTN_EN1                    EXP2_03_PIN
306
+  #define BTN_EN2                    EXP2_04_PIN
307
+  #define BTN_ENC                    EXP2_05_PIN
308
+#endif
309
+
310
+#if ENABLED(ZONESTAR_LCD2004_KNOB)
311
+  #define LCDSCREEN_NAME "LCD2004 KNOB"
312
+  #define LCD_PINS_RS                EXP1_08_PIN
313
+  #define LCD_PINS_ENABLE            EXP1_07_PIN
314
+  #define LCD_PINS_D4                EXP1_05_PIN
315
+  #define LCD_PINS_D5                EXP1_06_PIN
316
+  #define LCD_PINS_D6                EXP1_03_PIN
317
+  #define LCD_PINS_D7                EXP1_04_PIN
318
+  #define BTN_EN1                    EXP2_07_PIN
319
+  #define BTN_EN2                    EXP2_05_PIN
320
+  #define BTN_ENC                    EXP1_10_PIN
321
+  #define BEEPER_PIN                 EXP1_09_PIN
322
+  #define KILL_PIN                   EXP2_04_PIN
323
+#elif ENABLED(ZONESTAR_LCD2004_ADCKEY)
324
+  #define LCDSCREEN_NAME "LCD2004 5KEY"
325
+  #define LCD_PINS_RS                EXP1_08_PIN
326
+  #define LCD_PINS_ENABLE            EXP1_07_PIN
327
+  #define LCD_PINS_D4                EXP1_05_PIN
328
+  #define LCD_PINS_D5                EXP1_06_PIN
329
+  #define LCD_PINS_D6                EXP1_03_PIN
330
+  #define LCD_PINS_D7                EXP1_04_PIN
331
+  #define ADC_KEYPAD_PIN                    PC0   // PIN6 of AUX1
332
+#endif
333
+
334
+#if HAS_MARLINUI_U8GLIB
335
+  #define BOARD_ST7920_DELAY_1 DELAY_NS(125)
336
+  #define BOARD_ST7920_DELAY_2 DELAY_NS(250)
337
+  #define BOARD_ST7920_DELAY_3 DELAY_NS(125)
338
+#endif
339
+
340
+// Remap SERVO0 PIN for BLTouch
341
+#if ENABLED(BLTOUCH_ON_EXP1)
342
+  // BLTouch connected to EXP1
343
+  #define BLTOUCH_PROBE_PIN          EXP1_06_PIN
344
+  #define BLTOUCH_GND_PIN            EXP1_04_PIN
345
+  #undef SERVO0_PIN
346
+  #define SERVO0_PIN                 EXP1_03_PIN
347
+#elif ENABLED(BLTOUCH_ON_EXP2)
348
+  // BLTouch connected to EXP2
349
+  #define BLTOUCH_PROBE_PIN          EXP2_03_PIN
350
+  #define BLTOUCH_GND_PIN            EXP2_04_PIN
351
+  #undef SERVO0_PIN
352
+  #define SERVO0_PIN                 EXP2_06_PIN
353
+#else
354
+  #define BLTOUCH_PROBE_PIN                 PB13
355
+#endif

+ 328
- 0
Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h 查看文件

@@ -0,0 +1,328 @@
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 <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+#pragma once
23
+
24
+#include "env_validate.h"
25
+
26
+#define BOARD_INFO_NAME "ZONESTAR ZM3E4 V2.0"
27
+
28
+//#define DISABLE_DEBUG
29
+#define DISABLE_JTAG
30
+
31
+#if NO_EEPROM_SELECTED
32
+  #define FLASH_EEPROM_EMULATION
33
+  #define EEPROM_PAGE_SIZE      (0x800) // 2KB
34
+  #define EEPROM_START_ADDRESS  (0x08000000 + (STM32_FLASH_SIZE) * 1024 - 2 * EEPROM_PAGE_SIZE)
35
+  #define MARLIN_EEPROM_SIZE    EEPROM_PAGE_SIZE  // 2KB
36
+#endif
37
+
38
+//#define OPTION_DUALZ_DRIVE
39
+//#define OPTION_Z2_ENDSTOP
40
+//#define OPTION_REPEAT_PRINTING
41
+//#define SWITCH_EXTRUDER_SEQUENCE
42
+
43
+//=============================================================================
44
+// Zonestar ZM3E4 V2.0 (STM32F103VET6) board pin assignments
45
+//=============================================================================
46
+//  PA0                 |  PB0     HEAT_1          |  PC0         AUX_SDA
47
+//  PA1                 |  PB1     FAN1            |  PC1         TEMP_E1
48
+//  PA2     HEAT_BED    |  PB2     BOOT1           |  PC2         TEMP_E0
49
+//  PA3     PWR_HOLD    |  PB3     SPI3_SCK        |  PC3         TEMP_BED
50
+//  PA4     SD_CS       |  PB4     SPI3_MISO       |  PC4         SD_DETECT
51
+//  PA5     SD_SCK      |  PB5     SPI3_MOSI       |  PC5         HEAT_0
52
+//  PA6     SD_MISO     |  PB6     SERVO3          |  PC6         E1_STEP
53
+//  PA7     SD_MOSI     |  PB7     SERVO2          |  PC7         E1_EN
54
+//  PA8     X_DIR       |  PB8     FAN2/SERVO1     |  PC8         FIL_RUNOUT_PIN
55
+//  PA9     UART1_RX    |  PB9     SERVO0          |  PC9         E0_DIR
56
+//  PA10    UART1_TX    |  PB10    TX3             |  PC10        E0_EN
57
+//  PA11    USB_D-      |  PB11    RX3             |  PC11        Z2_EN
58
+//  PA12    USB_D+      |  PB12    LED             |  PC12        Z2_STEP
59
+//  PA13    SWD_SDO     |  PB13    Z1_MAX          |  PC13        X_MIN
60
+//  PA14    SWD_SCK     |  PB14    Y_MAX           |  PC14        WIFI_RST
61
+//  PA15    SPI3_CS     |  PB15    PWR_DET         |  PC15        WIFI_CS
62
+//  PD0     Z2_DIR      |  PE0     Y_EN
63
+//  PD1     Z2_MIN      |  PE1     Y_STEP
64
+//  PD2     Z1_EN       |  PE2     Y_DIR
65
+//  PD3     Z1_STEP     |  PE3     Y_MIN
66
+//  PD4     Z1_DIR      |  PE4     X_DIR
67
+//  PD5     WIFI_RXD    |  PE5     X_STEP
68
+//  PD6     WIFI_TXD    |  PE6     X_EN
69
+//  PD7     Z1_MIN      |  PE7     AUX_SCL
70
+//  PD8     X_MAX       |  PE8     BTN_EN1
71
+//  PD9     E3_DIR      |  PE9     LCD_SCK
72
+//  PD10    E3_STEP     |  PE10    LCD_MOSI
73
+//  PD11    E3_EN       |  PE11    BEEPER
74
+//  PD12    E2_DIR      |  PE12    LCD_EN
75
+//  PD13    E2_STEP     |  PE13    KILL
76
+//  PD14    E2_EN       |  PE14    BTN_EN2
77
+//  PD15    E1_DIR      |  PE15    BTN_ENC
78
+
79
+//=============================================================================
80
+// EXP1 connector
81
+//     MARK     I/O     ZONESTAR_LCD12864   REPRAPDISCOUNT_LCD12864
82
+//  10 RS       PE13    KILL                BTN_ENC
83
+//   9 BP       PE11    BEEP                BEEP
84
+//   8 EN       PE12    DOGLCD_CS           LCDRS
85
+//   7 MOSI     PE10    DOGLCD_SCK          LCDE
86
+//   6 EN1      PE8     BTN_EN1             NC
87
+//   5 SCK      PE9     DOGLCD_MOSI         LCD4
88
+//   4 ENC      PE15    BTN_ENC             NC
89
+//   3 EN2      PE14    BTN_EN2             NC
90
+//   2 +5V
91
+//   1 GND
92
+
93
+#define EXP1_03_PIN                         PE14
94
+#define EXP1_04_PIN                         PE15
95
+#define EXP1_05_PIN                         PE9
96
+#define EXP1_06_PIN                         PE8
97
+#define EXP1_07_PIN                         PE10
98
+#define EXP1_08_PIN                         PE12
99
+#define EXP1_09_PIN                         PE11
100
+#define EXP1_10_PIN                         PE13
101
+
102
+// EXP2 connector
103
+//     MARK     I/O     ZONESTAR_LCD12864   REPRAPDISCOUNT_LCD12864
104
+//  10 SDA      PC0
105
+//   9 SCL      PE7
106
+//   8 RX1      PA9     UART1_RX
107
+//   7 TX1      PA10    UART1_TX            BTN_EN2
108
+//   6 CS3      PA15
109
+//   5 MISO3    PB4                         BTN_EN1
110
+//   4 MOSI3    PB5                         KILL
111
+//   3 SCK3     PB3
112
+//   2 +5V
113
+//   1 GND
114
+
115
+#define EXP2_03_PIN                         PB3
116
+#define EXP2_04_PIN                         PB5
117
+#define EXP2_05_PIN                         PB4
118
+#define EXP2_06_PIN                         PA15
119
+#define EXP2_07_PIN                         PA10
120
+#define EXP2_08_PIN                         PA9
121
+#define EXP2_09_PIN                         PE7
122
+#define EXP2_10_PIN                         PC0
123
+
124
+// AUX1 connector
125
+//  1 +5V
126
+//  2 GND
127
+//  3 RX3       PB11    UART3_RX
128
+//  4 TX3       PB10    UART3_TX
129
+//  5 SCL       PE7
130
+//  6 SDA       PC0
131
+
132
+// WiFi
133
+//  1 +5V
134
+//  2 GND
135
+//  3 WIFI_TXD  PD5     UART2_RX
136
+//  4 WIFI_RXD  PD6     UART2_TX
137
+//  5 WIFI_RST  PC14
138
+//  6 WIFI_CS   PC15
139
+//=============================================================================
140
+
141
+//
142
+// Servos
143
+//
144
+#define SERVO0_PIN                          PB9
145
+//#define SERVO1_PIN                        PB8
146
+#define SERVO2_PIN                          PB7
147
+#define SERVO3_PIN                          PB6
148
+
149
+//
150
+// Limit Switches
151
+//
152
+#define X_MIN_PIN                           PC13
153
+#define Y_MIN_PIN                           PE3
154
+#define Z_MIN_PIN                           PD7
155
+#define X_MAX_PIN                           PD8
156
+#define Y_MAX_PIN                           PB14
157
+#define Z_MAX_PIN                           PB13
158
+
159
+#ifdef OPTION_Z2_ENDSTOP
160
+  #define Z2_MIN_PIN                        PD1
161
+  #define Z2_MAX_PIN                        PB12
162
+#endif
163
+
164
+//
165
+// Steppers
166
+//
167
+#if ENABLED(COREXY)
168
+  #define X_ENABLE_PIN                      PE0
169
+  #define X_STEP_PIN                        PE1
170
+  #define X_DIR_PIN                         PE2
171
+
172
+  #define Y_ENABLE_PIN                      PE6
173
+  #define Y_STEP_PIN                        PE5
174
+  #define Y_DIR_PIN                         PE4
175
+#else
176
+  #define X_ENABLE_PIN                      PE6
177
+  #define X_STEP_PIN                        PE5
178
+  #define X_DIR_PIN                         PE4
179
+
180
+  #define Y_ENABLE_PIN                      PE0
181
+  #define Y_STEP_PIN                        PE1
182
+  #define Y_DIR_PIN                         PE2
183
+#endif
184
+
185
+#define Z_ENABLE_PIN                        PD2
186
+#define Z_STEP_PIN                          PD3
187
+#define Z_DIR_PIN                           PD4
188
+
189
+#ifdef OPTION_DUALZ_DRIVE
190
+  #define Z2_ENABLE_PIN                     PC11
191
+  #define Z2_STEP_PIN                       PC12
192
+  #define Z2_DIR_PIN                        PD0
193
+#endif
194
+
195
+#ifdef OPTION_REPEAT_PRINTING
196
+  #define REPRINT_STOP_PIN                  PD8   // X_MAX_PIN
197
+  #define FORWARD_PIN                       PA13
198
+  #define BACK_PIN                          PA14
199
+#endif
200
+
201
+#ifdef SWITCH_EXTRUDER_SEQUENCE
202
+  #define E3_ENABLE_PIN                     PC10
203
+  #define E3_STEP_PIN                       PA8
204
+  #define E3_DIR_PIN                        PC9
205
+
206
+  #define E2_STEP_PIN                       PC6
207
+  #define E2_DIR_PIN                        PD15
208
+  #define E2_ENABLE_PIN                     PC7
209
+
210
+  #define E1_STEP_PIN                       PD13
211
+  #define E1_DIR_PIN                        PD12
212
+  #define E1_ENABLE_PIN                     PD14
213
+
214
+  #define E0_STEP_PIN                       PD10
215
+  #define E0_DIR_PIN                        PD9
216
+  #define E0_ENABLE_PIN                     PD11
217
+#else
218
+  #define E0_ENABLE_PIN                     PC10
219
+  #define E0_STEP_PIN                       PA8
220
+  #define E0_DIR_PIN                        PC9
221
+
222
+  #define E1_STEP_PIN                       PC6
223
+  #define E1_DIR_PIN                        PD15
224
+  #define E1_ENABLE_PIN                     PC7
225
+
226
+  #define E2_STEP_PIN                       PD13
227
+  #define E2_DIR_PIN                        PD12
228
+  #define E2_ENABLE_PIN                     PD14
229
+
230
+  #define E3_STEP_PIN                       PD10
231
+  #define E3_DIR_PIN                        PD9
232
+  #define E3_ENABLE_PIN                     PD11
233
+#endif
234
+
235
+//
236
+// Temperature Sensors
237
+//
238
+#define TEMP_0_PIN                          PC2   // TH0
239
+//#define TEMP_1_PIN                        PC1   // TH1
240
+#define TEMP_BED_PIN                        PC3   // TB1
241
+
242
+//
243
+// Heaters
244
+//
245
+#define HEATER_0_PIN                        PC5   // HEATER0
246
+//#define HEATER_1_PIN                      PB0   // HEATER1
247
+#define HEATER_BED_PIN                      PA2   // HOT BED
248
+
249
+//
250
+// Fans
251
+//
252
+#define FAN_PIN                             PB1   // FAN1
253
+#define FAN1_PIN                            PB8   // FAN2
254
+
255
+//
256
+// Misc. Functions
257
+//
258
+//#define POWER_LOSS_PIN                    PB15
259
+#define LED_PIN                             PA0
260
+#define SUICIDE_PIN                         PA3
261
+#define FIL_RUNOUT_PIN                      PC8
262
+
263
+//
264
+// SD card
265
+//
266
+#define ENABLE_SPI1
267
+#define SD_DETECT_PIN                       PC4
268
+#define SD_SCK_PIN                          PA5
269
+#define SD_MISO_PIN                         PA6
270
+#define SD_MOSI_PIN                         PA7
271
+#define SD_SS_PIN                           PA4
272
+
273
+// WiFi Functions
274
+#define WIFI_RST                            PC15
275
+#define WIFI_EN                             PC14
276
+
277
+#if ENABLED(ZONESTAR_12864LCD)
278
+  #define LCDSCREEN_NAME "ZONESTAR LCD12864"
279
+  #define LCD_PINS_RS                EXP1_08_PIN  // 7 CS make sure for zonestar zm3e4!
280
+  #define LCD_PINS_ENABLE            EXP1_05_PIN  // 6 DATA make sure for zonestar zm3e4!
281
+  #define LCD_PINS_D4                EXP1_07_PIN  // 8 SCK make sure for zonestar zm3e4!
282
+  #define BEEPER_PIN                 EXP1_09_PIN
283
+  #define KILL_PIN                          -1    // EXP1_10_PIN
284
+  #define BTN_EN1                    EXP1_06_PIN
285
+  #define BTN_EN2                    EXP1_03_PIN
286
+  #define BTN_ENC                    EXP1_04_PIN
287
+#elif ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
288
+  #define LCDSCREEN_NAME "REPRAPDISCOUNT LCD12864"
289
+  #define LCD_PINS_RS                EXP2_08_PIN  // 7 CS make sure for zonestar zm3e4!
290
+  #define LCD_PINS_ENABLE            EXP2_05_PIN  // 6 DATA make sure for zonestar zm3e4!
291
+  #define LCD_PINS_D4                EXP2_07_PIN  // 8 SCK make sure for zonestar zm3e4!
292
+  #define BEEPER_PIN                 EXP2_10_PIN
293
+  #define KILL_PIN                   EXP2_09_PIN
294
+  #define BTN_EN1                    EXP2_03_PIN
295
+  #define BTN_EN2                    EXP2_06_PIN
296
+  #define BTN_ENC                    EXP2_04_PIN
297
+#elif ENABLED(ZONESTAR_DWIN_LCD)
298
+  // Connect to EXP2 connector
299
+  #define LCDSCREEN_NAME "ZONESTAR DWIN LCD"
300
+  #define BEEPER_PIN                 EXP2_06_PIN  // PE11
301
+  #define KILL_PIN                          -1    // EXP1_10_PIN
302
+  #define BTN_EN2                    EXP2_04_PIN  // PE8
303
+  #define BTN_EN1                    EXP2_03_PIN  // PE14
304
+  #define BTN_ENC                    EXP2_05_PIN  // PE15
305
+#endif
306
+
307
+#if HAS_MARLINUI_U8GLIB
308
+  #define BOARD_ST7920_DELAY_1 DELAY_NS(200)    // Tclk_fall <200ns
309
+  #define BOARD_ST7920_DELAY_2 DELAY_NS(250)    // Tdata_width >200ns
310
+  #define BOARD_ST7920_DELAY_3 DELAY_NS(200)    // Tclk_rise <200ns
311
+#endif
312
+
313
+// Remap SERVO0 PIN for BLTouch
314
+#if ENABLED(BLTOUCH_ON_EXP1)
315
+  // BLTouch connected to EXP1
316
+  #define BLTOUCH_PROBE_PIN          EXP1_06_PIN
317
+  #define BLTOUCH_GND_PIN            EXP1_04_PIN
318
+  #undef SERVO0_PIN
319
+  #define SERVO0_PIN                 EXP1_03_PIN
320
+#elif ENABLED(BLTOUCH_ON_EXP2)
321
+  // BLTouch connected to EXP2
322
+  #define BLTOUCH_PROBE_PIN          EXP2_03_PIN
323
+  #define BLTOUCH_GND_PIN            EXP2_04_PIN
324
+  #undef SERVO0_PIN
325
+  #define SERVO0_PIN                 EXP2_06_PIN
326
+#else
327
+  #define BLTOUCH_PROBE_PIN                 PB13  // Z1_MAX
328
+#endif

+ 4
- 1
Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX.h 查看文件

@@ -223,13 +223,16 @@
223 223
   #define BTN_ENC                           PH8
224 224
 #endif
225 225
 
226
+//
227
+// SD card
228
+//
226 229
 #ifndef SDCARD_CONNECTION
227 230
   #define SDCARD_CONNECTION              ONBOARD
228 231
 #endif
229 232
 
230 233
 #define SOFTWARE_SPI
231 234
 #define SDSS                                PA15
232
-#define SS_PIN                              SDSS
235
+#define SD_SS_PIN                           SDSS
233 236
 #define SD_SCK_PIN                          PC10
234 237
 #define SD_MISO_PIN                         PC11
235 238
 #define SD_MOSI_PIN                         PC12

+ 14
- 0
buildroot/share/PlatformIO/ldscripts/ZONESTAR_ZM3E_256K.ld 查看文件

@@ -0,0 +1,14 @@
1
+MEMORY
2
+{
3
+  ram (rwx) : ORIGIN = 0x20000000, LENGTH = 48K - 40
4
+  rom (rx)  : ORIGIN = 0x08005000, LENGTH = 256K - 20K - 4K
5
+}
6
+
7
+/* Provide memory region aliases for common.inc */
8
+REGION_ALIAS("REGION_TEXT", rom);
9
+REGION_ALIAS("REGION_DATA", ram);
10
+REGION_ALIAS("REGION_BSS", ram);
11
+REGION_ALIAS("REGION_RODATA", rom);
12
+
13
+/* Let common.inc handle the real work. */
14
+INCLUDE common.inc

+ 14
- 0
buildroot/share/PlatformIO/ldscripts/ZONESTAR_ZM3E_512K.ld 查看文件

@@ -0,0 +1,14 @@
1
+MEMORY
2
+{
3
+  ram (rwx) : ORIGIN = 0x20000000, LENGTH = 48K - 40
4
+  rom (rx)  : ORIGIN = 0x08005000, LENGTH = 512K - 20K - 4K
5
+}
6
+
7
+/* Provide memory region aliases for common.inc */
8
+REGION_ALIAS("REGION_TEXT", rom);
9
+REGION_ALIAS("REGION_DATA", ram);
10
+REGION_ALIAS("REGION_BSS", ram);
11
+REGION_ALIAS("REGION_RODATA", rom);
12
+
13
+/* Let common.inc handle the real work. */
14
+INCLUDE common.inc

buildroot/tests/STM32F103RC_fysetc → buildroot/tests/STM32F103RC_fysetc_maple 查看文件


+ 14
- 0
buildroot/tests/STM32F103VE_ZM3E4V2_USB_maple 查看文件

@@ -0,0 +1,14 @@
1
+#!/usr/bin/env bash
2
+#
3
+# Build tests for STM32F103VE_ZM3E4V2_USB
4
+#
5
+
6
+# exit on first failure
7
+set -e
8
+
9
+restore_configs
10
+opt_set MOTHERBOARD BOARD_ZONESTAR_ZM3E4V2 SERIAL_PORT 1
11
+exec_test $1 $2 "Zonestar ZM3E4 V2.0" "$3"
12
+
13
+# cleanup
14
+restore_configs

buildroot/tests/jgaurora_a5s_a1 → buildroot/tests/jgaurora_a5s_a1_maple 查看文件


buildroot/tests/mks_robin_lite → buildroot/tests/mks_robin_lite_maple 查看文件


buildroot/tests/mks_robin_pro → buildroot/tests/mks_robin_pro_maple 查看文件


+ 43
- 0
ini/stm32f1-maple.ini 查看文件

@@ -357,3 +357,46 @@ extra_scripts     = ${common_stm32f1.extra_scripts}
357 357
   buildroot/share/PlatformIO/scripts/custom_board.py
358 358
 build_flags       = ${common_stm32f1.build_flags}
359 359
  -DDEBUG_LEVEL=0 -DSS_TIMER=4
360
+
361
+#
362
+# Zonestar ZM3E2 V1.0 / ZM3E4 V1.0 / ZM3E4 V2.0
363
+#
364
+#  STM32F103RC_ZM3E2_USB_maple ........... RCT6 with 256K
365
+#  STM32F103VC_ZM3E4_USB_maple ........... VCT6 with 256K
366
+#  STM32F103VE_ZM3E4V2_USB_maple ......... VET6 with 512K
367
+#
368
+[ZONESTAR_ZM3E_maple]
369
+platform                  = ${common_stm32f1.platform}
370
+extends                   = common_stm32f1
371
+platform_packages         = tool-stm32duino
372
+board_build.address       = 0x08005000
373
+board_build.offset        = 0x5000
374
+board_upload.maximum_size = 237568
375
+extra_scripts             = ${common.extra_scripts}
376
+  buildroot/share/PlatformIO/scripts/custom_board.py
377
+  buildroot/share/PlatformIO/scripts/offset_and_rename.py
378
+build_flags               = ${common_stm32f1.build_flags}
379
+  -D__STM32F1__=1 -DDEBUG_LEVEL=0 -DSS_TIMER=4 -DSERIAL_USB
380
+lib_deps                  = USBComposite for STM32F1@0.91
381
+lib_ignore                = Adafruit NeoPixel, SPI, SailfishLCD, SailfishRGB_LED, SlowSoftI2CMaster, TMCStepper
382
+
383
+[env:STM32F103RC_ZM3E2_USB_maple]
384
+platform             = ${ZONESTAR_ZM3E_maple.platform}
385
+extends              = ZONESTAR_ZM3E_maple
386
+board                = genericSTM32F103RC
387
+board_build.ldscript = ZONESTAR_ZM3E_256K.ld
388
+
389
+[env:STM32F103VC_ZM3E4_USB_maple]
390
+platform             = ${ZONESTAR_ZM3E_maple.platform}
391
+extends              = ZONESTAR_ZM3E_maple
392
+board                = genericSTM32F103VC
393
+board_build.ldscript = ZONESTAR_ZM3E_256K.ld
394
+build_flags          = ${ZONESTAR_ZM3E_maple.build_flags} -DTONE_TIMER=1 -DTONE_CHANNEL=2
395
+
396
+[env:STM32F103VE_ZM3E4V2_USB_maple]
397
+platform             = ${ZONESTAR_ZM3E_maple.platform}
398
+extends              = ZONESTAR_ZM3E_maple
399
+board                = genericSTM32F103VE
400
+board_build.ldscript = ZONESTAR_ZM3E_512K.ld
401
+build_flags          = ${ZONESTAR_ZM3E_maple.build_flags} -DTONE_TIMER=1 -DTONE_CHANNEL=2
402
+board_upload.maximum_size = 499712

+ 40
- 0
ini/stm32f1.ini 查看文件

@@ -374,3 +374,43 @@ extra_scripts        = ${stm32_variant.extra_scripts}
374 374
 platform      = ${common_stm32.platform}
375 375
 extends       = env:chitu_f103
376 376
 build_flags   = ${env:chitu_f103.build_flags} -DCHITU_V5_Z_MIN_BUGFIX
377
+
378
+#
379
+# Zonestar ZM3E2 V1.0 / ZM3E4 V1.0 / ZM3E4 V2.0
380
+#
381
+#  STM32F103RC_ZM3E2_USB ........... RCT6 with 256K
382
+#  STM32F103VC_ZM3E4_USB ........... VCT6 with 256K
383
+#  STM32F103VE_ZM3E4V2_USB ......... VET6 with 512K
384
+#
385
+[ZONESTAR_ZM3E]
386
+platform                  = ${common_stm32.platform}
387
+extends                   = stm32_variant
388
+platform_packages         = ${stm_flash_drive.platform_packages}
389
+board_upload.offset_address = 0x08005000
390
+board_build.offset        = 0x5000
391
+board_upload.maximum_size = 237568
392
+extra_scripts             = ${stm32_variant.extra_scripts}
393
+build_flags               = ${common_stm32.build_flags}
394
+  -DSS_TIMER=4 -DTIMER_SERVO=TIM5 -DUSE_USB_FS -DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6 -DUSBD_USE_CDC_MSC
395
+build_unflags             = ${stm32_variant.build_unflags} -DUSBD_USE_CDC
396
+
397
+[env:STM32F103RC_ZM3E2_USB]
398
+platform             = ${ZONESTAR_ZM3E.platform}
399
+extends              = ZONESTAR_ZM3E
400
+board                = genericSTM32F103RC
401
+board_build.variant  = MARLIN_F103Rx
402
+
403
+[env:STM32F103VC_ZM3E4_USB]
404
+platform             = ${ZONESTAR_ZM3E.platform}
405
+extends              = ZONESTAR_ZM3E
406
+board                = genericSTM32F103VC
407
+board_build.variant  = MARLIN_F103Vx
408
+build_flags          = ${ZONESTAR_ZM3E.build_flags} -DTIMER_TONE=1
409
+
410
+[env:STM32F103VE_ZM3E4V2_USB]
411
+platform             = ${ZONESTAR_ZM3E.platform}
412
+extends              = ZONESTAR_ZM3E
413
+board                = genericSTM32F103VE
414
+board_build.variant  = MARLIN_F103Vx
415
+build_flags          = ${ZONESTAR_ZM3E.build_flags} -DTIMER_TONE=1
416
+board_upload.maximum_size = 499712

Loading…
取消
儲存