Explorar el Código

Add Creality 4.5.2 board (#20378)

Co-authored-by: Jason Smith <jason.inet@gmail.com>
InsanityAutomation hace 4 años
padre
commit
e8ed880e62
No account linked to committer's email address

+ 2
- 0
Marlin/src/HAL/STM32F1/HAL.h Ver fichero

@@ -109,6 +109,8 @@
109 109
   #else
110 110
     #error "LCD_SERIAL_PORT must be -1 or from 1 to 3. Please update your configuration."
111 111
   #endif
112
+
113
+  #define SERIAL_GET_TX_BUFFER_FREE LCD_SERIAL.availableForWrite
112 114
 #endif
113 115
 
114 116
 // Set interrupt grouping for this MCU

+ 5
- 4
Marlin/src/core/boards.h Ver fichero

@@ -329,10 +329,11 @@
329 329
 #define BOARD_CHITU3D_V6              4036  // Chitu3D TronXY X5SA V5 Board
330 330
 #define BOARD_CREALITY_V4             4037  // Creality v4.x (STM32F103RE)
331 331
 #define BOARD_CREALITY_V427           4038  // Creality v4.2.7 (STM32F103RE)
332
-#define BOARD_TRIGORILLA_PRO          4039  // Trigorilla Pro (STM32F103ZET6)
333
-#define BOARD_FLY_MINI                4040  // FLY MINI (STM32F103RCT6)
334
-#define BOARD_FLSUN_HISPEED           4041  // FLSUN HiSpeedV1 (STM32F103VET6)
335
-#define BOARD_BEAST                   4042  // STM32F103RET6 Libmaple-based controller
332
+#define BOARD_CREALITY_V452           4039  // Creality v4.5.2 (STM32F103RE)
333
+#define BOARD_TRIGORILLA_PRO          4040  // Trigorilla Pro (STM32F103ZET6)
334
+#define BOARD_FLY_MINI                4041  // FLY MINI (STM32F103RCT6)
335
+#define BOARD_FLSUN_HISPEED           4042  // FLSUN HiSpeedV1 (STM32F103VET6)
336
+#define BOARD_BEAST                   4043  // STM32F103RET6 Libmaple-based controller
336 337
 
337 338
 //
338 339
 // ARM Cortex-M4F

+ 2
- 0
Marlin/src/pins/pins.h Ver fichero

@@ -530,6 +530,8 @@
530 530
   #include "stm32f1/pins_CREALITY_V4.h"         // STM32F1                                env:STM32F103RET6_creality
531 531
 #elif MB(CREALITY_V427)
532 532
   #include "stm32f1/pins_CREALITY_V427.h"       // STM32F1                                env:STM32F103RET6_creality
533
+#elif MB(CREALITY_V452)
534
+  #include "stm32f1/pins_CREALITY_V452.h"       // STM32F1                                env:STM32F103RET6_creality
533 535
 #elif MB(TRIGORILLA_PRO)
534 536
   #include "stm32f1/pins_TRIGORILLA_PRO.h"      // STM32F1                                env:trigorilla_pro
535 537
 #elif MB(FLY_MINI)

+ 2
- 2
Marlin/src/pins/stm32f1/pins_CREALITY_V4.h Ver fichero

@@ -21,13 +21,13 @@
21 21
  */
22 22
 
23 23
 /**
24
- * CREALITY (STM32F103) board pin assignments
24
+ * Creality 4.2.x (STM32F103RET6) board pin assignments
25 25
  */
26 26
 
27 27
 #if NOT_TARGET(__STM32F1__)
28 28
   #error "Oops! Select an STM32F1 board in 'Tools > Board.'"
29 29
 #elif HOTENDS > 1 || E_STEPPERS > 1
30
-  #error "Creality V4 only supports one hotend / E-stepper. Comment out this line to continue."
30
+  #error "Creality_V4 only supports one hotend / E-stepper. Comment out this line to continue."
31 31
 #endif
32 32
 
33 33
 #ifndef BOARD_INFO_NAME

+ 113
- 0
Marlin/src/pins/stm32f1/pins_CREALITY_V452.h Ver fichero

@@ -0,0 +1,113 @@
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
+
23
+/**
24
+ * Creality v4.5.2 (STM32F103RET6) board pin assignments
25
+ */
26
+
27
+#if NOT_TARGET(__STM32F1__)
28
+  #error "Oops! Select an STM32F1 board in 'Tools > Board.'"
29
+#elif HOTENDS > 1 || E_STEPPERS > 1
30
+  #error "CREALITY_V452 supports up to 1 hotends / E-steppers. Comment out this line to continue."
31
+#endif
32
+
33
+#define BOARD_NAME "Creality v4.5.2"
34
+#define DEFAULT_MACHINE_NAME "Creality3D"
35
+
36
+#define BOARD_NO_NATIVE_USB
37
+
38
+//
39
+// EEPROM
40
+//
41
+#if NO_EEPROM_SELECTED
42
+  #define IIC_BL24CXX_EEPROM                    // EEPROM on I2C-0
43
+  //#define SDCARD_EEPROM_EMULATION
44
+#endif
45
+
46
+#if ENABLED(IIC_BL24CXX_EEPROM)
47
+  #define IIC_EEPROM_SDA                  PA11
48
+  #define IIC_EEPROM_SCL                  PA12
49
+  #define MARLIN_EEPROM_SIZE             0x800  // 2Kb (24C16)
50
+#elif ENABLED(SDCARD_EEPROM_EMULATION)
51
+  #define MARLIN_EEPROM_SIZE             0x800  // 2Kb
52
+#endif
53
+
54
+//
55
+// Limit Switches
56
+//
57
+#define X_MIN_PIN           PC4
58
+// #define X_MAX_PIN          PA7
59
+#define Y_MIN_PIN           PC5
60
+#define Z_MIN_PIN           PA4
61
+#define PROBE_TARE_PIN      PA5
62
+
63
+//
64
+// Steppers
65
+//
66
+#define X_ENABLE_PIN        PC3
67
+#define X_STEP_PIN          PB8
68
+#define X_DIR_PIN           PB7
69
+
70
+#define Y_ENABLE_PIN        PC3
71
+#define Y_STEP_PIN          PB6
72
+#define Y_DIR_PIN           PB5
73
+
74
+#define Z_ENABLE_PIN        PC3
75
+#define Z_STEP_PIN          PB4
76
+#define Z_DIR_PIN           PB3
77
+
78
+#define E0_ENABLE_PIN       PC3
79
+#define E0_STEP_PIN         PC2
80
+#define E0_DIR_PIN          PB9
81
+
82
+
83
+//
84
+// Release PB4 (Z_STEP_PIN) from JTAG NRST role
85
+//
86
+#define DISABLE_DEBUG
87
+
88
+//
89
+// Temperature Sensors
90
+//
91
+#define TEMP_0_PIN         PB1   // TH1
92
+#define TEMP_BED_PIN       PB0   // TB1
93
+
94
+//
95
+// Heaters / Fans
96
+
97
+#define HEATER_0_PIN       PA1   // HEATER1
98
+#define HEATER_BED_PIN     PA2   // HOT BED
99
+
100
+#define FAN_PIN            PA0   // FAN
101
+#define FAN_SOFT_PWM
102
+
103
+/* SD card detect */
104
+#define SD_DETECT_PIN      PC7
105
+#define NO_SD_HOST_DRIVE       // SD is only seen by the printer
106
+
107
+#define SDIO_SUPPORT           // Extra added by Creality
108
+#define SDIO_CLOCK     6000000 // In original source code overridden by Creality in sdio.h
109
+
110
+#define CASE_LIGHT_PIN     PA6
111
+
112
+#define FIL_RUNOUT_PIN     PA7
113
+#define PROBE_ENABLE_PIN   PC6 // Optoswitch to Enable Z Probe

Loading…
Cancelar
Guardar