|
@@ -0,0 +1,180 @@
|
|
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
|
+ * BigTreeTech SKR CR-6 (STM32F103RET6) board pin assignments
|
|
26
|
+ */
|
|
27
|
+
|
|
28
|
+#define DEFAULT_MACHINE_NAME "Creality3D"
|
|
29
|
+#define BOARD_INFO_NAME "BTT SKR CR-6"
|
|
30
|
+
|
|
31
|
+#if NOT_TARGET(__STM32F1__)
|
|
32
|
+ #error "Oops! Select an STM32F1 board in 'Tools > Board.'"
|
|
33
|
+#endif
|
|
34
|
+
|
|
35
|
+//
|
|
36
|
+// Release PB4 (Z_STEP_PIN) from JTAG NRST role
|
|
37
|
+//
|
|
38
|
+#define DISABLE_DEBUG
|
|
39
|
+
|
|
40
|
+//
|
|
41
|
+// USB connect control
|
|
42
|
+//
|
|
43
|
+#define USB_CONNECT_PIN PA14
|
|
44
|
+#define USB_CONNECT_INVERTING false
|
|
45
|
+
|
|
46
|
+//
|
|
47
|
+// EEPROM
|
|
48
|
+//
|
|
49
|
+
|
|
50
|
+#if NO_EEPROM_SELECTED
|
|
51
|
+ #define I2C_EEPROM
|
|
52
|
+#endif
|
|
53
|
+
|
|
54
|
+/* I2C */
|
|
55
|
+#if ENABLED(I2C_EEPROM)
|
|
56
|
+ #define IIC_EEPROM_SDA PB7
|
|
57
|
+ #define IIC_EEPROM_SCL PB6
|
|
58
|
+
|
|
59
|
+ #define MARLIN_EEPROM_SIZE 0x1000 // 4KB
|
|
60
|
+#elif ENABLED(SDCARD_EEPROM_EMULATION)
|
|
61
|
+ #define MARLIN_EEPROM_SIZE 0x1000 // 4KB
|
|
62
|
+#endif
|
|
63
|
+
|
|
64
|
+#define E2END (MARLIN_EEPROM_SIZE - 1) // 2KB
|
|
65
|
+
|
|
66
|
+//
|
|
67
|
+// Limit Switches
|
|
68
|
+//
|
|
69
|
+
|
|
70
|
+#define X_STOP_PIN PC0
|
|
71
|
+#define Y_STOP_PIN PC1
|
|
72
|
+#define Z_STOP_PIN PC14 // Endtop or Probe
|
|
73
|
+
|
|
74
|
+#define FIL_RUNOUT_PIN PC15
|
|
75
|
+
|
|
76
|
+//
|
|
77
|
+// Probe
|
|
78
|
+//
|
|
79
|
+#define PROBE_TARE_PIN PA1
|
|
80
|
+#define PROBE_ACTIVATION_SWITCH_PIN PC2 // Optoswitch to Enable Z Probe
|
|
81
|
+
|
|
82
|
+//
|
|
83
|
+// Steppers
|
|
84
|
+//
|
|
85
|
+#define X_ENABLE_PIN PB14
|
|
86
|
+#define X_STEP_PIN PB13
|
|
87
|
+#define X_DIR_PIN PB12
|
|
88
|
+
|
|
89
|
+#define Y_ENABLE_PIN PB11
|
|
90
|
+#define Y_STEP_PIN PB10
|
|
91
|
+#define Y_DIR_PIN PB2
|
|
92
|
+
|
|
93
|
+#define Z_ENABLE_PIN PB1
|
|
94
|
+#define Z_STEP_PIN PB0
|
|
95
|
+#define Z_DIR_PIN PC5
|
|
96
|
+
|
|
97
|
+#define E0_ENABLE_PIN PD2
|
|
98
|
+#define E0_STEP_PIN PB3
|
|
99
|
+#define E0_DIR_PIN PB4
|
|
100
|
+
|
|
101
|
+//
|
|
102
|
+// Temperature Sensors
|
|
103
|
+//
|
|
104
|
+#define TEMP_0_PIN PA0 // TH1
|
|
105
|
+#define TEMP_BED_PIN PC3 // TB1
|
|
106
|
+
|
|
107
|
+//
|
|
108
|
+// Heaters / Fans
|
|
109
|
+//
|
|
110
|
+
|
|
111
|
+#define HEATER_0_PIN PC8 // HEATER1
|
|
112
|
+#define HEATER_BED_PIN PC9 // HOT BED
|
|
113
|
+
|
|
114
|
+#define FAN_PIN PC6 // FAN
|
|
115
|
+#define FAN_SOFT_PWM
|
|
116
|
+
|
|
117
|
+#define CONTROLLER_FAN_PIN PC7
|
|
118
|
+
|
|
119
|
+//
|
|
120
|
+// LCD / Controller
|
|
121
|
+//
|
|
122
|
+#if ENABLED(CR10_STOCKDISPLAY)
|
|
123
|
+ #define BTN_ENC PA15
|
|
124
|
+ #define BTN_EN1 PA9
|
|
125
|
+ #define BTN_EN2 PA10
|
|
126
|
+
|
|
127
|
+ #define LCD_PINS_RS PB8
|
|
128
|
+ #define LCD_PINS_ENABLE PB15
|
|
129
|
+ #define LCD_PINS_D4 PB9
|
|
130
|
+
|
|
131
|
+ #define BEEPER_PIN PB5
|
|
132
|
+#endif
|
|
133
|
+
|
|
134
|
+#if HAS_TMC_UART
|
|
135
|
+ /**
|
|
136
|
+ * TMC2209 stepper drivers
|
|
137
|
+ * Hardware serial communication ports.
|
|
138
|
+ */
|
|
139
|
+ #define X_HARDWARE_SERIAL MSerial4
|
|
140
|
+ #define Y_HARDWARE_SERIAL MSerial4
|
|
141
|
+ #define Z_HARDWARE_SERIAL MSerial4
|
|
142
|
+ #define E0_HARDWARE_SERIAL MSerial4
|
|
143
|
+
|
|
144
|
+ // Default TMC slave addresses
|
|
145
|
+ #ifndef X_SLAVE_ADDRESS
|
|
146
|
+ #define X_SLAVE_ADDRESS 0
|
|
147
|
+ #endif
|
|
148
|
+ #ifndef Y_SLAVE_ADDRESS
|
|
149
|
+ #define Y_SLAVE_ADDRESS 1
|
|
150
|
+ #endif
|
|
151
|
+ #ifndef Z_SLAVE_ADDRESS
|
|
152
|
+ #define Z_SLAVE_ADDRESS 2
|
|
153
|
+ #endif
|
|
154
|
+ #ifndef E0_SLAVE_ADDRESS
|
|
155
|
+ #define E0_SLAVE_ADDRESS 3
|
|
156
|
+ #endif
|
|
157
|
+#endif
|
|
158
|
+
|
|
159
|
+//
|
|
160
|
+// SD Card
|
|
161
|
+//
|
|
162
|
+
|
|
163
|
+#define HAS_ONBOARD_SD
|
|
164
|
+
|
|
165
|
+#ifndef SDCARD_CONNECTION
|
|
166
|
+ #define SDCARD_CONNECTION ONBOARD
|
|
167
|
+#endif
|
|
168
|
+
|
|
169
|
+#if SD_CONNECTION_IS(ONBOARD)
|
|
170
|
+ #define SD_DETECT_PIN PC4
|
|
171
|
+
|
|
172
|
+ #define ON_BOARD_SPI_DEVICE 1 // SPI1
|
|
173
|
+ #define ONBOARD_SD_CS_PIN PA4 // Chip select for "System" SD card
|
|
174
|
+#endif
|
|
175
|
+
|
|
176
|
+//
|
|
177
|
+// Misc. Functions
|
|
178
|
+//
|
|
179
|
+#define LED_CONTROL_PIN PA13
|
|
180
|
+#define NEOPIXEL_PIN PA8
|