Skip to content

Commit 90b7206

Browse files
committed
✨ BigTreeTech Manta M5P V1.0
1 parent 82674ab commit 90b7206

File tree

4 files changed

+348
-6
lines changed

4 files changed

+348
-6
lines changed

Marlin/src/core/boards.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -304,10 +304,11 @@
304304

305305
#define BOARD_BTT_EBB42_V1_1 4000 // BigTreeTech EBB42 V1.1 (STM32G0B1CB)
306306
#define BOARD_BTT_SKR_MINI_E3_V3_0 4001 // BigTreeTech SKR Mini E3 V3.0 (STM32G0B1RE)
307-
#define BOARD_BTT_MANTA_M4P_V1_0 4002 // BigTreeTech Manta M4P V1.0 (STM32G0B1RE)
308-
#define BOARD_BTT_MANTA_E3_EZ_V1_0 4003 // BigTreeTech Manta E3 EZ V1.0 (STM32G0B1RE)
309-
#define BOARD_BTT_MANTA_M8P_V1_0 4004 // BigTreeTech Manta M8P V1.0 (STM32G0B1VE)
310-
#define BOARD_BTT_MANTA_M8P_V1_1 4005 // BigTreeTech Manta M8P V1.1 (STM32G0B1VE)
307+
#define BOARD_BTT_MANTA_E3_EZ_V1_0 4002 // BigTreeTech Manta E3 EZ V1.0 (STM32G0B1RE)
308+
#define BOARD_BTT_MANTA_M4P_V1_0 4003 // BigTreeTech Manta M4P V1.0 (STM32G0B1RE)
309+
#define BOARD_BTT_MANTA_M5P_V1_0 4004 // BigTreeTech Manta M5P V1.0 (STM32G0B1RE)
310+
#define BOARD_BTT_MANTA_M8P_V1_0 4005 // BigTreeTech Manta M8P V1.0 (STM32G0B1VE)
311+
#define BOARD_BTT_MANTA_M8P_V1_1 4006 // BigTreeTech Manta M8P V1.1 (STM32G0B1VE)
311312

312313
//
313314
// STM32 ARM Cortex-M3

