add missing files from 2.1.2 merge

fixes 67c7ce7b79
This commit is contained in:
Stefan Kalscheuer
2022-12-22 09:47:49 +01:00
parent 0f75d5be1d
commit 4885c082fe
84 changed files with 13037 additions and 0 deletions

View File

@@ -0,0 +1,155 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* 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
* 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
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Tenlog pin assignments
*/
#define REQUIRE_MEGA2560
#include "env_validate.h"
#if HOTENDS > 2 || E_STEPPERS > 2
#error "Tenlog supports up to 2 hotends / E steppers."
#endif
#define BOARD_INFO_NAME "Tenlog MB1 V2.3"
#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
//
// Limit Switches
//
#define X_MIN_PIN 3
#define X_MAX_PIN 2
#define Y_MIN_PIN 14
//#define Y_MAX_PIN 15 // Connected to "DJ" plug on extruder heads
#define Z_MIN_PIN 18
#if ENABLED(BLTOUCH)
#define SERVO0_PIN 19
#else
#define Z_MAX_PIN 19
#endif
//
// Steppers
//
#define X_STEP_PIN 54
#define X_DIR_PIN 55
#define X_ENABLE_PIN 38
#define X2_STEP_PIN 36
#define X2_DIR_PIN 34
#define X2_ENABLE_PIN 30
#define Y_STEP_PIN 60
#define Y_DIR_PIN 61
#define Y_ENABLE_PIN 56
#define Z_STEP_PIN 46
#define Z_DIR_PIN 48
#define Z_ENABLE_PIN 62
#define Z2_STEP_PIN 65
#define Z2_DIR_PIN 66
#define Z2_ENABLE_PIN 64
#define E0_STEP_PIN 57
#define E0_DIR_PIN 58
#define E0_ENABLE_PIN 59
#define E1_STEP_PIN 26
#define E1_DIR_PIN 28
#define E1_ENABLE_PIN 24
//
// Temperature Sensors
//
#define TEMP_0_PIN 15 // Analog Input
#define TEMP_1_PIN 13 // Analog Input
#define TEMP_BED_PIN 14 // Analog Input
//
// Heaters / Fans
//
#define HEATER_0_PIN 11
#define HEATER_1_PIN 10
#define HEATER_BED_PIN 8
#define FAN_PIN 9
#define FAN2_PIN 5 // Normally this would be a servo pin
//#define NUM_RUNOUT_SENSORS 0
#define FIL_RUNOUT_PIN 15
//#define FIL_RUNOUT2_PIN 21
//
// PSU and Powerloss Recovery
//
#if ENABLED(PSU_CONTROL)
#define PS_ON_PIN 40 // The M80/M81 PSU pin for boards v2.1-2.3
#endif
//
// Misc. Functions
//
//#define CASE_LIGHT_PIN 5
//#ifndef LED_PIN
// #define LED_PIN 13
//#endif
#if HAS_CUTTER
//#define SPINDLE_LASER_PWM_PIN -1 // Hardware PWM
//#define SPINDLE_LASER_ENA_PIN 4 // Pullup!
#endif
// Use the RAMPS 1.4 Analog input 5 on the AUX2 connector
//#define FILWIDTH_PIN 5 // Analog Input
#define SDSS 53
#define SD_DETECT_PIN 49
//
// LCD / Controller
//
//#if IS_RRD_SC
//#ifndef BEEPER_PIN
// #define BEEPER_PIN -1
//#endif
#define LCD_PINS_RS -1
#define LCD_PINS_ENABLE -1
#define LCD_PINS_D4 -1
#define LCD_PINS_D5 -1
#define LCD_PINS_D6 -1
#define LCD_PINS_D7 -1
//#define BTN_EN1 31
//#define BTN_EN2 33
//#define BTN_ENC 35
//#ifndef KILL_PIN
// #define KILL_PIN 41
//#endif
//#endif // IS_RRD_SC

View File

