Skip to content

Commit

Permalink
✨ Creality v5.2.1 board (MarlinFirmware#24760)
Browse files Browse the repository at this point in the history
  • Loading branch information
Plyn1x authored and thinkyhead committed Dec 16, 2022
1 parent 827f9ae commit 215fcef
Show file tree
Hide file tree
Showing 10 changed files with 399 additions and 178 deletions.
29 changes: 15 additions & 14 deletions Marlin/src/core/boards.h
Original file line number Diff line number Diff line change
Expand Up @@ -355,20 +355,21 @@
#define BOARD_CREALITY_V431_D 4051 // Creality v4.3.1d (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V452 4052 // Creality v4.5.2 (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V453 4053 // Creality v4.5.3 (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V24S1 4054 // Creality v2.4.S1 (STM32F103RC / STM32F103RE) v101 as found in the Ender-7
#define BOARD_CREALITY_V24S1_301 4055 // Creality v2.4.S1_301 (STM32F103RC / STM32F103RE) v301 as found in the Ender-3 S1
#define BOARD_CREALITY_V25S1 4056 // Creality v2.5.S1 (STM32F103RE) as found in the CR-10 Smart Pro
#define BOARD_TRIGORILLA_PRO 4057 // Trigorilla Pro (STM32F103ZE)
#define BOARD_FLY_MINI 4058 // FLYmaker FLY MINI (STM32F103RC)
#define BOARD_FLSUN_HISPEED 4059 // FLSUN HiSpeedV1 (STM32F103VE)
#define BOARD_BEAST 4060 // STM32F103RE Libmaple-based controller
#define BOARD_MINGDA_MPX_ARM_MINI 4061 // STM32F103ZE Mingda MD-16
#define BOARD_GTM32_PRO_VD 4062 // STM32F103VE controller
#define BOARD_ZONESTAR_ZM3E2 4063 // Zonestar ZM3E2 (STM32F103RC)
#define BOARD_ZONESTAR_ZM3E4 4064 // Zonestar ZM3E4 V1 (STM32F103VC)
#define BOARD_ZONESTAR_ZM3E4V2 4065 // Zonestar ZM3E4 V2 (STM32F103VC)
#define BOARD_ERYONE_ERY32_MINI 4066 // Eryone Ery32 mini (STM32F103VE)
#define BOARD_PANDA_PI_V29 4067 // Panda Pi V2.9 - Standalone (STM32F103RC)
#define BOARD_CREALITY_V521 4054 // SV04 Board
#define BOARD_CREALITY_V24S1 4055 // Creality v2.4.S1 (STM32F103RC / STM32F103RE) v101 as found in the Ender-7
#define BOARD_CREALITY_V24S1_301 4056 // Creality v2.4.S1_301 (STM32F103RC / STM32F103RE) v301 as found in the Ender-3 S1
#define BOARD_CREALITY_V25S1 4057 // Creality v2.5.S1 (STM32F103RE) as found in the CR-10 Smart Pro
#define BOARD_TRIGORILLA_PRO 4058 // Trigorilla Pro (STM32F103ZE)
#define BOARD_FLY_MINI 4059 // FLYmaker FLY MINI (STM32F103RC)
#define BOARD_FLSUN_HISPEED 4060 // FLSUN HiSpeedV1 (STM32F103VE)
#define BOARD_BEAST 4061 // STM32F103RE Libmaple-based controller
#define BOARD_MINGDA_MPX_ARM_MINI 4062 // STM32F103ZE Mingda MD-16
#define BOARD_GTM32_PRO_VD 4063 // STM32F103VE controller
#define BOARD_ZONESTAR_ZM3E2 4064 // Zonestar ZM3E2 (STM32F103RC)
#define BOARD_ZONESTAR_ZM3E4 4065 // Zonestar ZM3E4 V1 (STM32F103VC)
#define BOARD_ZONESTAR_ZM3E4V2 4066 // Zonestar ZM3E4 V2 (STM32F103VC)
#define BOARD_ERYONE_ERY32_MINI 4067 // Eryone Ery32 mini (STM32F103VE)
#define BOARD_PANDA_PI_V29 4068 // Panda Pi V2.9 - Standalone (STM32F103RC)

//
// ARM Cortex-M4F
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/module/thermistor/thermistor_504.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/module/thermistor/thermistor_505.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
1 change: 1 addition & 0 deletions Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#if NO_EEPROM_SELECTED
//#define I2C_EEPROM // EEPROM on I2C-0
//#define SDCARD_EEPROM_EMULATION
//#undef NO_EEPROM_SELECTED
#endif

#if ENABLED(I2C_EEPROM)
Expand Down
2 changes: 2 additions & 0 deletions Marlin/src/pins/pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,8 @@
#include "stm32f1/pins_ERYONE_ERY32_MINI.h" // STM32F103VET6 env:ERYONE_ERY32_MINI_maple
#elif MB(PANDA_PI_V29)
#include "stm32f1/pins_PANDA_PI_V29.h" // STM32F103RCT6 env:PANDA_PI_V29
#elif MB(CREALITY_V521)
#include "stm32f1/pins_CREALITY_V521.h" // STM32F103RET6 env:STM32F103RET6_creality

//
// ARM Cortex-M4F
Expand Down
150 changes: 65 additions & 85 deletions Marlin/src/pins/stm32f1/pins_CREALITY_V4.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,94 +161,74 @@
#define SDIO_SUPPORT
#define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer

#if EITHER(CR10_STOCKDISPLAY, FYSETC_MINI_12864_2_1)

#if ENABLED(RET6_12864_LCD)

/**
* RET6 12864 LCD
* ------
* PC6 | 1 2 | PB2
* PB10 | 3 4 | PB11
* PB14 5 6 | PB13
* PB12 | 7 8 | PB15
* GND | 9 10 | 5V
* ------
* EXP1
*/
#define EXP1_01_PIN PC6
#define EXP1_02_PIN PB2
#define EXP1_03_PIN PB10
#define EXP1_04_PIN PB11
#define EXP1_05_PIN PB14
#define EXP1_06_PIN PB13
#define EXP1_07_PIN PB12
#define EXP1_08_PIN PB15

#elif ENABLED(VET6_12864_LCD)

/**
* VET6 12864 LCD
* ------
* ? | 1 2 | PC5
* PB10 | 3 4 | ?
* PA6 5 6 | PA5
* PA4 | 7 8 | PA7
* GND | 9 10 | 5V
* ------
* EXP1
*/
#define EXP1_01_PIN -1
#define EXP1_02_PIN PC5
#define EXP1_03_PIN PB10
#define EXP1_04_PIN -1
#define EXP1_05_PIN PA6
#define EXP1_06_PIN PA5
#define EXP1_07_PIN PA4
#define EXP1_08_PIN PA7
#if ANY(RET6_12864_LCD, HAS_DWIN_E3V2, IS_DWIN_MARLINUI)

#else
#error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for the LCD with the Creality V4 controller."
#endif
/**
* RET6 12864 LCD
* ------
* PC6 | 1 2 | PB2
* PB10 | 3 4 | PB11
* PB14 5 6 | PB13
* PB12 | 7 8 | PB15
* GND | 9 10 | 5V
* ------
*/
#define EXP3_01_PIN PC6
#define EXP3_02_PIN PB2
#define EXP3_03_PIN PB10
#define EXP3_04_PIN PB11
#define EXP3_05_PIN PB14
#define EXP3_06_PIN PB13
#define EXP3_07_PIN PB12
#define EXP3_08_PIN PB15

#elif EITHER(VET6_12864_LCD, DWIN_VET6_CREALITY_LCD)

/**
* VET6 12864 LCD
* ------
* ? | 1 2 | PC5
* PB10 | 3 4 | ?
* PA6 5 6 | PA5
* PA4 | 7 8 | PA7
* GND | 9 10 | 5V
* ------
*/
#define EXP3_01_PIN -1
#define EXP3_02_PIN PC5
#define EXP3_03_PIN PB10
#define EXP3_04_PIN -1
#define EXP3_05_PIN PA6
#define EXP3_06_PIN PA5
#define EXP3_07_PIN PA4
#define EXP3_08_PIN PA7

#elif EITHER(CR10_STOCKDISPLAY, FYSETC_MINI_12864_2_1)
#error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for the LCD with the Creality V4 controller."
#endif

#if ENABLED(CR10_STOCKDISPLAY)

#define LCD_PINS_RS EXP1_07_PIN
#define LCD_PINS_ENABLE EXP1_08_PIN
#define LCD_PINS_D4 EXP1_06_PIN
#define LCD_PINS_RS EXP3_07_PIN
#define LCD_PINS_ENABLE EXP3_08_PIN
#define LCD_PINS_D4 EXP3_06_PIN

#define BTN_ENC EXP1_02_PIN
#define BTN_EN1 EXP1_03_PIN
#define BTN_EN2 EXP1_05_PIN
#define BTN_ENC EXP3_02_PIN
#define BTN_EN1 EXP3_03_PIN
#define BTN_EN2 EXP3_05_PIN

#ifndef HAS_PIN_27_BOARD
#define BEEPER_PIN EXP1_01_PIN
#define BEEPER_PIN EXP3_01_PIN
#endif

#elif ANY(HAS_DWIN_E3V2, IS_DWIN_MARLINUI, DWIN_VET6_CREALITY_LCD)

#if HAS_DWIN_E3V2 || IS_DWIN_MARLINUI
// RET6 DWIN ENCODER LCD
#define EXP1_05_PIN PB14
#define EXP1_06_PIN PB13
#define EXP1_07_PIN PB12
#define EXP1_08_PIN PB15
//#define LCD_LED_PIN PB2
#else
// VET6 DWIN ENCODER LCD
#define EXP1_05_PIN PA6
#define EXP1_06_PIN PA5
#define EXP1_07_PIN PA4
#define EXP1_08_PIN PA7
#endif

#define BTN_ENC EXP1_05_PIN
#define BTN_EN1 EXP1_08_PIN
#define BTN_EN2 EXP1_07_PIN
#define BTN_ENC EXP3_05_PIN
#define BTN_EN1 EXP3_08_PIN
#define BTN_EN2 EXP3_07_PIN

#ifndef BEEPER_PIN
#define BEEPER_PIN EXP1_06_PIN
#define BEEPER_PIN EXP3_06_PIN
#endif

#elif ENABLED(FYSETC_MINI_12864_2_1)
Expand All @@ -257,8 +237,8 @@
#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"
#endif

#if SD_CONNECTION_IS(LCD)
#error "The LCD sdcard is not connected with this configuration"
#if SD_CONNECTION_IS(LCD)
#error "The LCD SD Card is not connected with this configuration."
#endif

/**
Expand All @@ -283,20 +263,20 @@
* Debug port EXP2
*
* Needs custom cable. Connect EN2-EN2, LCD_CS-LCD_CS and so on.
* Debug port is just above EXP1, You need to add pins
* Debug port is just above EXP1. You need to add pins.
*
*/

#define BTN_ENC EXP1_02_PIN
#define BTN_EN1 EXP1_01_PIN
#define BTN_EN2 EXP1_06_PIN
#define BTN_ENC EXP3_02_PIN
#define BTN_EN1 EXP3_01_PIN
#define BTN_EN2 EXP3_06_PIN
#define BEEPER_PIN -1

#define DOGLCD_CS EXP1_03_PIN
#define DOGLCD_A0 EXP1_05_PIN
#define DOGLCD_SCK EXP1_07_PIN
#define DOGLCD_MOSI EXP1_08_PIN
#define LCD_RESET_PIN EXP1_04_PIN
#define DOGLCD_CS EXP3_03_PIN
#define DOGLCD_A0 EXP3_05_PIN
#define DOGLCD_SCK EXP3_07_PIN
#define DOGLCD_MOSI EXP3_08_PIN
#define LCD_RESET_PIN EXP3_04_PIN

#define FORCE_SOFT_SPI
#define LCD_BACKLIGHT_PIN -1
Expand Down
Loading

0 comments on commit 215fcef

Please sign in to comment.