Marlin/src/pins/pins.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,8 @@
547547
#include "stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h" // STM32G0 env:STM32G0B1RE_btt env:STM32G0B1RE_btt_xfer
548548
#elif MB(BTT_MANTA_M4P_V1_0)
549549
#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
550552
#elif MB(BTT_MANTA_E3_EZ_V1_0)
551553
#include "stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h" // STM32G0 env:STM32G0B1RE_btt env:STM32G0B1RE_btt_xfer
552554
#elif MB(BTT_MANTA_M8P_V1_0)
Lines changed: 339 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,339 @@
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+
#ifndef BOARD_INFO_NAME
25+
#define BOARD_INFO_NAME "BTT Manta M5P V1.0"
26+
#endif
27+
28+
#define USES_DIAG_JUMPERS
29+
30+
// Ignore temp readings during development.
31+
//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
32+
33+
//
34+
// EEPROM
35+
//
36+
#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION)
37+
#undef NO_EEPROM_SELECTED
38+
#ifndef FLASH_EEPROM_EMULATION
39+
#define FLASH_EEPROM_EMULATION
40+
#endif
41+
#define EEPROM_PAGE_SIZE (0x800UL) // 2K
42+
#define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL)
43+
#define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE
44+
#endif
45+
46+
//
47+
// Servos
48+
//
49+
#define SERVO0_PIN PC15 // PROBE
50+
51+
//
52+
// Probe enable
53+
//
54+
#if ENABLED(PROBE_ENABLE_DISABLE)
55+
#ifndef PROBE_ENABLE_PIN
56+
#define PROBE_ENABLE_PIN SERVO0_PIN
57+
#endif
58+
#endif
59+
60+
//
61+
// Trinamic StallGuard pins
62+
//
63+
#define X_DIAG_PIN PD3 // MIN1
64+
#define Y_DIAG_PIN PD2 // MIN2
65+
#define Z_DIAG_PIN PC3 // MIN3
66+
#define E0_DIAG_PIN PC2 // MIN4
67+
#define E1_DIAG_PIN -1
68+
69+
//
70+
// Limit Switches
71+
//
72+
#define X_STOP_PIN X_DIAG_PIN // MIN1
73+
#define Y_STOP_PIN Y_DIAG_PIN // MIN1
74+
#define Z_STOP_PIN Z_DIAG_PIN // MIN3
75+
76+
//
77+
// Z Probe (when not Z_STOP_PIN)
78+
//
79+
#ifndef Z_MIN_PROBE_PIN
80+
#define Z_MIN_PROBE_PIN PC13 // PROBE
81+
//#define Z_MIN_PROBE_PIN PC15 // IND-DET (with adjustable pullup set via jumper)
82+
#endif
83+
84+
//
85+
// Filament Runout Sensor
86+
//
87+
#ifndef FIL_RUNOUT_PIN
88+
#define FIL_RUNOUT_PIN E0_DIAG_PIN // MIN4
89+
#endif
90+
91+
//
92+
// Steppers
93+
//
94+
#define X_STEP_PIN PC8
95+
#define X_DIR_PIN PC9
96+
#define X_ENABLE_PIN PA15
97+
#ifndef X_CS_PIN
98+
#define X_CS_PIN PD9
99+
#endif
100+
101+
#define Y_STEP_PIN PA10
102+
#define Y_DIR_PIN PA14
103+
#define Y_ENABLE_PIN PA13
104+
#ifndef Y_CS_PIN
105+
#define Y_CS_PIN PD8
106+
#endif
107+
108+
#define Z_STEP_PIN PC6
109+
#define Z_DIR_PIN PC7
110+
#define Z_ENABLE_PIN PA9
111+
#ifndef Z_CS_PIN
112+
#define Z_CS_PIN PB10
113+
#endif
114+
115+
#define E0_STEP_PIN PB12
116+
#define E0_DIR_PIN PB11
117+
#define E0_ENABLE_PIN PA8
118+
#ifndef E0_CS_PIN
119+
#define E0_CS_PIN PB2
120+
#endif
121+
122+
#define E1_STEP_PIN PB0
123+
#define E1_DIR_PIN PB1
124+
#define E1_ENABLE_PIN PC4
125+
#ifndef E1_CS_PIN
126+
#define E1_CS_PIN PA6
127+
#endif
128+
129+
//
130+
// Software SPI pins for TMC2130 stepper drivers
131+
//
132+
#if ENABLED(TMC_USE_SW_SPI)
133+
#ifndef TMC_SW_MOSI
134+
#define TMC_SW_MOSI PB15 // Shared with SPI header, Pin 5 (SPI2)
135+
#endif
136+
#ifndef TMC_SW_MISO
137+
#define TMC_SW_MISO PB14 // Shared with SPI header, Pin 6 (SPI2)
138+
#endif
139+
#ifndef TMC_SW_SCK
140+
#define TMC_SW_SCK PB13 // Shared with SPI header, Pin 4 (SPI2)
141+
#endif
142+
#endif
143+
144+
#if HAS_TMC_UART
145+
#define X_SERIAL_TX_PIN PD9 // X_CS_PIN
146+
#define X_SERIAL_RX_PIN X_SERIAL_TX_PIN
147+
148+
#define Y_SERIAL_TX_PIN PD8 // Y_CS_PIN
149+
#define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN
150+
151+
#define Z_SERIAL_TX_PIN PB10 // Z_CS_PIN
152+
#define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN
153+
154+
#define E0_SERIAL_TX_PIN PB2 // E0_CS_PIN
155+
#define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
156+
157+
#define E1_SERIAL_TX_PIN PA6 // E1_CS_PIN
158+
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
159+
160+
// Reduce baud rate to improve software serial reliability
161+
#define TMC_BAUD_RATE 19200
162+
#endif
163+
164+
//
165+
// Temperature Sensors
166+
//
167+
#define TEMP_0_PIN PA1 // Analog Input "TH0"
168+
#define TEMP_1_PIN PA2 // Analog Input "TH1"
169+
#define TEMP_BED_PIN PA0 // Analog Input "TB"
170+
171+
//
172+
// Heaters / Fans
173+
//
174+
#define HEATER_0_PIN PC5 // "HE0"
175+
#define HEATER_1_PIN PA7 // "HE1"
176+
#define HEATER_BED_PIN PA5 // "HB"
177+
178+
#define FAN_PIN PA4 // "FAN0"
179+
#define FAN1_PIN PA3 // "FAN1"
180+
181+
//
182+
// Auto fans
183+
//
184+
#ifndef E0_AUTO_FAN_PIN
185+
#define E0_AUTO_FAN_PIN FAN1_PIN
186+
#endif
187+
188+
/**
189+
* ------ ------
190+
* (BEEPER) PD5 | 1 2 | PD4 (BTN_ENC) (MISO) PB14 | 1 2 | PB13 (SCK)
191+
* (LCD_EN) PB3 | 3 4 | PD6 (LCD_RS) (BTN_EN1) PB8 | 3 4 | PB9 (SD_SS)
192+
* (LCD_D4) PB5 | 5 6 PB4 (LCD_D5) (BTN_EN2) PC10 | 5 6 PB15 (MOSI)
193+
* (LCD_D6) PB7 | 7 8 | PB6 (LCD_D7) (SD_DETECT) PC12 | 7 8 | PF2
194+
* GND | 9 10 | 5V GND | 9 10 | --
195+
* ------ ------
196+
* EXP1 EXP2
197+
*/
198+
#define EXP1_01_PIN PD5
199+
#define EXP1_02_PIN PD4
200+
#define EXP1_03_PIN PB3
201+
#define EXP1_04_PIN PD6
202+
#define EXP1_05_PIN PB5
203+
#define EXP1_06_PIN PB4
204+
#define EXP1_07_PIN PB7
205+
#define EXP1_08_PIN PB6
206+
207+
#define EXP2_01_PIN PB14
208+
#define EXP2_02_PIN PB13
209+
#define EXP2_03_PIN PB8
210+
#define EXP2_04_PIN PB9
211+
#define EXP2_05_PIN PC10
212+
#define EXP2_06_PIN PB15
213+
#define EXP2_07_PIN PC12
214+
#define EXP2_08_PIN -1
215+
216+
//
217+
// Onboard SD card
218+
// Must use soft SPI because Marlin's default hardware SPI is tied to LCD's EXP2
219+
//
220+
#if SD_CONNECTION_IS(LCD)
221+
#define SDSS EXP2_04_PIN
222+
#define SD_SS_PIN SDSS
223+
#define SD_SCK_PIN EXP2_02_PIN
224+
#define SD_MISO_PIN EXP2_01_PIN
225+
#define SD_MOSI_PIN EXP2_06_PIN
226+
#define SD_DETECT_PIN EXP2_07_PIN
227+
#elif SD_CONNECTION_IS(ONBOARD)
228+
#define SD_SCK_PIN PB13
229+
#define SD_MISO_PIN PB14
230+
#define SD_MOSI_PIN PB15
231+
#define ONBOARD_SD_CS_PIN PC1 // Chip select for "System" SD card
232+
#define SD_SS_PIN ONBOARD_SD_CS_PIN
233+
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
234+
#error "No custom SD drive cable defined for this board."
235+
#endif
236+
237+
//
238+
// LCDs and Controllers
239+
//
240+
#if IS_TFTGLCD_PANEL
241+
242+
#if ENABLED(TFTGLCD_PANEL_SPI)
243+
#define TFTGLCD_CS EXP2_03_PIN
244+
#endif
245+
246+
#elif HAS_WIRED_LCD
247+
248+
#define BEEPER_PIN EXP1_01_PIN
249+
#define BTN_ENC EXP1_02_PIN
250+
251+
#if ENABLED(CR10_STOCKDISPLAY)
252+
253+
#define LCD_PINS_RS EXP1_07_PIN
254+
255+
#define BTN_EN1 EXP1_03_PIN
256+
#define BTN_EN2 EXP1_05_PIN
257+
258+
#define LCD_PINS_ENABLE EXP1_08_PIN
259+
#define LCD_PINS_D4 EXP1_06_PIN
260+
261+
#elif ENABLED(MKS_MINI_12864)
262+
263+
#define DOGLCD_A0 EXP1_07_PIN
264+
#define DOGLCD_CS EXP1_06_PIN
265+
#define BTN_EN1 EXP2_03_PIN
266+
#define BTN_EN2 EXP2_05_PIN
267+
268+
#else
269+
270+
#define LCD_PINS_RS EXP1_04_PIN
271+
272+
#define BTN_EN1 EXP2_03_PIN
273+
#define BTN_EN2 EXP2_05_PIN
274+
275+
#define LCD_PINS_ENABLE EXP1_03_PIN
276+
#define LCD_PINS_D4 EXP1_05_PIN
277+
278+
#if ENABLED(FYSETC_MINI_12864)
279+
#define DOGLCD_CS EXP1_03_PIN
280+
#define DOGLCD_A0 EXP1_04_PIN
281+
//#define LCD_BACKLIGHT_PIN -1
282+
283+
#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems
284+
// results in LCD soft SPI mode 3, SD soft SPI mode 0
285+
286+
#define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally.
287+
#if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
288+
#ifndef RGB_LED_R_PIN
289+
#define RGB_LED_R_PIN EXP1_06_PIN
290+
#endif
291+
#ifndef RGB_LED_G_PIN
292+
#define RGB_LED_G_PIN EXP1_07_PIN
293+
#endif
294+
#ifndef RGB_LED_B_PIN
295+
#define RGB_LED_B_PIN EXP1_08_PIN
296+
#endif
297+
#elif ENABLED(FYSETC_MINI_12864_2_1)
298+
#define NEOPIXEL_PIN EXP1_06_PIN
299+
#endif
300+
#endif // !FYSETC_MINI_12864
301+
302+
#if IS_ULTIPANEL
303+
#define LCD_PINS_D5 EXP1_06_PIN
304+
#define LCD_PINS_D6 EXP1_07_PIN
305+
#define LCD_PINS_D7 EXP1_08_PIN
306+
307+
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
308+
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
309+
#endif
310+
311+
#endif
312+
313+
#endif
314+
315+
#endif // HAS_WIRED_LCD
316+
317+
// Alter timing for graphical display
318+
#if IS_U8GLIB_ST7920
319+
#ifndef BOARD_ST7920_DELAY_1
320+
#define BOARD_ST7920_DELAY_1 120
321+
#endif
322+
#ifndef BOARD_ST7920_DELAY_2
323+
#define BOARD_ST7920_DELAY_2 80
324+
#endif
325+
#ifndef BOARD_ST7920_DELAY_3
326+
#define BOARD_ST7920_DELAY_3 580
327+
#endif
328+
#endif
329+
330+
//
331+
// NeoPixel LED
332+
//
333+
#ifndef NEOPIXEL_PIN
334+
#define NEOPIXEL_PIN PC11 // RGB1
335+
#endif
336+
337+
#ifndef NEOPIXEL2_PIN
338+
#define NEOPIXEL2_PIN PC14 // RGB2
339+
#endif