@@ -0,0 +1,556 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* 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
* 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
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* ReprapWorld's Minitronics v2.0
*/
#if NOT_TARGET(__SAMD21__)
#error "Oops! Select 'Minitronics v2.0' in 'Tools > Board.'"
#endif
#ifndef BOARD_INFO_NAME
#define BOARD_INFO_NAME "Minitronics V2.0"
#endif
/**
* NOTE: We need the Serial port on the -1 to make it work!!. Remember to change it on configuration.h #define SERIAL_PORT -1
*/
/**
* EEPROM EMULATION: Works with some bugs already, but the board needs an I2C EEPROM memory soldered on.
*/
//#define FLASH_EEPROM_EMULATION
//#define I2C_EEPROM // EEPROM on I2C-0
#define MARLIN_EEPROM_SIZE 500 // 4000 bytes
//This its another option to emulate an EEPROM, but its more efficient to dont loose the data the first One.
//#define SDCARD_EEPROM_EMULATION
//
// BLTouch
//
#define SERVO0_PIN 33 // BLTouch PWM
//
// Limit Switches
//
#define X_STOP_PIN 54
#define Y_STOP_PIN 55
#define Z_STOP_PIN 4
/**
* NOTE: Useful if extra TMC2209 are to be used as independent axes.
* We need to configure the new digital PIN, for this we could configure on the board the extra pin of this stepper, for example as a MIN_PIN/MAX_PIN. This pin is the D14.
*/
//#define Z2_STOP_PIN 14
//#define X2_STOP_PIN 14
//#define Y2_STOP_PIN 14
//
// Z Probe (when not Z_MIN_PIN)
//
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN 12
#endif
//
// Steppers
//
#define X_STEP_PIN 1
#define X_DIR_PIN 3
#define X_ENABLE_PIN 0
#define Y_STEP_PIN 29
#define Y_DIR_PIN 28
#define Y_ENABLE_PIN 0
#define Z_STEP_PIN 16
#define Z_DIR_PIN 17
#define Z_ENABLE_PIN 0
#define E0_STEP_PIN 14
#define E0_DIR_PIN 15
#define E0_ENABLE_PIN 0
#define E1_STEP_PIN 20
#define E1_DIR_PIN 13
#define E1_ENABLE_PIN 21
// Filament runout. You may choose to use this pin for some other purpose. It's a normal GPIO that can be configured as I/O.
// For example, a switch to detect any kind of behavior, Power supply pin .... etc.
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN 44
#endif
// This board have the option to use an extra TMC2209 stepper, one of the use could be as a second extruder.
#if EXTRUDERS < 2
// TODO: Corregir aquí que cuando tenemos dos extrusores o lo que sea, utiliza los endstop que le sobran, osea los max, no hay Z2_endstop
#if NUM_Z_STEPPERS > 1
#define Z2_STOP_PIN 14
#endif
#else
// If we want to configure the extra stepper as a Extruder, we should have undef all of the extra motors.
#undef X2_DRIVER_TYPE
#undef Y2_DRIVER_TYPE
#undef Z2_DRIVER_TYPE
#undef Z3_DRIVER_TYPE
#undef Z4_DRIVER_TYPE
// Si tenemos más de un extrusor lo que hacemos es definir el nuevo extrusor así como sus pines
// Acordarse de definir el #define TEMP_SENSOR_1, ya que este contiene el tipo de sonda del extrusor E1
#define FIL_RUNOUT2_PIN 14
#endif
//
// Extruder / Bed
//
// Temperature Sensors
#define TEMP_0_PIN 4 // T1
// You could use one of the ADC for a temp chamber if you don't use the second extruder, for example.
#if TEMP_SENSOR_CHAMBER > 0
#define TEMP_CHAMBER_PIN 3
#else
#define TEMP_1_PIN 2 // T3
#endif
#define TEMP_BED_PIN 3 // T2
//
// Heaters / Fans
//
#define HEATER_0_PIN 10
#define HEATER_1_PIN 11
#define HEATER_BED_PIN 6
#define SPINDLE_LASER_PWM_PIN 6
// The board has 4 PWM fans, use and configure as desired
#define FAN_PIN 24
//
// LCD / Controller
//
#if ENABLED(CR10_STOCKDISPLAY)
#define EXP3_01_PIN EXP1_01_PIN
#define EXP3_02_PIN EXP1_02_PIN
#define EXP3_03_PIN EXP1_03_PIN
#define EXP3_04_PIN EXP1_04_PIN
#define EXP3_05_PIN EXP1_05_PIN
#define EXP3_06_PIN EXP1_06_PIN
#define EXP3_07_PIN EXP1_07_PIN
#define EXP3_08_PIN EXP1_08_PIN
#endif
/************************************/
/***** Configurations Section ******/
/************************************/
/**
* This sections starts with the pins_RAMPS_144.h as example, after if you need any new
* display, you could use normal duponts and connect it with with the scheme showed before.
* Tested:
* - Ender 3 Old display (Character LCD)
* - Ender 3 New Serial DWING Display
* - Reprap Display
* - Ender 5 New Serial Display
* - Any Reprap character display like
*/
#if HAS_WIRED_LCD
//
// LCD Display output pins
//
#if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
#define LCD_PINS_RS 18 // CS chip select /SS chip slave select
#define LCD_PINS_ENABLE MOSI // SID (MOSI)
#define LCD_PINS_D4 SCK // SCK (CLK) clock
#define BTN_ENC 23
#define BTN_EN1 27
#define BTN_EN2 33
#elif BOTH(IS_NEWPANEL, PANEL_ONE)
// TO TEST
//#define LCD_PINS_RS EXP1_02_PIN
//#define LCD_PINS_ENABLE EXP2_05_PIN
//#define LCD_PINS_D4 57 // Mega/Due:65 - AGCM4:57
//#define LCD_PINS_D5 58 // Mega/Due:66 - AGCM4:58
//#define LCD_PINS_D6 EXP2_07_PIN
//#define LCD_PINS_D7 56 // Mega/Due:64 - AGCM4:56
#else
#if ENABLED(CR10_STOCKDISPLAY)
// TO TEST
//#define LCD_PINS_RS EXP3_04_PIN
//#define LCD_PINS_ENABLE EXP3_03_PIN
//#define LCD_PINS_D4 EXP3_05_PIN
#if !IS_NEWPANEL
// TO TEST
//#define BEEPER_PIN EXP3_05_PIN
#endif
#elif ENABLED(ZONESTAR_LCD)
// TO TEST
//#define LCD_PINS_RS 56 // Mega/Due:64 - AGCM4:56
//#define LCD_PINS_ENABLE EXP2_07_PIN
//#define LCD_PINS_D4 55 // Mega/Due:63 - AGCM4:55
//#define LCD_PINS_D5 EXP1_02_PIN
//#define LCD_PINS_D6 EXP2_05_PIN
//#define LCD_PINS_D7 57 // Mega/Due:65 - AGCM4:57
#else
#if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306)
// TO TEST
//#define LCD_PINS_DC 25 // Set as output on init
//#define LCD_PINS_RS 27 // Pull low for 1s to init
// DOGM SPI LCD Support
//#define DOGLCD_CS 16
//#define DOGLCD_MOSI 17
//#define DOGLCD_SCK 23
//#define DOGLCD_A0 LCD_PINS_DC
#else
// Definitions for any standard Display
#define LCD_PINS_RS EXP1_04_PIN
#define LCD_PINS_ENABLE EXP1_03_PIN
#define LCD_PINS_D4 EXP1_05_PIN
#define LCD_PINS_D5 EXP1_06_PIN
#define LCD_PINS_D6 EXP1_07_PIN
#endif
#define LCD_PINS_D7 EXP1_08_PIN
#if !IS_NEWPANEL
#define BEEPER_PIN EXP1_01_PIN
#endif
#endif
#if !IS_NEWPANEL
// Buttons attached to a shift register
// Not wired yet
//#define SHIFT_CLK_PIN EXP1_07_PIN
//#define SHIFT_LD_PIN EXP2_05_PIN
//#define SHIFT_OUT_PIN EXP1_02_PIN
//#define SHIFT_EN_PIN 17
#endif
#endif
//
// LCD Display input pins
//
#if IS_NEWPANEL
#if IS_RRD_SC
//#define BEEPER_PIN EXP1_01_PIN
#if ENABLED(CR10_STOCKDISPLAY)
// TO TEST
#define BTN_EN1 EXP1_03_PIN
#define BTN_EN2 EXP1_05_PIN
#else
// Definitions fpr any standard Display
#define BTN_EN1 EXP2_05_PIN
#define BTN_EN2 EXP2_03_PIN
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
#endif
#endif
#define BTN_ENC EXP1_02_PIN
#ifndef SD_DETECT_PIN
#define SD_DETECT_PIN EXP2_07_PIN
#endif
//#define KILL_PIN EXP2_10_PIN
#if ENABLED(BQ_LCD_SMART_CONTROLLER)
//#define LCD_BACKLIGHT_PIN EXP1_08_PIN // TO TEST
#endif
#elif ENABLED(LCD_I2C_PANELOLU2)
// TO TEST
//#define BTN_EN1 47
//#define BTN_EN2 EXP2_03_PIN
//#define BTN_ENC 32
//#define LCD_SDSS SDSS
//#define KILL_PIN EXP1_01_PIN
#elif ENABLED(LCD_I2C_VIKI)
// TO TEST
//#define BTN_EN1 EXP1_02_PIN // https://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains 40/42.
//#define BTN_EN2 EXP2_05_PIN
//#define BTN_ENC -1
//#define LCD_SDSS SDSS
//#define SD_DETECT_PIN EXP2_10_PIN
#elif EITHER(VIKI2, miniVIKI)
// TO TEST
//#define DOGLCD_CS 45
//#define DOGLCD_A0 EXP2_07_PIN
//#define LCD_SCREEN_ROT_180
//#define BEEPER_PIN 33
//#define STAT_LED_RED_PIN 32
//#define STAT_LED_BLUE_PIN EXP1_03_PIN
//#define BTN_EN1 22
//#define BTN_EN2 7
//#define BTN_ENC EXP1_08_PIN
//#define SD_DETECT_PIN -1 // Pin 49 for display SD interface, 72 for easy adapter board
//#define KILL_PIN 31
#elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
// TO TEST
//#define DOGLCD_CS 29
//#define DOGLCD_A0 27
//#define BEEPER_PIN 23
//#define LCD_BACKLIGHT_PIN 33
//#define BTN_EN1 EXP1_03_PIN
//#define BTN_EN2 EXP1_06_PIN
//#define BTN_ENC 31
//#define LCD_SDSS SDSS
//#define SD_DETECT_PIN EXP2_10_PIN
//#define KILL_PIN EXP1_01_PIN
#elif EITHER(MKS_MINI_12864, FYSETC_MINI_12864)
// TO TEST
//#define BEEPER_PIN EXP1_06_PIN
//#define BTN_ENC EXP1_03_PIN
//#define SD_DETECT_PIN EXP2_10_PIN
//#ifndef KILL_PIN
// #define KILL_PIN EXP1_01_PIN
//#endif
#if ENABLED(MKS_MINI_12864)
// TO TEST
//#define DOGLCD_A0 27
//#define DOGLCD_CS 25
// GLCD features
// Uncomment screen orientation
//#define LCD_SCREEN_ROT_90
//#define LCD_SCREEN_ROT_180
//#define LCD_SCREEN_ROT_270
// not connected to a pin
//#define LCD_BACKLIGHT_PIN 57 // backlight LED on A11/D? (Mega/Due:65 - AGCM4:57)
//#define BTN_EN1 31
//#define BTN_EN2 33
#elif ENABLED(FYSETC_MINI_12864)
// From https://wiki.fysetc.com/Mini12864_Panel/
// TO TEST
//#define DOGLCD_A0 16
//#define DOGLCD_CS 17
//#define BTN_EN1 33
//#define BTN_EN2 31
//#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems
// results in LCD soft SPI mode 3, SD soft SPI mode 0
//#define LCD_RESET_PIN 23 // Must be high or open for LCD to operate normally.
#if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
#ifndef RGB_LED_R_PIN
// TO TEST
//#define RGB_LED_R_PIN 25
#endif
#ifndef RGB_LED_G_PIN
// TO TEST
//#define RGB_LED_G_PIN 27
#endif
#ifndef RGB_LED_B_PIN
// TO TEST
//#define RGB_LED_B_PIN 29
#endif
#elif ENABLED(FYSETC_MINI_12864_2_1)
// TO TEST
//#define NEOPIXEL_PIN 25
#endif
#endif
#elif ENABLED(MINIPANEL)
// TO TEST
//#define BEEPER_PIN EXP2_05_PIN
// not connected to a pin
//#define LCD_BACKLIGHT_PIN 57 // backlight LED on A11/D? (Mega/Due:65 - AGCM4:57)
//#define DOGLCD_A0 EXP2_07_PIN
//#define DOGLCD_CS 58 // Mega/Due:66 - AGCM4:58
// GLCD features
// Uncomment screen orientation
//#define LCD_SCREEN_ROT_90
//#define LCD_SCREEN_ROT_180
//#define LCD_SCREEN_ROT_270
//#define BTN_EN1 EXP1_02_PIN
//#define BTN_EN2 55 // Mega/Due:63 - AGCM4:55
//#define BTN_ENC 72 // Mega/Due:59 - AGCM4:72
//#define SD_DETECT_PIN EXP2_10_PIN
//#define KILL_PIN 56 // Mega/Due:64 - AGCM4:56
#elif ENABLED(ZONESTAR_LCD)
// TO TEST
//#define ADC_KEYPAD_PIN 12
#elif ENABLED(AZSMZ_12864)
// TO TEST
#else
// Beeper on AUX-4
//#define BEEPER_PIN 33
// Buttons are directly attached to AUX-2
#if IS_RRW_KEYPAD
// TO TEST
//#define SHIFT_OUT_PIN EXP1_02_PIN
//#define SHIFT_CLK_PIN EXP2_07_PIN
//#define SHIFT_LD_PIN EXP2_05_PIN
//#define BTN_EN1 56 // Mega/Due:64 - AGCM4:56
//#define BTN_EN2 72 // Mega/Due:59 - AGCM4:72
//#define BTN_ENC 55 // Mega/Due:63 - AGCM4:55
#elif ENABLED(PANEL_ONE)
// TO TEST
//#define BTN_EN1 72 // AUX2 PIN 3 (Mega/Due:59 - AGCM4:72)
//#define BTN_EN2 55 // AUX2 PIN 4 (Mega/Due:63 - AGCM4:55)
//#define BTN_ENC EXP2_10_PIN // AUX3 PIN 7
#else
// TO TEST
//#define BTN_EN1 EXP1_06_PIN
//#define BTN_EN2 EXP1_03_PIN
//#define BTN_ENC 31
#endif
#if ENABLED(G3D_PANEL)
// TO TEST
//#define SD_DETECT_PIN EXP2_10_PIN
//#define KILL_PIN EXP1_01_PIN
#endif
#endif
#endif // IS_NEWPANEL
#endif // HAS_WIRED_LCD
//
// SD Support
//
#define SDSS 2
#undef SD_DETECT_PIN
#define SD_DETECT_PIN 22
#if HAS_TMC_UART
/**
* Address for the UART Configuration of the TMC2209. Override in Configuration files.
* To test TMC2209 Steppers enable TMC_DEBUG in Configuration_adv.h and test the M122 command with voltage on the steppers.
*/
#ifndef X_SLAVE_ADDRESS
#define X_SLAVE_ADDRESS 0b00
#endif
#ifndef Y_SLAVE_ADDRESS
#define Y_SLAVE_ADDRESS 0b01
#endif
#ifndef Z_SLAVE_ADDRESS
#define Z_SLAVE_ADDRESS 0b10
#endif
#ifndef E0_SLAVE_ADDRESS
#define E0_SLAVE_ADDRESS 0b11
#endif
#ifndef E1_SLAVE_ADDRESS
#define E1_SLAVE_ADDRESS 0b00
#endif
/**
* TMC2208/TMC2209 stepper drivers
* It seems to work perfectly fine on Software Serial, if an advanced user wants to test, you could use the SAMD51 Serial1 and Serial 2. Be careful with the Sercom configurations.
* Steppers 1,2,3,4 (X,Y,Z,E0) are on the Serial1, Sercom (RX = 0, TX = 1), extra stepper 5 (E1 or any axis you want) is on Serial2, Sercom (RX = 17, TX = 16)
*/
//#define X_HARDWARE_SERIAL Serial1
//#define Y_HARDWARE_SERIAL Serial1
//#define Z_HARDWARE_SERIAL Serial1
//#define E0_HARDWARE_SERIAL Serial1
//#define E1_HARDWARE_SERIAL Serial2
#define TMC_BAUD_RATE 250000
//
// Software serial
//
#define X_SERIAL_TX_PIN 0
#define X_SERIAL_RX_PIN 1
#define Y_SERIAL_TX_PIN X_SERIAL_TX_PIN
#define Y_SERIAL_RX_PIN X_SERIAL_RX_PIN
#define Z_SERIAL_TX_PIN X_SERIAL_TX_PIN
#define Z_SERIAL_RX_PIN X_SERIAL_RX_PIN
#define E0_SERIAL_TX_PIN X_SERIAL_TX_PIN
#define E0_SERIAL_RX_PIN X_SERIAL_RX_PIN
#define E1_SERIAL_TX_PIN 17
#define E1_SERIAL_RX_PIN 16
#endif

