|
@@ -0,0 +1,195 @@
|
|
1
|
+/**
|
|
2
|
+ * Marlin 3D Printer Firmware
|
|
3
|
+ * Copyright (c) 2021 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
|
+ * Eryone Ery32 mini (STM32F103VET6) board pin assignments
|
|
26
|
+ */
|
|
27
|
+
|
|
28
|
+#include "env_validate.h"
|
|
29
|
+
|
|
30
|
+#if HOTENDS > 2 || E_STEPPERS > 2
|
|
31
|
+ #error "Eryone Ery32 mini supports up to 2 hotends / E-steppers. Comment out this line to continue."
|
|
32
|
+#endif
|
|
33
|
+
|
|
34
|
+#ifndef BOARD_INFO_NAME
|
|
35
|
+ #define BOARD_INFO_NAME "ERYONE Ery32 mini"
|
|
36
|
+#endif
|
|
37
|
+
|
|
38
|
+//#define DISABLE_DEBUG
|
|
39
|
+#define DISABLE_JTAG
|
|
40
|
+//#define ENABLE_SPI3
|
|
41
|
+#define FLASH_EEPROM_EMULATION
|
|
42
|
+#define FAN_SOFT_PWM
|
|
43
|
+
|
|
44
|
+#if ENABLED(FLASH_EEPROM_EMULATION)
|
|
45
|
+ #define EEPROM_PAGE_SIZE (0x800U) // 2KB
|
|
46
|
+ #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL)
|
|
47
|
+ #define MARLIN_EEPROM_SIZE (EEPROM_PAGE_SIZE)
|
|
48
|
+#endif
|
|
49
|
+
|
|
50
|
+//
|
|
51
|
+// Servos
|
|
52
|
+//
|
|
53
|
+#define SERVO0_PIN PA12
|
|
54
|
+
|
|
55
|
+//
|
|
56
|
+// Limit Switches
|
|
57
|
+//
|
|
58
|
+#define X_STOP_PIN PD8
|
|
59
|
+#define Y_STOP_PIN PD15
|
|
60
|
+#define Z_MIN_PIN PA11
|
|
61
|
+//#define Z_MAX_PIN PB1
|
|
62
|
+
|
|
63
|
+//
|
|
64
|
+// Steppers
|
|
65
|
+//
|
|
66
|
+#define X_STEP_PIN PB15
|
|
67
|
+#define X_DIR_PIN PB14
|
|
68
|
+#define X_ENABLE_PIN PD10
|
|
69
|
+
|
|
70
|
+#define Y_STEP_PIN PD14
|
|
71
|
+#define Y_DIR_PIN PD13
|
|
72
|
+#define Y_ENABLE_PIN PC6
|
|
73
|
+
|
|
74
|
+#define Z_STEP_PIN PC8
|
|
75
|
+#define Z_DIR_PIN PC7
|
|
76
|
+#define Z_ENABLE_PIN PA8
|
|
77
|
+
|
|
78
|
+#define E0_STEP_PIN PE13
|
|
79
|
+#define E0_DIR_PIN PE14
|
|
80
|
+#define E0_ENABLE_PIN PB13
|
|
81
|
+
|
|
82
|
+//#define E1_STEP_PIN PD13
|
|
83
|
+//#define E1_DIR_PIN PD12
|
|
84
|
+//#define E1_ENABLE_PIN PC6
|
|
85
|
+
|
|
86
|
+//
|
|
87
|
+// Heaters 0,1 / Fans / Bed
|
|
88
|
+//
|
|
89
|
+#define HEATER_0_PIN PD11
|
|
90
|
+
|
|
91
|
+#if ENABLED(FET_ORDER_EFB) // Hotend, Fan, Bed
|
|
92
|
+ #define HEATER_BED_PIN PD12
|
|
93
|
+#elif ENABLED(FET_ORDER_EEF) // Hotend, Hotend, Fan
|
|
94
|
+ #define HEATER_1_PIN PD4
|
|
95
|
+#elif ENABLED(FET_ORDER_EEB) // Hotend, Hotend, Bed
|
|
96
|
+ #define HEATER_1_PIN PD4
|
|
97
|
+ #define HEATER_BED_PIN PD12
|
|
98
|
+#elif ENABLED(FET_ORDER_EFF) // Hotend, Fan, Fan
|
|
99
|
+ #define FAN1_PIN PD12
|
|
100
|
+#elif DISABLED(FET_ORDER_SF) // Not Spindle, Fan (i.e., "EFBF" or "EFBE")
|
|
101
|
+ #define HEATER_BED_PIN PD12
|
|
102
|
+ #if EITHER(HAS_MULTI_HOTEND, HEATERS_PARALLEL)
|
|
103
|
+ #define HEATER_1_PIN PB9
|
|
104
|
+ #else
|
|
105
|
+ #define FAN1_PIN PB9
|
|
106
|
+ #endif
|
|
107
|
+#endif
|
|
108
|
+
|
|
109
|
+#ifndef FAN_PIN
|
|
110
|
+ #if EITHER(FET_ORDER_EFB, FET_ORDER_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan
|
|
111
|
+ #define FAN_PIN PB5
|
|
112
|
+ #elif EITHER(FET_ORDER_EEF, FET_ORDER_SF) // Hotend, Hotend, Fan or Spindle, Fan
|
|
113
|
+ #define FAN_PIN PD12
|
|
114
|
+ #elif ENABLED(FET_ORDER_EEB) // Hotend, Hotend, Bed
|
|
115
|
+ #define FAN_PIN -1 // IO pin. Buffer needed
|
|
116
|
+ #else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE")
|
|
117
|
+ #define FAN_PIN PB5
|
|
118
|
+ #endif
|
|
119
|
+#endif
|
|
120
|
+
|
|
121
|
+//
|
|
122
|
+// Misc. Functions
|
|
123
|
+//
|
|
124
|
+//#define PS_ON_PIN PB9
|
|
125
|
+
|
|
126
|
+#if HAS_TMC_UART
|
|
127
|
+ /**
|
|
128
|
+ * TMC2208/TMC2209 stepper drivers
|
|
129
|
+ *
|
|
130
|
+ * Hardware serial communication ports.
|
|
131
|
+ * If undefined software serial is used according to the pins below
|
|
132
|
+ */
|
|
133
|
+ #define X_HARDWARE_SERIAL MSerial4
|
|
134
|
+ #define Y_HARDWARE_SERIAL MSerial4
|
|
135
|
+ #define Z_HARDWARE_SERIAL MSerial4
|
|
136
|
+ #define E0_HARDWARE_SERIAL MSerial4
|
|
137
|
+ #ifndef X_SLAVE_ADDRESS
|
|
138
|
+ #define X_SLAVE_ADDRESS 2
|
|
139
|
+ #endif
|
|
140
|
+ #ifndef Y_SLAVE_ADDRESS
|
|
141
|
+ #define Y_SLAVE_ADDRESS 3
|
|
142
|
+ #endif
|
|
143
|
+ #ifndef Z_SLAVE_ADDRESS
|
|
144
|
+ #define Z_SLAVE_ADDRESS 1
|
|
145
|
+ #endif
|
|
146
|
+ #ifndef E0_SLAVE_ADDRESS
|
|
147
|
+ #define E0_SLAVE_ADDRESS 0
|
|
148
|
+ #endif
|
|
149
|
+#endif
|
|
150
|
+//
|
|
151
|
+// Temperature Sensors
|
|
152
|
+//
|
|
153
|
+#define TEMP_BED_PIN PC2 //TB
|
|
154
|
+#define TEMP_0_PIN PC1 //TH1
|
|
155
|
+//#define TEMP_1_PIN PC3 //TH2
|
|
156
|
+#define TEMP_BOARD_PIN PC3
|
|
157
|
+#ifndef TEMP_SENSOR_BOARD
|
|
158
|
+ #define TEMP_SENSOR_BOARD 13
|
|
159
|
+#endif
|
|
160
|
+#define FIL_RUNOUT_PIN PA10 // MT_DET
|
|
161
|
+
|
|
162
|
+//
|
|
163
|
+// LCD Pins
|
|
164
|
+//
|
|
165
|
+#if HAS_WIRED_LCD
|
|
166
|
+ #define BEEPER_PIN PE12
|
|
167
|
+ #define BTN_ENC PE11
|
|
168
|
+ #define LCD_PINS_ENABLE PE10
|
|
169
|
+ #define LCD_PINS_RS PE9
|
|
170
|
+ #define BTN_EN1 PE4
|
|
171
|
+ #define BTN_EN2 PE3
|
|
172
|
+ #define LCD_PINS_D4 PE8
|
|
173
|
+ #define LCD_PINS_D5 PE7
|
|
174
|
+ #define LCD_PINS_D6 PB2
|
|
175
|
+ #define LCD_PINS_D7 PB1
|
|
176
|
+
|
|
177
|
+ #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
|
|
178
|
+ #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
|
|
179
|
+ #endif
|
|
180
|
+
|
|
181
|
+ #define BOARD_ST7920_DELAY_1 50
|
|
182
|
+ #define BOARD_ST7920_DELAY_2 50
|
|
183
|
+ #define BOARD_ST7920_DELAY_3 50
|
|
184
|
+
|
|
185
|
+#endif // HAS_WIRED_LCD
|
|
186
|
+
|
|
187
|
+//
|
|
188
|
+// SD Card
|
|
189
|
+//
|
|
190
|
+#define ENABLE_SPI1
|
|
191
|
+#define SD_DETECT_PIN PA4
|
|
192
|
+#define SCK_PIN PA5
|
|
193
|
+#define MISO_PIN PA6
|
|
194
|
+#define MOSI_PIN PA7
|
|
195
|
+#define SS_PIN PC4
|