BTT SKR Mini E3 V3.0.1 (#24722)

This commit is contained in:
ellensp
2022-09-14 05:27:16 +12:00
committed by Scott Lahteine
parent 38b3105900
commit aabd3e9e19
12 changed files with 1378 additions and 70 deletions

View File

@ -329,45 +329,46 @@
#define BOARD_BTT_SKR_MINI_E3_V1_2 4025 // BigTreeTech SKR Mini E3 V1.2 (STM32F103RC)
#define BOARD_BTT_SKR_MINI_E3_V2_0 4026 // BigTreeTech SKR Mini E3 V2.0 (STM32F103RC / STM32F103RE)
#define BOARD_BTT_SKR_MINI_E3_V3_0 4027 // BigTreeTech SKR Mini E3 V3.0 (STM32G0B1RE)
#define BOARD_BTT_SKR_MINI_MZ_V1_0 4028 // BigTreeTech SKR Mini MZ V1.0 (STM32F103RC)
#define BOARD_BTT_SKR_E3_DIP 4029 // BigTreeTech SKR E3 DIP V1.0 (STM32F103RC / STM32F103RE)
#define BOARD_BTT_SKR_CR6 4030 // BigTreeTech SKR CR6 v1.0 (STM32F103RE)
#define BOARD_JGAURORA_A5S_A1 4031 // JGAurora A5S A1 (STM32F103ZE)
#define BOARD_FYSETC_AIO_II 4032 // FYSETC AIO_II (STM32F103RC)
#define BOARD_FYSETC_CHEETAH 4033 // FYSETC Cheetah (STM32F103RC)
#define BOARD_FYSETC_CHEETAH_V12 4034 // FYSETC Cheetah V1.2 (STM32F103RC)
#define BOARD_LONGER3D_LK 4035 // Longer3D LK1/2 - Alfawise U20/U20+/U30 (STM32F103VE)
#define BOARD_CCROBOT_MEEB_3DP 4036 // ccrobot-online.com MEEB_3DP (STM32F103RC)
#define BOARD_CHITU3D_V5 4037 // Chitu3D TronXY X5SA V5 Board (STM32F103ZE)
#define BOARD_CHITU3D_V6 4038 // Chitu3D TronXY X5SA V6 Board (STM32F103ZE)
#define BOARD_CHITU3D_V9 4039 // Chitu3D TronXY X5SA V9 Board (STM32F103ZE)
#define BOARD_CREALITY_V4 4040 // Creality v4.x (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V422 4041 // Creality v4.2.2 (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V423 4042 // Creality v4.2.3 (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V425 4043 // Creality v4.2.5 (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V427 4044 // Creality v4.2.7 (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V4210 4045 // Creality v4.2.10 (STM32F103RC / STM32F103RE) as found in the CR-30
#define BOARD_CREALITY_V431 4046 // Creality v4.3.1 (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V431_A 4047 // Creality v4.3.1a (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V431_B 4048 // Creality v4.3.1b (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V431_C 4049 // Creality v4.3.1c (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V431_D 4050 // Creality v4.3.1d (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V452 4051 // Creality v4.5.2 (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V453 4052 // Creality v4.5.3 (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V24S1 4053 // Creality v2.4.S1 (STM32F103RC / STM32F103RE) v101 as found in the Ender-7
#define BOARD_CREALITY_V24S1_301 4054 // Creality v2.4.S1_301 (STM32F103RC / STM32F103RE) v301 as found in the Ender-3 S1
#define BOARD_CREALITY_V25S1 4055 // Creality v2.5.S1 (STM32F103RE) as found in the CR-10 Smart Pro
#define BOARD_TRIGORILLA_PRO 4056 // Trigorilla Pro (STM32F103ZE)
#define BOARD_FLY_MINI 4057 // FLYmaker FLY MINI (STM32F103RC)
#define BOARD_FLSUN_HISPEED 4058 // FLSUN HiSpeedV1 (STM32F103VE)
#define BOARD_BEAST 4059 // STM32F103RE Libmaple-based controller
#define BOARD_MINGDA_MPX_ARM_MINI 4060 // STM32F103ZE Mingda MD-16
#define BOARD_GTM32_PRO_VD 4061 // STM32F103VE controller
#define BOARD_ZONESTAR_ZM3E2 4062 // Zonestar ZM3E2 (STM32F103RC)
#define BOARD_ZONESTAR_ZM3E4 4063 // Zonestar ZM3E4 V1 (STM32F103VC)
#define BOARD_ZONESTAR_ZM3E4V2 4064 // Zonestar ZM3E4 V2 (STM32F103VC)
#define BOARD_ERYONE_ERY32_MINI 4065 // Eryone Ery32 mini (STM32F103VE)
#define BOARD_PANDA_PI_V29 4066 // Panda Pi V2.9 - Standalone (STM32F103RC)
#define BOARD_BTT_SKR_MINI_E3_V3_0_1 4028 // BigTreeTech SKR Mini E3 V3.0.1 (STM32F401RC)
#define BOARD_BTT_SKR_MINI_MZ_V1_0 4029 // BigTreeTech SKR Mini MZ V1.0 (STM32F103RC)
#define BOARD_BTT_SKR_E3_DIP 4030 // BigTreeTech SKR E3 DIP V1.0 (STM32F103RC / STM32F103RE)
#define BOARD_BTT_SKR_CR6 4031 // BigTreeTech SKR CR6 v1.0 (STM32F103RE)
#define BOARD_JGAURORA_A5S_A1 4032 // JGAurora A5S A1 (STM32F103ZE)
#define BOARD_FYSETC_AIO_II 4033 // FYSETC AIO_II (STM32F103RC)
#define BOARD_FYSETC_CHEETAH 4034 // FYSETC Cheetah (STM32F103RC)
#define BOARD_FYSETC_CHEETAH_V12 4035 // FYSETC Cheetah V1.2 (STM32F103RC)
#define BOARD_LONGER3D_LK 4036 // Longer3D LK1/2 - Alfawise U20/U20+/U30 (STM32F103VE)
#define BOARD_CCROBOT_MEEB_3DP 4037 // ccrobot-online.com MEEB_3DP (STM32F103RC)
#define BOARD_CHITU3D_V5 4038 // Chitu3D TronXY X5SA V5 Board (STM32F103ZE)
#define BOARD_CHITU3D_V6 4039 // Chitu3D TronXY X5SA V6 Board (STM32F103ZE)
#define BOARD_CHITU3D_V9 4040 // Chitu3D TronXY X5SA V9 Board (STM32F103ZE)
#define BOARD_CREALITY_V4 4041 // Creality v4.x (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V422 4042 // Creality v4.2.2 (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V423 4043 // Creality v4.2.3 (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V425 4044 // Creality v4.2.5 (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V427 4045 // Creality v4.2.7 (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V4210 4046 // Creality v4.2.10 (STM32F103RC / STM32F103RE) as found in the CR-30
#define BOARD_CREALITY_V431 4047 // Creality v4.3.1 (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V431_A 4048 // Creality v4.3.1a (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V431_B 4049 // Creality v4.3.1b (STM32F103RC / STM32F103RE)
#define BOARD_CREALITY_V431_C 4050 // Creality v4.3.1c (STM32F103RC / STM32F103RE)
#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)
//
// ARM Cortex-M4F

View File

@ -541,6 +541,8 @@
#include "stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_USB env:STM32F103RE_btt env:STM32F103RE_btt_USB env:STM32F103RC_btt_maple env:STM32F103RC_btt_USB_maple env:STM32F103RE_btt_maple env:STM32F103RE_btt_USB_maple
#elif MB(BTT_SKR_MINI_E3_V3_0)
#include "stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h" // STM32G0 env:STM32G0B1RE_btt env:STM32G0B1RE_btt_xfer
#elif MB(BTT_SKR_MINI_E3_V3_0_1)
#include "stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h"// STM32F4 env:STM32F401RC_btt
#elif MB(BTT_SKR_MINI_MZ_V1_0)
#include "stm32f1/pins_BTT_SKR_MINI_MZ_V1_0.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_USB env:STM32F103RC_btt_maple env:STM32F103RC_btt_USB_maple
#elif MB(BTT_SKR_E3_DIP)

View File

@ -135,6 +135,12 @@
#define EXP1_02_PIN PB6
#define EXP1_08_PIN PB7
#endif
#define EXP1_01_PIN PB5
#define EXP1_03_PIN PA9
#define EXP1_04_PIN -1 // RESET
#define EXP1_05_PIN PA10
#define EXP1_06_PIN PB9
#define EXP1_07_PIN PB8
#if HAS_DWIN_E3V2 || IS_DWIN_MARLINUI
/**
@ -156,22 +162,22 @@
#define BEEPER_PIN EXP1_02_PIN
#define BTN_EN1 EXP1_08_PIN
#define BTN_EN2 PB8
#define BTN_ENC PB5
#define BTN_EN2 EXP1_07_PIN
#define BTN_ENC EXP1_01_PIN
#elif HAS_WIRED_LCD
#if ENABLED(CR10_STOCKDISPLAY)
#define BEEPER_PIN PB5
#define BEEPER_PIN EXP1_01_PIN
#define BTN_ENC EXP1_02_PIN
#define BTN_EN1 PA9
#define BTN_EN2 PA10
#define BTN_EN1 EXP1_03_PIN
#define BTN_EN2 EXP1_05_PIN
#define LCD_PINS_RS PB8
#define LCD_PINS_RS EXP1_07_PIN
#define LCD_PINS_ENABLE EXP1_08_PIN
#define LCD_PINS_D4 PB9
#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!
@ -179,23 +185,23 @@
#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 PB9
#define LCD_PINS_RS EXP1_06_PIN
#define LCD_PINS_ENABLE EXP1_02_PIN
#define LCD_PINS_D4 PB8
#define LCD_PINS_D5 PA10
#define LCD_PINS_D6 PA9
#define LCD_PINS_D7 PB5
#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 PA9
#define BTN_EN2 PA10
#define BTN_EN1 EXP1_03_PIN
#define BTN_EN2 EXP1_05_PIN
#define DOGLCD_CS PB8
#define DOGLCD_A0 PB9
#define DOGLCD_SCK PB5
#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
@ -238,7 +244,7 @@
* EXP1-1 ----------- EXP1-7 SD_DET
*/
#define TFTGLCD_CS PA9
#define TFTGLCD_CS EXP1_03_PIN
#endif
@ -291,20 +297,20 @@
* for backlight configuration see steps 2 (V2.1) and 3 in https://wiki.fysetc.com/Mini12864_Panel/
*/
#define LCD_PINS_RS PA9 // CS
#define LCD_PINS_RS EXP1_03_PIN // CS
#define LCD_PINS_ENABLE PA3 // MOSI
#define LCD_BACKLIGHT_PIN -1
#define NEOPIXEL_PIN PB8
#define NEOPIXEL_PIN EXP1_07_PIN
#define LCD_CONTRAST 255
#define LCD_RESET_PIN PA10
#define LCD_RESET_PIN EXP1_05_PIN
#define DOGLCD_CS PA9
#define DOGLCD_A0 PB5
#define DOGLCD_CS EXP1_03_PIN
#define DOGLCD_A0 EXP1_01_PIN
#define DOGLCD_SCK PA2
#define DOGLCD_MOSI PA3
#define BTN_ENC PA15
#define BTN_EN1 PB9
#define BTN_EN1 EXP1_06_PIN
#define BTN_EN2 PB15
#define FORCE_SOFT_SPI
@ -354,8 +360,8 @@
#define BEEPER_PIN EXP1_02_PIN
#define CLCD_MOD_RESET PA9
#define CLCD_SPI_CS PB8
#define CLCD_MOD_RESET EXP1_03_PIN
#define CLCD_SPI_CS EXP1_07_PIN
#endif // TOUCH_UI_FTDI_EVE && LCD_FYSETC_TFT81050
@ -370,8 +376,8 @@
#if SD_CONNECTION_IS(ONBOARD)
#define SD_DETECT_PIN PC4
#elif SD_CONNECTION_IS(LCD) && (BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) || IS_TFTGLCD_PANEL)
#define SD_DETECT_PIN PB5
#define SD_SS_PIN PA10
#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

View File

@ -19,11 +19,10 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
// https://github.com/ktand/Armed
#pragma once
// https://github.com/ktand/Armed
#include "env_validate.h"
#if HOTENDS > 2 || E_STEPPERS > 2

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 // 4KB
#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