View File

@@ -0,0 +1,226 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* 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
* 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
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Creality 5.2.1 (STM32F103RE) board pin assignments
*/
#include "env_validate.h"
#if HOTENDS > 2 || E_STEPPERS > 2
#error "Creality v5.2.1 supports up to 2 hotends / E steppers."
#endif
#ifndef BOARD_INFO_NAME
#define BOARD_INFO_NAME "Creality V521"
#endif
#ifndef DEFAULT_MACHINE_NAME
#define DEFAULT_MACHINE_NAME "Creality V5.2.1"
#endif
//
// EEPROM
//
#if NO_EEPROM_SELECTED
// FLASH
//#define FLASH_EEPROM_EMULATION
// I2C
#define IIC_BL24CXX_EEPROM // EEPROM on I2C-0 used only for display settings
#if ENABLED(IIC_BL24CXX_EEPROM)
#define IIC_EEPROM_SDA PC2
#define IIC_EEPROM_SCL PC3
#define MARLIN_EEPROM_SIZE 0x800 // 2K (24C16)
#else
#define SDCARD_EEPROM_EMULATION // SD EEPROM until all EEPROM is BL24CXX
#define MARLIN_EEPROM_SIZE 0x800 // 2K
#endif
#undef NO_EEPROM_SELECTED
#endif
//
// Servos
//
#define SERVO0_PIN PD13 // BLTouch OUT
//
// Limit Switches
//
#define X_STOP_PIN PD10 // X
#define X2_STOP_PIN PE15 // X2
#define Y_STOP_PIN PE0 // Y
#define Z_STOP_PIN PE1 // Z
#define Z2_STOP_PIN PE2 // Z2
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN PD12 // BLTouch IN
#endif
//
// Filament Runout Sensor
//
#define FIL_RUNOUT_PIN PE5 // "Pulled-high"
#define FIL_RUNOUT2_PIN PE6 // "Pulled-high"
//
// Steppers
//
#define X_ENABLE_PIN PC7
#define X_STEP_PIN PD15
#define X_DIR_PIN PD14
#define Y_ENABLE_PIN PB9
#define Y_STEP_PIN PB7
#define Y_DIR_PIN PB6
#define Z_ENABLE_PIN PB5
#define Z_STEP_PIN PB3
#define Z_DIR_PIN PD7
#define E0_ENABLE_PIN PD4
#define E0_STEP_PIN PD1
#define E0_DIR_PIN PD0
#define E1_ENABLE_PIN PE7
#define E1_STEP_PIN PB1
#define E1_DIR_PIN PB0
#define X2_ENABLE_PIN PE11
#define X2_STEP_PIN PE9
#define X2_DIR_PIN PE8
#define Z2_ENABLE_PIN PC5
#define Z2_STEP_PIN PA7
#define Z2_DIR_PIN PA6
//
// Release PB4 (Y_ENABLE_PIN) from JTAG NRST role
//
#define DISABLE_JTAG
//
// Temperature Sensors
//
#define TEMP_0_PIN PA4 // TH0
#define TEMP_1_PIN PA5 // TH1
#define TEMP_BED_PIN PA3 // TB1
//
// Heaters / Fans
//
#define HEATER_0_PIN PA1 // HEATER0
#define HEATER_1_PIN PA0 // HEATER1
#define HEATER_BED_PIN PA2 // HOT BED
#define FAN_PIN PB14 // FAN
#define FAN1_PIN PB12 // FAN
#define FAN_SOFT_PWM
//
// SD Card
//
#define SD_DETECT_PIN PA8
#define SDCARD_CONNECTION ONBOARD
#define ONBOARD_SPI_DEVICE 1
#define ONBOARD_SD_CS_PIN PC11 // SDSS
#define SDIO_SUPPORT
#define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer
#if ANY(RET6_12864_LCD, HAS_DWIN_E3V2, IS_DWIN_MARLINUI)
/**
* RET6 12864 LCD
* ------
* PC6 | 1 2 | PB2
* PB10 | 3 4 | PE8
* 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 PE8
#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
#endif
#if ENABLED(CR10_STOCKDISPLAY)
#if 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
#define LCD_PINS_RS EXP3_07_PIN
#define LCD_PINS_ENABLE EXP3_08_PIN
#define LCD_PINS_D4 EXP3_06_PIN
#define BTN_ENC EXP3_02_PIN
#define BTN_EN1 EXP3_03_PIN
#define BTN_EN2 EXP3_05_PIN
#define BEEPER_PIN EXP3_01_PIN
#elif ANY(DWIN_VET6_CREALITY_LCD, HAS_DWIN_E3V2, IS_DWIN_MARLINUI)
// RET6 / VET6 DWIN ENCODER LCD
#define BTN_ENC EXP3_05_PIN
#define BTN_EN1 EXP3_08_PIN
#define BTN_EN2 EXP3_07_PIN
//#define LCD_LED_PIN EXP3_02_PIN
#ifndef BEEPER_PIN
#define BEEPER_PIN EXP3_06_PIN
#endif
#endif
// DGUS LCDs
#if HAS_DGUS_LCD
#define LCD_SERIAL_PORT 3
#endif

View File

@@ -0,0 +1,350 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* 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
* 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
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
//#define BOARD_CUSTOM_BUILD_FLAGS -DTONE_CHANNEL=4 -DTONE_TIMER=4 -DTIMER_TONE=4
#include "env_validate.h"
#if HOTENDS > 1 || E_STEPPERS > 1
#error "BTT SKR Mini E3 V3.0.1 supports up to 1 hotend / E stepper."
#endif
#ifndef BOARD_INFO_NAME
#define BOARD_INFO_NAME "BTT SKR Mini E3 V3.0.1"
#endif
#define USES_DIAG_JUMPERS
// Ignore temp readings during development.
//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
#ifndef NEOPIXEL_LED
#define LED_PIN PA14
#endif
// Onboard I2C EEPROM
#if EITHER(NO_EEPROM_SELECTED, I2C_EEPROM)
#undef NO_EEPROM_SELECTED
#define I2C_EEPROM
#define SOFT_I2C_EEPROM // Force the use of Software I2C
#define I2C_SCL_PIN PB8
#define I2C_SDA_PIN PB9
#define MARLIN_EEPROM_SIZE 0x1000 // 4K
#endif
//
// Servos
//
#define SERVO0_PIN PA0 // SERVOS
//
// Limit Switches
//
#define X_STOP_PIN PB5 // X-STOP
#define Y_STOP_PIN PB6 // Y-STOP
#define Z_STOP_PIN PB7 // Z-STOP
//
// Z Probe must be this pin
//
#define Z_MIN_PROBE_PIN PA1 // PROBE
//
// Filament Runout Sensor
//
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN PC15 // E0-STOP
#endif
//
// Power-loss Detection
//
#ifndef POWER_LOSS_PIN
#define POWER_LOSS_PIN PC13 // Power Loss Detection: PWR-DET
#endif
#ifndef NEOPIXEL_PIN
#define NEOPIXEL_PIN PA14 // LED driving pin
#endif
#ifndef PS_ON_PIN
#define PS_ON_PIN PC14 // Power Supply Control
#endif
//
// Steppers
//
#define X_ENABLE_PIN PC10
#define X_STEP_PIN PC11
#define X_DIR_PIN PC12
#define Y_ENABLE_PIN PB13
#define Y_STEP_PIN PB12
#define Y_DIR_PIN PB10
#define Z_ENABLE_PIN PB2
#define Z_STEP_PIN PB1
#define Z_DIR_PIN PB0
#define E0_ENABLE_PIN PC3
#define E0_STEP_PIN PC2
#define E0_DIR_PIN PC1
#if HAS_TMC_UART
/**
* TMC220x stepper drivers
* Hardware serial communication ports
*/
#define X_HARDWARE_SERIAL MSerial6
#define Y_HARDWARE_SERIAL MSerial6
#define Z_HARDWARE_SERIAL MSerial6
#define E0_HARDWARE_SERIAL MSerial6
// Default TMC slave addresses
#ifndef X_SLAVE_ADDRESS
#define X_SLAVE_ADDRESS 0
#endif
#ifndef Y_SLAVE_ADDRESS
#define Y_SLAVE_ADDRESS 2
#endif
#ifndef Z_SLAVE_ADDRESS
#define Z_SLAVE_ADDRESS 1
#endif
#ifndef E0_SLAVE_ADDRESS
#define E0_SLAVE_ADDRESS 3
#endif
#endif
//
// Temperature Sensors
//
#define TEMP_0_PIN PC5 // Analog Input "TH0"
#define TEMP_BED_PIN PC4 // Analog Input "TB0"
//
// Heaters / Fans
//
#define HEATER_0_PIN PA15 // "HE"
#define HEATER_BED_PIN PB3 // "HB"
#define FAN_PIN PC9 // "FAN0"
#define FAN1_PIN PA8 // "FAN1"
#define FAN2_PIN PC8 // "FAN2"
/**
* SKR Mini E3 V3.0.1
* ------
* (BEEPER) PB15 | 1 2 | PB14 (BTN_ENC)
* (BTN_EN1) PA9 | 3 4 | RESET
* (BTN_EN2) PA10 5 6 | PB4 (LCD_D4)
* (LCD_RS) PD2 | 7 8 | PC0 (LCD_EN)
* GND | 9 10 | 5V
* ------
* EXP1
*/
#define EXP1_01_PIN PB15
#define EXP1_02_PIN PB14
#define EXP1_03_PIN PA9
#define EXP1_04_PIN -1 // RESET
#define EXP1_05_PIN PA10
#define EXP1_06_PIN PB4
#define EXP1_07_PIN PD2
#define EXP1_08_PIN PC0
#if HAS_DWIN_E3V2 || IS_DWIN_MARLINUI
/**
* ------ ------ ------
* (ENT) | 1 2 | (BEEP) |10 9 | |10 9 |
* (RX) | 3 4 | (RX) | 8 7 | (TX) RX | 8 7 | TX
* (TX) 5 6 | (ENT) 6 5 | (BEEP) ENT | 6 5 | BEEP
* (B) | 7 8 | (A) (B) | 4 3 | (A) B | 4 3 | A
* GND | 9 10 | (VCC) GND | 2 1 | VCC GND | 2 1 | VCC
* ------ ------ ------
* EXP1 DWIN DWIN (plug)
*
* All pins are labeled as printed on DWIN PCB. Connect TX-TX, A-A and so on.
*/
#error "DWIN_CREALITY_LCD requires a custom cable, see diagram above this line. Comment out this line to continue."
#define BEEPER_PIN EXP1_02_PIN
#define BTN_EN1 EXP1_08_PIN
#define BTN_EN2 EXP1_07_PIN
#define BTN_ENC EXP1_01_PIN
#elif HAS_WIRED_LCD
#if ENABLED(CR10_STOCKDISPLAY)
#define BEEPER_PIN EXP1_01_PIN
#define BTN_ENC EXP1_02_PIN
#define BTN_EN1 EXP1_03_PIN
#define BTN_EN2 EXP1_05_PIN
#define LCD_PINS_RS EXP1_07_PIN
#define LCD_PINS_ENABLE EXP1_08_PIN
#define LCD_PINS_D4 EXP1_06_PIN
#elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD!
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! ZONESTAR_LCD requires wiring modifications. See 'pins_BTT_SKR_MINI_E3_common.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
#define LCD_PINS_RS EXP1_06_PIN
#define LCD_PINS_ENABLE EXP1_02_PIN
#define LCD_PINS_D4 EXP1_07_PIN
#define LCD_PINS_D5 EXP1_05_PIN
#define LCD_PINS_D6 EXP1_03_PIN
#define LCD_PINS_D7 EXP1_01_PIN
#define ADC_KEYPAD_PIN PA1 // Repurpose servo pin for ADC - CONNECTING TO 5V WILL DAMAGE THE BOARD!
#elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
#define BTN_ENC EXP1_02_PIN
#define BTN_EN1 EXP1_03_PIN
#define BTN_EN2 EXP1_05_PIN
#define DOGLCD_CS EXP1_07_PIN
#define DOGLCD_A0 EXP1_06_PIN
#define DOGLCD_SCK EXP1_01_PIN
#define DOGLCD_MOSI EXP1_08_PIN
#define FORCE_SOFT_SPI
#define LCD_BACKLIGHT_PIN -1
#elif IS_TFTGLCD_PANEL
#if ENABLED(TFTGLCD_PANEL_SPI)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! TFTGLCD_PANEL_SPI requires wiring modifications. See 'pins_BTT_SKR_MINI_E3_common.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
/**
* TFTGLCD_PANEL_SPI display pinout
*
* Board Display
* ------ ------
* (BEEPER) PB6 | 1 2 | PB15 (SD_DET) 5V |10 9 | GND
* RESET | 3 4 | PA9 (MOD_RESET) -- | 8 7 | (SD_DET)
* PB4 5 6 | PA10 (SD_CS) (MOSI) | 6 5 | --
* PB7 | 7 8 | PD2 (LCD_CS) (SD_CS) | 4 3 | (LCD_CS)
* GND | 9 10 | 5V (SCK) | 2 1 | (MISO)
* ------ ------
* EXP1 EXP1
*
* Needs custom cable:
*
* Board Display
*
* EXP1-10 ---------- EXP1-10
* EXP1-9 ----------- EXP1-9
* SPI1-4 ----------- EXP1-6
* EXP1-7 ----------- FREE
* SPI1-3 ----------- EXP1-2
* EXP1-5 ----------- EXP1-4
* EXP1-4 ----------- FREE
* EXP1-3 ----------- EXP1-3
* SPI1-1 ----------- EXP1-1
* EXP1-1 ----------- EXP1-7
*/
#define TFTGLCD_CS EXP1_03_PIN
#endif
#else
#error "Only CR10_STOCKDISPLAY, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, MKS_MINI_12864, and TFTGLCD_PANEL_(SPI|I2C) are currently supported on the BIGTREE_SKR_MINI_E3."
#endif
#endif // HAS_WIRED_LCD
#if BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! LCD_FYSETC_TFT81050 requires wiring modifications. See 'pins_BTT_SKR_MINI_E3_common.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
/**
* FYSETC TFT TFT81050 display pinout
*
* Board Display
* ------ ------
* (SD_DET) PB15 | 1 2 | PB6 (BEEPER) 5V |10 9 | GND
* (MOD_RESET) PA9 | 3 4 | RESET (RESET) | 8 7 | (SD_DET)
* (SD_CS) PA10 5 6 | PB4 (FREE) (MOSI) | 6 5 | (LCD_CS)
* (LCD_CS) PD2 | 7 8 | PB7 (FREE) (SD_CS) | 4 3 | (MOD_RESET)
* 5V | 9 10 | GND (SCK) | 2 1 | (MISO)
* ------ ------
* EXP1 EXP1
*
* Needs custom cable:
*
* Board Adapter Display
* _________
* EXP1-10 ---------- EXP1-10
* EXP1-9 ----------- EXP1-9
* SPI1-4 ----------- EXP1-6
* EXP1-7 ----------- EXP1-5
* SPI1-3 ----------- EXP1-2
* EXP1-5 ----------- EXP1-4
* EXP1-4 ----------- EXP1-8
* EXP1-3 ----------- EXP1-3
* SPI1-1 ----------- EXP1-1
* EXP1-1 ----------- EXP1-7
*/
#define CLCD_SPI_BUS 1 // SPI1 connector
#define BEEPER_PIN EXP1_02_PIN
#define CLCD_MOD_RESET EXP1_03_PIN
#define CLCD_SPI_CS EXP1_07_PIN
#endif // TOUCH_UI_FTDI_EVE && LCD_FYSETC_TFT81050
//
// SD Support
//
#ifndef SDCARD_CONNECTION
#define SDCARD_CONNECTION ONBOARD
#endif
#if SD_CONNECTION_IS(LCD) && (BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) || IS_TFTGLCD_PANEL)
#define SD_DETECT_PIN EXP1_01_PIN
#define SD_SS_PIN EXP1_05_PIN
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
#error "SD CUSTOM_CABLE is not compatible with SKR Mini E3."
#endif
#define ONBOARD_SPI_DEVICE 1 // SPI1 -> used only by HAL/STM32F1...
#define ONBOARD_SD_CS_PIN PA4 // Chip select for "System" SD card
#define ENABLE_SPI1
#define SDSS ONBOARD_SD_CS_PIN
#define SD_SS_PIN ONBOARD_SD_CS_PIN
#define SD_SCK_PIN PA5
#define SD_MISO_PIN PA6
#define SD_MOSI_PIN PA7

