Browse Source

Trigorilla Pro board (#18692)

Claus Näveke 3 years ago
parent
commit
afce012960
No account linked to committer's email address
4 changed files with 168 additions and 0 deletions
  1. 1
    0
      Marlin/src/core/boards.h
  2. 2
    0
      Marlin/src/pins/pins.h
  3. 157
    0
      Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h
  4. 8
    0
      platformio.ini

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

@@ -311,6 +311,7 @@
311 311
 #define BOARD_CHITU3D_V5              4030  // Chitu3D TronXY X5SA V5 Board
312 312
 #define BOARD_CHITU3D_V6              4031  // Chitu3D TronXY X5SA V5 Board
313 313
 #define BOARD_CREALITY_V4             4032  // Creality v4.x (STM32F103RE)
314
+#define BOARD_TRIGORILLA_PRO          4033  // Trigorilla Pro (STM32F103ZET6)
314 315
 
315 316
 //
316 317
 // ARM Cortex-M4F

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

@@ -546,6 +546,8 @@
546 546
   #include "stm32f1/pins_CHITU3D_V6.h"          // STM32F1                                env:chitu_f103 env:chitu_f103_lvgl
547 547
 #elif MB(CREALITY_V4)
548 548
   #include "stm32f1/pins_CREALITY_V4.h"         // STM32F1                                env:STM32F103RET6_creality
549
+#elif MB(TRIGORILLA_PRO)
550
+  #include "stm32f1/pins_TRIGORILLA_PRO.h"      // STM32F1                                env:trigorilla_pro
549 551
 
550 552
 //
551 553
 // ARM Cortex-M4F

+ 157
- 0
Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h View File

@@ -0,0 +1,157 @@
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
+#pragma once
23
+
24
+/**
25
+ * ANYCUBIC Trigorilla Pro (STM32F130ZET6) board pin assignments.
26
+ * It is the same used by the Tronxy X5SA thanks to ftoz1 for sharing it
27
+ * https://github.com/MarlinFirmware/Marlin/issues/14655
28
+ * https://github.com/MarlinFirmware/Marlin/files/3401484/x5sa-main_board-2.pdf
29
+ */
30
+
31
+#ifndef __STM32F1__
32
+  #error "Oops! Select an STM32F1 board in 'Tools > Board.'"
33
+#elif HOTENDS > 2 || E_STEPPERS > 2
34
+  #error "Trigorilla Pro supports up to 2 hotends / E-steppers. Comment out this line to continue."
35
+#endif
36
+
37
+#define BOARD_INFO_NAME "Trigorilla Pro"
38
+#define DISABLE_JTAG
39
+
40
+//
41
+// EEPROM
42
+//
43
+#define FLASH_EEPROM_EMULATION
44
+#if ENABLED(FLASH_EEPROM_EMULATION)
45
+  // SoC Flash (framework-arduinoststm32-maple/STM32F1/libraries/EEPROM/EEPROM.h)
46
+  #define EEPROM_START_ADDRESS (0x8000000UL + (512 * 1024) - 2 * EEPROM_PAGE_SIZE)
47
+  #define EEPROM_PAGE_SIZE     (0x800U)     // 2KB, but will use 2x more (4KB)
48
+  #define MARLIN_EEPROM_SIZE    EEPROM_PAGE_SIZE
49
+#else
50
+  #define MARLIN_EEPROM_SIZE   (0x800U) // On SD, Limit to 2KB, require this amount of RAM
51
+#endif
52
+
53
+//
54
+// Limit Switches
55
+//
56
+#define X_MAX_PIN                           PG10
57
+#define Y_MAX_PIN                           PA12
58
+#define Z_MAX_PIN                           PA14
59
+#define Z_MIN_PIN                           PA13
60
+
61
+//
62
+// Steppers
63
+//
64
+#define X_ENABLE_PIN                        PC13
65
+#define X_STEP_PIN                          PE5
66
+#define X_DIR_PIN                           PE6
67
+
68
+#define Y_ENABLE_PIN                        PE4
69
+#define Y_STEP_PIN                          PE2
70
+#define Y_DIR_PIN                           PE3
71
+
72
+#define Z_ENABLE_PIN                        PE1
73
+#define Z_STEP_PIN                          PB9
74
+#define Z_DIR_PIN                           PE0
75
+
76
+#define E0_ENABLE_PIN                       PB8
77
+#define E0_STEP_PIN                         PB4
78
+#define E0_DIR_PIN                          PB5
79
+
80
+#define E1_ENABLE_PIN                       PG8
81
+#define E1_STEP_PIN                         PC7
82
+#define E1_DIR_PIN                          PC6
83
+
84
+//
85
+// Temperature Sensors
86
+//
87
+#define TEMP_0_PIN                          PA1   // TH1
88
+#define TEMP_BED_PIN                        PA0   // TB1
89
+
90
+//
91
+// Heaters
92
+//
93
+#define HEATER_0_PIN                        PG12  // HEATER1
94
+#define HEATER_BED_PIN                      PG11  // HOT BED
95
+#define HEATER_BED_INVERTING true
96
+
97
+//
98
+// Fans
99
+//
100
+#define CONTROLLER_FAN_PIN                  PD6   // FAN
101
+#define FAN_PIN                             PG13  // FAN
102
+#define FAN1_PIN                            PG14  // FAN
103
+
104
+//
105
+// Misc
106
+//
107
+#define BEEPER_PIN                          PB0
108
+#define LED_PIN                             PD3
109
+//#define POWER_LOSS_PIN                    PG2   // PG4 PW_DET
110
+#define FIL_RUNOUT_PIN                      PA15  // MT_DET
111
+
112
+/**
113
+ * Note: MKS Robin TFT screens use various TFT controllers
114
+ * Supported screens are based on the ILI9341, ST7789V and ILI9328 (320x240)
115
+ * ILI9488 is not supported.
116
+ * Define init sequences for other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp
117
+ *
118
+ * If the screen stays white, disable 'LCD_RESET_PIN' to let the bootloader init the screen.
119
+ *
120
+ * Setting an 'LCD_RESET_PIN' may cause a flicker when entering the LCD menu
121
+ * because Marlin uses the reset as a failsafe to revive a glitchy LCD.
122
+ */
123
+#define LCD_RESET_PIN                       PF11
124
+#define LCD_BACKLIGHT_PIN                   PD13
125
+#define FSMC_CS_PIN                         PD7   // NE4
126
+#define FSMC_RS_PIN                         PD11  // A0
127
+
128
+#define LCD_USE_DMA_FSMC                          // Use DMA transfers to send data to the TFT
129
+#define FSMC_DMA_DEV                        DMA2
130
+#define FSMC_DMA_CHANNEL                 DMA_CH5
131
+
132
+#if ENABLED(TOUCH_BUTTONS)
133
+  #define TOUCH_CS_PIN                      PB7   // SPI2_NSS
134
+  #define TOUCH_SCK_PIN                     PA5   // SPI2_SCK
135
+  #define TOUCH_MISO_PIN                    PA6   // SPI2_MISO
136
+  #define TOUCH_MOSI_PIN                    PA7   // SPI2_MOSI
137
+#endif
138
+
139
+// SPI1(PA7) & SPI3(PB5) not available
140
+#define ENABLE_SPI2
141
+
142
+#if ENABLED(SDIO_SUPPORT)
143
+  #define SCK_PIN                           PB13  // SPI2 ok
144
+  #define MISO_PIN                          PB14  // SPI2 ok
145
+  #define MOSI_PIN                          PB15  // SPI2 ok
146
+  #define SS_PIN                            PC11  // PB12 is X- ok
147
+  #define SD_DETECT_PIN                     -1    // SD_CD ok
148
+#else
149
+  // SD as custom software SPI (SDIO pins)
150
+  #define SCK_PIN                           PC12
151
+  #define MISO_PIN                          PC8
152
+  #define MOSI_PIN                          PD2
153
+  #define SS_PIN                            -1
154
+  #define ONBOARD_SD_CS_PIN                 PC11
155
+  #define SDSS                              PD2
156
+  #define SD_DETECT_PIN                     -1
157
+#endif

+ 8
- 0
platformio.ini View File

@@ -586,6 +586,14 @@ platform      = ${common_stm32f1.platform}
586 586
 extends       = env:mks_robin
587 587
 extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_pro.py
588 588
 
589
+
590
+#
591
+# TRIGORILLA PRO (STM32F103ZET6)
592
+#
593
+[env:trigorilla_pro]
594
+platform      = ${common_stm32f1.platform}
595
+extends       = env:mks_robin
596
+
589 597
 #
590 598
 # MKS Robin E3D (STM32F103RCT6) and
591 599
 # MKS Robin E3 with TMC2209

Loading…
Cancel
Save