Browse Source

MPX_ARM_MINI board (Mingda MD-16) (#20711)

rafaljot 3 years ago
parent
commit
0d2645b3e1
No account linked to committer's email address

+ 1
- 0
Marlin/src/core/boards.h View File

@@ -338,6 +338,7 @@
338 338
 #define BOARD_FLY_MINI                4045  // FLY MINI (STM32F103RCT6)
339 339
 #define BOARD_FLSUN_HISPEED           4046  // FLSUN HiSpeedV1 (STM32F103VET6)
340 340
 #define BOARD_BEAST                   4047  // STM32F103RET6 Libmaple-based controller
341
+#define BOARD_MINGDA_MPX_ARM_MINI     4048  // STM32F103ZET6 Mingda MD-16
341 342
 
342 343
 //
343 344
 // ARM Cortex-M4F

+ 2
- 0
Marlin/src/pins/pins.h View File

@@ -548,6 +548,8 @@
548 548
   #include "stm32f1/pins_FLSUN_HISPEED.h"       // STM32F1                                env:flsun_hispeed
549 549
 #elif MB(BEAST)
550 550
   #include "stm32f1/pins_BEAST.h"               // STM32F1                                env:STM32F103RE
551
+#elif MB(MINGDA_MPX_ARM_MINI)
552
+  #include "stm32f1/pins_MINGDA_MPX_ARM_MINI.h" // STM32F1                                env:STM32F103RE
551 553
 
552 554
 //
553 555
 // ARM Cortex-M4F

+ 176
- 0
Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h View File

@@ -0,0 +1,176 @@
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 <https://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+#pragma once
23
+
24
+/**
25
+ * MKS Robin mini (STM32F130VET6) board pin assignments
26
+ */
27
+
28
+#if NOT_TARGET(STM32F1, STM32F1xx)
29
+  #error "Oops! Select an STM32F1 board in 'Tools > Board.'"
30
+#elif HOTENDS > 2 || E_STEPPERS > 2
31
+  #error "MKS Robin supports up to 2 hotends / E-steppers. Comment out this line to continue."
32
+#endif
33
+
34
+#define BOARD_INFO_NAME "Mingda MPX_ARM_MINI"
35
+
36
+#define BOARD_NO_NATIVE_USB
37
+#define DISABLE_DEBUG
38
+
39
+//
40
+// EEPROM
41
+//
42
+
43
+/*
44
+//Mingda used an unknown EEPROM chip ATMLH753, so I turned on the emulation below.
45
+//It is connected to EEPROM PB6 PB7
46
+
47
+#define I2C_EEPROM
48
+#undef NO_EEPROM_SELECTED
49
+#define MARLIN_EEPROM_SIZE                0x1000  // 4KB
50
+#define USE_SHARED_EEPROM                      1  // Use Platform-independent Arduino functions for I2C EEPROM
51
+#define E2END                             0xFFFF  // EEPROM end address AT24C256 (32kB)
52
+*/
53
+
54
+#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION)
55
+  #define FLASH_EEPROM_EMULATION
56
+  #define EEPROM_PAGE_SIZE                0x800U  // 2KB
57
+  #define EEPROM_START_ADDRESS  (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL)
58
+  #define MARLIN_EEPROM_SIZE    EEPROM_PAGE_SIZE  // 2KB
59
+#endif
60
+
61
+#define SPI_DEVICE                             2
62
+
63
+//
64
+// Limit Switches
65
+//
66
+#define X_MIN_PIN                           PD6
67
+#define X_MAX_PIN                           PG15
68
+#define Y_MIN_PIN                           PG9
69
+#define Y_MAX_PIN                           PG14
70
+#define Z_MIN_PIN                           PG10
71
+#define Z_MAX_PIN                           PG13
72
+
73
+#ifndef FIL_RUNOUT_PIN
74
+  #define FIL_RUNOUT_PIN                    PG11
75
+#endif
76
+
77
+//
78
+// Steppers
79
+//
80
+#define X_ENABLE_PIN                        PD13
81
+#define X_STEP_PIN                          PD12
82
+#define X_DIR_PIN                           PD11
83
+
84
+#define Y_ENABLE_PIN                        PG4
85
+#define Y_STEP_PIN                          PG3
86
+#define Y_DIR_PIN                           PG2
87
+
88
+#define Z_ENABLE_PIN                        PG7
89
+#define Z_STEP_PIN                          PG6
90
+#define Z_DIR_PIN                           PG5
91
+
92
+#define E0_ENABLE_PIN                       PC7
93
+#define E0_STEP_PIN                         PC6
94
+#define E0_DIR_PIN                          PG8
95
+
96
+//
97
+// Temperature Sensors
98
+//
99
+//#define TEMP_0_PIN                        PF6   // THERM_E0
100
+//#define TEMP_0_PIN                        PB3   // E0 K+
101
+#define TEMP_BED_PIN                        PF7   // THERM_BED
102
+
103
+#define MAX6675_SS_PIN                      PB5
104
+#define MAX6675_SCK_PIN                     PB3
105
+#define MAX6675_DO_PIN                      PB4
106
+#define MAX6675_MOSI_PIN                    PA14
107
+
108
+//
109
+// Heaters / Fans
110
+//
111
+#define HEATER_0_PIN                        PB0
112
+#define HEATER_BED_PIN                      PB1
113
+
114
+#define FAN_PIN                             PA0   // FAN
115
+
116
+//
117
+// SD Card
118
+//
119
+#ifndef SDCARD_CONNECTION
120
+  #define SDCARD_CONNECTION              ONBOARD
121
+#endif
122
+
123
+#define SDIO_SUPPORT
124
+#define SDIO_CLOCK                       4500000  // 4.5 MHz
125
+#define SDIO_READ_RETRIES                     16
126
+
127
+#define SD_DETECT_PIN                       PC5
128
+#define ONBOARD_SPI_DEVICE                     1  // SPI1
129
+#define ONBOARD_SD_CS_PIN                   PC10
130
+
131
+//
132
+// LCD / Controller
133
+//
134
+#define BEEPER_PIN                          PE4
135
+
136
+/**
137
+ * Note: MKS Robin TFT screens use various TFT controllers.
138
+ * If the screen stays white, disable 'LCD_RESET_PIN'
139
+ * to let the bootloader init the screen.
140
+ */
141
+#if HAS_FSMC_TFT
142
+  /**
143
+   * Note: MKS Robin TFT screens use various TFT controllers
144
+   * Supported screens are based on the ILI9341, ST7789V and ILI9328 (320x240)
145
+   * ILI9488 is not supported
146
+   * Define init sequences for other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp
147
+   *
148
+   * If the screen stays white, disable 'TFT_RESET_PIN'
149
+   * to let the bootloader init the screen.
150
+   *
151
+   * Setting an 'TFT_RESET_PIN' may cause a flicker when entering the LCD menu
152
+   * because Marlin uses the reset as a failsafe to revive a glitchy LCD.
153
+   */
154
+  #define TFT_CS_PIN                        PD7   // NE4
155
+  #define TFT_RS_PIN                        PG0   // A0
156
+
157
+  #define FSMC_CS_PIN                 TFT_CS_PIN
158
+  #define FSMC_RS_PIN                 TFT_RS_PIN
159
+
160
+  #define LCD_USE_DMA_FSMC                        // Use DMA transfers to send data to the TFT
161
+  #define FSMC_DMA_DEV                      DMA2
162
+  #define FSMC_DMA_CHANNEL               DMA_CH5
163
+
164
+  #define TFT_RESET_PIN                     PF15
165
+  #define TFT_BACKLIGHT_PIN                 PF11
166
+
167
+  #define TOUCH_BUTTONS_HW_SPI
168
+  #define TOUCH_BUTTONS_HW_SPI_DEVICE          1
169
+#endif
170
+
171
+#if NEED_TOUCH_PINS
172
+  #define TOUCH_CS_PIN                      PA4   // SPI2_NSS
173
+  #define TOUCH_SCK_PIN                     PA5   // SPI2_SCK
174
+  #define TOUCH_MISO_PIN                    PA6   // SPI2_MISO
175
+  #define TOUCH_MOSI_PIN                    PA7   // SPI2_MOSI
176
+#endif

+ 17
- 0
platformio.ini View File

@@ -1524,6 +1524,23 @@ build_flags       = ${stm32_flash_drive.build_flags}
1524 1524
   -DUSE_USB_HS_IN_FS
1525 1525
   -DUSBD_USE_CDC
1526 1526
 
1527
+#
1528
+# Mingda MPX_ARM_MINI
1529
+#
1530
+
1531
+[env:mingda_mpx_arm_mini]
1532
+platform             = ${common_stm32.platform}
1533
+extends              = common_stm32
1534
+board                = genericSTM32F103ZE
1535
+board_build.core     = stm32
1536
+board_build.variant  = MARLIN_F103Zx
1537
+board_build.ldscript = ldscript.ld
1538
+board_build.offset   = 0x10000
1539
+build_flags          = ${common_stm32.build_flags} -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5
1540
+build_unflags        = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC
1541
+extra_scripts        = ${common.extra_scripts} pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py buildroot/share/PlatformIO/scripts/stm32_bootloader.py
1542
+
1543
+
1527 1544
 #################################
1528 1545
 #                               #
1529 1546
 #      Other Architectures      #

Loading…
Cancel
Save