Skip to content

Commit 2bc711c

Browse files
authored
✨ BigTreeTech Manta M4P, M5P, M8P V1.0 / 1.1, E3 EZ (MarlinFirmware#25001)
1 parent 444259d commit 2bc711c

21 files changed

+3061
-159
lines changed

Marlin/src/core/boards.h

Lines changed: 160 additions & 150 deletions
Large diffs are not rendered by default.

Marlin/src/pins/pins.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,16 @@
545545
#include "stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_USB env:STM32F103RE_btt env:STM32F103RE_btt_USB env:STM32F103RC_btt_maple env:STM32F103RC_btt_USB_maple env:STM32F103RE_btt_maple env:STM32F103RE_btt_USB_maple
546546
#elif MB(BTT_SKR_MINI_E3_V3_0)
547547
#include "stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h" // STM32G0 env:STM32G0B1RE_btt env:STM32G0B1RE_btt_xfer
548+
#elif MB(BTT_MANTA_M4P_V1_0)
549+
#include "stm32g0/pins_BTT_MANTA_M4P_V1_0.h" // STM32G0 env:STM32G0B1RE_btt env:STM32G0B1RE_btt_xfer
550+
#elif MB(BTT_MANTA_M5P_V1_0)
551+
#include "stm32g0/pins_BTT_MANTA_M5P_V1_0.h" // STM32G0 env:STM32G0B1RE_btt env:STM32G0B1RE_btt_xfer
552+
#elif MB(BTT_MANTA_E3_EZ_V1_0)
553+
#include "stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h" // STM32G0 env:STM32G0B1RE_btt env:STM32G0B1RE_btt_xfer
554+
#elif MB(BTT_MANTA_M8P_V1_0)
555+
#include "stm32g0/pins_BTT_MANTA_M8P_V1_0.h" // STM32G0 env:STM32G0B1VE_btt env:STM32G0B1VE_btt_xfer
556+
#elif MB(BTT_MANTA_M8P_V1_1)
557+
#include "stm32g0/pins_BTT_MANTA_M8P_V1_1.h" // STM32G0 env:STM32G0B1VE_btt env:STM32G0B1VE_btt_xfer
548558
#elif MB(BTT_SKR_MINI_E3_V3_0_1)
549559
#include "stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h"// STM32F4 env:STM32F401RC_btt
550560
#elif MB(BTT_SKR_MINI_MZ_V1_0)
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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+
#pragma once
23+
24+
#if NOT_TARGET(STM32G0xx) || NOT_TARGET(STM32G0B1xx)
25+
#error "Oops! Select an STM32G0 board in 'Tools > Board.'"
26+
#endif

Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
*/
2222
#pragma once
2323

24+
#include "env_validate.h"
25+
2426
/** CAUTION **
2527
* This board definition is to facilitate support for a Filament Extrusion
2628
* devices, used to convert waste plastic into 3D printable filament.
Lines changed: 340 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,340 @@
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+
#pragma once
23+
24+
#include "env_validate.h"
25+
26+
#ifndef BOARD_INFO_NAME
27+
#define BOARD_INFO_NAME "BTT Manta E3 EZ V1.0"
28+
#endif
29+
30+
#define USES_DIAG_JUMPERS
31+
32+
// Ignore temp readings during development.
33+
//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
34+
35+
//
36+
// EEPROM
37+
//
38+
#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION)
39+
#undef NO_EEPROM_SELECTED
40+
#ifndef FLASH_EEPROM_EMULATION
41+
#define FLASH_EEPROM_EMULATION
42+
#endif
43+
#define EEPROM_PAGE_SIZE (0x800UL) // 2K
44+
#define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL)
45+
#define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE
46+
#endif
47+
48+
//
49+
// Servos
50+
//
51+
#define SERVO0_PIN PA7 // BLTouch
52+
53+
//
54+
// Probe enable
55+
//
56+
#if ENABLED(PROBE_ENABLE_DISABLE)
57+
#ifndef PROBE_ENABLE_PIN
58+
#define PROBE_ENABLE_PIN SERVO0_PIN
59+
#endif
60+
#endif
61+
62+
//
63+
// Trinamic StallGuard pins
64+
//
65+
#define X_DIAG_PIN PC4 // X-STOP
66+
#define Y_DIAG_PIN PB0 // Y-STOP
67+
#define Z_DIAG_PIN PC6 // Z-STOP
68+
#define E0_DIAG_PIN PC5 // E0-DET
69+
#define E1_DIAG_PIN PB1 // E1-DET
70+
71+
//
72+
// Limit Switches
73+
//
74+
#define X_STOP_PIN X_DIAG_PIN // X-STOP
75+
#define Y_STOP_PIN Y_DIAG_PIN // Y-STOP
76+
#define Z_STOP_PIN Z_DIAG_PIN // Z-STOP
77+
78+
//
79+
// Z Probe (when not Z_STOP_PIN)
80+
//
81+
#define Z_MIN_PROBE_PIN PA6 // BLTouch
82+
83+
//
84+
// Filament Runout Sensor
85+
//
86+
#ifndef FIL_RUNOUT_PIN
87+
#define FIL_RUNOUT_PIN E0_DIAG_PIN // E0-DET
88+
#endif
89+
#ifndef FIL_RUNOUT2_PIN
90+
#define FIL_RUNOUT2_PIN E1_DIAG_PIN // E1-DET
91+
#endif
92+
93+
//
94+
// Power Supply Control
95+
//
96+
#ifndef PS_ON_PIN
97+
#define PS_ON_PIN PA9 // PS-ON
98+
#endif
99+
100+
//
101+
// Power Loss Detection
102+
//
103+
#ifndef POWER_LOSS_PIN
104+
#define POWER_LOSS_PIN PB9 // PWRDET
105+
#endif
106+
107+
//
108+
// Steppers
109+
//
110+
#define X_STEP_PIN PA14
111+
#define X_DIR_PIN PA10
112+
#define X_ENABLE_PIN PA13
113+
#ifndef X_CS_PIN
114+
#define X_CS_PIN PB8
115+
#endif
116+
117+
#define Y_STEP_PIN PC8
118+
#define Y_DIR_PIN PA15
119+
#define Y_ENABLE_PIN PC14
120+
#ifndef Y_CS_PIN
121+
#define Y_CS_PIN PC9
122+
#endif
123+
124+
#define Z_STEP_PIN PD2
125+
#define Z_DIR_PIN PD4
126+
#define Z_ENABLE_PIN PD3
127+
#ifndef Z_CS_PIN
128+
#define Z_CS_PIN PD0
129+
#endif
130+
131+
#define E0_STEP_PIN PD5
132+
#define E0_DIR_PIN PD6
133+
#define E0_ENABLE_PIN PB3
134+
#ifndef E0_CS_PIN
135+
#define E0_CS_PIN PD1
136+
#endif
137+
138+
#define E1_STEP_PIN PB7
139+
#define E1_DIR_PIN PB6
140+
#define E1_ENABLE_PIN PB4
141+
#ifndef E1_CS_PIN
142+
#define E1_CS_PIN PB5
143+
#endif
144+
145+
//
146+
// Software SPI pins for TMC2130 stepper drivers
147+
//
148+
#if ENABLED(TMC_USE_SW_SPI)
149+
#ifndef TMC_SW_MOSI
150+
#define TMC_SW_MOSI PC12 // Shared with SPI header, Pin 5 (SPI3)
151+
#endif
152+
#ifndef TMC_SW_MISO
153+
#define TMC_SW_MISO PC11 // Shared with SPI header, Pin 6 (SPI3)
154+
#endif
155+
#ifndef TMC_SW_SCK
156+
#define TMC_SW_SCK PC10 // Shared with SPI header, Pin 4 (SPI3)
157+
#endif
158+
#endif
159+
160+
#if HAS_TMC_UART
161+
#define X_SERIAL_TX_PIN PB8 // X_CS_PIN
162+
#define X_SERIAL_RX_PIN X_SERIAL_TX_PIN
163+
164+
#define Y_SERIAL_TX_PIN PC9 // Y_CS_PIN
165+
#define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN
166+
167+
#define Z_SERIAL_TX_PIN PD0 // Z_CS_PIN
168+
#define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN
169+
170+
#define E0_SERIAL_TX_PIN PD1 // E0_CS_PIN
171+
#define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
172+
173+
#define E1_SERIAL_TX_PIN PB5 // E1_CS_PIN
174+
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
175+
176+
// Reduce baud rate to improve software serial reliability
177+
#define TMC_BAUD_RATE 19200
178+
#endif
179+
180+
//
181+
// Temperature Sensors
182+
//
183+
#define TEMP_0_PIN PA4 // Analog Input "TH0"
184+
#define TEMP_1_PIN PA5 // Analog Input "TH1"
185+
#define TEMP_BED_PIN PA3 // Analog Input "TB"
186+
187+
//
188+
// Heaters / Fans
189+
//
190+
#define HEATER_0_PIN PB11 // "HE0"
191+
#define HEATER_1_PIN PB10 // "HE1"
192+
#define HEATER_BED_PIN PB2 // "HB"
193+
194+
#define FAN_PIN PA8 // "FAN0"
195+
#define FAN1_PIN PB15 // "FAN1"
196+
#define FAN2_PIN PB14 // "FAN2"
197+
198+
//
199+
// Auto fans
200+
//
201+
#if HOTENDS == 2
202+
#ifndef E0_AUTO_FAN_PIN
203+
#define E0_AUTO_FAN_PIN FAN1_PIN
204+
#endif
205+
#ifndef E1_AUTO_FAN_PIN
206+
#define E1_AUTO_FAN_PIN FAN2_PIN
207+
#endif
208+
#else
209+
#ifndef E0_AUTO_FAN_PIN
210+
#define E0_AUTO_FAN_PIN FAN1_PIN
211+
#endif
212+
#ifndef CONTROLLER_FAN_PIN
213+
#define CONTROLLER_FAN_PIN FAN2_PIN
214+
#endif
215+
#endif
216+
217+
/**
218+
* Manta E3 EZ V1.0
219+
* ------
220+
* (BEEPER) PC1 | 1 2 | PC2 (BTN_ENC)
221+
* (BTN_EN1) PC3 | 3 4 | RESET
222+
* (BTN_EN2) PC0 5 6 | PA0 (LCD_D4)
223+
* (LCD_RS) PA2 | 7 8 | PA1 (LCD_EN)
224+
* GND | 9 10 | 5V
225+
* ------
226+
* EXP1
227+
*/
228+
#define EXP1_01_PIN PC1
229+
#define EXP1_02_PIN PC2
230+
#define EXP1_03_PIN PC3
231+
#define EXP1_04_PIN -1
232+
#define EXP1_05_PIN PC0
233+
#define EXP1_06_PIN PA0
234+
#define EXP1_07_PIN PA2
235+
#define EXP1_08_PIN PA1
236+
#define EXP1_09_PIN -1
237+
#define EXP1_10_PIN -1
238+
239+
#if HAS_DWIN_E3V2 || IS_DWIN_MARLINUI
240+
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
241+
#error "CAUTION! Ender-3 V2 display requires a custom cable with TX = PA0, RX = PC2. See 'pins_BTT_MANTA_E3_EZ_V1_0.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
242+
#endif
243+
244+
/**
245+
* Ender-3 V2 display Manta E3 EZ V1.0 Ender-3 V2 display --> Manta E3 EZ V1.0
246+
* ------ ------ RX 3 --> 5 P0_15
247+
* -- | 1 2 | -- (BEEPER) PC1 | 1 2 | PC2 (BTN_ENC) TX 4 --> 9 P0_16
248+
* (MANTA TX1) RX | 3 4 | TX (MANTA RX1) (BTN_EN1) PC3 | 3 4 | RESET BEEPER 6 --> 10 P2_08
249+
* (BTN_ENC) ENT 5 6 | BEEPER (BTN_EN2) PC0 5 6 | PA0 (LCD_D4)
250+
* (BTN_E2) B | 7 8 | A (BTN_E1) (LCD_RS) PA2 | 7 8 | PA1 (LCD_EN)
251+
* GND | 9 10 | 5V GND | 9 10 | 5V
252+
* ------ ------
253+
*/
254+
255+
#define BEEPER_PIN EXP1_01_PIN
256+
#define BTN_EN1 EXP1_08_PIN
257+
#define BTN_EN2 EXP1_07_PIN
258+
#define BTN_ENC EXP1_05_PIN
259+
260+
#elif HAS_WIRED_LCD
261+
262+
#if ENABLED(CR10_STOCKDISPLAY)
263+
264+
#define BEEPER_PIN EXP1_01_PIN
265+
266+
#define BTN_EN1 EXP1_03_PIN
267+
#define BTN_EN2 EXP1_05_PIN
268+
#define BTN_ENC EXP1_02_PIN
269+
270+
#define LCD_PINS_RS EXP1_07_PIN
271+
#define LCD_PINS_ENABLE EXP1_08_PIN
272+
#define LCD_PINS_D4 EXP1_06_PIN
273+
274+
#elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD!
275+
276+
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
277+
#error "CAUTION! ZONESTAR_LCD requires wiring modifications. See 'pins_BTT_MANTA_E3_EZ_V1_0.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
278+
#endif
279+
280+
#define LCD_PINS_RS EXP1_06_PIN
281+
#define LCD_PINS_ENABLE EXP1_02_PIN
282+
#define LCD_PINS_D4 EXP1_07_PIN
283+
#define LCD_PINS_D5 EXP1_05_PIN
284+
#define LCD_PINS_D6 EXP1_03_PIN
285+
#define LCD_PINS_D7 EXP1_01_PIN
286+
#define ADC_KEYPAD_PIN PA7 // Repurpose default SERVO0_PIN for ADC - CONNECTING TO 5V WILL DAMAGE THE BOARD!
287+
288+
#elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
289+
290+
#define BTN_EN1 EXP1_03_PIN
291+
#define BTN_EN2 EXP1_05_PIN
292+
#define BTN_ENC EXP1_02_PIN
293+
294+
#define DOGLCD_CS EXP1_07_PIN
295+
#define DOGLCD_A0 EXP1_06_PIN
296+
#define DOGLCD_SCK EXP1_01_PIN
297+
#define DOGLCD_MOSI EXP1_08_PIN
298+
#define FORCE_SOFT_SPI
299+
#define LCD_BACKLIGHT_PIN -1
300+
301+
#else
302+
303+
#error "Only ZONESTAR_LCD, MKS_MINI_12864, ENDER2_STOCKDISPLAY, and CR10_STOCKDISPLAY are currently supported on the BTT_MANTA_E3_EZ_V1_0."
304+
305+
#endif
306+
307+
#endif // HAS_WIRED_LCD
308+
309+
//
310+
// SD Support
311+
//
312+
313+
#ifndef SDCARD_CONNECTION
314+
#define SDCARD_CONNECTION ONBOARD
315+
#endif
316+
317+
#define SD_DETECT_PIN -1
318+
319+
#if SD_CONNECTION_IS(LCD) && (BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) || IS_TFTGLCD_PANEL)
320+
#define SD_SS_PIN EXP1_05_PIN
321+
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
322+
#error "SD CUSTOM_CABLE is not compatible with Manta E3 EZ."
323+
#endif
324+
325+
#define ONBOARD_SPI_DEVICE 3 // SPI3 -> used only by HAL/STM32F1...
326+
#define ONBOARD_SD_CS_PIN PC13 // Chip select for "System" SD card
327+
328+
#define ENABLE_SPI3
329+
#define SDSS ONBOARD_SD_CS_PIN
330+
#define SD_SS_PIN ONBOARD_SD_CS_PIN
331+
#define SD_SCK_PIN PC10
332+
#define SD_MISO_PIN PC11
333+
#define SD_MOSI_PIN PC12
334+
335+
//
336+
// NeoPixel LED
337+
//
338+
#ifndef NEOPIXEL_PIN
339+
#define NEOPIXEL_PIN PC7 // RGB
340+
#endif

0 commit comments

Comments
 (0)