muele-marlin/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h

201 lines
5.4 KiB
C
Raw Normal View History

2020-06-16 06:45:27 +00:00
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
2020-06-16 06:45:27 +00:00
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
2020-06-16 06:45:27 +00:00
*
* 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
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
2020-07-23 03:20:14 +00:00
* along with this program. If not, see <https://www.gnu.org/licenses/>.
2020-06-16 06:45:27 +00:00
*
*/
/**
* Creality 4.2.x (STM32F103RET6) board pin assignments
2020-06-16 06:45:27 +00:00
*/
#if NOT_TARGET(__STM32F1__)
2020-06-16 06:45:27 +00:00
#error "Oops! Select an STM32F1 board in 'Tools > Board.'"
#elif HOTENDS > 1 || E_STEPPERS > 1
2020-12-06 00:18:28 +00:00
#error "Creality V4 only supports one hotend / E-stepper. Comment out this line to continue."
2020-06-16 06:45:27 +00:00
#endif
2020-08-22 02:56:18 +00:00
#ifndef BOARD_INFO_NAME
#define BOARD_INFO_NAME "Creality V4"
#endif
#ifndef DEFAULT_MACHINE_NAME
#define DEFAULT_MACHINE_NAME "Ender 3 V2"
#endif
2020-06-16 06:45:27 +00:00
#define BOARD_NO_NATIVE_USB
2020-06-16 06:45:27 +00:00
//
// EEPROM
//
2020-07-13 20:57:26 +00:00
#if NO_EEPROM_SELECTED
#define IIC_BL24CXX_EEPROM // EEPROM on I2C-0
//#define SDCARD_EEPROM_EMULATION
#endif
2020-07-13 20:57:26 +00:00
#if ENABLED(IIC_BL24CXX_EEPROM)
#define IIC_EEPROM_SDA PA11
#define IIC_EEPROM_SCL PA12
#define MARLIN_EEPROM_SIZE 0x800 // 2Kb (24C16)
#elif ENABLED(SDCARD_EEPROM_EMULATION)
#define MARLIN_EEPROM_SIZE 0x800 // 2Kb
2020-07-13 20:57:26 +00:00
#endif
2020-06-16 06:45:27 +00:00
//
// Servos
//
#ifndef HAS_PIN_27_BOARD
#define SERVO0_PIN PB0 // BLTouch OUT
#else
#define SERVO0_PIN PC6
#endif
2020-06-16 06:45:27 +00:00
//
// Limit Switches
//
#define X_STOP_PIN PA5
#define Y_STOP_PIN PA6
#define Z_STOP_PIN PA7
2020-08-27 19:01:56 +00:00
#define Z_MIN_PROBE_PIN PB1 // BLTouch IN
2020-06-16 06:45:27 +00:00
//
// Filament Runout Sensor
//
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN PA4 // "Pulled-high"
#endif
2020-06-16 06:45:27 +00:00
//
// Steppers
//
#define X_ENABLE_PIN PC3
2020-08-22 02:56:18 +00:00
#ifndef X_STEP_PIN
#define X_STEP_PIN PC2
#endif
#ifndef X_DIR_PIN
#define X_DIR_PIN PB9
#endif
2020-06-16 06:45:27 +00:00
#define Y_ENABLE_PIN PC3
2020-08-22 02:56:18 +00:00
#ifndef Y_STEP_PIN
#define Y_STEP_PIN PB8
#endif
#ifndef Y_DIR_PIN
#define Y_DIR_PIN PB7
#endif
2020-06-16 06:45:27 +00:00
#define Z_ENABLE_PIN PC3
2020-08-22 02:56:18 +00:00
#ifndef Z_STEP_PIN
#define Z_STEP_PIN PB6
#endif
#ifndef Z_DIR_PIN
#define Z_DIR_PIN PB5
#endif
2020-06-16 06:45:27 +00:00
#define E0_ENABLE_PIN PC3
2020-08-22 02:56:18 +00:00
#ifndef E0_STEP_PIN
#define E0_STEP_PIN PB4
#endif
#ifndef E0_DIR_PIN
#define E0_DIR_PIN PB3
#endif
2020-06-16 06:45:27 +00:00
//
// Release PB4 (Y_ENABLE_PIN) from JTAG NRST role
//
#define DISABLE_DEBUG
//
// Temperature Sensors
//
#define TEMP_0_PIN PC5 // TH1
#define TEMP_BED_PIN PC4 // TB1
//
// Heaters / Fans
//
#define HEATER_0_PIN PA1 // HEATER1
#define HEATER_BED_PIN PA2 // HOT BED
#define FAN_PIN PA0 // FAN
#define FAN_SOFT_PWM
//
// SD Card
//
#define SD_DETECT_PIN PC7
#define SDCARD_CONNECTION ONBOARD
#define ONBOARD_SPI_DEVICE 1
#define ONBOARD_SD_CS_PIN PA4 // SDSS
2020-06-16 06:45:27 +00:00
#define SDIO_SUPPORT
2020-09-04 19:15:06 +00:00
#define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer
2020-06-16 06:45:27 +00:00
#if ENABLED(CR10_STOCKDISPLAY) && NONE(RET6_12864_LCD, VET6_12864_LCD)
#error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for CR10_STOCKDISPLAY with the Creality V4 controller."
#endif
2020-06-16 06:45:27 +00:00
#if ENABLED(RET6_12864_LCD)
2020-09-09 22:56:01 +00:00
// RET6 12864 LCD
2020-06-16 06:45:27 +00:00
#define LCD_PINS_RS PB12
#define LCD_PINS_ENABLE PB15
#define LCD_PINS_D4 PB13
#define BTN_ENC PB2
#define BTN_EN1 PB10
#define BTN_EN2 PB14
#ifndef HAS_PIN_27_BOARD
#define BEEPER_PIN PC6
#endif
2020-06-16 06:45:27 +00:00
#elif ENABLED(VET6_12864_LCD)
2020-09-09 22:56:01 +00:00
// VET6 12864 LCD
2020-06-16 06:45:27 +00:00
#define LCD_PINS_RS PA4
#define LCD_PINS_ENABLE PA7
#define LCD_PINS_D4 PA5
#define BTN_ENC PC5
#define BTN_EN1 PB10
#define BTN_EN2 PA6
#elif ENABLED(DWIN_CREALITY_LCD)
2020-09-09 22:56:01 +00:00
// RET6 DWIN ENCODER LCD
2020-06-16 06:45:27 +00:00
#define BTN_ENC PB14
#define BTN_EN1 PB15
#define BTN_EN2 PB12
//#define LCD_LED_PIN PB2
2020-08-19 06:49:38 +00:00
#ifndef BEEPER_PIN
#define BEEPER_PIN PB13
#undef SPEAKER
#endif
2020-06-16 06:45:27 +00:00
#elif ENABLED(DWIN_VET6_CREALITY_LCD)
2020-09-09 22:56:01 +00:00
// VET6 DWIN ENCODER LCD
2020-06-16 06:45:27 +00:00
#define BTN_ENC PA6
#define BTN_EN1 PA7
#define BTN_EN2 PA4
#define BEEPER_PIN PA5
#endif