View File

@@ -0,0 +1,381 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* 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
* 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
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
#include "env_validate.h"
#if HOTENDS > 4 || E_STEPPERS > 4
#error "MKS SKIPR supports up to 4 hotends / E steppers."
#endif
#define BOARD_INFO_NAME "MKS SKIPR V1.0"
// Valid SERIAL_PORT values: -1 (USB-C), 1 (direct to RK3328), 3 (USART3 header)
#define USES_DIAG_JUMPERS
// Onboard I2C EEPROM
#define I2C_EEPROM
#define MARLIN_EEPROM_SIZE 0x1000 // 4K (AT24C32)
#define I2C_SCL_PIN PB8
#define I2C_SDA_PIN PB9
//
// Servos
//
#define SERVO0_PIN PA8
//
// Trinamic Stallguard pins // Connector labels
#define X_DIAG_PIN PA14 // X-
#define Y_DIAG_PIN PA15 // Y-
#define Z_DIAG_PIN PB15 // Z-
#define E0_DIAG_PIN PA13 // MT-DET
#define E1_DIAG_PIN PC5 // NEOPIXEL
#define E2_DIAG_PIN PB14 // Z+
//
// Check for additional used endstop pins
//
#if HAS_EXTRA_ENDSTOPS
#define _ENDSTOP_IS_ANY(ES) X2_USE_ENDSTOP == ES || Y2_USE_ENDSTOP == ES || Z2_USE_ENDSTOP == ES || Z3_USE_ENDSTOP == ES || Z4_USE_ENDSTOP == ES
#if _ENDSTOP_IS_ANY(_XMIN_) || _ENDSTOP_IS_ANY(_XMAX_)
#define NEEDS_X_MINMAX 1
#endif
#if _ENDSTOP_IS_ANY(_YMIN_) || _ENDSTOP_IS_ANY(_YMAX_)
#define NEEDS_Y_MINMAX 1
#endif
#if _ENDSTOP_IS_ANY(_ZMIN_) || _ENDSTOP_IS_ANY(_ZMAX_)
#define NEEDS_Z_MINMAX 1
#endif
#undef _ENDSTOP_IS_ANY
#endif
//
// Limit Switches
//
#ifdef X_STALL_SENSITIVITY
#define X_STOP_PIN X_DIAG_PIN // X-
#elif EITHER(DUAL_X_CARRIAGE, NEEDS_X_MINMAX)
#ifndef X_MIN_PIN
#define X_MIN_PIN X_DIAG_PIN // X-
#endif
#ifndef X_MAX_PIN
#define X_MAX_PIN E0_DIAG_PIN // MT-DET
#endif
#else
#define X_STOP_PIN X_DIAG_PIN // X-
#endif
#ifdef Y_STALL_SENSITIVITY
#define Y_STOP_PIN Y_DIAG_PIN // Y-
#elif NEEDS_Y_MINMAX
#ifndef Y_MIN_PIN
#define Y_MIN_PIN Y_DIAG_PIN // Y-
#endif
#ifndef Y_MAX_PIN
#define Y_MAX_PIN E1_DIAG_PIN // NEOPIXEL
#endif
#else
#define Y_STOP_PIN Y_DIAG_PIN // Y-
#endif
#ifdef Z_STALL_SENSITIVITY
#define Z_STOP_PIN Z_DIAG_PIN // Z-
#elif NEEDS_Z_MINMAX
#ifndef Z_MIN_PIN
#define Z_MIN_PIN Z_DIAG_PIN // Z-
#endif
#ifndef Z_MAX_PIN
#define Z_MAX_PIN E2_DIAG_PIN // Z+
#endif
#else
#define Z_STOP_PIN Z_DIAG_PIN // Z-
#endif
#if DISABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) || ENABLED(USE_PROBE_FOR_Z_HOMING)
#ifndef Z_MIN_PROBE
#define Z_MIN_PROBE_PIN E2_DIAG_PIN // defaults to 'Z+' connector
#endif
#endif
#undef NEEDS_X_MINMAX
#undef NEEDS_Y_MINMAX
#undef NEEDS_Z_MINMAX
//
// Steppers
//
#define X_STEP_PIN PC14
#define X_DIR_PIN PC13
#define X_ENABLE_PIN PC15
#ifndef X_CS_PIN
#define X_CS_PIN PE6
#endif
#define Y_STEP_PIN PE5
#define Y_DIR_PIN PE4
#define Y_ENABLE_PIN PD14
#ifndef Y_CS_PIN
#define Y_CS_PIN PE3
#endif
#define Z_STEP_PIN PE1 // "Z1"
#define Z_DIR_PIN PE0
#define Z_ENABLE_PIN PE2
#ifndef Z_CS_PIN
#define Z_CS_PIN PB7
#endif
#define E0_STEP_PIN PB5
#define E0_DIR_PIN PB4
#define E0_ENABLE_PIN PB6
#ifndef E0_CS_PIN
#define E0_CS_PIN PB3
#endif
#define E1_STEP_PIN PD6 // "Z2"
#define E1_DIR_PIN PD5
#define E1_ENABLE_PIN PD7
#ifndef E1_CS_PIN
#define E1_CS_PIN PD4
#endif
#define E2_STEP_PIN PD2 // "Z3"
#define E2_DIR_PIN PD1
#define E2_ENABLE_PIN PD3
#ifndef E2_CS_PIN
#define E2_CS_PIN PD0
#endif
#define E3_STEP_PIN PC7 // "Z4"
#define E3_DIR_PIN PC6
#define E3_ENABLE_PIN PC8
#ifndef E3_CS_PIN
#define E3_CS_PIN PD15
#endif
//
// Temperature Sensors
//
#define TEMP_BED_PIN PC0 // TB
#define TEMP_0_PIN PC1 // TH0
#define TEMP_1_PIN PC2 // TH1
#define TEMP_2_PIN PC3 // TH2
//
// Heaters / Fans
//
#define HEATER_BED_PIN PD12 // Hotbed
#define HEATER_0_PIN PB1 // Heater0
#define HEATER_1_PIN PB0 // Heater1
#define HEATER_2_PIN PA3 // Heater2
#define FAN_PIN PA2 // Fan0
#define FAN1_PIN PA1 // Fan1
#define FAN2_PIN PA0 // Fan2
//
// Software SPI pins for TMC2130 stepper drivers
// This board doesn't support hardware SPI there
//
#if HAS_TMC_SPI
#define TMC_USE_SW_SPI
#define TMC_SW_MOSI PE14
#define TMC_SW_MISO PE13
#define TMC_SW_SCK PE12
#endif
//
// TMC2208/TMC2209 stepper drivers
// This board is routed for one-wire software serial
//
#if HAS_TMC_UART
#define X_SERIAL_TX_PIN PE6
#define X_SERIAL_RX_PIN X_SERIAL_TX_PIN
#define Y_SERIAL_TX_PIN PE3
#define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN
#define Z_SERIAL_TX_PIN PB7
#define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN
#define E0_SERIAL_TX_PIN PB3
#define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
#define E1_SERIAL_TX_PIN PD4
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
#define E2_SERIAL_TX_PIN PD0
#define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN
#define E3_SERIAL_TX_PIN PD15
#define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
/** ------ ------
* (BEEPER) PB2 | 1 2 | PE10 (BTN_ENC) (MISO) PA6 | 1 2 | PA5 (SCK)
* (LCD_EN) PE11 | 3 4 | PD10 (LCD_RS) (BTN_EN1) PE9 | 3 4 | PA4 (SD_SS)
* (LCD_D4) PD9 | 5 6 PD8 (LCD_D5) (BTN_EN2) PE8 | 5 6 PA7 (MOSI)
* (LCD_D6) PE15 | 7 8 | PE7 (LCD_D7) (SD_DETECT) PD13 | 7 8 | RESET
* GND | 9 10 | 5V GND | 9 10 | --
* ------ ------
* EXP1 EXP2
*/
#define EXP1_01_PIN PB2
#define EXP1_02_PIN PE10
#define EXP1_03_PIN PE11
#define EXP1_04_PIN PD10
#define EXP1_05_PIN PD9
#define EXP1_06_PIN PD8
#define EXP1_07_PIN PE15
#define EXP1_08_PIN PE7
#define EXP2_01_PIN PA6
#define EXP2_02_PIN PA5
#define EXP2_03_PIN PE9
#define EXP2_04_PIN PA4
#define EXP2_05_PIN PE8
#define EXP2_06_PIN PA7
#define EXP2_07_PIN PD13
#define EXP2_08_PIN -1 // connected to MCU reset
//
// SD Support
// Onboard SD card use hardware SPI3 (defined in variant), LCD SD card use hardware SPI1
//
#if ENABLED(SDSUPPORT)
#ifndef SDCARD_CONNECTION
#define SDCARD_CONNECTION LCD
#endif
#if SD_CONNECTION_IS(ONBOARD)
//#define SOFTWARE_SPI
//#define SD_SPI_SPEED SPI_HALF_SPEED
#undef SD_DETECT_STATE
#define SD_DETECT_STATE LOW
#define SD_DETECT_PIN PC4
#elif SD_CONNECTION_IS(LCD)
//#define SOFTWARE_SPI
//#define SD_SPI_SPEED SPI_QUARTER_SPEED
#define SD_SS_PIN EXP2_04_PIN
#define SD_SCK_PIN EXP2_02_PIN
#define SD_MISO_PIN EXP2_01_PIN
#define SD_MOSI_PIN EXP2_06_PIN
#define SD_DETECT_PIN EXP2_07_PIN
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
#error "CUSTOM_CABLE is not a supported SDCARD_CONNECTION for this board"
#endif
#define SDSS SD_SS_PIN
#endif
//
// LCDs and Controllers
//
#if IS_TFTGLCD_PANEL
#if ENABLED(TFTGLCD_PANEL_SPI)
#define TFTGLCD_CS EXP2_03_PIN
#endif
#elif HAS_WIRED_LCD
#define BEEPER_PIN EXP1_01_PIN
#define BTN_ENC EXP1_02_PIN
#if ENABLED(CR10_STOCKDISPLAY)
#define LCD_PINS_RS EXP1_07_PIN
#define BTN_EN1 EXP1_03_PIN
#define BTN_EN2 EXP1_05_PIN
#define LCD_PINS_ENABLE EXP1_08_PIN
#define LCD_PINS_D4 EXP1_06_PIN
#else
#define LCD_PINS_RS EXP1_04_PIN
#define BTN_EN1 EXP2_03_PIN
#define BTN_EN2 EXP2_05_PIN
#define LCD_PINS_ENABLE EXP1_03_PIN
#define LCD_PINS_D4 EXP1_05_PIN
#if ENABLED(FYSETC_MINI_12864)
#define DOGLCD_CS EXP1_03_PIN
#define DOGLCD_A0 EXP1_04_PIN
//#define LCD_BACKLIGHT_PIN -1
#define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally.
#if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
#ifndef RGB_LED_R_PIN
#define RGB_LED_R_PIN EXP1_06_PIN
#endif
#ifndef RGB_LED_G_PIN
#define RGB_LED_G_PIN EXP1_07_PIN
#endif
#ifndef RGB_LED_B_PIN
#define RGB_LED_B_PIN EXP1_08_PIN
#endif
#elif ENABLED(FYSETC_MINI_12864_2_1)
#define NEOPIXEL_PIN EXP1_06_PIN
#endif
#endif // !FYSETC_MINI_12864
#if IS_ULTIPANEL
#define LCD_PINS_D5 EXP1_06_PIN
#define LCD_PINS_D6 EXP1_07_PIN
#define LCD_PINS_D7 EXP1_08_PIN
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
#endif
#endif
#endif
#endif // HAS_WIRED_LCD
// Alter timing for graphical display
#if IS_U8GLIB_ST7920
#define BOARD_ST7920_DELAY_1 120
#define BOARD_ST7920_DELAY_2 80
#define BOARD_ST7920_DELAY_3 580
#endif
//
// NeoPixel LED
//
#ifndef NEOPIXEL_PIN
#define NEOPIXEL_PIN PC5
#endif
//
// MAX31865
//
#if HAS_MAX31865
#define TEMP_0_CS_PIN PD11
#define TEMP_0_SCK_PIN PE12
#define TEMP_0_MISO_PIN PE13
#define TEMP_0_MOSI_PIN PE14
#endif

