Browse Source

Add BTT SKR CR6 board (#20522)

Sebastiaan Dammann 3 years ago
parent
commit
3ec59b36eb

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

@@ -335,6 +335,7 @@
335 335
 #define BOARD_FLY_MINI                4042  // FLY MINI (STM32F103RCT6)
336 336
 #define BOARD_FLSUN_HISPEED           4043  // FLSUN HiSpeedV1 (STM32F103VET6)
337 337
 #define BOARD_BEAST                   4044  // STM32F103RET6 Libmaple-based controller
338
+#define BOARD_BTT_SKR_CR6             4045  // BigTreeTech SKR CR6 v1.0 (STM32F103RE)
338 339
 
339 340
 //
340 341
 // ARM Cortex-M4F

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

@@ -542,6 +542,8 @@
542 542
   #include "stm32f1/pins_FLSUN_HISPEED.h"       // STM32F1                                env:flsun_hispeed
543 543
 #elif MB(BEAST)
544 544
   #include "stm32f1/pins_BEAST.h"               // STM32F1                                env:STM32F103RE
545
+#elif MB(BTT_SKR_CR6)
546
+  #include "stm32f1/pins_BTT_SKR_CR6.h"         // STM32F1                                env:STM32F103RC_btt_512K_USB
545 547
 
546 548
 //
547 549
 // ARM Cortex-M4F

+ 180
- 0
Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h View File

@@ -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

+ 12
- 0
buildroot/tests/STM32F103RE_btt_USB-tests View File

@@ -15,5 +15,17 @@ opt_set SERIAL_PORT 1
15 15
 opt_set SERIAL_PORT_2 -1
16 16
 exec_test $1 $2 "BigTreeTech SKR E3 DIP v1.0 - Basic Configuration" "$3"
17 17
 
18
+restore_configs
19
+opt_set MOTHERBOARD BOARD_BTT_SKR_CR6
20
+opt_set SERIAL_PORT -1
21
+opt_set SERIAL_PORT_2 2
22
+opt_set TEMP_SENSOR_BED 1
23
+opt_enable CR10_STOCKDISPLAY \
24
+           NOZZLE_AS_PROBE Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN Z_SAFE_HOMING \
25
+           PROBE_ACTIVATION_SWITCH PROBE_TARE PROBE_TARE_ONLY_WHILE_INACTIVE \
26
+           PROBING_HEATERS_OFF PREHEAT_BEFORE_PROBING
27
+opt_disable NOZZLE_TO_PROBE_OFFSET
28
+exec_test $1 $2 "BigTreeTech SKR CR6 PROBE_ACTIVATION_SWITCH, Probe Tare" "$3"
29
+
18 30
 # clean up
19 31
 restore_configs

Loading…
Cancel
Save