Browse Source

✨ Creality v5.2.1 board (#24760)

Plynix / Ben Hartiwch 1 year ago
parent
commit
1b3941c0d2
No account linked to committer's email address

+ 15
- 14
Marlin/src/core/boards.h View File

@@ -355,20 +355,21 @@
355 355
 #define BOARD_CREALITY_V431_D         4051  // Creality v4.3.1d (STM32F103RC / STM32F103RE)
356 356
 #define BOARD_CREALITY_V452           4052  // Creality v4.5.2 (STM32F103RC / STM32F103RE)
357 357
 #define BOARD_CREALITY_V453           4053  // Creality v4.5.3 (STM32F103RC / STM32F103RE)
358
-#define BOARD_CREALITY_V24S1          4054  // Creality v2.4.S1 (STM32F103RC / STM32F103RE) v101 as found in the Ender-7
359
-#define BOARD_CREALITY_V24S1_301      4055  // Creality v2.4.S1_301 (STM32F103RC / STM32F103RE) v301 as found in the Ender-3 S1
360
-#define BOARD_CREALITY_V25S1          4056  // Creality v2.5.S1 (STM32F103RE) as found in the CR-10 Smart Pro
361
-#define BOARD_TRIGORILLA_PRO          4057  // Trigorilla Pro (STM32F103ZE)
362
-#define BOARD_FLY_MINI                4058  // FLYmaker FLY MINI (STM32F103RC)
363
-#define BOARD_FLSUN_HISPEED           4059  // FLSUN HiSpeedV1 (STM32F103VE)
364
-#define BOARD_BEAST                   4060  // STM32F103RE Libmaple-based controller
365
-#define BOARD_MINGDA_MPX_ARM_MINI     4061  // STM32F103ZE Mingda MD-16
366
-#define BOARD_GTM32_PRO_VD            4062  // STM32F103VE controller
367
-#define BOARD_ZONESTAR_ZM3E2          4063  // Zonestar ZM3E2    (STM32F103RC)
368
-#define BOARD_ZONESTAR_ZM3E4          4064  // Zonestar ZM3E4 V1 (STM32F103VC)
369
-#define BOARD_ZONESTAR_ZM3E4V2        4065  // Zonestar ZM3E4 V2 (STM32F103VC)
370
-#define BOARD_ERYONE_ERY32_MINI       4066  // Eryone Ery32 mini (STM32F103VE)
371
-#define BOARD_PANDA_PI_V29            4067  // Panda Pi V2.9 - Standalone (STM32F103RC)
358
+#define BOARD_CREALITY_V521           4054  // SV04 Board
359
+#define BOARD_CREALITY_V24S1          4055  // Creality v2.4.S1 (STM32F103RC / STM32F103RE) v101 as found in the Ender-7
360
+#define BOARD_CREALITY_V24S1_301      4056  // Creality v2.4.S1_301 (STM32F103RC / STM32F103RE) v301 as found in the Ender-3 S1
361
+#define BOARD_CREALITY_V25S1          4057  // Creality v2.5.S1 (STM32F103RE) as found in the CR-10 Smart Pro
362
+#define BOARD_TRIGORILLA_PRO          4058  // Trigorilla Pro (STM32F103ZE)
363
+#define BOARD_FLY_MINI                4059  // FLYmaker FLY MINI (STM32F103RC)
364
+#define BOARD_FLSUN_HISPEED           4060  // FLSUN HiSpeedV1 (STM32F103VE)
365
+#define BOARD_BEAST                   4061  // STM32F103RE Libmaple-based controller
366
+#define BOARD_MINGDA_MPX_ARM_MINI     4062  // STM32F103ZE Mingda MD-16
367
+#define BOARD_GTM32_PRO_VD            4063  // STM32F103VE controller
368
+#define BOARD_ZONESTAR_ZM3E2          4064  // Zonestar ZM3E2    (STM32F103RC)
369
+#define BOARD_ZONESTAR_ZM3E4          4065  // Zonestar ZM3E4 V1 (STM32F103VC)
370
+#define BOARD_ZONESTAR_ZM3E4V2        4066  // Zonestar ZM3E4 V2 (STM32F103VC)
371
+#define BOARD_ERYONE_ERY32_MINI       4067  // Eryone Ery32 mini (STM32F103VE)
372
+#define BOARD_PANDA_PI_V29            4068  // Panda Pi V2.9 - Standalone (STM32F103RC)
372 373
 
373 374
 //
374 375
 // ARM Cortex-M4F

+ 2
- 2
Marlin/src/module/thermistor/thermistor_504.h View File

@@ -1,9 +1,9 @@
1 1
 /**
2 2
  * Marlin 3D Printer Firmware
3
- * Copyright (C) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
3
+ * Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 4
  *
5 5
  * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
6
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7 7
  *
8 8
  * This program is free software: you can redistribute it and/or modify
9 9
  * it under the terms of the GNU General Public License as published by

+ 2
- 2
Marlin/src/module/thermistor/thermistor_505.h View File

@@ -1,9 +1,9 @@
1 1
 /**
2 2
  * Marlin 3D Printer Firmware
3
- * Copyright (C) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
3
+ * Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 4
  *
5 5
  * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
6
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7 7
  *
8 8
  * This program is free software: you can redistribute it and/or modify
9 9
  * it under the terms of the GNU General Public License as published by

+ 1
- 0
Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h View File

@@ -43,6 +43,7 @@
43 43
 #if NO_EEPROM_SELECTED
44 44
   //#define I2C_EEPROM                            // EEPROM on I2C-0
45 45
   //#define SDCARD_EEPROM_EMULATION
46
+  //#undef NO_EEPROM_SELECTED
46 47
 #endif
47 48
 
48 49
 #if ENABLED(I2C_EEPROM)

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

@@ -611,6 +611,8 @@
611 611
   #include "stm32f1/pins_ERYONE_ERY32_MINI.h"   // STM32F103VET6                          env:ERYONE_ERY32_MINI_maple
612 612
 #elif MB(PANDA_PI_V29)
613 613
   #include "stm32f1/pins_PANDA_PI_V29.h"        // STM32F103RCT6                          env:PANDA_PI_V29
614
+#elif MB(CREALITY_V521)
615
+  #include "stm32f1/pins_CREALITY_V521.h"       // STM32F103RET6                          env:STM32F103RET6_creality
614 616
 
615 617
 //
616 618
 // ARM Cortex-M4F

+ 65
- 85
Marlin/src/pins/stm32f1/pins_CREALITY_V4.h View File

@@ -161,94 +161,74 @@
161 161
 #define SDIO_SUPPORT
162 162
 #define NO_SD_HOST_DRIVE                          // This board's SD is only seen by the printer
163 163
 
164
-#if EITHER(CR10_STOCKDISPLAY, FYSETC_MINI_12864_2_1)
165
-
166
-  #if ENABLED(RET6_12864_LCD)
167
-
168
-    /**
169
-     *    RET6 12864 LCD
170
-     *        ------
171
-     *  PC6  | 1  2 | PB2
172
-     *  PB10 | 3  4 | PB11
173
-     *  PB14   5  6 | PB13
174
-     *  PB12 | 7  8 | PB15
175
-     *   GND | 9 10 | 5V
176
-     *        ------
177
-     *         EXP1
178
-     */
179
-    #define EXP1_01_PIN                     PC6
180
-    #define EXP1_02_PIN                     PB2
181
-    #define EXP1_03_PIN                     PB10
182
-    #define EXP1_04_PIN                     PB11
183
-    #define EXP1_05_PIN                     PB14
184
-    #define EXP1_06_PIN                     PB13
185
-    #define EXP1_07_PIN                     PB12
186
-    #define EXP1_08_PIN                     PB15
187
-
188
-  #elif ENABLED(VET6_12864_LCD)
189
-
190
-    /**
191
-     *    VET6 12864 LCD
192
-     *        ------
193
-     *  ?    | 1  2 | PC5
194
-     *  PB10 | 3  4 | ?
195
-     *  PA6    5  6 | PA5
196
-     *  PA4  | 7  8 | PA7
197
-     *   GND | 9 10 | 5V
198
-     *        ------
199
-     *         EXP1
200
-     */
201
-    #define EXP1_01_PIN                     -1
202
-    #define EXP1_02_PIN                     PC5
203
-    #define EXP1_03_PIN                     PB10
204
-    #define EXP1_04_PIN                     -1
205
-    #define EXP1_05_PIN                     PA6
206
-    #define EXP1_06_PIN                     PA5
207
-    #define EXP1_07_PIN                     PA4
208
-    #define EXP1_08_PIN                     PA7
164
+#if ANY(RET6_12864_LCD, HAS_DWIN_E3V2, IS_DWIN_MARLINUI)
209 165
 
210
-  #else
211
-    #error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for the LCD with the Creality V4 controller."
212
-  #endif
166
+  /**
167
+   *    RET6 12864 LCD
168
+   *        ------
169
+   *  PC6  | 1  2 | PB2
170
+   *  PB10 | 3  4 | PB11
171
+   *  PB14   5  6 | PB13
172
+   *  PB12 | 7  8 | PB15
173
+   *   GND | 9 10 | 5V
174
+   *        ------
175
+   */
176
+  #define EXP3_01_PIN                     PC6
177
+  #define EXP3_02_PIN                     PB2
178
+  #define EXP3_03_PIN                     PB10
179
+  #define EXP3_04_PIN                     PB11
180
+  #define EXP3_05_PIN                     PB14
181
+  #define EXP3_06_PIN                     PB13
182
+  #define EXP3_07_PIN                     PB12
183
+  #define EXP3_08_PIN                     PB15
184
+
185
+#elif EITHER(VET6_12864_LCD, DWIN_VET6_CREALITY_LCD)
186
+
187
+  /**
188
+   *    VET6 12864 LCD
189
+   *        ------
190
+   *  ?    | 1  2 | PC5
191
+   *  PB10 | 3  4 | ?
192
+   *  PA6    5  6 | PA5
193
+   *  PA4  | 7  8 | PA7
194
+   *   GND | 9 10 | 5V
195
+   *        ------
196
+   */
197
+  #define EXP3_01_PIN                     -1
198
+  #define EXP3_02_PIN                     PC5
199
+  #define EXP3_03_PIN                     PB10
200
+  #define EXP3_04_PIN                     -1
201
+  #define EXP3_05_PIN                     PA6
202
+  #define EXP3_06_PIN                     PA5
203
+  #define EXP3_07_PIN                     PA4
204
+  #define EXP3_08_PIN                     PA7
205
+
206
+#elif EITHER(CR10_STOCKDISPLAY, FYSETC_MINI_12864_2_1)
207
+  #error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for the LCD with the Creality V4 controller."
213 208
 #endif
214 209
 
215 210
 #if ENABLED(CR10_STOCKDISPLAY)
216 211
 
217
-  #define LCD_PINS_RS                EXP1_07_PIN
218
-  #define LCD_PINS_ENABLE            EXP1_08_PIN
219
-  #define LCD_PINS_D4                EXP1_06_PIN
212
+  #define LCD_PINS_RS                EXP3_07_PIN
213
+  #define LCD_PINS_ENABLE            EXP3_08_PIN
214
+  #define LCD_PINS_D4                EXP3_06_PIN
220 215
 
221
-  #define BTN_ENC                    EXP1_02_PIN
222
-  #define BTN_EN1                    EXP1_03_PIN
223
-  #define BTN_EN2                    EXP1_05_PIN
216
+  #define BTN_ENC                    EXP3_02_PIN
217
+  #define BTN_EN1                    EXP3_03_PIN
218
+  #define BTN_EN2                    EXP3_05_PIN
224 219
 
225 220
   #ifndef HAS_PIN_27_BOARD
226
-    #define BEEPER_PIN               EXP1_01_PIN
221
+    #define BEEPER_PIN               EXP3_01_PIN
227 222
   #endif
228 223
 
229 224
 #elif ANY(HAS_DWIN_E3V2, IS_DWIN_MARLINUI, DWIN_VET6_CREALITY_LCD)
230 225
 
231
-  #if HAS_DWIN_E3V2 || IS_DWIN_MARLINUI
232
-    // RET6 DWIN ENCODER LCD
233
-    #define EXP1_05_PIN                     PB14
234
-    #define EXP1_06_PIN                     PB13
235
-    #define EXP1_07_PIN                     PB12
236
-    #define EXP1_08_PIN                     PB15
237
-    //#define LCD_LED_PIN                   PB2
238
-  #else
239
-    // VET6 DWIN ENCODER LCD
240
-    #define EXP1_05_PIN                     PA6
241
-    #define EXP1_06_PIN                     PA5
242
-    #define EXP1_07_PIN                     PA4
243
-    #define EXP1_08_PIN                     PA7
244
-  #endif
245
-
246
-  #define BTN_ENC                    EXP1_05_PIN
247
-  #define BTN_EN1                    EXP1_08_PIN
248
-  #define BTN_EN2                    EXP1_07_PIN
226
+  #define BTN_ENC                    EXP3_05_PIN
227
+  #define BTN_EN1                    EXP3_08_PIN
228
+  #define BTN_EN2                    EXP3_07_PIN
249 229
 
250 230
   #ifndef BEEPER_PIN
251
-    #define BEEPER_PIN               EXP1_06_PIN
231
+    #define BEEPER_PIN               EXP3_06_PIN
252 232
   #endif
253 233
 
254 234
 #elif ENABLED(FYSETC_MINI_12864_2_1)
@@ -257,8 +237,8 @@
257 237
     #error "CAUTION! FYSETC_MINI_12864_2_1 and clones require wiring modifications. See 'pins_CREALITY_V4.h' for details. Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning"
258 238
   #endif
259 239
 
260
-  #if SD_CONNECTION_IS(LCD) 
261
-    #error "The LCD sdcard is not connected with this configuration"
240
+  #if SD_CONNECTION_IS(LCD)
241
+    #error "The LCD SD Card is not connected with this configuration."
262 242
   #endif
263 243
 
264 244
   /**
@@ -283,20 +263,20 @@
283 263
    *              Debug port                               EXP2
284 264
    *
285 265
    * Needs custom cable. Connect EN2-EN2, LCD_CS-LCD_CS and so on.
286
-   * Debug port is just above EXP1, You need to add pins
266
+   * Debug port is just above EXP1. You need to add pins.
287 267
    *
288 268
    */
289 269
 
290
-  #define BTN_ENC                    EXP1_02_PIN
291
-  #define BTN_EN1                    EXP1_01_PIN
292
-  #define BTN_EN2                    EXP1_06_PIN
270
+  #define BTN_ENC                    EXP3_02_PIN
271
+  #define BTN_EN1                    EXP3_01_PIN
272
+  #define BTN_EN2                    EXP3_06_PIN
293 273
   #define BEEPER_PIN                        -1
294 274
 
295
-  #define DOGLCD_CS                  EXP1_03_PIN
296
-  #define DOGLCD_A0                  EXP1_05_PIN
297
-  #define DOGLCD_SCK                 EXP1_07_PIN
298
-  #define DOGLCD_MOSI                EXP1_08_PIN
299
-  #define LCD_RESET_PIN              EXP1_04_PIN
275
+  #define DOGLCD_CS                  EXP3_03_PIN
276
+  #define DOGLCD_A0                  EXP3_05_PIN
277
+  #define DOGLCD_SCK                 EXP3_07_PIN
278
+  #define DOGLCD_MOSI                EXP3_08_PIN
279
+  #define LCD_RESET_PIN              EXP3_04_PIN
300 280
 
301 281
   #define FORCE_SOFT_SPI
302 282
   #define LCD_BACKLIGHT_PIN                 -1

+ 63
- 73
Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h View File

@@ -1,9 +1,9 @@
1 1
 /**
2 2
  * Marlin 3D Printer Firmware
3
- * Copyright (C) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
3
+ * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 4
  *
5 5
  * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
6
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7 7
  *
8 8
  * This program is free software: you can redistribute it and/or modify
9 9
  * it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@
22 22
 #pragma once
23 23
 
24 24
 /**
25
- * CREALITY 4.2.10 (STM32F103RE / STM32F103RC) board pin assignments
25
+ * Creality 4.2.10 (STM32F103RE / STM32F103RC) board pin assignments
26 26
  */
27 27
 
28 28
 #include "env_validate.h"
@@ -143,85 +143,75 @@
143 143
 #define SDIO_SUPPORT
144 144
 #define NO_SD_HOST_DRIVE                          // This board's SD is only seen by the printer
145 145
 
146
-#if ENABLED(CR10_STOCKDISPLAY)
146
+#if ANY(RET6_12864_LCD, HAS_DWIN_E3V2, IS_DWIN_MARLINUI)
147
+
148
+  /**
149
+   *    RET6 12864 LCD
150
+   *        ------
151
+   *  PC6  | 1  2 | PB2
152
+   *  PB10 | 3  4 | PE8
153
+   *  PB14   5  6 | PB13
154
+   *  PB12 | 7  8 | PB15
155
+   *   GND | 9 10 | 5V
156
+   *        ------
157
+   */
158
+  #define EXP3_01_PIN                       PC6
159
+  #define EXP3_02_PIN                       PB2
160
+  #define EXP3_03_PIN                       PB10
161
+  #define EXP3_04_PIN                       PE8
162
+  #define EXP3_05_PIN                       PB14
163
+  #define EXP3_06_PIN                       PB13
164
+  #define EXP3_07_PIN                       PB12
165
+  #define EXP3_08_PIN                       PB15
166
+
167
+#elif EITHER(VET6_12864_LCD, DWIN_VET6_CREALITY_LCD)
168
+
169
+  /**
170
+   *    VET6 12864 LCD
171
+   *        ------
172
+   *  ?    | 1  2 | PC5
173
+   *  PB10 | 3  4 | ?
174
+   *  PA6    5  6 | PA5
175
+   *  PA4  | 7  8 | PA7
176
+   *   GND | 9 10 | 5V
177
+   *        ------
178
+   */
179
+  #define EXP3_01_PIN                       -1
180
+  #define EXP3_02_PIN                       PC5
181
+  #define EXP3_03_PIN                       PB10
182
+  #define EXP3_04_PIN                       -1
183
+  #define EXP3_05_PIN                       PA6
184
+  #define EXP3_06_PIN                       PA5
185
+  #define EXP3_07_PIN                       PA4
186
+  #define EXP3_08_PIN                       PA7
187
+
188
+#endif
147 189
 
148
-  #if ENABLED(RET6_12864_LCD)
149
-
150
-    /**
151
-     *    RET6 12864 LCD
152
-     *        ------
153
-     *  PC6  | 1  2 | PB2
154
-     *  PB10 | 3  4 | PE8
155
-     *  PB14   5  6 | PB13
156
-     *  PB12 | 7  8 | PB15
157
-     *   GND | 9 10 | 5V
158
-     *        ------
159
-     *         EXP1
160
-     */
161
-    #define EXP1_01_PIN                     PC6
162
-    #define EXP1_02_PIN                     PB2
163
-    #define EXP1_03_PIN                     PB10
164
-    #define EXP1_04_PIN                     PE8
165
-    #define EXP1_05_PIN                     PB14
166
-    #define EXP1_06_PIN                     PB13
167
-    #define EXP1_07_PIN                     PB12
168
-    #define EXP1_08_PIN                     PB15
169
-
170
-    #define BEEPER_PIN               EXP1_01_PIN
171
-
172
-  #elif ENABLED(VET6_12864_LCD)
173
-
174
-    /**
175
-     *    VET6 12864 LCD
176
-     *        ------
177
-     *  ?    | 1  2 | PC5
178
-     *  PB10 | 3  4 | ?
179
-     *  PA6    5  6 | PA5
180
-     *  PA4  | 7  8 | PA7
181
-     *   GND | 9 10 | 5V
182
-     *        ------
183
-     *         EXP1
184
-     */
185
-    #define EXP1_01_PIN                     -1
186
-    #define EXP1_02_PIN                     PC5
187
-    #define EXP1_03_PIN                     PB10
188
-    #define EXP1_04_PIN                     -1
189
-    #define EXP1_05_PIN                     PA6
190
-    #define EXP1_06_PIN                     PA5
191
-    #define EXP1_07_PIN                     PA4
192
-    #define EXP1_08_PIN                     PA7
193
-
194
-  #else
190
+#if ENABLED(CR10_STOCKDISPLAY)
191
+  #if NONE(RET6_12864_LCD, VET6_12864_LCD)
195 192
     #error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for CR10_STOCKDISPLAY with the Creality V4 controller."
196 193
   #endif
197 194
 
198
-  #define LCD_PINS_RS                EXP1_07_PIN
199
-  #define LCD_PINS_ENABLE            EXP1_08_PIN
200
-  #define LCD_PINS_D4                EXP1_06_PIN
195
+  #define LCD_PINS_RS                EXP3_07_PIN
196
+  #define LCD_PINS_ENABLE            EXP3_08_PIN
197
+  #define LCD_PINS_D4                EXP3_06_PIN
201 198
 
202
-  #define BTN_ENC                    EXP1_02_PIN
203
-  #define BTN_EN1                    EXP1_03_PIN
204
-  #define BTN_EN2                    EXP1_05_PIN
199
+  #define BTN_ENC                    EXP3_02_PIN
200
+  #define BTN_EN1                    EXP3_03_PIN
201
+  #define BTN_EN2                    EXP3_05_PIN
205 202
 
206
-#elif HAS_DWIN_E3V2 || IS_DWIN_MARLINUI
203
+  #define BEEPER_PIN                 EXP3_01_PIN
207 204
 
208
-  // RET6 DWIN ENCODER LCD
209
-  #define BTN_ENC                           PB14
210
-  #define BTN_EN1                           PB15
211
-  #define BTN_EN2                           PB12
205
+#elif ANY(DWIN_VET6_CREALITY_LCD, HAS_DWIN_E3V2, IS_DWIN_MARLINUI)
212 206
 
213
-  //#define LCD_LED_PIN                     PB2
207
+  // RET6 / VET6 DWIN ENCODER LCD
208
+  #define BTN_ENC                    EXP3_05_PIN
209
+  #define BTN_EN1                    EXP3_08_PIN
210
+  #define BTN_EN2                    EXP3_07_PIN
211
+
212
+  //#define LCD_LED_PIN              EXP3_02_PIN
214 213
   #ifndef BEEPER_PIN
215
-    #define BEEPER_PIN                      PB13
214
+    #define BEEPER_PIN               EXP3_06_PIN
216 215
   #endif
217 216
 
218
-#elif ENABLED(DWIN_VET6_CREALITY_LCD)
219
-
220
-  // VET6 DWIN ENCODER LCD
221
-  #define BTN_ENC                           PA6
222
-  #define BTN_EN1                           PA7
223
-  #define BTN_EN2                           PA4
224
-
225
-  #define BEEPER_PIN                        PA5
226
-
227 217
 #endif

+ 2
- 2
Marlin/src/pins/stm32f1/pins_CREALITY_V425.h View File

@@ -1,9 +1,9 @@
1 1
 /**
2 2
  * Marlin 3D Printer Firmware
3
- * Copyright (C) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
3
+ * Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 4
  *
5 5
  * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
6
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7 7
  *
8 8
  * This program is free software: you can redistribute it and/or modify
9 9
  * it under the terms of the GNU General Public License as published by

+ 226
- 0
Marlin/src/pins/stm32f1/pins_CREALITY_V521.h View File

@@ -0,0 +1,226 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (c) 2022 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
+ * Creality 5.2.1 (STM32F103RE) board pin assignments
26
+ */
27
+
28
+#include "env_validate.h"
29
+
30
+#if HOTENDS > 2 || E_STEPPERS > 2
31
+  #error "Creality v5.2.1 supports up to 2 hotends / E steppers."
32
+#endif
33
+
34
+#ifndef BOARD_INFO_NAME
35
+  #define BOARD_INFO_NAME      "Creality V521"
36
+#endif
37
+#ifndef DEFAULT_MACHINE_NAME
38
+  #define DEFAULT_MACHINE_NAME "Creality V5.2.1"
39
+#endif
40
+
41
+//
42
+// EEPROM
43
+//
44
+#if NO_EEPROM_SELECTED
45
+  // FLASH
46
+  //#define FLASH_EEPROM_EMULATION
47
+
48
+  // I2C
49
+  #define IIC_BL24CXX_EEPROM                      // EEPROM on I2C-0 used only for display settings
50
+  #if ENABLED(IIC_BL24CXX_EEPROM)
51
+    #define IIC_EEPROM_SDA                  PC2
52
+    #define IIC_EEPROM_SCL                  PC3
53
+    #define MARLIN_EEPROM_SIZE             0x800  // 2K (24C16)
54
+  #else
55
+    #define SDCARD_EEPROM_EMULATION               // SD EEPROM until all EEPROM is BL24CXX
56
+    #define MARLIN_EEPROM_SIZE             0x800  // 2K
57
+  #endif
58
+
59
+  #undef NO_EEPROM_SELECTED
60
+#endif
61
+
62
+//
63
+// Servos
64
+//
65
+#define SERVO0_PIN                          PD13  // BLTouch OUT
66
+
67
+//
68
+// Limit Switches
69
+//
70
+#define X_STOP_PIN                          PD10  // X
71
+#define X2_STOP_PIN                         PE15  // X2
72
+#define Y_STOP_PIN                          PE0   // Y
73
+#define Z_STOP_PIN                          PE1   // Z
74
+#define Z2_STOP_PIN                         PE2   // Z2
75
+
76
+#ifndef Z_MIN_PROBE_PIN
77
+  #define Z_MIN_PROBE_PIN                   PD12  // BLTouch IN
78
+#endif
79
+
80
+//
81
+// Filament Runout Sensor
82
+//
83
+#define FIL_RUNOUT_PIN                      PE5   // "Pulled-high"
84
+#define FIL_RUNOUT2_PIN                     PE6   // "Pulled-high"
85
+
86
+//
87
+// Steppers
88
+//
89
+#define X_ENABLE_PIN                        PC7
90
+#define X_STEP_PIN                          PD15
91
+#define X_DIR_PIN                           PD14
92
+
93
+#define Y_ENABLE_PIN                        PB9
94
+#define Y_STEP_PIN                          PB7
95
+#define Y_DIR_PIN                           PB6
96
+
97
+#define Z_ENABLE_PIN                        PB5
98
+#define Z_STEP_PIN                          PB3
99
+#define Z_DIR_PIN                           PD7
100
+
101
+#define E0_ENABLE_PIN                       PD4
102
+#define E0_STEP_PIN                         PD1
103
+#define E0_DIR_PIN                          PD0
104
+
105
+#define E1_ENABLE_PIN                       PE7
106
+#define E1_STEP_PIN                         PB1
107
+#define E1_DIR_PIN                          PB0
108
+
109
+#define X2_ENABLE_PIN                       PE11
110
+#define X2_STEP_PIN                         PE9
111
+#define X2_DIR_PIN                          PE8
112
+
113
+#define Z2_ENABLE_PIN                       PC5
114
+#define Z2_STEP_PIN                         PA7
115
+#define Z2_DIR_PIN                          PA6
116
+
117
+//
118
+// Release PB4 (Y_ENABLE_PIN) from JTAG NRST role
119
+//
120
+#define DISABLE_JTAG
121
+
122
+//
123
+// Temperature Sensors
124
+//
125
+#define TEMP_0_PIN                          PA4   // TH0
126
+#define TEMP_1_PIN                          PA5   // TH1
127
+#define TEMP_BED_PIN                        PA3   // TB1
128
+
129
+//
130
+// Heaters / Fans
131
+//
132
+#define HEATER_0_PIN                        PA1   // HEATER0
133
+#define HEATER_1_PIN                        PA0   // HEATER1
134
+#define HEATER_BED_PIN                      PA2   // HOT BED
135
+
136
+#define FAN_PIN                             PB14  // FAN
137
+#define FAN1_PIN                            PB12  // FAN
138
+#define FAN_SOFT_PWM
139
+
140
+//
141
+// SD Card
142
+//
143
+#define SD_DETECT_PIN                       PA8
144
+#define SDCARD_CONNECTION                ONBOARD
145
+#define ONBOARD_SPI_DEVICE                     1
146
+#define ONBOARD_SD_CS_PIN                   PC11  // SDSS
147
+#define SDIO_SUPPORT
148
+#define NO_SD_HOST_DRIVE                          // This board's SD is only seen by the printer
149
+
150
+#if ANY(RET6_12864_LCD, HAS_DWIN_E3V2, IS_DWIN_MARLINUI)
151
+
152
+  /**
153
+   *    RET6 12864 LCD
154
+   *        ------
155
+   *  PC6  | 1  2 | PB2
156
+   *  PB10 | 3  4 | PE8
157
+   *  PB14   5  6 | PB13
158
+   *  PB12 | 7  8 | PB15
159
+   *   GND | 9 10 | 5V
160
+   *        ------
161
+   */
162
+  #define EXP3_01_PIN                       PC6
163
+  #define EXP3_02_PIN                       PB2
164
+  #define EXP3_03_PIN                       PB10
165
+  #define EXP3_04_PIN                       PE8
166
+  #define EXP3_05_PIN                       PB14
167
+  #define EXP3_06_PIN                       PB13
168
+  #define EXP3_07_PIN                       PB12
169
+  #define EXP3_08_PIN                       PB15
170
+
171
+#elif EITHER(VET6_12864_LCD, DWIN_VET6_CREALITY_LCD)
172
+
173
+  /**
174
+   *    VET6 12864 LCD
175
+   *        ------
176
+   *  ?    | 1  2 | PC5
177
+   *  PB10 | 3  4 | ?
178
+   *  PA6    5  6 | PA5
179
+   *  PA4  | 7  8 | PA7
180
+   *   GND | 9 10 | 5V
181
+   *        ------
182
+   */
183
+  #define EXP3_01_PIN                       -1
184
+  #define EXP3_02_PIN                       PC5
185
+  #define EXP3_03_PIN                       PB10
186
+  #define EXP3_04_PIN                       -1
187
+  #define EXP3_05_PIN                       PA6
188
+  #define EXP3_06_PIN                       PA5
189
+  #define EXP3_07_PIN                       PA4
190
+  #define EXP3_08_PIN                       PA7
191
+
192
+#endif
193
+
194
+#if ENABLED(CR10_STOCKDISPLAY)
195
+  #if NONE(RET6_12864_LCD, VET6_12864_LCD)
196
+    #error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for CR10_STOCKDISPLAY with the Creality V4 controller."
197
+  #endif
198
+
199
+  #define LCD_PINS_RS                EXP3_07_PIN
200
+  #define LCD_PINS_ENABLE            EXP3_08_PIN
201
+  #define LCD_PINS_D4                EXP3_06_PIN
202
+
203
+  #define BTN_ENC                    EXP3_02_PIN
204
+  #define BTN_EN1                    EXP3_03_PIN
205
+  #define BTN_EN2                    EXP3_05_PIN
206
+
207
+  #define BEEPER_PIN                 EXP3_01_PIN
208
+
209
+#elif ANY(DWIN_VET6_CREALITY_LCD, HAS_DWIN_E3V2, IS_DWIN_MARLINUI)
210
+
211
+  // RET6 / VET6 DWIN ENCODER LCD
212
+  #define BTN_ENC                    EXP3_05_PIN
213
+  #define BTN_EN1                    EXP3_08_PIN
214
+  #define BTN_EN2                    EXP3_07_PIN
215
+
216
+  //#define LCD_LED_PIN              EXP3_02_PIN
217
+  #ifndef BEEPER_PIN
218
+    #define BEEPER_PIN               EXP3_06_PIN
219
+  #endif
220
+
221
+#endif
222
+
223
+// DGUS LCDs
224
+#if HAS_DGUS_LCD
225
+  #define LCD_SERIAL_PORT                      3
226
+#endif

+ 21
- 0
ini/stm32f1.ini View File

@@ -467,3 +467,24 @@ board                = genericSTM32F103VE
467 467
 board_build.variant  = MARLIN_F103Vx
468 468
 build_flags          = ${ZONESTAR_ZM3E.build_flags} -DTIMER_TONE=TIM1
469 469
 board_upload.maximum_size = 499712
470
+
471
+#
472
+# Creality (STM32F103RET6)
473
+#
474
+[env:STM32F103RET6_creality]
475
+platform                    = ${common_stm32f1.platform}
476
+extends                     = stm32_variant
477
+board                       = genericSTM32F103VE
478
+board_build.variant         = MARLIN_F103Vx
479
+board_build.offset          = 0x7000
480
+board_upload.offset_address = 0x08007000
481
+build_flags                 = ${stm32_variant.build_flags}
482
+                              -DSS_TIMER=4 -DTIMER_SERVO=TIM5
483
+                              -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8
484
+build_unflags               = ${stm32_variant.build_unflags}
485
+                              -DUSBCON -DUSBD_USE_CDC
486
+extra_scripts               = ${stm32_variant.extra_scripts}
487
+                              pre:buildroot/share/PlatformIO/scripts/random-bin.py
488
+monitor_speed               = 115200
489
+debug_tool                  = jlink
490
+upload_protocol             = jlink

Loading…
Cancel
Save