View File

@@ -0,0 +1,206 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* 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
* 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
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* STM32F407VET6 on Opulo Lumen PnP Rev3
* Website - https://opulo.io/
*/
#define ALLOW_STM32DUINO
#include "env_validate.h"
#define BOARD_INFO_NAME "LumenPnP Motherboard REV04"
#define DEFAULT_MACHINE_NAME "LumenPnP"
/**
* By default, the extra stepper motor configuration is:
* I = Left Head
* J = Right Head
* K = Auxiliary (Conveyor belt)
*/
#define SRAM_EEPROM_EMULATION
#define MARLIN_EEPROM_SIZE 0x2000 // 8K
// I2C MCP3426 (16-Bit, 240SPS, dual-channel ADC)
#define HAS_MCP3426_ADC
//
// Servos
//
#define SERVO0_PIN PB10
#define SERVO1_PIN PB11
//
// Limit Switches
//
#define X_STOP_PIN PC6
#define Y_STOP_PIN PD15
#define Z_STOP_PIN PD14
// None of these require limit switches by default, so we leave these commented
// here for your reference.
//#define I_MIN_PIN PA8
//#define I_MAX_PIN PA8
//#define J_MIN_PIN PD13
//#define J_MAX_PIN PD13
//#define K_MIN_PIN PC9
//#define K_MAX_PIN PC9
//
// Steppers
//
#define X_STEP_PIN PB15
#define X_DIR_PIN PB14
#define X_ENABLE_PIN PD9
#define Y_STEP_PIN PE15
#define Y_DIR_PIN PE14
#define Y_ENABLE_PIN PB13
#define Z_STEP_PIN PE7
#define Z_DIR_PIN PB1
#define Z_ENABLE_PIN PE9
#define I_STEP_PIN PC4
#define I_DIR_PIN PA4
#define I_ENABLE_PIN PB0
#define J_STEP_PIN PE11
#define J_DIR_PIN PE10
#define J_ENABLE_PIN PE13
#define K_STEP_PIN PD6
#define K_DIR_PIN PD7
#define K_ENABLE_PIN PA3
#if HAS_TMC_SPI
/**
* Make sure to configure the jumpers on the back side of the Mobo according to
* this diagram: https://github.com/MarlinFirmware/Marlin/pull/23851
*/
#error "SPI drivers require a custom jumper configuration, see comment above! Comment out this line to continue."
#if AXIS_HAS_SPI(X)
#define X_CS_PIN PD8
#endif
#if AXIS_HAS_SPI(Y)
#define Y_CS_PIN PB12
#endif
#if AXIS_HAS_SPI(Z)
#define Z_CS_PIN PE8
#endif
#if AXIS_HAS_SPI(I)
#define I_CS_PIN PC5
#endif
#if AXIS_HAS_SPI(J)
#define J_CS_PIN PE12
#endif
#if AXIS_HAS_SPI(K)
#define K_CS_PIN PA2
#endif
#elif HAS_TMC_UART
#define X_SERIAL_TX_PIN PD8
#define X_SERIAL_RX_PIN X_SERIAL_TX_PIN
#define Y_SERIAL_TX_PIN PB12
#define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN
#define Z_SERIAL_TX_PIN PE8
#define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN
#define I_SERIAL_TX_PIN PC5
#define I_SERIAL_RX_PIN I_SERIAL_TX_PIN
#define J_SERIAL_TX_PIN PE12
#define J_SERIAL_RX_PIN J_SERIAL_TX_PIN
#define K_SERIAL_TX_PIN PA2
#define K_SERIAL_RX_PIN K_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
//
// Heaters / Fans
//
#define FAN_PIN PE2
#define FAN1_PIN PE3
#define FAN2_PIN PE4
#define FAN3_PIN PE5
#define FAN_SOFT_PWM_REQUIRED
//
// Neopixel
//
#define NEOPIXEL_PIN PC7
#define NEOPIXEL2_PIN PC8
//
// SPI
//
#define MISO_PIN PB4
#define MOSI_PIN PB5
#define SCK_PIN PB3
#define TMC_SW_MISO MISO_PIN
#define TMC_SW_MOSI MOSI_PIN
#define TMC_SW_SCK SCK_PIN
//
// I2C
//
#define I2C_SDA_PIN PB7
#define I2C_SCL_PIN PB6
/**
* The index mobo rev03 has 3 aux ports. We define them here so they may be used
* in other places and to make sure someone doesn't have to go look up the pinout
* in the board files. Each 12 pin aux port has this pinout:
*
* VDC 1 2 GND
* 3.3V 3 4 SCL (I2C_SCL_PIN)
* PWM1 5 6 SDA (I2C_SDA_PIN)
* PWM2 7 8 CIPO (MISO_PIN)
* A1 9 10 COPI (MOSI_PIN)
* A2 11 12 SCK (SCK_PIN)
*/
#define LUMEN_AUX1_PWM1 PA15
#define LUMEN_AUX1_PWM2 PA5
#define LUMEN_AUX1_A1 PC0
#define LUMEN_AUX1_A2 PC1
#define LUMEN_AUX2_PWM1 PA6
#define LUMEN_AUX2_PWM2 PA7
#define LUMEN_AUX2_A1 PC2
#define LUMEN_AUX2_A2 PC3
#define LUMEN_AUX3_PWM1 PB8
#define LUMEN_AUX3_PWM2 PB9
#define LUMEN_AUX3_A1 PA0
#define LUMEN_AUX3_A2 PA1