ini/stm32g0.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ upload_protocol = stlink
4141
debug_tool = stlink
4242

4343
#
44-
# BigTreeTech SKR Mini E3 V3.0 / Manta M4P V1.0 / Manta E3 EZ V1.0 (STM32G0B1RET6 ARM Cortex-M0+)
44+
# BigTreeTech SKR Mini E3 V3.0 / Manta E3 EZ V1.0 / Manta M4P V1.0 / Manta M5P V1.0 (STM32G0B1RET6 ARM Cortex-M0+)
4545
#
4646
[env:STM32G0B1RE_btt]
4747
extends = stm32_variant
@@ -59,7 +59,7 @@ upload_protocol = stlink
5959
debug_tool = stlink
6060

6161
#
62-
# BigTreeTech SKR Mini E3 V3.0 / Manta M4P V1.0 / Manta E3 EZ V1.0 (STM32G0B1RET6 ARM Cortex-M0+)
62+
# BigTreeTech SKR Mini E3 V3.0 / Manta E3 EZ V1.0 / Manta M4P V1.0 / Manta M5P V1.0 (STM32G0B1RET6 ARM Cortex-M0+)
6363
# Custom upload to SD via Marlin with Binary Protocol
6464
#
6565
[env:STM32G0B1RE_btt_xfer]

0 commit comments

Comments
 (0)