Skip to content

Commit 7ab63cd

Browse files
authored
✨ Creality E3 Free-runs Silent Motherboard (MarlinFirmware#25636)
1 parent b901338 commit 7ab63cd

File tree

14 files changed

+1727
-13
lines changed

14 files changed

+1727
-13
lines changed

Marlin/src/core/boards.h

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -454,16 +454,17 @@
454454
#define BOARD_ARTILLERY_RUBY 5238 // Artillery Ruby (STM32F401RC)
455455
#define BOARD_FYSETC_SPIDER_V2_2 5239 // FYSETC Spider V2.2 (STM32F446VE)
456456
#define BOARD_CREALITY_V24S1_301F4 5240 // Creality v2.4.S1_301F4 (STM32F401RC) as found in the Ender-3 S1 F4
457-
#define BOARD_OPULO_LUMEN_REV4 5241 // Opulo Lumen PnP Controller REV4 (STM32F407VE / STM32F407VG)
458-
#define BOARD_FYSETC_SPIDER_KING407 5242 // FYSETC Spider King407 (STM32F407ZG)
459-
#define BOARD_MKS_SKIPR_V1 5243 // MKS SKIPR v1.0 all-in-one board (STM32F407VE)
460-
#define BOARD_TRONXY_V10 5244 // TRONXY V10 (STM32F446ZE)
461-
#define BOARD_CREALITY_F401RE 5245 // Creality CR4NS200141C13 (STM32F401RE) as found in the Ender-5 S1
462-
#define BOARD_BLACKPILL_CUSTOM 5246 // Custom board based on STM32F401CDU6.
463-
#define BOARD_I3DBEEZ9_V1 5247 // I3DBEEZ9 V1 (STM32F407ZG)
464-
#define BOARD_MELLOW_FLY_E3_V2 5248 // Mellow Fly E3 V2 (STM32F407VG)
465-
#define BOARD_FYSETC_CHEETAH_V30 5249 // FYSETC Cheetah V3.0 (STM32F446RC)
466-
#define BOARD_BLACKBEEZMINI_V1 5250 // BlackBeezMini V1 (STM32F401CCU6)
457+
#define BOARD_CREALITY_CR4NTXXC10 5241 // Creality E3 Free-runs Silent Motherboard (STM32F401RET6)
458+
#define BOARD_OPULO_LUMEN_REV4 5242 // Opulo Lumen PnP Controller REV4 (STM32F407VE / STM32F407VG)
459+
#define BOARD_FYSETC_SPIDER_KING407 5243 // FYSETC Spider King407 (STM32F407ZG)
460+
#define BOARD_MKS_SKIPR_V1 5244 // MKS SKIPR v1.0 all-in-one board (STM32F407VE)
461+
#define BOARD_TRONXY_V10 5245 // TRONXY V10 (STM32F446ZE)
462+
#define BOARD_CREALITY_F401RE 5246 // Creality CR4NS200141C13 (STM32F401RE) as found in the Ender-5 S1
463+
#define BOARD_BLACKPILL_CUSTOM 5247 // Custom board based on STM32F401CDU6.
464+
#define BOARD_I3DBEEZ9_V1 5248 // I3DBEEZ9 V1 (STM32F407ZG)
465+
#define BOARD_MELLOW_FLY_E3_V2 5249 // Mellow Fly E3 V2 (STM32F407VG)
466+
#define BOARD_FYSETC_CHEETAH_V30 5250 // FYSETC Cheetah V3.0 (STM32F446RC)
467+
#define BOARD_BLACKBEEZMINI_V1 5251 // BlackBeezMini V1 (STM32F401CCU6)
467468

468469
//
469470
// ARM Cortex-M7

Marlin/src/pins/esp32/pins_MM_JOKER.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@
220220
#if HAS_WIRED_LCD
221221

222222
//#define LCD_PINS_RS 13
223-
//#define LCD_PINS_ENABLE 17
223+
//#define LCD_PINS_EN 17
224224
//#define LCD_PINS_D4 16
225225

226226
#if ENABLED(CR10_STOCKDISPLAY)

Marlin/src/pins/pins.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,8 @@
796796
#include "stm32f4/pins_ARTILLERY_RUBY.h" // STM32F4 env:Artillery_Ruby
797797
#elif MB(CREALITY_V24S1_301F4)
798798
#include "stm32f4/pins_CREALITY_V24S1_301F4.h" // STM32F4 env:STM32F401RC_creality env:STM32F401RC_creality_nobootloader env:STM32F401RC_creality_jlink env:STM32F401RC_creality_stlink
799+
#elif MB(CREALITY_CR4NTXXC10)
800+
#include "stm32f4/pins_CREALITY_CR4NTXXC10.h" // STM32F4 env:STM32F401RE_freeruns env:STM32F401RE_freeruns_jlink env:STM32F401RE_freeruns_stlink
799801
#elif MB(OPULO_LUMEN_REV4)
800802
#include "stm32f4/pins_OPULO_LUMEN_REV4.h" // STM32F4 env:Opulo_Lumen_REV4
801803
#elif MB(FYSETC_SPIDER_KING407)

Marlin/src/pins/stm32f1/pins_CREALITY_V24S1_301.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
#define SPINDLE_LASER_PWM_PIN PC0 // Bed FET
9090
#define SPINDLE_LASER_ENA_PIN PC0 // FET 1
9191
#define SPINDLE_DIR_PIN PC0 // FET 4
92-
#define LASER_SOFT_PWM_PIN PC0
92+
//#define LASER_SOFT_PWM_PIN PC0
9393
#endif
9494

9595
#include "pins_CREALITY_V4.h"
Lines changed: 261 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,261 @@
1+
/**
2+
* Marlin 3D Printer Firmware
3+
* Copyright (c) 2023 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+
23+
/**
24+
* Creality CREALITY_CR4NTXXC10 (STM32F401RET6) board pin assignments
25+
*
26+
* Sold as "E3 Free-runs Silent Motherboard"
27+
*/
28+
#include "env_validate.h"
29+
30+
#if HOTENDS > 1 || E_STEPPERS > 1
31+
#error "CR4NT220622C10 only supports one hotend / E-stepper."
32+
#endif
33+
34+
#if !AXIS_DRIVER_TYPE_X(TMC2209) || !AXIS_DRIVER_TYPE_Y(TMC2209) || !AXIS_DRIVER_TYPE_Z(TMC2209) || !AXIS_DRIVER_TYPE_E0(TMC2209)
35+
#error "This board has onboard TMC2209 drivers for X, Y, Z, and E0."
36+
#endif
37+
38+
#ifndef BOARD_INFO_NAME
39+
#define BOARD_INFO_NAME "CR4NT220622C10"
40+
#endif
41+
#ifndef DEFAULT_MACHINE_NAME
42+
#define DEFAULT_MACHINE_NAME "Ender-3 Series"
43+
#endif
44+
#define BOARD_WEBSITE_URL "www.creality.com"
45+
46+
#define BOARD_NO_NATIVE_USB
47+
//#undef DISABLE_DEBUG // DISABLE_(DEBUG|JTAG) is not supported for STM32F4.
48+
//#define DISABLE_JTAG
49+
50+
//
51+
// EEPROM
52+
//
53+
#if NO_EEPROM_SELECTED
54+
#define IIC_BL24CXX_EEPROM // EEPROM on I2C-0
55+
//#define SDCARD_EEPROM_EMULATION
56+
#undef NO_EEPROM_SELECTED
57+
#endif
58+
59+
#if ENABLED(IIC_BL24CXX_EEPROM)
60+
#define IIC_EEPROM_SDA PA11
61+
#define IIC_EEPROM_SCL PA12
62+
#define MARLIN_EEPROM_SIZE 0x800 // 2K (24C16)
63+
#elif ENABLED(SDCARD_EEPROM_EMULATION)
64+
#define MARLIN_EEPROM_SIZE 0x800 // 2K
65+
#endif
66+
67+
//
68+
// Servos
69+
//
70+
#define SERVO0_PIN PB0 // BLTouch PWM-OUT PIN (TOUCH pins in the schematic have changed)
71+
72+
//
73+
// Limit Switches
74+
//
75+
#define X_STOP_PIN PA5
76+
#define Y_STOP_PIN PA6
77+
78+
#if ENABLED(BLTOUCH)
79+
#define Z_MIN_PIN PB1 // BLTouch IN PIN (TOUCH pins in the schematic have changed)
80+
#define Z_MAX_PIN PA7
81+
#else
82+
#define Z_STOP_PIN PA7 // Z-axis limit switch
83+
#endif
84+
85+
#ifndef Z_MIN_PROBE_PIN
86+
#define Z_MIN_PROBE_PIN PB1 // BLTouch IN
87+
#endif
88+
89+
//
90+
// Filament Runout Sensor
91+
//
92+
#ifndef FIL_RUNOUT_PIN
93+
#define FIL_RUNOUT_PIN PA4 // "Pulled-high"
94+
#endif
95+
96+
//
97+
// Steppers
98+
//
99+
#define X_ENABLE_PIN PC3
100+
#define X_STEP_PIN PC2
101+
#define X_DIR_PIN PB9
102+
103+
#define Y_ENABLE_PIN PC3
104+
#define Y_STEP_PIN PB8
105+
#define Y_DIR_PIN PB7
106+
107+
#define Z_ENABLE_PIN PC3
108+
#define Z_STEP_PIN PB6
109+
#define Z_DIR_PIN PB5
110+
111+
#define E0_ENABLE_PIN PC3
112+
#define E0_STEP_PIN PB4
113+
#define E0_DIR_PIN PB3
114+
115+
//
116+
// Temperature Sensors
117+
//
118+
#define TEMP_0_PIN PC5 // TH1
119+
#define TEMP_BED_PIN PC4 // TB1
120+
121+
//
122+
// Heaters / Fans
123+
//
124+
#define HEATER_0_PIN PA1 // HEATER1
125+
#define HEATER_BED_PIN PB10 // HOT BED
126+
127+
#ifndef FAN0_PIN
128+
#define FAN0_PIN PA0 // FAN
129+
#endif
130+
#if PIN_EXISTS(FAN0)
131+
#define FAN_SOFT_PWM
132+
#endif
133+
134+
#if HAS_TMC_UART
135+
// Reduce baud rate to improve software serial reliability
136+
#define TMC_BAUD_RATE 19200
137+
138+
/**
139+
* TMC2208/TMC2209 stepper drivers
140+
*
141+
* Hardware serial communication ports.
142+
* If undefined software serial is used according to the pins below
143+
*/
144+
#define X_HARDWARE_SERIAL Serial6
145+
#define Y_HARDWARE_SERIAL Serial6
146+
#define Z_HARDWARE_SERIAL Serial6
147+
#define E0_HARDWARE_SERIAL Serial6
148+
149+
#ifndef X_SLAVE_ADDRESS
150+
#define X_SLAVE_ADDRESS 0
151+
#endif
152+
#ifndef Y_SLAVE_ADDRESS
153+
#define Y_SLAVE_ADDRESS 1
154+
#endif
155+
#ifndef Z_SLAVE_ADDRESS
156+
#define Z_SLAVE_ADDRESS 2
157+
#endif
158+
#ifndef E0_SLAVE_ADDRESS
159+
#define E0_SLAVE_ADDRESS 3
160+
#endif
161+
162+
// Software serial
163+
164+
#define X_SERIAL_TX_PIN PC6
165+
#define X_SERIAL_RX_PIN PC7
166+
167+
#define Y_SERIAL_TX_PIN X_SERIAL_TX_PIN
168+
#define Y_SERIAL_RX_PIN X_SERIAL_RX_PIN
169+
170+
#define Z_SERIAL_TX_PIN X_SERIAL_TX_PIN
171+
#define Z_SERIAL_RX_PIN X_SERIAL_RX_PIN
172+
173+
#define E0_SERIAL_TX_PIN X_SERIAL_TX_PIN
174+
#define E0_SERIAL_RX_PIN X_SERIAL_RX_PIN
175+
176+
#define E1_SERIAL_TX_PIN X_SERIAL_TX_PIN
177+
#define E1_SERIAL_RX_PIN X_SERIAL_RX_PIN
178+
179+
#define X_DIAG_PIN PC13
180+
#define Y_DIAG_PIN PC14
181+
#define Z_DIAG_PIN PC15
182+
#define E0_DIAG_PIN PA15
183+
184+
#endif // HAS_TMC_UART
185+
186+
//
187+
// SD Card
188+
//
189+
#define SD_DETECT_PIN PC1
190+
#define SDCARD_CONNECTION ONBOARD
191+
#define ONBOARD_SPI_DEVICE 1
192+
//#define ONBOARD_SD_CS_PIN PA4 // SDSS
193+
#define SDIO_SUPPORT
194+
#define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer
195+
196+
#if ENABLED(CR10_STOCKDISPLAY)
197+
198+
#if ENABLED(RET6_12864_LCD)
199+
// RET6 12864 LCD
200+
#define LCD_PINS_RS PB12
201+
#define LCD_PINS_EN PB15
202+
#define LCD_PINS_D4 PB13
203+
204+
#define BTN_ENC PB2
205+
#define BTN_EN1 PA2
206+
#define BTN_EN2 PB14
207+
208+
#ifndef HAS_PIN_27_BOARD
209+
#define BEEPER_PIN PC0
210+
#endif
211+
212+
#elif ENABLED(VET6_12864_LCD)
213+
// VET6 12864 LCD
214+
#define LCD_PINS_RS PA4
215+
//#define LCD_PINS_EN PA7
216+
#define LCD_PINS_D4 PA5
217+
218+
#define BTN_ENC PC5
219+
#define BTN_EN1 PB10
220+
#define BTN_EN2 PA6
221+
222+
#else
223+
#error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for CR10_STOCKDISPLAY with the CREALITY_CR4NTXXC10 controller."
224+
#endif
225+
226+
#elif ENABLED(DWIN_CREALITY_LCD)
227+
228+
// RET6 DWIN ENCODER LCD
229+
#define BTN_ENC PB14
230+
#define BTN_EN1 PB15
231+
#define BTN_EN2 PB12
232+
233+
//#define LCD_LED_PIN PB2
234+
#ifndef BEEPER_PIN
235+
#define BEEPER_PIN PB13
236+
#undef SPEAKER
237+
#endif
238+
239+
#elif ENABLED(DWIN_VET6_CREALITY_LCD)
240+
241+
// VET6 DWIN ENCODER LCD
242+
#define BTN_ENC PA6
243+
//#define BTN_EN1 PA7
244+
#define BTN_EN2 PA4
245+
246+
#define BEEPER_PIN PA5
247+
248+
#endif
249+
250+
//
251+
// M3/M4/M5 - Spindle/Laser Control
252+
//
253+
#if HAS_CUTTER
254+
//#undef HEATER_0_PIN
255+
//#undef HEATER_BED_PIN
256+
//#undef FAN0_PIN
257+
#define SPINDLE_LASER_ENA_PIN PC0 // FET 1
258+
#define SPINDLE_LASER_PWM_PIN PC0 // Bed FET
259+
#define SPINDLE_DIR_PIN PC0 // FET 4
260+
//#define LASER_SOFT_PWM_PIN PC0
261+
#endif

Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER_KING407.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@
309309

310310
#define LCD_SDSS EXP2_07_PIN
311311

312-
#define LCD_PINS_ENABLE EXP1_08_PIN
312+
#define LCD_PINS_EN EXP1_08_PIN
313313
#define LCD_PINS_D4 EXP1_06_PIN
314314

315315
#if ENABLED(FYSETC_MINI_12864)
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"build": {
3+
"core": "stm32",
4+
"cpu": "cortex-m4",
5+
"extra_flags": "-DSTM32F401xx",
6+
"f_cpu": "84000000L",
7+
"hwids": [
8+
[
9+
"0x1EAF",
10+
"0x0003"
11+
],
12+
[
13+
"0x0483",
14+
"0x3748"
15+
]
16+
],
17+
"ldscript": "ldscript.ld",
18+
"mcu": "stm32f401ret6",
19+
"variant": "MARLIN_STM32F401RE_FREERUNS"
20+
},
21+
"debug": {
22+
"jlink_device": "STM32F401RE",
23+
"openocd_target": "stm32f4x",
24+
"svd_path": "STM32F40x.svd",
25+
"tools": {
26+
"stlink": {
27+
"server": {
28+
"arguments": [
29+
"-f",
30+
"scripts/interface/stlink.cfg",
31+
"-c",
32+
"transport select hla_swd",
33+
"-f",
34+
"scripts/target/stm32f4x.cfg",
35+
"-c",
36+
"reset_config none"
37+
],
38+
"executable": "bin/openocd",
39+
"package": "tool-openocd"
40+
}
41+
}
42+
}
43+
},
44+
"frameworks": [
45+
"arduino",
46+
"stm32cube"
47+
],
48+
"name": "STM32F401RE (96k RAM. 512k Flash)",
49+
"upload": {
50+
"disable_flushing": false,
51+
"maximum_ram_size": 98304,
52+
"maximum_size": 524288,
53+
"protocol": "stlink",
54+
"protocols": [
55+
"stlink",
56+
"dfu",
57+
"jlink"
58+
],
59+
"require_upload_port": true,
60+
"use_1200bps_touch": false,
61+
"wait_for_upload_port": false
62+
},
63+
"url": "https://www.st.com/en/microcontrollers-microprocessors/stm32f401re.html",
64+
"vendor": "Generic"
65+
}

0 commit comments

Comments
 (0)