View File

@@ -0,0 +1,266 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* 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
* 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
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
#include "env_validate.h"
#if HOTENDS > 3 || E_STEPPERS > 3
#error "Tronxy V10 supports up to 3 hotends / E steppers."
#endif
#define BOARD_INFO_NAME "Tronxy V10"
#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
#define STEP_TIMER 6
#define TEMP_TIMER 14
//
// Servos
//
//#define SERVO0_PIN PB10
//
// EEPROM
//
#if NO_EEPROM_SELECTED
#undef NO_EEPROM_SELECTED
#if TRONXY_UI > 0
#define EEPROM_AT24CXX
#else
#define FLASH_EEPROM_EMULATION
#endif
#endif
#if ENABLED(FLASH_EEPROM_EMULATION)
// SoC Flash (framework-arduinoststm32-maple/STM32F1/libraries/EEPROM/EEPROM.h)
#define EEPROM_START_ADDRESS (0x8000000UL + (512 * 1024) - 2 * EEPROM_PAGE_SIZE)
#define EEPROM_PAGE_SIZE (0x800U) // 2KB, but will use 2x more (4KB)
#define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE
#else
#if ENABLED(EEPROM_AT24CXX)
#define AT24CXX_SCL PB8
#define AT24CXX_SDA PB9
#define AT24CXX_WP PB7
#else
#define I2C_EEPROM // AT24C32
#endif
#define MARLIN_EEPROM_SIZE 0x1000 // 4K
#endif
//
// SPI Flash
//
//#define SPI_FLASH
#if ENABLED(SPI_FLASH)
#define SPI_FLASH_SIZE 0x200000 // 2MB
#define W25QXX_CS_PIN PG15 // SPI2
#define W25QXX_MOSI_PIN PB5
#define W25QXX_MISO_PIN PB4
#define W25QXX_SCK_PIN PB3
#endif
//
// Limit Switches
//
#define X_MIN_PIN PC15
#define X_MAX_PIN PB0
#define Y_STOP_PIN PC14
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN PE3
#endif
#if ENABLED(DUAL_Z_ENDSTOP_PROBE)
#if NUM_Z_STEPPERS > 1 && Z_HOME_TO_MAX // Swap Z1/Z2 for dual Z with max homing
#define Z_MIN_PIN PF11
#define Z_MAX_PIN PC13
#else
#define Z_MIN_PIN PC13
#define Z_MAX_PIN PF11
#endif
#else
#ifndef Z_STOP_PIN
#define Z_STOP_PIN PC13
#endif
#endif
//
// Filament Sensors
//
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN PE6 // MT_DET
#endif
#ifndef FIL_RUNOUT2_PIN
#define FIL_RUNOUT2_PIN PF12
#endif
//
// Steppers
//
#define X_ENABLE_PIN PF0
#define X_STEP_PIN PE5
#define X_DIR_PIN PF1
#define Y_ENABLE_PIN PF5
#define Y_STEP_PIN PF9
#define Y_DIR_PIN PF3
#define Z_ENABLE_PIN PA5
#define Z_STEP_PIN PA6
#define Z_DIR_PIN PF15
#define E0_ENABLE_PIN PF14
#define E0_STEP_PIN PB1
#define E0_DIR_PIN PF13
#define E1_ENABLE_PIN PG5
#define E1_STEP_PIN PD12
#define E1_DIR_PIN PG4
#define E2_ENABLE_PIN PF7
#define E2_STEP_PIN PF6
#define E2_DIR_PIN PF4
//
// Temperature Sensors
//
#define TEMP_0_PIN PC3 // TH1
#define TEMP_BED_PIN PC2 // TB1
//
// Heaters / Fans
//
#define HEATER_0_PIN PG7 // HEATER1
#define HEATER_BED_PIN PE2 // HOT BED
//#define HEATER_BED_INVERTING true
#define FAN_PIN PG0 // FAN0
#define FAN1_PIN PB6 // FAN1
#define FAN2_PIN PG9 // FAN2
#define FAN3_PIN PF10 // FAN3
#define CONTROLLER_FAN_PIN PD7 // BOARD FAN
#define FAN_SOFT_PWM
//
// Laser / Spindle
//
#if HAS_CUTTER
#define SPINDLE_LASER_ENA_PIN PB11 // wifi:TX
#if ENABLED(SPINDLE_LASER_USE_PWM)
#define SPINDLE_LASER_PWM_PIN PB10 // wifi:RX-TIM2_CH3
// The PWM pin definition const PinMap PinMap_PWM[] in PeripheralPins.c must be compounded here
// See PWM_PIN(x) definition for details
#endif
#endif
//
// Misc
//
#define BEEPER_PIN PA8
//#define LED_PIN PG10
#define PS_ON_PIN PG10 // Temporarily switch the machine with LED simulation
#if ENABLED(TRONXY_BACKUP_POWER)
#define POWER_LOSS_PIN PF11 // Configure as drop-down input
#else
#define POWER_LOSS_PIN PE1 // Output of LM393 comparator, configured as pullup
#endif
//#define POWER_LM393_PIN PE0 // +V for the LM393 comparator, configured as output high
#if ENABLED(TFT_TRONXY_X5SA)
#error "TFT_TRONXY_X5SA is not yet supported."
#endif
#if 0
//
// TFT with FSMC interface
//
#if HAS_FSMC_TFT
#define TFT_RESET_PIN PB12
#define TFT_BACKLIGHT_PIN PG8
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
#define FSMC_DMA_DEV DMA2
#define FSMC_DMA_CHANNEL DMA_CH5
#define TFT_CS_PIN PG12
#define TFT_RS_PIN PG2
//#define TFT_WIDTH 480
//#define TFT_HEIGHT 320
//#define TFT_PIXEL_OFFSET_X 48
//#define TFT_PIXEL_OFFSET_Y 32
//#define TFT_DRIVER ILI9488
//#define TFT_BUFFER_SIZE 14400
#if NEED_TOUCH_PINS
#define TOUCH_CS_PIN PD11 // SPI1_NSS
#define TOUCH_SCK_PIN PB13 // SPI1_SCK
#define TOUCH_MISO_PIN PB14 // SPI1_MISO
#define TOUCH_MOSI_PIN PB15 // SPI1_MOSI
#endif
#if (LCD_CHIP_INDEX == 1 && (TRONXY_UI == 1 || TRONXY_UI == 2)) || LCD_CHIP_INDEX == 3
#define TOUCH_CALIBRATION_X -17181
#define TOUCH_CALIBRATION_Y 11434
#define TOUCH_OFFSET_X 501
#define TOUCH_OFFSET_Y -9
#elif LCD_CHIP_INDEX == 1 && TRONXY_UI == 4
#define TOUCH_CALIBRATION_X 11166
#define TOUCH_CALIBRATION_Y 17162
#define TOUCH_OFFSET_X -10
#define TOUCH_OFFSET_Y -16
#elif LCD_CHIP_INDEX == 4 && TRONXY_UI == 3
//#define TOUCH_CALIBRATION_X 8781
//#define TOUCH_CALIBRATION_Y 11773
//#define TOUCH_OFFSET_X -17
//#define TOUCH_OFFSET_Y -16
// Upside-down
#define TOUCH_CALIBRATION_X -8553
#define TOUCH_CALIBRATION_Y -11667
#define TOUCH_OFFSET_X 253
#define TOUCH_OFFSET_Y 331
#elif LCD_CHIP_INDEX == 2
#define TOUCH_CALIBRATION_X 17184
#define TOUCH_CALIBRATION_Y 10604
#define TOUCH_OFFSET_X -31
#define TOUCH_OFFSET_Y -29
#endif
#endif
#endif
//
// SD Card
//
#define SDIO_SUPPORT
#define SD_DETECT_PIN -1 // PF0, but not connected
#define SDIO_CLOCK 4500000
#define SDIO_READ_RETRIES 16
#define SDIO_D0_PIN PC8
#define SDIO_D1_PIN PC9
#define SDIO_D2_PIN PC10
#define SDIO_D3_PIN PC11
#define SDIO_CK_PIN PC12
#define SDIO_CMD_PIN PD2

View File

@@ -0,0 +1,153 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* 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
* 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
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/** CAUTION **
* This board definition is to facilitate support for a Filament Extrusion
* devices, used to convert waste plastic into 3D printable filament.
* This board is NOT a general 3D printing controller; it is NOT supported
* as a toolboard via CANBUS (as it was originally designed) or any device
* that requires kinematics.
*/
#ifndef BOARD_INFO_NAME
#define BOARD_INFO_NAME "BTT EBB42 V1.1"
#endif
//
// EEPROM
//
#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION)
#undef NO_EEPROM_SELECTED
#ifndef FLASH_EEPROM_EMULATION
#define FLASH_EEPROM_EMULATION
#endif
#define EEPROM_PAGE_SIZE (0x800UL) // 2K
#define EEPROM_START_ADDRESS (0x0801F800UL)
#define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE
#endif
//#define USES_DIAG_JUMPERS
// Ignore temp readings during development.
//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
#define LED_PIN PA13
#define I2C_SDA_PIN PB4
#define I2C_SCL_PIN PB3
//
// Servos
//
#define SERVO0_PIN PB9 // SERVOS
//
// Limit Switches
//
#if !HAS_WIRED_LCD
#define X_STOP_PIN PB6
#define Y_STOP_PIN PB5
#define Z_STOP_PIN PB7
#endif
//
// Z Probe must be this pin
//
#define Z_MIN_PROBE_PIN PB8 // PROBE
//
// Steppers
//
#define X_ENABLE_PIN -1
#define X_STEP_PIN PA10 // Unused. Assigned so Marlin will compile
#define X_DIR_PIN -1
#define Y_ENABLE_PIN -1
#define Y_STEP_PIN PA10 // Unused. Assigned so Marlin will compile
#define Y_DIR_PIN -1
#define Z_ENABLE_PIN -1
#define Z_STEP_PIN PA10 // Unused. Assigned so Marlin will compile
#define Z_DIR_PIN -1
#define E0_ENABLE_PIN PD2
#define E0_STEP_PIN PD0
#define E0_DIR_PIN PD1
#if HAS_TMC_UART
/**
* TMC220x stepper drivers
* Hardware serial communication ports
*/
//#define E0_HARDWARE_SERIAL MSerial4
// This is the stable default value after testing, but, higher UART rates could be configured, remeber to test the Steppers with the M122 command to check if everything works.
//#define TMC_BAUD_RATE 250000
#define E0_SERIAL_TX_PIN PA15
#define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
// Default TMC slave addresses
#ifndef E0_SLAVE_ADDRESS
#define E0_SLAVE_ADDRESS 0b00
#endif
#endif
//
// Temperature Sensors
//
#define TEMP_0_PIN PA3 // Analog Input "TH0"
// SPI for MAX Thermocouple
// Uses a separate SPI bus
#define TEMP_0_CS_PIN PA4 // GTR K-TEMP
#define TEMP_0_SCK_PIN PA5 // SCK
#define TEMP_0_MISO_PIN PA6 // MISO
#define TEMP_0_MOSI_PIN PA7 // For MAX31865
//
// Heaters / Fans
//
#define HEATER_0_PIN PA2 // "HE"
#define FAN_PIN PA0 // "FAN0"
#define FAN1_PIN PA1 // "FAN1"
//
// Default NEOPIXEL_PIN
//
#ifndef NEOPIXEL_PIN
#define NEOPIXEL_PIN PD3 // LED driving pin
#endif
//
// LCD / Controller
//
#if HAS_WIRED_LCD
#define BTN_EN1 PB7
#define BTN_EN2 PB5
#define BTN_ENC PB6
#endif