code
stringlengths
1
1.05M
repo_name
stringlengths
6
83
path
stringlengths
3
242
language
stringclasses
222 values
license
stringclasses
20 values
size
int64
1
1.05M
/** * 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" #define BOARD_INFO_NAME "PANDA PI V2.9" // Release PB3/PB4 (TMC_SW Pins) from JTAG pins #define DISABLE_JTAG // Ignore temp readings during development. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 #if ANY(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) #define FLASH_EEPROM_EMULATION #define EEPROM_PAGE_SIZE (0x800U) // 2K #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL) #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE // 2K #endif #if ENABLED(BD_SENSOR) #define I2C_BD_SDA_PIN PC6 #define I2C_BD_SCL_PIN PB2 #define I2C_BD_DELAY 10 // (seconds) #endif // // Servos // #define SERVO0_PIN PA11 // SERVOS // // Limit Switches // #define X_STOP_PIN PA3 // X-STOP #define Y_STOP_PIN PC9 // Y-STOP #define Z_STOP_PIN PA1 // 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 PC2 // E0-STOP //#endif // // Steppers // #define X_ENABLE_PIN PC12 #define X_STEP_PIN PC11 #define X_DIR_PIN PB6 #define Y_ENABLE_PIN PC12 #define Y_STEP_PIN PB5 #define Y_DIR_PIN PB4 #define Z_ENABLE_PIN PC12 #define Z_STEP_PIN PB3 #define Z_DIR_PIN PA15 #define E0_ENABLE_PIN PC12 #define E0_STEP_PIN PB15 #define E0_DIR_PIN PB14 // // SPI pins for TMC2130 stepper drivers // #ifndef TMC_SPI_MOSI #define TMC_SPI_MOSI PB5 #endif #ifndef TMC_SPI_MISO #define TMC_SPI_MISO PB4 #endif #ifndef TMC_SPI_SCK #define TMC_SPI_SCK PB3 #endif #if HAS_TMC_UART /** * TMC2208/TMC2209 stepper drivers * * Hardware serial communication ports. * If undefined software serial is used according to the pins below */ //#define X_HARDWARE_SERIAL MSerial1 //#define Y_HARDWARE_SERIAL MSerial1 //#define Z_HARDWARE_SERIAL MSerial1 //#define E0_HARDWARE_SERIAL MSerial1 #define X_SERIAL_TX_PIN PC10 #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PC11 #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PC12 #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PD2 #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE #define TMC_BAUD_RATE 19200 #endif #endif // HAS_TMC_UART // // Temperature Sensors // #define TEMP_0_PIN PB0 // Analog Input "TH0" #define TEMP_BED_PIN PB1 // Analog Input "TB0" #define TEMP_1_PIN PA2 // // Heaters / Fans // #define HEATER_0_PIN PB12 // "HE" #define HEATER_BED_PIN PB13 // "HB" #define FAN0_PIN PA8 // "FAN0" #define HEATER_1_PIN PA12 // // SD Support // #define ONBOARD_SPI_DEVICE 1 // SPI1 #define ONBOARD_SD_CS_PIN PA4 // Chip select for "System" SD card #define SDSS ONBOARD_SD_CS_PIN #ifndef SDCARD_CONNECTION #define SDCARD_CONNECTION ONBOARD #endif #if SD_CONNECTION_IS(ONBOARD) //#define SD_DETECT_PIN PA4 #define SD_SCK_PIN PA5 #define SD_MISO_PIN PA6 #define SD_MOSI_PIN PA7 #elif SD_CONNECTION_IS(CUSTOM_CABLE) #error "SD CUSTOM_CABLE is not compatible with SKR E3 DIP." #endif // // LCD / Controller // #if HAS_WIRED_LCD #define BTN_ENC PA0 #define BTN_EN1 PC4 #define BTN_EN2 PC5 #define LCD_PINS_RS PC0 #define LCD_PINS_EN PC2 #define LCD_PINS_D4 PC1 #endif #if ALL(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING #error "CAUTION! LCD_FYSETC_TFT81050 requires wiring modifications. See 'pins_PANDA_PI_V29.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" #endif /** FYSETC TFT TFT81050 display pinout * * Board Display * ------ ------ * (SD_DET) PA15 | 1 2 | PB6 (BEEPER) (SPI1-MISO) MISO | 1 2 | SCK (SPI1-SCK) * (MOD_RESET) PA9 | 3 4 | RESET MOD_RESET | 3 4 | SD_CS * (SD_CS) PA10 5 6 | PB9 (FREE) LCD_CS | 5 6 MOSI (SPI1-MOSI) * (LCD_CS) PB8 | 7 8 | PB7 (FREE) SD_DET | 7 8 | RESET * GND | 9 10 | 5V GND | 9 10 | 5V * ------ ------ * EXP1 EXP1 * * Needs custom cable: * * Board Adapter Display * ---------------------------------- * EXP1-10 ---------- EXP1-10 5V * EXP1-9 ----------- EXP1-9 GND * SPI1-4 ----------- EXP1-6 MOSI * EXP1-7 ----------- EXP1-5 LCD_CS * SP11-3 ----------- EXP1-2 SCK * EXP1-5 ----------- EXP1-4 SD_CS * EXP1-4 ----------- EXP1-8 RESET * EXP1-3 ----------- EXP1-3 MOD_RST * SPI1-1 ----------- EXP1-1 MISO * EXP1-1 ----------- EXP1-7 SD_DET */ #define CLCD_SPI_BUS 1 // SPI1 connector #define BEEPER_PIN PB6 #define CLCD_MOD_RESET PA9 #define CLCD_SPI_CS PB8 #if SD_CONNECTION_IS(LCD) && ALL(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) #define SD_DETECT_PIN PA15 #define SD_SS_PIN PA10 #endif #elif HAS_WIRED_LCD #define BEEPER_PIN PC3 #endif
2301_81045437/Marlin
Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h
C
agpl-3.0
7,352
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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" /** * 2017 Victor Perez Marlin for stm32f1 test */ #define BOARD_INFO_NAME "Misc. STM32F1R" #define DEFAULT_MACHINE_NAME "STM32F103RET6" // Ignore temp readings during development. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 // // Limit Switches // #define X_STOP_PIN PB3 #define Y_STOP_PIN PB4 #define Z_STOP_PIN PB5 // // Steppers // #define X_STEP_PIN PC0 #define X_DIR_PIN PC1 #define X_ENABLE_PIN PA8 #define Y_STEP_PIN PC2 #define Y_DIR_PIN PC3 #define Y_ENABLE_PIN PA8 #define Z_STEP_PIN PC4 #define Z_DIR_PIN PC5 #define Z_ENABLE_PIN PA8 #define E0_STEP_PIN PC6 #define E0_DIR_PIN PC7 #define E0_ENABLE_PIN PA8 /** * TODO: Currently using same Enable pin to all steppers. */ #define E1_STEP_PIN PC8 #define E1_DIR_PIN PC9 #define E1_ENABLE_PIN PA8 #define E2_STEP_PIN PC10 #define E2_DIR_PIN PC11 #define E2_ENABLE_PIN PA8 // // Misc. Functions // #define SDSS PA4 #define LED_PIN PD2 // // Heaters / Fans // #define HEATER_0_PIN PB0 // EXTRUDER 1 #define HEATER_1_PIN PB1 #define HEATER_BED_PIN PA3 // BED // // Temperature Sensors // #define TEMP_BED_PIN PA0 // Analog Input #define TEMP_0_PIN PA1 // Analog Input #define TEMP_1_PIN PA2 // Analog Input // // LCD Pins // #if HAS_WIRED_LCD #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) #error "REPRAPWORLD_GRAPHICAL_LCD is not supported." #else #define LCD_PINS_RS PB8 #define LCD_PINS_EN PD2 #define LCD_PINS_D4 PB12 #define LCD_PINS_D5 PB13 #define LCD_PINS_D6 PB14 #define LCD_PINS_D7 PB15 #if !IS_NEWPANEL #error "Non-NEWPANEL LCD is not supported." #endif #endif #if IS_NEWPANEL #if IS_RRD_SC #error "RRD Smart Controller is not supported." #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD) #error "REPRAPWORLD_GRAPHICAL_LCD is not supported." #elif ENABLED(LCD_I2C_PANELOLU2) #error "LCD_I2C_PANELOLU2 is not supported." #elif ENABLED(LCD_I2C_VIKI) #error "LCD_I2C_VIKI is not supported." #elif ANY(VIKI2, miniVIKI) #error "VIKI2 / miniVIKI is not supported." #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) #error "ELB_FULL_GRAPHIC_CONTROLLER is not supported." #elif ENABLED(MINIPANEL) #error "MINIPANEL is not supported." #else #error "Other generic NEWPANEL LCD is not supported." #endif #endif #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder #endif #endif // HAS_WIRED_LCD
2301_81045437/Marlin
Marlin/src/pins/stm32f1/pins_STM32F1R.h
C
agpl-3.0
4,236
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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" /** * 2017 Victor Perez Marlin for stm32f1 test */ #define BOARD_INFO_NAME "STM3R Mini" #define DEFAULT_MACHINE_NAME BOARD_INFO_NAME // Enable I2C_EEPROM for testing #define I2C_EEPROM // Ignore temp readings during development. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 // // Limit Switches // #define X_STOP_PIN PD0 #define Y_STOP_PIN PD1 #define Z_STOP_PIN PD4 // // Steppers // #define X_STEP_PIN PE1 #define X_DIR_PIN PE0 #define X_ENABLE_PIN PC0 #define Y_STEP_PIN PE3 #define Y_DIR_PIN PE2 #define Y_ENABLE_PIN PC1 #define Z_STEP_PIN PE5 #define Z_DIR_PIN PE4 #define Z_ENABLE_PIN PC2 #define E0_STEP_PIN PE7 #define E0_DIR_PIN PE6 #define E0_ENABLE_PIN PC3 #define E1_STEP_PIN PE9 #define E1_DIR_PIN PE8 #define E1_ENABLE_PIN PC4 #define E2_STEP_PIN PE11 #define E2_DIR_PIN PE10 #define E2_ENABLE_PIN PC5 // // Misc. Functions // #define SDSS PA15 #define LED_PIN PB2 // // Heaters / Fans // #define HEATER_0_PIN PD12 // EXTRUDER 1 //#define HEATER_1_PIN PD13 #define HEATER_BED_PIN PB9 // BED //#define HEATER_BED2_PIN -1 // BED2 //#define HEATER_BED3_PIN -1 // BED3 #ifndef FAN0_PIN #define FAN0_PIN PD14 #endif #define FAN1_PIN PD13 #define FAN_SOFT_PWM_REQUIRED // // Temperature Sensors // #define TEMP_BED_PIN PA0 #define TEMP_0_PIN PA1 #define TEMP_1_PIN PA2 #define TEMP_2_PIN PA3 // Laser control #if HAS_CUTTER #define SPINDLE_LASER_PWM_PIN PB8 #define SPINDLE_LASER_ENA_PIN PD5 #endif // // LCD Pins // #if HAS_WIRED_LCD #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) #error "REPRAPWORLD_GRAPHICAL_LCD is not supported." #else #define LCD_PINS_RS PB8 #define LCD_PINS_EN PD2 #define LCD_PINS_D4 PB12 #define LCD_PINS_D5 PB13 #define LCD_PINS_D6 PB14 #define LCD_PINS_D7 PB15 #if !IS_NEWPANEL #error "Non-NEWPANEL LCD is not supported." #endif #endif #if NEED_TOUCH_PINS #define TOUCH_CS_PIN PB12 // SPI2_NSS #define TOUCH_SCK_PIN PB13 #define TOUCH_MOSI_PIN PB14 #define TOUCH_MISO_PIN PB15 #define TOUCH_INT_PIN PC6 // (PenIRQ coming from ADS7843) #elif IS_NEWPANEL #if IS_RRD_SC #error "RRD Smart Controller is not supported." #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD) #error "REPRAPWORLD_GRAPHICAL_LCD is not supported." #elif ENABLED(LCD_I2C_PANELOLU2) #error "LCD_I2C_PANELOLU2 is not supported." #elif ENABLED(LCD_I2C_VIKI) #error "LCD_I2C_VIKI is not supported." #elif ANY(VIKI2, miniVIKI) #error "VIKI2 / miniVIKI is not supported." #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) #error "ELB_FULL_GRAPHIC_CONTROLLER is not supported." #elif ENABLED(MINIPANEL) #error "MINIPANEL is not supported." #else #error "Other generic NEWPANEL LCD is not supported." #endif #endif #endif // HAS_WIRED_LCD
2301_81045437/Marlin
Marlin/src/pins/stm32f1/pins_STM3R_MINI.h
C
agpl-3.0
4,780
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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 /** * ANYCUBIC Trigorilla Pro (STM32F103ZET6) board pin assignments. * It is the same used by the Tronxy X5SA thanks to ftoz1 for sharing it * https://github.com/MarlinFirmware/Marlin/issues/14655 * https://github.com/MarlinFirmware/Marlin/files/3401484/x5sa-main_board-2.pdf */ #include "env_validate.h" #if HOTENDS > 2 || E_STEPPERS > 2 #error "Trigorilla Pro supports up to 2 hotends / E steppers." #endif #define BOARD_INFO_NAME "Trigorilla Pro" #define BOARD_NO_NATIVE_USB #define DISABLE_JTAG //#define SWAPPED_Z_PLUGS // // EEPROM // #if NO_EEPROM_SELECTED #define FLASH_EEPROM_EMULATION #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) // 2K, but will use 2x more (4K) #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE #else #define MARLIN_EEPROM_SIZE (0x800U) // On SD, Limit to 2K, require this amount of RAM #endif // // Limit Switches // #define X_STOP_PIN PG10 #define Y_STOP_PIN PA12 #ifndef Z_MIN_PIN #ifdef SWAPPED_Z_PLUGS #define Z_MIN_PIN PA14 #else #define Z_MIN_PIN PA13 #endif #endif #ifndef Z_MAX_PIN #ifdef SWAPPED_Z_PLUGS #define Z_MAX_PIN PA13 #else #define Z_MAX_PIN PA14 #endif #endif // // Steppers // #define X_ENABLE_PIN PC13 #define X_STEP_PIN PE5 #define X_DIR_PIN PE6 #define Y_ENABLE_PIN PE4 #define Y_STEP_PIN PE2 #define Y_DIR_PIN PE3 #define Z_ENABLE_PIN PE1 #define Z_STEP_PIN PB9 #define Z_DIR_PIN PE0 #define E0_ENABLE_PIN PB8 #define E0_STEP_PIN PB4 #define E0_DIR_PIN PB5 #define E1_ENABLE_PIN PG8 #define E1_STEP_PIN PC7 #define E1_DIR_PIN PC6 // // Temperature Sensors // #define TEMP_0_PIN PA1 // TH1 #define TEMP_BED_PIN PA0 // TB1 // // Heaters // #define HEATER_0_PIN PG12 // HEATER1 #define HEATER_BED_PIN PG11 // HOT BED #define HEATER_BED_INVERTING true // // Fans // #define CONTROLLER_FAN_PIN PD6 // FAN #define FAN0_PIN PG13 // FAN #define FAN1_PIN PG14 // FAN // // Misc // #define BEEPER_PIN PB0 #define LED_PIN PD3 //#define POWER_LOSS_PIN PG2 // PG4 PW_DET #define FIL_RUNOUT_PIN PA15 // MT_DET // // TFT with FSMC interface // #if HAS_FSMC_TFT /** * Note: MKS Robin TFT screens use various TFT controllers * Supported screens are based on the ILI9341, ST7789V and ILI9328 (320x240) * ILI9488 is not supported. * Define init sequences for other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp * * If the screen stays white, disable 'LCD_RESET_PIN' to let the bootloader init the screen. * * Setting an 'LCD_RESET_PIN' may cause a flicker when entering the LCD menu * because Marlin uses the reset as a failsafe to revive a glitchy LCD. */ #define TFT_RESET_PIN PF11 #define TFT_BACKLIGHT_PIN PD13 #define FSMC_CS_PIN PD7 // NE4 #define FSMC_RS_PIN PD11 // A0 #define TFT_CS_PIN FSMC_CS_PIN #define TFT_RS_PIN FSMC_RS_PIN #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT #define ANYCUBIC_TFT35 #else #define LCD_RESET_PIN PF11 #define LCD_BACKLIGHT_PIN PD13 #endif // XPT2046 Touch Screen calibration #if ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI) #ifndef TOUCH_CALIBRATION_X #define TOUCH_CALIBRATION_X -17181 #endif #ifndef TOUCH_CALIBRATION_Y #define TOUCH_CALIBRATION_Y 11434 #endif #ifndef TOUCH_OFFSET_X #define TOUCH_OFFSET_X 501 #endif #ifndef TOUCH_OFFSET_Y #define TOUCH_OFFSET_Y -9 #endif #endif #if NEED_TOUCH_PINS #define TOUCH_CS_PIN PB7 // SPI2_NSS #define TOUCH_SCK_PIN PA5 // SPI2_SCK #define TOUCH_MISO_PIN PA6 // SPI2_MISO #define TOUCH_MOSI_PIN PA7 // SPI2_MOSI #endif // SPI1(PA7) & SPI3(PB5) not available #define SPI_DEVICE 2 // Maple // // SD Card // #ifndef ONBOARD_SDIO #define ONBOARD_SDIO #endif #if ENABLED(ONBOARD_SDIO) #define SD_SCK_PIN PB13 // SPI2 ok #define SD_MISO_PIN PB14 // SPI2 ok #define SD_MOSI_PIN PB15 // SPI2 ok #define SD_SS_PIN PC11 // PB12 is X- ok #define SD_DETECT_PIN -1 // SD_CD ok #else // SD as custom software SPI (SDIO pins) #define SD_SCK_PIN PC12 #define SD_MISO_PIN PC8 #define SD_MOSI_PIN PD2 #define SD_SS_PIN -1 #define ONBOARD_SD_CS_PIN PC11 #define SDSS PD2 #define SD_DETECT_PIN -1 #endif #undef SWAPPED_Z_PLUGS
2301_81045437/Marlin
Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h
C
agpl-3.0
6,640
/** * Marlin 3D Printer Firmware * Copyright (c) 2021 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" #define BOARD_INFO_NAME "ZONESTAR ZM3E2 V1.0" #define DISABLE_DEBUG //#define DISABLE_JTAG #if NO_EEPROM_SELECTED #define FLASH_EEPROM_EMULATION #define EEPROM_PAGE_SIZE (0x800) // 2K #define EEPROM_START_ADDRESS (0x08000000 + (STM32_FLASH_SIZE) * 1024 - 2 * EEPROM_PAGE_SIZE) #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE // 2K #endif //============================================================================= // Zonestar ZM3E2 V1.0 (STM32F103RCT6) board pin assignments //============================================================================= // PA0 PWR_HOLD | PB0 BEEP | PC0 HEATER_0 // PA1 FAN0_PIN | PB1 KILL | PC1 HEATER_BED // PA2 TX2 | PB2 LCD_SDA | PC2 TEMP_BED // PA3 RX2 | PB3 E1_EN | PC3 TEMP_E0 // PA4 SD_CS | PB4 Z_STOP | PC4 SD_DETECT // PA5 SD_SCK | PB5 Z_DIR | PC5 BTN_EN2 // PA6 SD_MISO | PB6 Z_STEP | PC6 FAN1 // PA7 SD_MOSI | PB7 Z_EN | PC7 FIL_RUNOUT // PA8 X_DIR | PB8 Y_STEP | PC8 X_EN // PA9 LCD_RS | PB9 Y_DIR | PC9 X_STEP // PA10 LCD_SCK | PB10 BTN_ENC | PC10 Z_MIN_PROBE_PIN // PA11 USB_D- | PB11 BTN_EN1 | PC11 FIL_RUNOUT2 // PA12 USB_D+ | PB12 LED | PC12 E1_DIR // PA13 MS1 | PB13 E0_EN | PC13 Y_STOP // PA14 MS2 | PB14 E0_STEP | PC14 Y_EN // PA15 PWM | PB15 E0_DIR | PC15 X_STOP // PD0 NC // PD1 NC // PD2 E1_STEP //============================================================================= // EXP1 connector // MARK I/O ZONESTAR_12864LCD ZONESTAR_12864OLED // 10 MOSI PB1 KILL SDA // 9 SCK PB0 BEEP SCK // 8 TX1 PA9 DOGLCD_CS CS // 7 RX1 PA10 DOGLCD_SCK DC // 6 ENA PC5 BTN_EN2 KNOB_ENB // 5 DAT PB2 DOGLCD_MOSI RESET // 4 TX3 PB10 BTN_ENC KNOB_ENC // 3 RX3 PB11 BTN_EN1 KNOB_ENA // 2 +5V // 1 GND #define EXP1_01_PIN PB1 #define EXP1_02_PIN PB0 #define EXP1_03_PIN PA9 #define EXP1_04_PIN PA10 #define EXP1_05_PIN PC5 #define EXP1_06_PIN PB2 #define EXP1_07_PIN PB10 #define EXP1_08_PIN PB11 // AUX1 connector // 1 +5V // 2 TX2 PA2 UART2_TX // 3 RX2 PA3 UART2_RX // 4 GND // AUX2 connector to BLTouch // 1 +5V // 2 SEN PC10 // 3 PWM PA15 // 4 GND //============================================================================= // // Servos // #define SERVO0_PIN PA15 // // Limit Switches // #define X_STOP_PIN PC15 #define Y_STOP_PIN PC13 #define Z_STOP_PIN PB4 #ifndef Z_MIN_PROBE_PIN #define Z_MIN_PROBE_PIN PC10 // BLTouch (3DTouch) #endif // // Filament Runout Sensor // #define FIL_RUNOUT_PIN PC7 // E0_SW //#define FIL_RUNOUT2_PIN PC11 // E1_SW // // Steppers // #define MS1_PIN PA13 #define MS2_PIN PA14 #define X_STEP_PIN PC9 #define X_DIR_PIN PA8 #define X_ENABLE_PIN PC8 #define Y_STEP_PIN PB8 #define Y_DIR_PIN PB9 #define Y_ENABLE_PIN PC14 #define Z_STEP_PIN PB6 #define Z_DIR_PIN PB5 #define Z_ENABLE_PIN PB7 #define E0_STEP_PIN PB14 #define E0_DIR_PIN PB15 #define E0_ENABLE_PIN PB13 #define E1_STEP_PIN PD2 #define E1_DIR_PIN PC12 #define E1_ENABLE_PIN PB3 // // Heaters / Fans // #define HEATER_0_PIN PC0 // EXTRUDER 1 #define HEATER_BED_PIN PC1 // BED #define FAN1_PIN PC6 #define FAN0_PIN PA1 // // Temperature Sensors // #define TEMP_BED_PIN PC2 // Analog Input #define TEMP_0_PIN PC3 // Analog Input #define LED_PIN PB12 //#define KILL_PIN PB1 // @EXP1 #define SUICIDE_PIN PA0 // // SD card // #define ENABLE_SPI1 #define SD_DETECT_PIN PC4 #define SD_SCK_PIN PA5 #define SD_MISO_PIN PA6 #define SD_MOSI_PIN PA7 #define SD_SS_PIN PA4 // // LCD Pins // #if ENABLED(ZONESTAR_12864LCD) //================================================================================ // LCD 128x64 //================================================================================ // EXP1 connector // MARK I/O ZONESTAR_12864LCD // 10 MOSI PB1 KILL // 9 SCK PB0 BEEP // 8 TX1 PA9 LCD_PINS_RS // 7 RX1 PA10 LCD_PINS_D4 // 6 ENA PC5 BTN_EN2 // 5 DAT PB2 LCD_PINS_EN // 4 TX3 PB10 BTN_ENC // 3 RX3 PB11 BTN_EN1 // 2 +5V // 1 GND #define LCDSCREEN_NAME "ZONESTAR LCD12864" #define LCD_PINS_RS EXP1_03_PIN #define LCD_PINS_EN EXP1_06_PIN #define LCD_PINS_D4 EXP1_04_PIN //#define KILL_PIN EXP1_01_PIN #define BEEPER_PIN EXP1_02_PIN #define BTN_EN1 EXP1_08_PIN #define BTN_EN2 EXP1_05_PIN #define BTN_ENC EXP1_07_PIN #define BOARD_ST7920_DELAY_1 125 #define BOARD_ST7920_DELAY_2 200 #define BOARD_ST7920_DELAY_3 125 #elif ANY(ZONESTAR_12864OLED, ZONESTAR_12864OLED_SSD1306) //================================================================================ // OLED 128x64 //================================================================================ // 10 MOSI PB1 OLED_SDA // 9 SCK PB0 OLED_SCK // 8 TX1 PA9 OLED_CS // 7 RX1 PA10 OLED_DC // 6 ENA PC5 KNOB_ENA // 5 DAT PB2 OLED_RESET // 4 TX3 PB10 KNOB_ENC // 3 RX3 PB11 KNOB_ENB #define FORCE_SOFT_SPI #define LCDSCREEN_NAME "ZONESTAR 12864OLED" #define LCD_PINS_RS EXP1_06_PIN // = LCD_RESET_PIN #define LCD_PINS_DC EXP1_04_PIN // DC #define DOGLCD_CS EXP1_03_PIN // CS #define DOGLCD_A0 LCD_PINS_DC #define DOGLCD_MOSI EXP1_01_PIN // SDA #define DOGLCD_SCK EXP1_02_PIN // SCK // Encoder #define BTN_EN1 EXP1_08_PIN #define BTN_EN2 EXP1_05_PIN #define BTN_ENC EXP1_07_PIN #endif
2301_81045437/Marlin
Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h
C
agpl-3.0
8,360
/** * Marlin 3D Printer Firmware * Copyright (c) 2021 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" #define BOARD_INFO_NAME "ZONESTAR ZM3E4 V1.0" //#define DISABLE_DEBUG #define DISABLE_JTAG #if NO_EEPROM_SELECTED #define FLASH_EEPROM_EMULATION #define EEPROM_PAGE_SIZE (0x800) // 2K #define EEPROM_START_ADDRESS (0x08000000 + (STM32_FLASH_SIZE) * 1024 - 2 * EEPROM_PAGE_SIZE) #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE // 2K #endif //#define OPTION_DUALZ_DRIVE //#define OPTION_Z2_ENDSTOP //#define SWITCH_EXTRUDER_SEQUENCE //============================================================================= // Zonestar ZM3E4 V1.0 (STM32F103VCT6) board pin assignments //============================================================================= // PA0 | PB0 HEAT_1 | PC0 AXU_SDA // PA1 | PB1 FAN1 | PC1 TEMP_E1 // PA2 HEAT_BED | PB2 BOOT1 | PC2 TEMP_E0 // PA3 PWR_HOLD | PB3 SPI3_SCK | PC3 TEMP_BED // PA4 SD_CS | PB4 SPI3_MISO | PC4 SD_DETECT // PA5 SD_SCK | PB5 SPI3_MOSI | PC5 HEAT_0 // PA6 SD_MISO | PB6 SERVO3 | PC6 E1_STEP // PA7 SD_MOSI | PB7 SERVO2 | PC7 E1_EN // PA8 X_DIR | PB8 FAN2/SERVO1 | PC8 FIL_RUNOUT_PIN // PA9 UART1_RX | PB9 SERVO0 | PC9 E0_DIR // PA10 UART1_TX | PB10 TX3 | PC10 E0_EN // PA11 USB_D- | PB11 RX3 | PC11 Z2_EN // PA12 USB_D+ | PB12 LED | PC12 Z2_STEP // PA13 SWD_SDO | PB13 Z1_MAX | PC13 X_MIN // PA14 SWD_SCK | PB14 Y_MAX | PC14 WIFI_RST // PA15 SPI3_CS | PB15 PWR_DET | PC15 WIFI_CS // PD0 Z2_DIR | PE0 Y_EN // PD1 Z2_MIN | PE1 Y_STEP // PD2 Z1_EN | PE2 Y_DIR // PD3 Z1_STEP | PE3 Y_MIN // PD4 Z1_DIR | PE4 X_DIR // PD5 WIFI_RXD | PE5 X_STEP // PD6 WIFI_TXD | PE6 X_EN // PD7 Z1_MIN | PE7 AXU_SCL // PD8 X_MAX | PE8 BTN_EN1 // PD9 E3_DIR | PE9 LCD_SCK // PD10 E3_STEP | PE10 LCD_MOSI // PD11 E3_EN | PE11 BEEPER // PD12 E2_DIR | PE12 LCD_EN // PD13 E2_STEP | PE13 KILL // PD14 E2_EN | PE14 BTN_EN2 // PD15 E1_DIR | PE15 BTN_ENC //============================================================================= // EXP1 connector // MARK I/O ZONESTAR_LCD12864 REPRAPDISCOUNT_LCD12864 // 10 RS PE13 KILL BTN_ENC // 9 BP PE11 BEEP BEEP // 8 EN PE12 DOGLCD_CS LCDRS // 7 MOSI PE10 DOGLCD_SCK LCDE // 6 EN1 PE8 BTN_EN1 NC // 5 SCK PE9 DOGLCD_MOSI LCD4 // 4 ENC PE15 BTN_ENC NC // 3 EN2 PE14 BTN_EN2 NC // 2 +5V +5V // 1 GND GND #define EXP1_01_PIN PE13 #define EXP1_02_PIN PE11 #define EXP1_03_PIN PE12 #define EXP1_04_PIN PE10 #define EXP1_05_PIN PE8 #define EXP1_06_PIN PE9 #define EXP1_07_PIN PE15 #define EXP1_08_PIN PE14 // EXP2 connector // MARK I/O ZONESTAR_LCD12864 REPRAPDISCOUNT_LCD12864 // 10 // 9 // 8 RX0 PA9 UART1_RX // 7 TX0 PA10 UART1_TX BTN_EN2 // 6 CS3 PA15 // 5 MISO3 PB4 BTN_EN1 // 4 MOSI3 PB5 KILL // 3 SCK3 PB3 // 2 +5V +5V // 1 GND GND #define EXP2_03_PIN PA9 #define EXP2_04_PIN PA10 #define EXP2_05_PIN PA15 #define EXP2_06_PIN PB4 #define EXP2_07_PIN PB5 #define EXP2_08_PIN PB3 // AUX1 connector // 1 +5V // 2 GND // 3 RX3 PB11 UART3_RX // 4 TX3 PB10 UART3_TX // 5 SCL PE7 // 6 SDA PC0 // WiFi // 1 +5V // 2 GND // 3 WIFI_TXD PD5 UART2_RX // 4 WIFI_RXD PD6 UART2_TX // 5 WIFI_RST PC14 // 6 WIFI_CS PC15 //============================================================================= // // Servos // #define SERVO0_PIN PB9 #define SERVO2_PIN PB7 #define SERVO3_PIN PB6 // // Limit Switches // #define X_MIN_PIN PC13 #define X_MAX_PIN PD8 #define Y_MIN_PIN PE3 #define Y_MAX_PIN PB14 #define Z_MIN_PIN PD7 #define Z_MAX_PIN PB13 // // Filament Runout Sensor // #ifndef FIL_RUNOUT_PIN #define FIL_RUNOUT_PIN PC8 #endif // // Steppers // #if ENABLED(COREXY) #define X_ENABLE_PIN PE0 #define X_STEP_PIN PE1 #define X_DIR_PIN PE2 #define Y_ENABLE_PIN PE6 #define Y_STEP_PIN PE5 #define Y_DIR_PIN PE4 #else #define X_ENABLE_PIN PE6 #define X_STEP_PIN PE5 #define X_DIR_PIN PE4 #define Y_ENABLE_PIN PE0 #define Y_STEP_PIN PE1 #define Y_DIR_PIN PE2 #endif #define Z_ENABLE_PIN PD2 #define Z_STEP_PIN PD3 #define Z_DIR_PIN PD4 #ifdef OPTION_DUALZ_DRIVE #define Z2_ENABLE_PIN PC11 #define Z2_STEP_PIN PC12 #define Z2_DIR_PIN PD0 #endif // TODO: Use different pin names for auto-remapping #ifdef OPTION_Z2_ENDSTOP #define Z2_MIN_PIN PD1 #define Z2_MAX_PIN PB12 #endif #ifdef SWITCH_EXTRUDER_SEQUENCE #define E3_ENABLE_PIN PC10 #define E3_STEP_PIN PA8 #define E3_DIR_PIN PC9 #define E2_STEP_PIN PC6 #define E2_DIR_PIN PD15 #define E2_ENABLE_PIN PC7 #define E1_STEP_PIN PD13 #define E1_DIR_PIN PD12 #define E1_ENABLE_PIN PD14 #define E0_STEP_PIN PD10 #define E0_DIR_PIN PD9 #define E0_ENABLE_PIN PD11 #else #define E0_ENABLE_PIN PC10 #define E0_STEP_PIN PA8 #define E0_DIR_PIN PC9 #define E1_STEP_PIN PC6 #define E1_DIR_PIN PD15 #define E1_ENABLE_PIN PC7 #define E2_STEP_PIN PD13 #define E2_DIR_PIN PD12 #define E2_ENABLE_PIN PD14 #define E3_STEP_PIN PD10 #define E3_DIR_PIN PD9 #define E3_ENABLE_PIN PD11 #endif // // Temperature Sensors // #define TEMP_0_PIN PC2 // TH0 #define TEMP_BED_PIN PC3 // TB1 // // Heaters / Fans // #define HEATER_0_PIN PC5 // HEATER0 #define HEATER_BED_PIN PA2 // HOT BED #if ENABLED(OPTION_CHAMBER) #define TEMP_CHAMBER_PIN PC1 #define HEATER_CHAMBER_PIN PB0 #else #define TEMP_1_PIN PC1 // TH1 #define HEATER_1_PIN PB0 // HEATER1 #endif #define FAN0_PIN PB1 // FAN1 #define FAN1_PIN PB8 // FAN2 // // Misc. Functions // //#define POWER_LOSS_PIN PB15 #define LED_PIN PA0 #define SUICIDE_PIN PA3 // // SD card // #define ENABLE_SPI1 #define SD_DETECT_PIN PC4 #define SD_SCK_PIN PA5 #define SD_MISO_PIN PA6 #define SD_MOSI_PIN PA7 #define SD_SS_PIN PA4 // WiFi Functions #define WIFI_RST PC15 #define WIFI_EN PC14 // // LCD / Controller // #if ENABLED(ZONESTAR_12864LCD) #define LCDSCREEN_NAME "ZONESTAR LCD12864" #define LCD_PINS_RS EXP1_03_PIN // 7 CS make sure for zonestar zm3e4! #define LCD_PINS_EN EXP1_06_PIN // 6 DATA make sure for zonestar zm3e4! #define LCD_PINS_D4 EXP1_04_PIN // 8 SCK make sure for zonestar zm3e4! #define BEEPER_PIN EXP1_02_PIN #define KILL_PIN -1 // EXP1_01_PIN #define BTN_EN1 EXP1_05_PIN #define BTN_EN2 EXP1_08_PIN #define BTN_ENC EXP1_07_PIN #elif ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #define LCDSCREEN_NAME "REPRAPDISCOUNT LCD12864" #define LCD_PINS_RS EXP1_03_PIN // 7 CS make sure for zonestar zm3e4! #define LCD_PINS_EN EXP1_04_PIN // 6 DATA make sure for zonestar zm3e4! #define LCD_PINS_D4 EXP1_06_PIN // 8 SCK make sure for zonestar zm3e4! #define BEEPER_PIN EXP1_02_PIN #define KILL_PIN EXP2_07_PIN #define BTN_EN1 EXP2_06_PIN #define BTN_EN2 EXP2_04_PIN #define BTN_ENC EXP1_01_PIN #elif ENABLED(ZONESTAR_DWIN_LCD) // Connect to EXP2 connector #define LCDSCREEN_NAME "ZONESTAR DWIN LCD" #define BEEPER_PIN EXP2_05_PIN #define KILL_PIN PC0 #define BTN_EN1 EXP2_08_PIN #define BTN_EN2 EXP2_07_PIN #define BTN_ENC EXP2_06_PIN #endif #if ENABLED(ZONESTAR_LCD2004_KNOB) #define LCDSCREEN_NAME "LCD2004 KNOB" #define LCD_PINS_RS EXP1_03_PIN #define LCD_PINS_EN EXP1_04_PIN #define LCD_PINS_D4 EXP1_06_PIN #define LCD_PINS_D5 EXP1_05_PIN #define LCD_PINS_D6 EXP1_08_PIN #define LCD_PINS_D7 EXP1_07_PIN #define BTN_EN1 EXP2_04_PIN #define BTN_EN2 EXP2_06_PIN #define BTN_ENC EXP1_01_PIN #define BEEPER_PIN EXP1_02_PIN #define KILL_PIN EXP2_07_PIN #elif ENABLED(ZONESTAR_LCD2004_ADCKEY) #define LCDSCREEN_NAME "LCD2004 5KEY" #define LCD_PINS_RS EXP1_03_PIN #define LCD_PINS_EN EXP1_04_PIN #define LCD_PINS_D4 EXP1_06_PIN #define LCD_PINS_D5 EXP1_05_PIN #define LCD_PINS_D6 EXP1_08_PIN #define LCD_PINS_D7 EXP1_07_PIN #define ADC_KEYPAD_PIN PC0 // PIN6 of AUX1 #endif // Alter timing for graphical display #if IS_U8GLIB_ST7920 #define BOARD_ST7920_DELAY_1 125 #define BOARD_ST7920_DELAY_2 250 #define BOARD_ST7920_DELAY_3 125 #endif // Remap SERVO0 PIN for BLTouch #if ENABLED(BLTOUCH_ON_EXP1) // BLTouch connected to EXP1 #define BLTOUCH_PROBE_PIN EXP1_05_PIN #define BLTOUCH_GND_PIN EXP1_07_PIN #undef SERVO0_PIN #define SERVO0_PIN EXP1_08_PIN #elif ENABLED(BLTOUCH_ON_EXP2) // BLTouch connected to EXP2 #define BLTOUCH_PROBE_PIN EXP2_08_PIN #define BLTOUCH_GND_PIN EXP2_07_PIN #undef SERVO0_PIN #define SERVO0_PIN EXP2_05_PIN #else #define BLTOUCH_PROBE_PIN PB13 #endif
2301_81045437/Marlin
Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h
C
agpl-3.0
13,108
/** * Marlin 3D Printer Firmware * Copyright (c) 2021 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" #define BOARD_INFO_NAME "ZONESTAR ZM3E4 V2.0" //#define DISABLE_DEBUG #define DISABLE_JTAG #if NO_EEPROM_SELECTED #define FLASH_EEPROM_EMULATION #define EEPROM_PAGE_SIZE (0x800) // 2K #define EEPROM_START_ADDRESS (0x08000000 + (STM32_FLASH_SIZE) * 1024 - 2 * EEPROM_PAGE_SIZE) #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE // 2K #endif //#define OPTION_DUALZ_DRIVE //#define OPTION_Z2_ENDSTOP //#define OPTION_REPEAT_PRINTING //#define SWITCH_EXTRUDER_SEQUENCE //============================================================================= // Zonestar ZM3E4 V2.0 (STM32F103VET6) board pin assignments //============================================================================= // PA0 | PB0 HEAT_1 | PC0 AUX_SDA // PA1 | PB1 FAN1 | PC1 TEMP_E1 // PA2 HEAT_BED | PB2 BOOT1 | PC2 TEMP_E0 // PA3 PWR_HOLD | PB3 SPI3_SCK | PC3 TEMP_BED // PA4 SD_CS | PB4 SPI3_MISO | PC4 SD_DETECT // PA5 SD_SCK | PB5 SPI3_MOSI | PC5 HEAT_0 // PA6 SD_MISO | PB6 SERVO3 | PC6 E1_STEP // PA7 SD_MOSI | PB7 SERVO2 | PC7 E1_EN // PA8 X_DIR | PB8 FAN2/SERVO1 | PC8 FIL_RUNOUT_PIN // PA9 UART1_RX | PB9 SERVO0 | PC9 E0_DIR // PA10 UART1_TX | PB10 TX3 | PC10 E0_EN // PA11 USB_D- | PB11 RX3 | PC11 Z2_EN // PA12 USB_D+ | PB12 LED | PC12 Z2_STEP // PA13 SWD_SDO | PB13 Z1_MAX | PC13 X_MIN // PA14 SWD_SCK | PB14 Y_MAX | PC14 WIFI_RST // PA15 SPI3_CS | PB15 PWR_DET | PC15 WIFI_CS // PD0 Z2_DIR | PE0 Y_EN // PD1 Z2_MIN | PE1 Y_STEP // PD2 Z1_EN | PE2 Y_DIR // PD3 Z1_STEP | PE3 Y_MIN // PD4 Z1_DIR | PE4 X_DIR // PD5 WIFI_RXD | PE5 X_STEP // PD6 WIFI_TXD | PE6 X_EN // PD7 Z1_MIN | PE7 AUX_SCL // PD8 X_MAX | PE8 BTN_EN1 // PD9 E3_DIR | PE9 LCD_SCK // PD10 E3_STEP | PE10 LCD_MOSI // PD11 E3_EN | PE11 BEEPER // PD12 E2_DIR | PE12 LCD_EN // PD13 E2_STEP | PE13 KILL // PD14 E2_EN | PE14 BTN_EN2 // PD15 E1_DIR | PE15 BTN_ENC //============================================================================= // EXP1 connector // MARK I/O ZONESTAR_LCD12864 REPRAPDISCOUNT_LCD12864 // 10 RS PE13 KILL BTN_ENC // 9 BP PE11 BEEP BEEP // 8 EN PE12 DOGLCD_CS LCDRS // 7 MOSI PE10 DOGLCD_SCK LCDE // 6 EN1 PE8 BTN_EN1 NC // 5 SCK PE9 DOGLCD_MOSI LCD4 // 4 ENC PE15 BTN_ENC NC // 3 EN2 PE14 BTN_EN2 NC // 2 +5V // 1 GND #define EXP1_01_PIN PE13 #define EXP1_02_PIN PE11 #define EXP1_03_PIN PE12 #define EXP1_04_PIN PE10 #define EXP1_05_PIN PE8 #define EXP1_06_PIN PE9 #define EXP1_07_PIN PE15 #define EXP1_08_PIN PE14 // EXP2 connector // MARK I/O ZONESTAR_LCD12864 REPRAPDISCOUNT_LCD12864 // 10 SDA PC0 // 9 SCL PE7 // 8 RX1 PA9 UART1_RX // 7 TX1 PA10 UART1_TX BTN_EN2 // 6 CS3 PA15 // 5 MISO3 PB4 BTN_EN1 // 4 MOSI3 PB5 KILL // 3 SCK3 PB3 // 2 +5V // 1 GND #define EXP2_01_PIN PC0 #define EXP2_02_PIN PE7 #define EXP2_03_PIN PA9 #define EXP2_04_PIN PA10 #define EXP2_05_PIN PA15 #define EXP2_06_PIN PB4 #define EXP2_07_PIN PB5 #define EXP2_08_PIN PB3 // AUX1 connector // 1 +5V // 2 GND // 3 RX3 PB11 UART3_RX // 4 TX3 PB10 UART3_TX // 5 SCL PE7 // 6 SDA PC0 // WiFi // 1 +5V // 2 GND // 3 WIFI_TXD PD5 UART2_RX // 4 WIFI_RXD PD6 UART2_TX // 5 WIFI_RST PC14 // 6 WIFI_CS PC15 //============================================================================= // // Servos // #define SERVO0_PIN PB9 //#define SERVO1_PIN PB8 #define SERVO2_PIN PB7 #define SERVO3_PIN PB6 // // Limit Switches // #define X_MIN_PIN PC13 #define Y_MIN_PIN PE3 #define Z_MIN_PIN PD7 #define X_MAX_PIN PD8 #define Y_MAX_PIN PB14 #define Z_MAX_PIN PB13 // TODO: Use different pin names for auto-remapping #ifdef OPTION_Z2_ENDSTOP #define Z2_MIN_PIN PD1 #define Z2_MAX_PIN PB12 #endif // // Steppers // #if ENABLED(COREXY) #define X_ENABLE_PIN PE0 #define X_STEP_PIN PE1 #define X_DIR_PIN PE2 #define Y_ENABLE_PIN PE6 #define Y_STEP_PIN PE5 #define Y_DIR_PIN PE4 #else #define X_ENABLE_PIN PE6 #define X_STEP_PIN PE5 #define X_DIR_PIN PE4 #define Y_ENABLE_PIN PE0 #define Y_STEP_PIN PE1 #define Y_DIR_PIN PE2 #endif #define Z_ENABLE_PIN PD2 #define Z_STEP_PIN PD3 #define Z_DIR_PIN PD4 #ifdef OPTION_DUALZ_DRIVE #define Z2_ENABLE_PIN PC11 #define Z2_STEP_PIN PC12 #define Z2_DIR_PIN PD0 #endif #ifdef OPTION_REPEAT_PRINTING #define REPRINT_STOP_PIN PD8 // X_MAX_PIN #define FORWARD_PIN PA13 #define BACK_PIN PA14 #endif #ifdef SWITCH_EXTRUDER_SEQUENCE #define E3_ENABLE_PIN PC10 #define E3_STEP_PIN PA8 #define E3_DIR_PIN PC9 #define E2_STEP_PIN PC6 #define E2_DIR_PIN PD15 #define E2_ENABLE_PIN PC7 #define E1_STEP_PIN PD13 #define E1_DIR_PIN PD12 #define E1_ENABLE_PIN PD14 #define E0_STEP_PIN PD10 #define E0_DIR_PIN PD9 #define E0_ENABLE_PIN PD11 #else #define E0_ENABLE_PIN PC10 #define E0_STEP_PIN PA8 #define E0_DIR_PIN PC9 #define E1_STEP_PIN PC6 #define E1_DIR_PIN PD15 #define E1_ENABLE_PIN PC7 #define E2_STEP_PIN PD13 #define E2_DIR_PIN PD12 #define E2_ENABLE_PIN PD14 #define E3_STEP_PIN PD10 #define E3_DIR_PIN PD9 #define E3_ENABLE_PIN PD11 #endif // // Temperature Sensors // #define TEMP_0_PIN PC2 // TH0 //#define TEMP_1_PIN PC1 // TH1 #define TEMP_BED_PIN PC3 // TB1 // // Heaters // #define HEATER_0_PIN PC5 // HEATER0 //#define HEATER_1_PIN PB0 // HEATER1 #define HEATER_BED_PIN PA2 // HOT BED // // Fans // #define FAN0_PIN PB1 // FAN1 #define FAN1_PIN PB8 // FAN2 // // Misc. Functions // //#define POWER_LOSS_PIN PB15 #define LED_PIN PA0 #define SUICIDE_PIN PA3 #define FIL_RUNOUT_PIN PC8 // // SD card // #define ENABLE_SPI1 #define SD_DETECT_PIN PC4 #define SD_SCK_PIN PA5 #define SD_MISO_PIN PA6 #define SD_MOSI_PIN PA7 #define SD_SS_PIN PA4 // WiFi Functions #define WIFI_RST PC15 #define WIFI_EN PC14 #if ENABLED(ZONESTAR_12864LCD) #define LCDSCREEN_NAME "ZONESTAR LCD12864" #define LCD_PINS_RS EXP1_03_PIN // 7 CS make sure for zonestar zm3e4! #define LCD_PINS_EN EXP1_06_PIN // 6 DATA make sure for zonestar zm3e4! #define LCD_PINS_D4 EXP1_04_PIN // 8 SCK make sure for zonestar zm3e4! #define BEEPER_PIN EXP1_02_PIN #define KILL_PIN -1 // EXP1_01_PIN #define BTN_EN1 EXP1_05_PIN #define BTN_EN2 EXP1_08_PIN #define BTN_ENC EXP1_07_PIN #elif ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #define LCDSCREEN_NAME "REPRAPDISCOUNT LCD12864" #define LCD_PINS_RS EXP2_03_PIN // 7 CS make sure for zonestar zm3e4! #define LCD_PINS_EN EXP2_06_PIN // 6 DATA make sure for zonestar zm3e4! #define LCD_PINS_D4 EXP2_04_PIN // 8 SCK make sure for zonestar zm3e4! #define BEEPER_PIN EXP2_01_PIN #define KILL_PIN EXP2_02_PIN #define BTN_EN1 EXP2_08_PIN #define BTN_EN2 EXP2_05_PIN #define BTN_ENC EXP2_07_PIN #elif ENABLED(ZONESTAR_DWIN_LCD) // Connect to EXP2 connector #define LCDSCREEN_NAME "ZONESTAR DWIN LCD" #define BEEPER_PIN EXP2_05_PIN // PE11 #define KILL_PIN -1 // EXP1_01_PIN #define BTN_EN2 EXP2_07_PIN // PE8 #define BTN_EN1 EXP2_08_PIN // PE14 #define BTN_ENC EXP2_06_PIN // PE15 #endif // Alter timing for graphical display #if IS_U8GLIB_ST7920 #define BOARD_ST7920_DELAY_1 200 // Tclk_fall <200ns #define BOARD_ST7920_DELAY_2 250 // Tdata_width >200ns #define BOARD_ST7920_DELAY_3 200 // Tclk_rise <200ns #endif // Remap SERVO0 PIN for BLTouch #if ENABLED(BLTOUCH_ON_EXP1) // BLTouch connected to EXP1 #define BLTOUCH_PROBE_PIN EXP1_05_PIN #define BLTOUCH_GND_PIN EXP1_07_PIN #undef SERVO0_PIN #define SERVO0_PIN EXP1_08_PIN #elif ENABLED(BLTOUCH_ON_EXP2) // BLTouch connected to EXP2 #define BLTOUCH_PROBE_PIN EXP2_08_PIN #define BLTOUCH_GND_PIN EXP2_07_PIN #undef SERVO0_PIN #define SERVO0_PIN EXP2_05_PIN #else #define BLTOUCH_PROBE_PIN PB13 // Z1_MAX #endif
2301_81045437/Marlin
Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h
C
agpl-3.0
12,263
/** * Marlin 3D Printer Firmware * Copyright (c) 2021 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/>. * */ #ifndef ENV_VALIDATE_H #define ENV_VALIDATE_H #if NOT_TARGET(STM32F4) && (DISABLED(ALLOW_STM32DUINO) || NOT_TARGET(STM32F4xx)) #error "Oops! Select an STM32F4 board in 'Tools > Board.'" #endif #undef ALLOW_STM32DUINO #endif
2301_81045437/Marlin
Marlin/src/pins/stm32f4/env_validate.h
C
agpl-3.0
1,091
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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 HAS_MULTI_HOTEND || E_STEPPERS > 1 #error "Anet ET4 only supports 1 hotend / E stepper." #endif #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "Anet ET4 1.x" #endif // // EEPROM // // Use one of these or SDCard-based Emulation will be used #if NO_EEPROM_SELECTED //#define SRAM_EEPROM_EMULATION // Use BackSRAM-based EEPROM emulation #define FLASH_EEPROM_EMULATION // Use Flash-based EEPROM emulation //#define IIC_BL24CXX_EEPROM // Use I2C EEPROM onboard IC (AT24C04C, Size 4K, PageSize 16B) #endif #if ENABLED(FLASH_EEPROM_EMULATION) // Decrease delays and flash wear by spreading writes across the // 128 kB sector allocated for EEPROM emulation. #define FLASH_EEPROM_LEVELING #elif ENABLED(IIC_BL24CXX_EEPROM) #define IIC_EEPROM_SDA PB11 #define IIC_EEPROM_SCL PB10 #define EEPROM_DEVICE_ADDRESS 0xA0 #define MARLIN_EEPROM_SIZE 0x1000 // 4K #endif // // Limit Switches // #define X_STOP_PIN PC13 #define Y_STOP_PIN PE12 #define Z_STOP_PIN PE11 // // Z Probe // #if ENABLED(BLTOUCH) #error "You will need to use 24V to 5V converter and remove one resistor and capacitor from the motherboard. See https://bit.ly/3xg9cXO for more information. Comment out this line to proceed at your own risk." #define SERVO0_PIN PC3 #elif !defined(Z_MIN_PROBE_PIN) #define Z_MIN_PROBE_PIN PC3 #endif // // Filament Runout Sensor // #ifndef FIL_RUNOUT_PIN #define FIL_RUNOUT_PIN PA2 #endif // // Power Loss Detection // #ifndef POWER_LOSS_PIN #define POWER_LOSS_PIN PA8 #endif // // LED PIN // #define LED_PIN PD12 // // Steppers // #define X_STEP_PIN PB6 #define X_DIR_PIN PB5 #define X_ENABLE_PIN PB7 #define Y_STEP_PIN PB3 #define Y_DIR_PIN PD6 #define Y_ENABLE_PIN PB4 #define Z_STEP_PIN PA12 #define Z_DIR_PIN PA11 #define Z_ENABLE_PIN PA15 #define E0_STEP_PIN PB9 #define E0_DIR_PIN PB8 #define E0_ENABLE_PIN PE0 // // Temperature Sensors // #define TEMP_0_PIN PA1 #define TEMP_BED_PIN PA4 // // Heaters // #define HEATER_0_PIN PA0 #define HEATER_BED_PIN PE2 // // Fans // #define FAN0_PIN PE3 // Layer fan #define FAN1_PIN PE1 // Hotend fan #ifndef E0_AUTO_FAN_PIN #define E0_AUTO_FAN_PIN FAN1_PIN #endif // // LCD / Controller // #if HAS_SPI_TFT || HAS_FSMC_TFT #define TFT_RESET_PIN PE6 #define TFT_CS_PIN PD7 #define TFT_RS_PIN PD13 #if HAS_FSMC_TFT #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT #define FSMC_CS_PIN TFT_CS_PIN #define FSMC_RS_PIN TFT_RS_PIN #define TFT_INTERFACE_FSMC_8BIT #endif #endif // // Touch Screen // https://ldm-systems.ru/f/doc/catalog/HY-TFT-2,8/XPT2046.pdf // #if NEED_TOUCH_PINS #define TOUCH_CS_PIN PB2 #define TOUCH_SCK_PIN PB0 #define TOUCH_MOSI_PIN PE5 #define TOUCH_MISO_PIN PE4 #define TOUCH_INT_PIN PB1 #endif #if ENABLED(ANET_ET5_TFT35) #ifndef TOUCH_CALIBRATION_X #define TOUCH_CALIBRATION_X 17125 #endif #ifndef TOUCH_CALIBRATION_Y #define TOUCH_CALIBRATION_Y -11307 #endif #ifndef TOUCH_OFFSET_X #define TOUCH_OFFSET_X -26 #endif #ifndef TOUCH_OFFSET_Y #define TOUCH_OFFSET_Y 337 #endif #ifndef TOUCH_ORIENTATION #define TOUCH_ORIENTATION TOUCH_PORTRAIT #endif #elif ENABLED(ANET_ET4_TFT28) #ifndef TOUCH_CALIBRATION_X #define TOUCH_CALIBRATION_X -11838 #endif #ifndef TOUCH_CALIBRATION_Y #define TOUCH_CALIBRATION_Y 8776 #endif #ifndef TOUCH_OFFSET_X #define TOUCH_OFFSET_X 333 #endif #ifndef TOUCH_OFFSET_Y #define TOUCH_OFFSET_Y -17 #endif #ifndef TOUCH_ORIENTATION #define TOUCH_ORIENTATION TOUCH_PORTRAIT #endif #endif // // SD Card // //#define ONBOARD_SDIO #ifndef SDCARD_CONNECTION #define SDCARD_CONNECTION CUSTOM_CABLE #endif #if HAS_MEDIA #if DISABLED(ONBOARD_SDIO) #define SOFTWARE_SPI #define SDSS PC11 #define SD_SS_PIN SDSS #define SD_SCK_PIN PC12 #define SD_MISO_PIN PC8 #define SD_MOSI_PIN PD2 #endif #ifndef SD_DETECT_PIN #define SD_DETECT_PIN PD3 #endif #endif
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_ANET_ET4.h
C
agpl-3.0
6,094
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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_INFO_NAME "Anet ET4P 1.x" // // TMC2208 Configuration_adv defaults for Anet ET4P-MB_V1.x // #if !AXIS_DRIVER_TYPE_X(TMC2208_STANDALONE) || !AXIS_DRIVER_TYPE_Y(TMC2208_STANDALONE) || !AXIS_DRIVER_TYPE_Z(TMC2208_STANDALONE) || !AXIS_DRIVER_TYPE_E0(TMC2208_STANDALONE) #error "ANET_ET4P requires ([XYZ]|E0)_DRIVER_TYPE set to TMC2208_STANDALONE." #endif #include "pins_ANET_ET4.h"
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_ANET_ET4P.h
C
agpl-3.0
1,272
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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 // https://github.com/ktand/Armed #include "env_validate.h" #if HOTENDS > 2 || E_STEPPERS > 2 #error "Arm'ed supports up to 2 hotends / E steppers." #endif #ifndef ARMED_V1_0 #define ARMED_V1_1 #endif #undef BOARD_INFO_NAME // Defined on the command line by Arduino Core STM32 #define BOARD_INFO_NAME "Arm'ed" #define DEFAULT_MACHINE_NAME BOARD_INFO_NAME #if NO_EEPROM_SELECTED #define I2C_EEPROM #define MARLIN_EEPROM_SIZE 0x1000 // 4K #endif // // Limit Switches // #define X_STOP_PIN PE0 #define Y_STOP_PIN PE1 #define Z_STOP_PIN PE14 // // Z Probe (when not Z_MIN_PIN) // //#ifndef Z_MIN_PROBE_PIN // #define Z_MIN_PROBE_PIN PA4 //#endif // // Filament Runout Sensor // #ifndef FIL_RUNOUT_PIN #define FIL_RUNOUT_PIN PA3 #endif // // Steppers // #ifdef ARMED_SWAP_X_E1 #define X_STEP_PIN PE4 #define X_DIR_PIN PE2 #define X_ENABLE_PIN PE3 #define X_CS_PIN PE5 #else #define X_STEP_PIN PD3 #define X_DIR_PIN PD2 #define X_ENABLE_PIN PD0 #define X_CS_PIN PD1 #endif #define Y_STEP_PIN PE11 #define Y_DIR_PIN PE10 #define Y_ENABLE_PIN PE13 #define Y_CS_PIN PE12 #define Z_STEP_PIN PD6 #define Z_DIR_PIN PD7 #define Z_ENABLE_PIN PD4 #define Z_CS_PIN PD5 #define E0_STEP_PIN PB5 #define E0_DIR_PIN PB6 #ifdef ARMED_V1_1 #define E0_ENABLE_PIN PC12 #else #define E0_ENABLE_PIN PB3 #endif #define E0_CS_PIN PB4 #ifdef ARMED_SWAP_X_E1 #define E1_STEP_PIN PD3 #define E1_DIR_PIN PD2 #define E1_ENABLE_PIN PD0 #define E1_CS_PIN PD1 #else #define E1_STEP_PIN PE4 #define E1_DIR_PIN PE2 #define E1_ENABLE_PIN PE3 #define E1_CS_PIN PE5 #endif // // Temperature Sensors // #define TEMP_0_PIN PC0 // Analog Input #define TEMP_1_PIN PC1 // Analog Input #define TEMP_BED_PIN PC2 // Analog Input #if HOTENDS == 1 && TEMP_SENSOR_PROBE #define TEMP_PROBE_PIN PC1 #endif // // Heaters / Fans // #define HEATER_0_PIN PA1 // Hardware PWM #define HEATER_1_PIN PA2 // Hardware PWM #define HEATER_BED_PIN PA0 // Hardware PWM #define FAN0_PIN PC6 // Hardware PWM, Part cooling fan #define FAN1_PIN PC7 // Hardware PWM, Extruder fan #define FAN2_PIN PC8 // Hardware PWM, Controller fan // // Misc functions // #define SDSS PE7 #define LED_PIN PB7 // Heart beat #define PS_ON_PIN PA10 #define KILL_PIN PA8 #define PWR_LOSS PA4 // Power loss / nAC_FAULT // // LCD / Controller // #define SD_DETECT_PIN PA15 #define BEEPER_PIN PC9 #if ENABLED(FYSETC_MINI_12864) // // See https://wiki.fysetc.com/Mini12864_Panel/ // #define DOGLCD_A0 PE9 #define DOGLCD_CS PE8 #define LCD_BACKLIGHT_PIN -1 #define LCD_RESET_PIN PB12 // Must be high or open for LCD to operate normally. #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN PB13 #endif #ifndef RGB_LED_G_PIN #define RGB_LED_G_PIN PB14 #endif #ifndef RGB_LED_B_PIN #define RGB_LED_B_PIN PB15 #endif #elif ENABLED(FYSETC_MINI_12864_2_1) #define NEOPIXEL_PIN PB13 #endif #else #define LCD_PINS_RS PE9 #define LCD_PINS_EN PE8 #define LCD_PINS_D4 PB12 #define LCD_PINS_D5 PB13 #define LCD_PINS_D6 PB14 #define LCD_PINS_D7 PB15 #if ENABLED(MKS_MINI_12864) #define DOGLCD_CS PB13 #define DOGLCD_A0 PB14 #endif #endif #define BTN_EN1 PC4 #define BTN_EN2 PC5 #define BTN_ENC PC3 // // Extension pins // #define EXT0_PIN PB0 #define EXT1_PIN PB1 #define EXT2_PIN PB2 #define EXT3_PIN PD8 #define EXT4_PIN PD9 #define EXT5_PIN PD10 #define EXT6_PIN PD11 #define EXT7_PIN PD12 #define EXT8_PIN PB10 #define EXT9_PIN PB11 #if HAS_TMC_UART // TMC2208/TMC2209 stepper drivers #define X_SERIAL_TX_PIN EXT0_PIN #define X_SERIAL_RX_PIN EXT0_PIN #define Y_SERIAL_TX_PIN EXT1_PIN #define Y_SERIAL_RX_PIN EXT1_PIN #define Z_SERIAL_TX_PIN EXT2_PIN #define Z_SERIAL_RX_PIN EXT2_PIN #define E0_SERIAL_TX_PIN EXT3_PIN #define E0_SERIAL_RX_PIN EXT3_PIN #define E1_SERIAL_RX_PIN EXT4_PIN #define E1_SERIAL_TX_PIN EXT4_PIN #define Z2_SERIAL_RX_PIN EXT4_PIN #define Z2_SERIAL_TX_PIN EXT4_PIN #ifndef TMC_BAUD_RATE #define TMC_BAUD_RATE 19200 #endif #endif // HAS_TMC_UART
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_ARMED.h
C
agpl-3.0
7,122
/** * Marlin 3D Printer Firmware * Copyright (c) 2021 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 HAS_MULTI_HOTEND || E_STEPPERS > 1 #error "Artillery Ruby only supports 1 hotend / E stepper." #endif #define BOARD_INFO_NAME "Artillery Ruby" #if NO_EEPROM_SELECTED #define FLASH_EEPROM_EMULATION //#define I2C_EEPROM #endif //#define E2END 0xFFF // 4K #define HAL_TIMER_RATE F_CPU // // Limit Switches // #if (X_HOME_DIR == 1) #define X_MIN_PIN -1 #define X_MAX_PIN PA2 #else #define X_MIN_PIN PA2 #define X_MAX_PIN -1 #endif #if (Y_HOME_DIR == 1) #define Y_MIN_PIN -1 #define Y_MAX_PIN PA1 #else #define Y_MIN_PIN PA1 #define Y_MAX_PIN -1 #endif #if (Z_HOME_DIR == 1) #define Z_MIN_PIN PC2 #define Z_MAX_PIN PA0 #else #define Z_MIN_PIN PA0 #define Z_MAX_PIN PC2 #endif // // Steppers // #define X_STEP_PIN PB14 #define X_DIR_PIN PB13 #define X_ENABLE_PIN PB15 #define Y_STEP_PIN PB10 #define Y_DIR_PIN PB2 #define Y_ENABLE_PIN PB12 #define Z_STEP_PIN PB0 #define Z_DIR_PIN PC5 #define Z_ENABLE_PIN PB1 #define E0_STEP_PIN PA7 #define E0_DIR_PIN PA6 #define E0_ENABLE_PIN PC4 #define E1_STEP_PIN PA4 #define E1_DIR_PIN PA3 #define E1_ENABLE_PIN PA5 // // Temperature Sensors // #define TEMP_0_PIN PC0 #define TEMP_BED_PIN PC1 // // Heaters / Fans // #ifndef HEATER_0_PIN #define HEATER_0_PIN PC9 // Heater0 #endif #ifndef HEATER_BED_PIN #define HEATER_BED_PIN PA8 // Hotbed #endif #ifndef FAN0_PIN #define FAN0_PIN PC8 // Fan0 #endif #ifndef FAN1_PIN #define FAN1_PIN PC7 // Fan1 #endif #ifndef FAN2_PIN #define FAN2_PIN PC6 // Fan2 #endif // // Servos // #define SERVO0_PIN PC3 // // SPI // #define SCK_PIN PC10 #define MISO_PIN PC11 #define MOSI_PIN PC12 // // LCD / Controller // #if HAS_WIRED_LCD #if ANY(MKS_12864OLED, MKS_12864OLED_SSD1306) #define LCD_PINS_DC PB8 // Set as output on init #define LCD_PINS_RS PB9 // Pull low for 1s to init // DOGM SPI LCD Support #define DOGLCD_CS PC15 #define DOGLCD_MOSI PB6 #define DOGLCD_SCK PB5 #define DOGLCD_A0 LCD_PINS_DC #elif ENABLED(FYSETC_MINI_12864) #define DOGLCD_CS PB6 #define DOGLCD_A0 PC15 //#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 PB5 // Must be high or open for LCD to operate normally. #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN PB9 #endif #ifndef RGB_LED_G_PIN #define RGB_LED_G_PIN PB8 #endif #ifndef RGB_LED_B_PIN #define RGB_LED_B_PIN PB7 #endif #elif ENABLED(FYSETC_MINI_12864_2_1) #define NEOPIXEL_PIN PB9 #endif #define LCD_CONTRAST_INIT 255 #else #define LCD_PINS_RS PC15 #define LCD_PINS_EN PB6 #define LCD_PINS_D4 PB5 #define LCD_PINS_D5 PB9 #define LCD_PINS_D6 PB8 #endif #define LCD_PINS_D7 PB7 // // Beeper, SD Card, Encoder // #define BEEPER_PIN PC13 #if HAS_MEDIA #define SDSS PA15 #define SD_DETECT_PIN PD2 #endif #define BTN_EN1 PB4 #define BTN_EN2 PB3 #define BTN_ENC PC14 #endif
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_ARTILLERY_RUBY.h
C
agpl-3.0
5,576
/** * Marlin 3D Printer Firmware * Copyright (c) 2023 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 #if NOT_TARGET(STM32F4) #error "Oops! Select an STM32F4 board in 'Tools > Board.'" #elif HOTENDS > 1 || E_STEPPERS > 1 #error "STM32F401CCU6 boards support one hotend / E-steppers only." #endif #include "env_validate.h" #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "I3DBEE BP_01" #endif #define TEMP_TIMER 5 //#define DISABLE_DEBUG // DISABLE_(DEBUG|JTAG) is not supported for STM32F4. //#define DISABLE_JTAG //#define ALLOW_STM32F4 //#define BOARD_NO_NATIVE_USB // // EEPROM // #if NO_EEPROM_SELECTED #define FLASH_EEPROM_EMULATION #define FLASH_EEPROM_LEVELING #define FLASH_SECTOR (FLASH_SECTOR_TOTAL - 1) #define FLASH_UNIT_SIZE 0x4000 // 16kB #define MARLIN_EEPROM_SIZE FLASH_UNIT_SIZE #undef NO_EEPROM_SELECTED #endif /* #if NO_EEPROM_SELECTED #define IIC_BL24CXX_EEPROM // EEPROM on I2C-0 #define SDCARD_EEPROM_EMULATION #endif */ // // Limit Switches // #define X_STOP_PIN PB9 #define Y_STOP_PIN PB3 #define Z_STOP_PIN PA9 // // Steppers // #define X_STEP_PIN PB7 #define X_DIR_PIN PB6 #define X_ENABLE_PIN PB8 #define Y_STEP_PIN PB5 #define Y_DIR_PIN PB4 #define Y_ENABLE_PIN X_ENABLE_PIN #define Z_STEP_PIN PA15 #define Z_DIR_PIN PA10 #define Z_ENABLE_PIN X_ENABLE_PIN #define E0_STEP_PIN PA8 #define E0_DIR_PIN PB15 #define E0_ENABLE_PIN X_ENABLE_PIN // // Temperature Sensors // #define TEMP_0_PIN PB1 // Analog Input (HOTEND thermistor) #define TEMP_BED_PIN PB0 // Analog Input (BED thermistor) // // Heaters / Fans // #define HEATER_0_PIN PA2 // HOTEND MOSFET #define HEATER_BED_PIN PA0 // BED MOSFET #define FAN0_PIN PA1 // FAN1 header on board - PRINT FAN // // SD Card // #define SDSS PA4 #define SD_DETECT_PIN -1 #define SD_SCK_PIN PA5 #define SD_MISO_PIN PA6 #define SD_MOSI_PIN PA7 /** * ------ ------ * (BEEPER) PB10 | 1 2 | PC13 (BTN_ENC) (MISO) PA6 | 1 2 | PA5 (SCK) * (LCD_EN) PB13 | 3 4 | PB12 (LCD_RS) (BTN_EN1) PC15 | 3 4 | PA4 (SD_SS) * (LCD_D4) PB14 5 6 | PA3 (LCD_D5) (BTN_EN2) PC14 5 6 | PA7 (MOSI) * (LCD_D6) - | 7 8 | - (LCD_D7) (SD_DET) - | 7 8 | RESET * GND | 9 10 | 5V GND | 9 10 | - * ------ ------ * EXP1 EXP2 */ #define EXP1_01_PIN PB10 // BEEPER #define EXP1_02_PIN PC13 // ENC #define EXP1_03_PIN PB13 // EN #define EXP1_04_PIN PB12 // RS #define EXP1_05_PIN PB14 // D4 #define EXP1_06_PIN PA3 // D5 #define EXP1_07_PIN -1 #define EXP1_08_PIN -1 #define EXP2_01_PIN PA6 // MISO #define EXP2_02_PIN PA5 // SCK #define EXP2_03_PIN PC15 // EN1 #define EXP2_04_PIN PA4 // SS #define EXP2_05_PIN PC14 // EN2 #define EXP2_06_PIN PA7 // MOSI #define EXP2_07_PIN -1 #define EXP2_08_PIN -1 // RESET #define EXP2_10_PIN -1 // // LCD / Controller // #if HAS_WIRED_LCD #define BEEPER_PIN EXP1_01_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN #define BTN_ENC EXP1_02_PIN #define LCD_PINS_RS EXP1_04_PIN #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN #define LCD_PINS_D5 EXP1_06_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 ENABLED(FYSETC_MINI_12864_2_1) #define NEOPIXEL_PIN EXP1_06_PIN #endif #endif // // GLCD features // //#define LCD_CONTRAST 190 // // Dcreen orientation // //#define LCD_SCREEN_ROT_90 //#define LCD_SCREEN_ROT_180 //#define LCD_SCREEN_ROT_270 #endif
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h
C
agpl-3.0
5,887
/** * Marlin 3D Printer Firmware * Copyright (c) 2023 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" #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "Custom Blackpill" #endif #ifndef DEFAULT_MACHINE_NAME #define DEFAULT_MACHINE_NAME "SLA Printer" #endif #define DISABLE_DEBUG false // DISABLE_(DEBUG|JTAG) is not supported for STM32F4. #define ALLOW_STM32F4 #define BOARD_NO_NATIVE_USB // // EEPROM // #if NO_EEPROM_SELECTED #define IIC_BL24CXX_EEPROM // EEPROM on I2C-0 //#define SDCARD_EEPROM_EMULATION #endif // // Servos // #if !defined(SERVO0_PIN) && !defined(HAS_PIN_27_BOARD) #define SERVO0_PIN PC13 // BLTouch OUT #endif #define LED_PIN PC13 // // Limit Switches // #define Z_STOP_PIN PA15 #define X_STOP_PIN PA11 #define Y_STOP_PIN PA12 // // Filament Runout Sensor // #define FIL_RUNOUT_PIN PB15 // "Pulled-high" // // Steppers // #define X_STEP_PIN PB0 #define X_DIR_PIN PB1 #define X_ENABLE_PIN PB2 // Shared #define Y_STEP_PIN PB3 #define Y_DIR_PIN PB4 #define Y_ENABLE_PIN X_ENABLE_PIN #define Z_STEP_PIN PB8 #define Z_DIR_PIN PB5 #define Z_ENABLE_PIN X_ENABLE_PIN #define E0_STEP_PIN PB9 #define E0_DIR_PIN PB10 #define E0_ENABLE_PIN X_ENABLE_PIN // // Temperature Sensors // #define TEMP_0_PIN PA0 // TH1 #define TEMP_BED_PIN PA1 // TB1 // // Heaters / Fans // #define HEATER_BED_PIN PA2 // HOT BED #define FAN1_PIN PA8 // extruder fan #define HEATER_0_PIN PA3 // HEATER1 // // Encoder pins // #if ENABLED(OLED_PANEL_TINYBOY2) #define BTN_EN1 PB12 #define BTN_EN2 PB13 #define BTN_ENC PB14 #define BEEPER_PIN PC15 #endif // // SD Card // #define ONBOARD_SPI_DEVICE 1 // #define ONBOARD_SD_CS_PIN PA4 // SDSS #define SD_DETECT_PIN -1 #define SDCARD_CONNECTION ONBOARD //#define ONBOARD_SDIO #define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer #if SD_CONNECTION_IS(ONBOARD) #define SDSS PA4 #define SD_SCK_PIN PA5 #define SD_MISO_PIN PA6 #define SD_MOSI_PIN PA7 #endif // Pins for documentation and sanity checks only. // Changing these will not change the pin they are on. // Hardware UART pins #define UART1_TX_PIN PA9 // default uses CH340 RX #define UART1_RX_PIN PA10 // default uses CH340 TX #define UART2_TX_PIN PA2 // default uses HEATER_BED_PIN #define UART2_RX_PIN PA3 // not connected #define UART3_TX_PIN PB10 // default uses LCD connector #define UART3_RX_PIN PB11 // default uses LCD connector #define UART4_TX_PIN PC10 // default uses sdcard SDIO_D2 #define UART4_RX_PIN PC11 // default uses sdcard SDIO_D3 #define UART5_TX_PIN PC12 // default uses sdcard SDIO_CK #define UART5_RX_PIN PD2 // default uses sdcard SDIO_CMD
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_BLACKPILL_CUSTOM.h
C
agpl-3.0
4,551
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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 with RAMPS-like shield * 'Black' STM32F407VET6 board - https://www.stm32duino.com/viewtopic.php?t=485 * Shield - https://github.com/jmz52/Hardware */ #define ALLOW_STM32DUINO #include "env_validate.h" #if HOTENDS > 2 || E_STEPPERS > 2 #error "Black STM32F4VET6 supports up to 2 hotends / E steppers." #endif #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "Black STM32F4VET6" #endif #define DEFAULT_MACHINE_NAME "STM32F407VET6" //#define I2C_EEPROM #define SRAM_EEPROM_EMULATION #define MARLIN_EEPROM_SIZE 0x2000 // 8K // // Servos // #define SERVO0_PIN PC6 #define SERVO1_PIN PC7 // // Limit Switches // #define X_MIN_PIN PC13 #define X_MAX_PIN PA15 #define Y_MIN_PIN PA5 #define Y_MAX_PIN PD12 #define Z_MIN_PIN PD14 #define Z_MAX_PIN PD15 // // Steppers // #define X_STEP_PIN PC4 #define X_DIR_PIN PA4 #define X_ENABLE_PIN PE7 #define Y_STEP_PIN PE5 #define Y_DIR_PIN PE2 #define Y_ENABLE_PIN PE6 #define Z_STEP_PIN PD5 #define Z_DIR_PIN PD3 #define Z_ENABLE_PIN PD6 #define E0_STEP_PIN PD7 #define E0_DIR_PIN PD0 #define E0_ENABLE_PIN PB9 #define E1_STEP_PIN PE0 #define E1_DIR_PIN PE1 #define E1_ENABLE_PIN PB8 // // Temperature Sensors // #define TEMP_0_PIN PC0 // T0 #define TEMP_1_PIN PC1 // T1 #define TEMP_BED_PIN PC2 // TB #ifndef TEMP_CHAMBER_PIN #define TEMP_CHAMBER_PIN PC3 // TC #endif // // Heaters / Fans // #define HEATER_0_PIN PA2 // Heater0 #define HEATER_1_PIN PA3 // Heater1 #define HEATER_BED_PIN PA1 // Hotbed #define FAN0_PIN PE9 // Fan0 #define FAN1_PIN PE11 // Fan1 #define FAN2_PIN PE13 // Fan2 #define FAN3_PIN PE14 // Fan3 // // Misc. Functions // #define LED_PIN PA6 //#define LED_PIN PA7 #define KILL_PIN PB1 // // LCD / Controller // //#define SD_DETECT_PIN PC5 //#define SD_DETECT_PIN PA8 // SDIO SD_DETECT_PIN, external SDIO card reader only #define BEEPER_PIN PD10 #define LCD_PINS_RS PE15 #define LCD_PINS_EN PD8 #define LCD_PINS_D4 PE10 #define LCD_PINS_D5 PE12 #define LCD_PINS_D6 PD1 #define LCD_PINS_D7 PE8 #define BTN_ENC PD9 #define BTN_EN1 PD4 #define BTN_EN2 PD13 #define DOGLCD_CS LCD_PINS_D5 #define DOGLCD_A0 LCD_PINS_D6 #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder #endif // // Onboard SD support // #ifndef SDCARD_CONNECTION #define SDCARD_CONNECTION ONBOARD #endif #if SD_CONNECTION_IS(ONBOARD) #define ONBOARD_SDIO // Use SDIO for onboard SD #if DISABLED(ONBOARD_SDIO) #define SOFTWARE_SPI // Use soft SPI for onboard SD #define SDSS PC11 #define SD_SCK_PIN PC12 #define SD_MISO_PIN PC8 #define SD_MOSI_PIN PD2 #endif #endif
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_BLACK_STM32F407VE.h
C
agpl-3.0
4,973
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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 HAS_MULTI_HOTEND || E_STEPPERS > 1 #error "BIGTREE BTT002 V1.0 only supports 1 hotend / E stepper." #endif #define BOARD_INFO_NAME "BTT BTT002 V1.0" //#define MK3_FAN_PINS #define USES_DIAG_PINS // Ignore temp readings during development. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 // Use one of these or SDCard-based Emulation will be used #if NO_EEPROM_SELECTED //#define SRAM_EEPROM_EMULATION // Use BackSRAM-based EEPROM emulation #define FLASH_EEPROM_EMULATION // Use Flash-based EEPROM emulation #endif #if ENABLED(FLASH_EEPROM_EMULATION) // Decrease delays and flash wear by spreading writes across the // 128 kB sector allocated for EEPROM emulation. #define FLASH_EEPROM_LEVELING #endif // // Limit Switches // #define X_STOP_PIN PD3 #define Y_STOP_PIN PD2 #define Z_STOP_PIN PD1 // Shares J4 connector with PC3 // // Z Probe must be this pin // #ifndef Z_MIN_PROBE_PIN #define Z_MIN_PROBE_PIN PD1 #endif // // Filament Runout Sensor // #ifndef FIL_RUNOUT_PIN #define FIL_RUNOUT_PIN PA15 #endif // // Power Loss Detection // #ifndef POWER_LOSS_PIN #define POWER_LOSS_PIN PD4 #endif // // Steppers // #define X_STEP_PIN PA9 #define X_DIR_PIN PA10 #define X_ENABLE_PIN PA8 #ifndef X_CS_PIN #define X_CS_PIN PE2 #endif #define Y_STEP_PIN PC8 #define Y_DIR_PIN PC9 #define Y_ENABLE_PIN PC7 #ifndef Y_CS_PIN #define Y_CS_PIN PE3 #endif #define Z_STEP_PIN PD15 #define Z_DIR_PIN PC6 #define Z_ENABLE_PIN PD14 #ifndef Z_CS_PIN #define Z_CS_PIN PE4 #endif #define E0_STEP_PIN PD12 #define E0_DIR_PIN PD13 #define E0_ENABLE_PIN PD11 #ifndef E0_CS_PIN #define E0_CS_PIN PD7 #endif // // SPI pins for TMC2130 stepper drivers // #ifndef TMC_SPI_MOSI #define TMC_SPI_MOSI PB15 #endif #ifndef TMC_SPI_MISO #define TMC_SPI_MISO PB14 #endif #ifndef TMC_SPI_SCK #define TMC_SPI_SCK PB13 #endif #if HAS_TMC_UART /** * TMC2208/TMC2209 stepper drivers * * Hardware serial communication ports. * If undefined software serial is used according to the pins below */ //#define X_HARDWARE_SERIAL Serial1 //#define X2_HARDWARE_SERIAL Serial1 //#define Y_HARDWARE_SERIAL Serial1 //#define Y2_HARDWARE_SERIAL Serial1 //#define Z_HARDWARE_SERIAL Serial1 //#define Z2_HARDWARE_SERIAL Serial1 //#define E0_HARDWARE_SERIAL Serial1 //#define E1_HARDWARE_SERIAL Serial1 //#define E2_HARDWARE_SERIAL Serial1 //#define E3_HARDWARE_SERIAL Serial1 //#define E4_HARDWARE_SERIAL Serial1 #define X_SERIAL_TX_PIN PE2 #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 PE4 #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PD7 #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE #define TMC_BAUD_RATE 19200 #endif #endif // HAS_TMC_UART // // Temperature Sensors // #define TEMP_0_PIN PA2 // T0 <-> E0 #define TEMP_1_PIN PA0 // T1 <-> E1 #define TEMP_BED_PIN PA1 // T2 <-> Bed #define TEMP_PROBE_PIN PC3 // Shares J4 connector with PD1 #ifndef TEMP_BOARD_PIN #define TEMP_BOARD_PIN PC2 // Onboard thermistor, NTC100K #endif // // Heaters / Fans // #define HEATER_0_PIN PE6 // Heater0 #define HEATER_BED_PIN PE5 // Hotbed #ifndef FAN0_PIN #ifdef MK3_FAN_PINS #define FAN0_PIN PB8 // Fan1 #else #define FAN0_PIN PB9 // Fan0 #endif #endif #ifndef FAN1_PIN #ifdef MK3_FAN_PINS #define FAN1_PIN PB9 // Fan0 #else #define FAN1_PIN PB8 // Fan1 #endif #endif #ifndef E0_FAN_TACHO_PIN #ifdef MK3_FAN_PINS #define E0_FAN_TACHO_PIN PE1 // Fan1 #else #define E0_FAN_TACHO_PIN PE0 // Fan0 #endif #endif /** * ------ ------ * (BEEPER) PE7 | 1 2 | PB1 (BTN_ENC) (MISO) PA6 | 1 2 | PA5 (SCK) * (LCD_EN) PE9 | 3 4 | PE8 (LCD_RS) (BTN_EN1) PC5 | 3 4 | PA4 (SD_SS) * (LCD_D4) PE10 5 6 | PE11 (LCD_D5) (BTN_EN2) PB0 5 6 | PA7 (MOSI) * (LCD_D6) PE12 | 7 8 | PE13 (LCD_D7) (SD_DET) PC4 | 7 8 | RESET * GND | 9 10 | 5V GND | 9 10 | PA3 * ------ ------ * EXP1 EXP2 */ #define EXP1_01_PIN PE7 #define EXP1_02_PIN PB1 #define EXP1_03_PIN PE9 #define EXP1_04_PIN PE8 #define EXP1_05_PIN PE10 #define EXP1_06_PIN PE11 #define EXP1_07_PIN PE12 #define EXP1_08_PIN PE13 #define EXP2_01_PIN PA6 #define EXP2_02_PIN PA5 #define EXP2_03_PIN PC5 #define EXP2_04_PIN PA4 #define EXP2_05_PIN PB0 #define EXP2_06_PIN PA7 #define EXP2_07_PIN PC4 #define EXP2_08_PIN -1 #define EXP2_10_PIN PA3 // HAL SPI1 pins #define SD_SCK_PIN EXP2_02_PIN // SPI1 SCLK #define SD_SS_PIN EXP2_04_PIN // SPI1 SSEL #define SD_MISO_PIN EXP2_01_PIN // SPI1 MISO #define SD_MOSI_PIN EXP2_06_PIN // SPI1 MOSI #define SDSS EXP2_04_PIN // // LCD / Controller // #if HAS_WIRED_LCD #define BEEPER_PIN EXP1_01_PIN #define BTN_ENC EXP1_02_PIN #define SD_DETECT_PIN EXP2_07_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_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #elif ENABLED(MKS_MINI_12864) #define DOGLCD_A0 EXP1_07_PIN #define DOGLCD_CS EXP1_06_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN #else #define LCD_PINS_RS EXP1_04_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN #define LCD_PINS_EN 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 DOGLCD_MOSI EXP2_06_PIN #define DOGLCD_MISO EXP2_01_PIN #define DOGLCD_SCK EXP2_02_PIN #define LCD_BACKLIGHT_PIN -1 #define FORCE_SOFT_SPI #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. #if ANY(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 // Alter timing for graphical display #if IS_U8GLIB_ST7920 #define BOARD_ST7920_DELAY_1 96 #define BOARD_ST7920_DELAY_2 48 #define BOARD_ST7920_DELAY_3 600 #endif #endif // HAS_WIRED_LCD // // RGB LEDs // #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN PB5 #endif #ifndef RGB_LED_G_PIN #define RGB_LED_G_PIN PB4 #endif #ifndef RGB_LED_B_PIN #define RGB_LED_B_PIN PB3 #endif #ifndef RGB_LED_W_PIN #define RGB_LED_W_PIN -1 #endif
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h
C
agpl-3.0
10,215
/** * Marlin 3D Printer Firmware * Copyright (c) 2021 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 #if NOT_TARGET(STM32F4) #error "Oops! Select an STM32F4 board in 'Tools > Board.'" #endif #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "BTT E3 RRF" #endif #define USES_DIAG_JUMPERS // Add-on board for IDEX conversion //#define BTT_E3_RRF_IDEX_BOARD // Onboard I2C EEPROM #define I2C_EEPROM #define MARLIN_EEPROM_SIZE 0x1000 // 4K // // Servos // #define SERVO0_PIN PB0 // SERVOS // // Limit Switches // #define X_STOP_PIN PC0 // X-STOP #define Y_STOP_PIN PC1 // Y-STOP #define Z_STOP_PIN PC2 // Z-STOP #if ENABLED(BTT_E3_RRF_IDEX_BOARD) #define X2_STOP_PIN FPC2_PIN // X2-STOP #endif // // Z Probe must be this pin // #define Z_MIN_PROBE_PIN PC5 // PROBE // // Probe enable // #if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) #define PROBE_ENABLE_PIN SERVO0_PIN #endif // // Filament Runout Sensor // #ifndef FIL_RUNOUT_PIN #define FIL_RUNOUT_PIN PC3 // E0-STOP #endif #if !defined(FIL1_RUNOUT2_PIN) && ENABLED(BTT_E3_RRF_IDEX_BOARD) #define FIL_RUNOUT2_PIN FPC3_PIN // E1-STOP #endif // // Power-loss Detection // #ifndef POWER_LOSS_PIN #define POWER_LOSS_PIN PE0 // Power Loss Detection: PWR-DET #endif // // Steppers // #define X_ENABLE_PIN PD7 #define X_STEP_PIN PD5 #define X_DIR_PIN PD4 #define Y_ENABLE_PIN PD3 #define Y_STEP_PIN PD0 #define Y_DIR_PIN PA15 #define Z_ENABLE_PIN PD14 #define Z_STEP_PIN PC6 #define Z_DIR_PIN PC7 #define E0_ENABLE_PIN PD10 #define E0_STEP_PIN PD12 #define E0_DIR_PIN PD13 #if ENABLED(BTT_E3_RRF_IDEX_BOARD) #define E1_ENABLE_PIN FPC7_PIN // E1EN #define E1_STEP_PIN FPC5_PIN // E1STP #define E1_DIR_PIN FPC4_PIN // E1DIR #define X2_ENABLE_PIN FPC13_PIN // X2EN #define X2_STEP_PIN FPC11_PIN // X2STP #define X2_DIR_PIN FPC10_PIN // X2DIR #endif /** * TMC2208/TMC2209 stepper drivers */ #if HAS_TMC_UART #define X_SERIAL_TX_PIN PD6 #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PD1 #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PD15 #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PD11 #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #if ENABLED(BTT_E3_RRF_IDEX_BOARD) #define X2_SERIAL_TX_PIN FPC12_PIN // X2UART #define X2_SERIAL_RX_PIN X2_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN FPC6_PIN // E1UART #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN #endif // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE #define TMC_BAUD_RATE 19200 #endif #endif // HAS_TMC_UART // // Temperature Sensors // #define TEMP_BED_PIN PA1 // Analog Input "TB" #define TEMP_0_PIN PA0 // Analog Input "TH0" #if ENABLED(BTT_E3_RRF_IDEX_BOARD) #define TEMP_1_PIN FPC9_PIN // Analog Input "TH1" #define PT100_PIN FPC8_PIN // Analog Input "PT100" (INA826) #endif // // Heaters / Fans // #define HEATER_BED_PIN PB4 // "HB" #define HEATER_0_PIN PB3 // "HE0" #if ENABLED(BTT_E3_RRF_IDEX_BOARD) #define HEATER_1_PIN FPC16_PIN // "HE1" #endif #define FAN0_PIN PB5 // "FAN0" #ifndef CONTROLLER_FAN_PIN #define CONTROLLER_FAN_PIN PB6 // "FAN1" #endif #if ENABLED(BTT_E3_RRF_IDEX_BOARD) #define FAN1_PIN FPC15_PIN // "FAN0" in IDEX board #define FAN2_PIN FPC14_PIN // "FAN1" in IDEX board #else //#define FAN1_PIN PB6 // "FAN1" #endif // // Misc. Functions // #ifndef BOARD_NEOPIXEL_PIN #define BOARD_NEOPIXEL_PIN PB7 // LED driving pin #endif #ifndef PS_ON_PIN #define PS_ON_PIN PE1 // Power Supply Control #endif /** ------ * (BEEPER) PE8 | 1 2 | PE9 (BTN_ENC) * (BTN_EN1) PE7 | 3 4 | RESET * (BTN_EN2) PB2 5 6 | PE10 (LCD_D4) * (LCD_RS) PB1 | 7 8 | PE11 (LCD_EN) * GND | 9 10 | 5V * ------ * EXP1 */ #define EXP1_01_PIN PE8 #define EXP1_02_PIN PE9 #define EXP1_03_PIN PE7 #define EXP1_04_PIN -1 // RESET #define EXP1_05_PIN PB2 #define EXP1_06_PIN PE10 #define EXP1_07_PIN PB1 #define EXP1_08_PIN PE11 #if HAS_WIRED_LCD #if ANY(CR10_STOCKDISPLAY, LCD_FOR_MELZI) #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_D4 EXP1_06_PIN #define LCD_PINS_RS EXP1_07_PIN #define LCD_PINS_EN EXP1_08_PIN #if ENABLED(LCD_FOR_MELZI) #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING #error "CAUTION! LCD_FOR_MELZI requires wiring modifications. See 'pins_BTT_E3_RRF.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" #endif /** LCD_FOR_MELZI display pinout * * BTT E3 RRF Display Ribbon * ------ ------ * (BEEPER) PE8 | 1 2 | PE9 (BTN_ENC) GND |10 9 | 5V * (BTN_EN1) PE7 | 3 4 | RESET BEEPER | 8 7 | ESTOP (RESET) * (BTN_EN2) PB2 5 6 | PE10 (LCD_D4) (BTN_ENC) ENC_BTN | 6 5 | LCD_SCLK (LCD_D4) * (LCD_RS) PB1 | 7 8 | PE11 (LCD_EN) (BTN_EN2) ENC_A | 4 3 | LCD_DATA (LCD_EN) * GND | 9 10 | 5V (BTN_EN1) ENC_B | 2 1 | LCD_CS (LCD_RS) * ------ ------ * EXP1 LCD * * Needs custom cable: * * Board Adapter Display Ribbon (coming from display) * ---------------------------------- * EXP1-10 ---------- LCD-9 5V * EXP1-9 ----------- LCD-10 GND * EXP1-8 ----------- LCD-3 LCD_EN * EXP1-7 ----------- LCD-1 LCD_RS * EXP1-6 ----------- LCD-5 LCD_D4 * EXP1-5 ----------- LCD-4 EN2 * EXP1-4 ----------- LCD-7 RESET * EXP1-3 ----------- LCD-2 EN1 * EXP1-2 ----------- LCD-6 BTN * EXP1-1 ----------- LCD-8 BEEPER */ #endif #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_E3_RRF.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" #endif #define LCD_PINS_RS EXP1_06_PIN #define LCD_PINS_EN 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 PB0 // Repurpose servo pin for ADC - CONNECTING TO 5V WILL DAMAGE THE BOARD! #elif ANY(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_E3_RRF.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" #endif /** * TFTGLCD_PANEL_SPI display pinout * * Board Display * ------ ------ * (SD_DET) PE8 | 1 2 | PE9 (BEEPER) 5V |10 9 | GND * (MOD_RESET) PE7 | 3 4 | RESET -- | 8 7 | (SD_DET) * (SD_CS) PB2 5 6 | PE10 (MOSI) 6 5 | -- * (LCD_CS) PB1 | 7 8 | PE11 (SD_CS) | 4 3 | (LCD_CS) * GND | 9 10 | 5V (SCK) | 2 1 | (MISO) * ------ ------ * EXP1 EXP1 * * Needs custom cable: * * Board Adapter Display * ---------------------------------- * EXP1-10 ---------- EXP1-10 5V * EXP1-9 ----------- EXP1-9 GND * SPI1-4 ----------- EXP1-6 MOSI * EXP1-7 ----------- n/c * SPI1-3 ----------- EXP1-2 SCK * EXP1-5 ----------- EXP1-4 SD_CS * EXP1-4 ----------- n/c * EXP1-3 ----------- EXP1-3 LCD_CS * SPI1-1 ----------- EXP1-1 MISO * EXP1-1 ----------- EXP1-7 SD_DET */ #define TFTGLCD_CS EXP1_03_PIN #endif #else #error "Only CR10_STOCKDISPLAY, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, MKS_MINI_12864, LCD_FOR_MELZI, and TFTGLCD_PANEL_(SPI|I2C) are currently supported on the BTT_E3_RRF." #endif // Alter timing for graphical display #if ENABLED(LCD_FOR_MELZI) // LCD_FOR_MELZI default timing is too fast. This works but may be reduced. #define BOARD_ST7920_DELAY_1 200 #define BOARD_ST7920_DELAY_2 400 #define BOARD_ST7920_DELAY_3 1200 #elif IS_U8GLIB_ST7920 #define BOARD_ST7920_DELAY_1 96 #define BOARD_ST7920_DELAY_2 48 #define BOARD_ST7920_DELAY_3 600 #endif #endif // HAS_WIRED_LCD #if ALL(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING #error "CAUTION! LCD_FYSETC_TFT81050 requires wiring modifications. See 'pins_BTT_E3_RRF.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" #endif /** FYSETC TFT TFT81050 display pinout * * Board Display * ------ ------ * (SD_DET) PE8 | 1 2 | PE9 (BEEPER) 5V |10 9 | GND * (MOD_RESET) PE7 | 3 4 | RESET RESET | 8 7 | (SD_DET) * (SD_CS) PB2 5 6 | PE10 (MOSI) | 6 5 | (LCD_CS) * (LCD_CS) PB1 | 7 8 | PE11 (SD_CS) | 4 3 | (MOD_RESET) * GND | 9 10 | 5V (SCK) | 2 1 | (MISO) * ------ ------ * EXP1 EXP1 * * Needs custom cable: * * Board Adapter Display * ---------------------------------- * EXP1-10 ---------- EXP1-10 5V * EXP1-9 ----------- EXP1-9 GND * SPI1-4 ----------- EXP1-6 MOSI * EXP1-7 ----------- EXP1-5 LCD_CS * SPI1-3 ----------- EXP1-2 SCK * EXP1-5 ----------- EXP1-4 SD_CS * EXP1-4 ----------- EXP1-8 RESET * EXP1-3 ----------- EXP1-3 MOD_RST * SPI1-1 ----------- EXP1-1 MISO * EXP1-1 ----------- EXP1-7 SD_DET */ #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(ONBOARD) #define ONBOARD_SDIO // Use SDIO for onboard SD //#define SDIO_CLOCK 48000000 #define SD_DETECT_PIN PC4 #elif SD_CONNECTION_IS(CUSTOM_CABLE) #error "SD CUSTOM_CABLE is not compatible with BTT E3 RRF." #endif #if ENABLED(WIFISUPPORT) // // WIFI // #define ESP_WIFI_MODULE_COM 3 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this #define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2 #define ESP_WIFI_MODULE_RESET_PIN PA4 #define ESP_WIFI_MODULE_ENABLE_PIN PA5 #define ESP_WIFI_MODULE_GPIO0_PIN PA6 #endif #if ENABLED(BTT_E3_RRF_IDEX_BOARD) #define FPC2_PIN PB11 #define FPC3_PIN PB10 #define FPC4_PIN PE12 #define FPC5_PIN PE13 #define FPC6_PIN PE14 #define FPC7_PIN PE15 #define FPC8_PIN PA3 #define FPC9_PIN PA2 #define FPC10_PIN PA8 #define FPC11_PIN PC15 #define FPC12_PIN PC14 #define FPC13_PIN PC13 #define FPC14_PIN PE6 #define FPC15_PIN PE5 #define FPC16_PIN PE4 #define FPC17_PIN PE3 #endif
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h
C
agpl-3.0
15,091
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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 E_STEPPERS > MAX_E_STEPPERS #error "Marlin extruder/hotends limit! Increase MAX_E_STEPPERS to continue." #elif HOTENDS > 8 || E_STEPPERS > 8 #error "BIGTREE GTR V1.0 supports up to 8 hotends / E steppers." #endif #define BOARD_INFO_NAME "BTT GTR V1.0" #define USES_DIAG_PINS // DIAG jumpers rendered useless due to a board design error #define HAS_OTG_USB_HOST_SUPPORT // USB Flash Drive support #define M5_EXTENDER // The M5 extender is attached // Onboard I2C EEPROM #define I2C_EEPROM #define MARLIN_EEPROM_SIZE 0x2000 // 8K (24C64) // // Servos // #define SERVO0_PIN PB11 // BLTOUCH #define SOL0_PIN PC7 // Toolchanger #if ENABLED(TOOL_SENSOR) #define TOOL_SENSOR1_PIN PH6 #define TOOL_SENSOR2_PIN PI4 //#define TOOL_SENSOR3_PIN PF4 #else #define PS_ON_PIN PH6 #endif // // Trinamic Stallguard pins // #define X_DIAG_PIN PF2 // X- #define Y_DIAG_PIN PC13 // Y- #define Z_DIAG_PIN PE0 // Z- #define E0_DIAG_PIN PG14 // X+ #define E1_DIAG_PIN PG9 // Y+ #define E2_DIAG_PIN PD3 // Z+ // // Limit Switches // #ifdef X_STALL_SENSITIVITY #define X_STOP_PIN X_DIAG_PIN #if X_HOME_TO_MIN #define X_MAX_PIN E0_DIAG_PIN // X+ #else #define X_MIN_PIN E0_DIAG_PIN // X+ #endif #else #define X_MIN_PIN X_DIAG_PIN // X- #define X_MAX_PIN E0_DIAG_PIN // X+ #endif #ifdef Y_STALL_SENSITIVITY #define Y_STOP_PIN Y_DIAG_PIN #if Y_HOME_TO_MIN #define Y_MAX_PIN E1_DIAG_PIN // Y+ #else #define Y_MIN_PIN E1_DIAG_PIN // Y+ #endif #else #define Y_MIN_PIN Y_DIAG_PIN // Y- #define Y_MAX_PIN E1_DIAG_PIN // Y+ #endif #ifdef Z_STALL_SENSITIVITY #define Z_STOP_PIN Z_DIAG_PIN #if Z_HOME_TO_MIN #define Z_MAX_PIN E2_DIAG_PIN // Z+ #else #define Z_MIN_PIN E2_DIAG_PIN // Z+ #endif #else #define Z_MIN_PIN Z_DIAG_PIN // Z- #define Z_MAX_PIN E2_DIAG_PIN // Z+ #endif // // Pins on the extender // #if ENABLED(M5_EXTENDER) #define USES_DIAG_JUMPERS // DIAG jumpers work on M5 extender #ifndef X2_STOP_PIN #define X2_STOP_PIN PI4 // M5 M1_STOP #endif #ifndef Y2_STOP_PIN #define Y2_STOP_PIN PF12 // M5 M5_STOP #endif #ifndef Z2_STOP_PIN #define Z2_STOP_PIN PF4 // M5 M2_STOP #endif #ifndef Z3_STOP_PIN #define Z3_STOP_PIN PI7 // M5 M4_STOP #endif #ifndef Z4_STOP_PIN #define Z4_STOP_PIN PF6 // M5 M3_STOP #endif #endif #ifndef Z_MIN_PROBE_PIN #define Z_MIN_PROBE_PIN PH11 // Z Probe must be PH11 #endif // // Probe enable // #if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) #define PROBE_ENABLE_PIN SERVO0_PIN #endif // // Steppers // #define X_STEP_PIN PC15 #define X_DIR_PIN PF0 #define X_ENABLE_PIN PF1 #ifndef X_CS_PIN #define X_CS_PIN PC14 #endif #define Y_STEP_PIN PE3 #define Y_DIR_PIN PE2 #define Y_ENABLE_PIN PE4 #ifndef Y_CS_PIN #define Y_CS_PIN PE1 #endif #define Z_STEP_PIN PB8 #define Z_DIR_PIN PB7 // PB7 #define Z_ENABLE_PIN PB9 #ifndef Z_CS_PIN #define Z_CS_PIN PB5 #endif #define E0_STEP_PIN PG12 #define E0_DIR_PIN PG11 #define E0_ENABLE_PIN PG13 #ifndef E0_CS_PIN #define E0_CS_PIN PG10 #endif #define E1_STEP_PIN PD6 #define E1_DIR_PIN PD5 #define E1_ENABLE_PIN PD7 #ifndef E1_CS_PIN #define E1_CS_PIN PD4 #endif #define E2_STEP_PIN PD1 #define E2_DIR_PIN PD0 #define E2_ENABLE_PIN PD2 #ifndef E2_CS_PIN #define E2_CS_PIN PC12 #endif #if ENABLED(M5_EXTENDER) #define E3_STEP_PIN PF3 #define E3_DIR_PIN PG3 #define E3_ENABLE_PIN PF8 #ifndef E3_CS_PIN #define E3_CS_PIN PG4 #endif #define E4_STEP_PIN PD14 #define E4_DIR_PIN PD11 #define E4_ENABLE_PIN PG2 #ifndef E4_CS_PIN #define E4_CS_PIN PE15 #endif #define E5_STEP_PIN PE12 #define E5_DIR_PIN PE10 #define E5_ENABLE_PIN PF14 #ifndef E5_CS_PIN #define E5_CS_PIN PE7 #endif #define E6_STEP_PIN PG0 #define E6_DIR_PIN PG1 #define E6_ENABLE_PIN PE8 #ifndef E6_CS_PIN #define E6_CS_PIN PF15 #endif #define E7_STEP_PIN PH12 #define E7_DIR_PIN PH15 #define E7_ENABLE_PIN PI0 #ifndef E7_CS_PIN #define E7_CS_PIN PH14 #endif #endif // // SPI pins for TMC2130 stepper drivers // #ifndef TMC_SPI_MOSI #define TMC_SPI_MOSI PG15 #endif #ifndef TMC_SPI_MISO #define TMC_SPI_MISO PB6 #endif #ifndef TMC_SPI_SCK #define TMC_SPI_SCK PB3 #endif #if HAS_TMC_UART /** * TMC2208/TMC2209 stepper drivers * * Hardware serial communication ports. * If undefined software serial is used according to the pins below */ //#define X_HARDWARE_SERIAL Serial1 //#define X2_HARDWARE_SERIAL Serial1 //#define Y_HARDWARE_SERIAL Serial1 //#define Y2_HARDWARE_SERIAL Serial1 //#define Z_HARDWARE_SERIAL Serial1 //#define Z2_HARDWARE_SERIAL Serial1 //#define E0_HARDWARE_SERIAL Serial1 //#define E1_HARDWARE_SERIAL Serial1 //#define E2_HARDWARE_SERIAL Serial1 //#define E3_HARDWARE_SERIAL Serial1 // M5 MOTOR 1 //#define E4_HARDWARE_SERIAL Serial1 // M5 MOTOR 2 //#define E5_HARDWARE_SERIAL Serial1 // M5 MOTOR 3 //#define E6_HARDWARE_SERIAL Serial1 // M5 MOTOR 4 //#define E7_HARDWARE_SERIAL Serial1 // M5 MOTOR 5 #define X_SERIAL_TX_PIN PC14 #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PE1 #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PB5 #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PG10 #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 PC12 #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN #if ENABLED(M5_EXTENDER) #define E3_SERIAL_TX_PIN PG4 #define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN #define E4_SERIAL_TX_PIN PE15 #define E4_SERIAL_RX_PIN E4_SERIAL_TX_PIN #define E5_SERIAL_TX_PIN PE7 #define E5_SERIAL_RX_PIN E5_SERIAL_TX_PIN #define E6_SERIAL_TX_PIN PF15 #define E6_SERIAL_RX_PIN E6_SERIAL_TX_PIN #define E7_SERIAL_TX_PIN PH14 #define E7_SERIAL_RX_PIN E7_SERIAL_TX_PIN #endif // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE #define TMC_BAUD_RATE 19200 #endif #endif // HAS_TMC_UART // // Temperature Sensors // #define TEMP_0_PIN PC1 // T1 <-> E0 #define TEMP_1_PIN PC2 // T2 <-> E1 #define TEMP_2_PIN PC3 // T3 <-> E2 #if ENABLED(M5_EXTENDER) #define TEMP_3_PIN PA3 // M5 TEMP1 #define TEMP_4_PIN PF9 // M5 TEMP2 #define TEMP_5_PIN PF10 // M5 TEMP3 #define TEMP_6_PIN PF7 // M5 TEMP4 #define TEMP_7_PIN PF5 // M5 TEMP5 #endif #define TEMP_BED_PIN PC0 // T0 <-> Bed // SPI for MAX Thermocouple // Uses a separate SPI bus // If you have a two-way thermocouple, you can customize two TEMP_x_CS_PIN pins (x:0~1) #define TEMP_0_CS_PIN PH9 // GTR K-TEMP #define TEMP_0_SCK_PIN PI1 // SCK #define TEMP_0_MISO_PIN PI2 // MISO //#define TEMP_0_MOSI_PIN ... // For MAX31865 #define TEMP_1_CS_PIN PH2 // M5 K-TEMP #define TEMP_1_SCK_PIN TEMP_0_SCK_PIN #define TEMP_1_MISO_PIN TEMP_0_MISO_PIN //#define TEMP_1_MOSI_PIN TEMP_0_MOSI_PIN // // Heaters / Fans // #define HEATER_0_PIN PB1 // Heater0 #define HEATER_1_PIN PA1 // Heater1 #define HEATER_2_PIN PB0 // Heater2 #if ENABLED(M5_EXTENDER) #define HEATER_3_PIN PD15 // M5 HEAT1 #define HEATER_4_PIN PD13 // M5 HEAT2 #define HEATER_5_PIN PD12 // M5 HEAT3 #define HEATER_6_PIN PE13 // M5 HEAT4 #define HEATER_7_PIN PI6 // M5 HEAT5 #endif #define HEATER_BED_PIN PA2 // Hotbed #define FAN0_PIN PE5 // Fan0 #define FAN1_PIN PE6 // Fan1 #define FAN2_PIN PC8 // Fan2 #if ENABLED(M5_EXTENDER) #define FAN3_PIN PI5 // M5 FAN1 #define FAN4_PIN PE9 // M5 FAN2 #define FAN5_PIN PE11 // M5 FAN3 //#define FAN6_PIN PC9 // M5 FAN4 //#define FAN7_PIN PE14 // M5 FAN5 #endif #ifndef SDCARD_CONNECTION #define SDCARD_CONNECTION ONBOARD #endif // // By default the LCD SD (SPI2) is enabled // Onboard SD is on a completely separate SPI bus, and requires // overriding pins to access. // #if SD_CONNECTION_IS(LCD) #define SD_DETECT_PIN EXP2_07_PIN #define SDSS EXP2_04_PIN #elif SD_CONNECTION_IS(ONBOARD) #define SDSS PA4 #define SD_SS_PIN SDSS #define SD_SCK_PIN PA5 #define SD_MISO_PIN PA6 #define SD_MOSI_PIN PA7 #define SD_DETECT_PIN PC4 #elif SD_CONNECTION_IS(CUSTOM_CABLE) #error "CUSTOM_CABLE is not a supported SDCARD_CONNECTION for this board" #endif /** * ------ ------ * (BEEPER) PC11 | 1 2 | PA15 (BTN_ENC) (MISO) PB14 | 1 2 | PB13 (SCK) * (LCD_EN) PC10 | 3 4 | PA8 (LCD_RS) (BTN_EN1) PD10 | 3 4 | PB12 (SD_SS) * (LCD_D4) PG8 5 6 | PG7 (LCD_D5) (BTN_EN2) PH10 5 6 | PB15 (MOSI) * (LCD_D6) PG6 | 7 8 | PG5 (LCD_D7) (SD_DETECT) PB10 | 7 8 | RESET * GND | 9 10 | 5V GND | 9 10 | -- * ------ ------ * EXP1 EXP2 */ #define EXP1_01_PIN PC11 #define EXP1_02_PIN PA15 #define EXP1_03_PIN PC10 #define EXP1_04_PIN PA8 #define EXP1_05_PIN PG8 #define EXP1_06_PIN PG7 #define EXP1_07_PIN PG6 #define EXP1_08_PIN PG5 #define EXP2_01_PIN PB14 #define EXP2_02_PIN PB13 #define EXP2_03_PIN PD10 #define EXP2_04_PIN PB12 #define EXP2_05_PIN PH10 #define EXP2_06_PIN PB15 #define EXP2_07_PIN PB10 // // LCD / Controller // #if ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI) #define TFT_CS_PIN EXP2_04_PIN #define TFT_A0_PIN EXP2_07_PIN #define TFT_SCK_PIN EXP2_02_PIN #define TFT_MISO_PIN EXP2_01_PIN #define TFT_MOSI_PIN EXP2_06_PIN #define TOUCH_INT_PIN EXP1_07_PIN #define TOUCH_MISO_PIN EXP1_06_PIN #define TOUCH_MOSI_PIN EXP1_03_PIN #define TOUCH_SCK_PIN EXP1_05_PIN #define TOUCH_CS_PIN EXP1_04_PIN #define BTN_ENC EXP1_02_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN #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_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #elif ENABLED(MKS_MINI_12864) #define DOGLCD_A0 EXP1_07_PIN #define DOGLCD_CS EXP1_06_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN #if SD_CONNECTION_IS(ONBOARD) #define SOFTWARE_SPI #endif #else #define LCD_PINS_RS EXP1_04_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN #define LCD_PINS_EN 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 #if SD_CONNECTION_IS(ONBOARD) #define SOFTWARE_SPI #endif //#define LCD_BACKLIGHT_PIN -1 #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. #if ANY(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 // Alter timing for graphical display #if IS_U8GLIB_ST7920 #define BOARD_ST7920_DELAY_1 125 #define BOARD_ST7920_DELAY_2 90 #define BOARD_ST7920_DELAY_3 600 #endif #endif // HAS_WIRED_LCD #undef TP #undef M5_EXTENDER
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h
C
agpl-3.0
16,731
/** * Marlin 3D Printer Firmware * Copyright (c) 2021 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_INFO_NAME "BTT OCTOPUS PRO V1.0" // // Temperature Sensors // #define TEMP_0_PIN PF4 // TH0 #if TEMP_SENSOR_0_IS_MAX31865 #define TEMP_0_CS_PIN PF8 // Max31865 CS #define TEMP_0_SCK_PIN PA5 #define TEMP_0_MISO_PIN PA6 #define TEMP_0_MOSI_PIN PA7 #define SOFTWARE_SPI // Max31865 and LCD SD share a set of SPIs, Set SD to softwareSPI for Max31865 #define FORCE_SOFT_SPI #endif #if !defined(Z_MIN_PROBE_PIN) && DISABLED(BLTOUCH) #define Z_MIN_PROBE_PIN PC5 // Probe (Proximity switch) port #endif #include "pins_BTT_OCTOPUS_V1_common.h"
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_PRO_V1_0.h
C
agpl-3.0
1,594
/** * Marlin 3D Printer Firmware * Copyright (c) 2021 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_INFO_NAME "BTT OCTOPUS V1.0" // // Temperature Sensors // #if TEMP_SENSOR_0 == 20 #define TEMP_0_PIN PF8 // PT100 Connector #else #define TEMP_0_PIN PF4 // TH0 #endif #include "pins_BTT_OCTOPUS_V1_common.h"
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_0.h
C
agpl-3.0
1,153
/** * Marlin 3D Printer Firmware * Copyright (c) 2021 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_INFO_NAME "BTT OCTOPUS V1.1" // // Temperature Sensors // #if TEMP_SENSOR_0 == 20 #define TEMP_0_PIN PF8 // PT100 Connector #else #define TEMP_0_PIN PF4 // TH0 #endif #include "pins_BTT_OCTOPUS_V1_common.h"
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_1.h
C
agpl-3.0
1,153
/** * Marlin 3D Printer Firmware * Copyright (c) 2021 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 // The Octopus Pro V1 has shipped with both STM32F4 and STM32H7 MCUs. // Ensure the correct env_validate.h file is included based on the build environment used. #if NOT_TARGET(STM32H7) #include "env_validate.h" #else #include "../stm32h7/env_validate.h" #endif #define HAS_OTG_USB_HOST_SUPPORT // USB Flash Drive support #define USES_DIAG_JUMPERS // Onboard I2C EEPROM #if ANY(NO_EEPROM_SELECTED, I2C_EEPROM) #undef NO_EEPROM_SELECTED #define I2C_EEPROM #define MARLIN_EEPROM_SIZE 0x1000 // 4K (AT24C32) #define SOFT_I2C_EEPROM // Force the use of Software I2C #define I2C_SCL_PIN PB8 #define I2C_SDA_PIN PB9 #endif // Avoid conflict with TIMER_TONE #define STEP_TIMER 8 // // Servos // #define SERVO0_PIN PB6 // // Trinamic Stallguard pins // #define X_DIAG_PIN PG6 // X-STOP #define Y_DIAG_PIN PG9 // Y-STOP #define Z_DIAG_PIN PG10 // Z-STOP #define Z2_DIAG_PIN PG11 // Z2-STOP #define E0_DIAG_PIN PG12 // E0DET #define E1_DIAG_PIN PG13 // E1DET #define E2_DIAG_PIN PG14 // E2DET #define E3_DIAG_PIN PG15 // E3DET // // Limit Switches // #ifdef X_STALL_SENSITIVITY #define X_STOP_PIN X_DIAG_PIN #if X_HOME_TO_MIN #define X_MAX_PIN E0_DIAG_PIN // E0DET #else #define X_MIN_PIN E0_DIAG_PIN // E0DET #endif #elif NEEDS_X_MINMAX #ifndef X_MIN_PIN #define X_MIN_PIN X_DIAG_PIN // X-STOP #endif #ifndef X_MAX_PIN #define X_MAX_PIN E0_DIAG_PIN // E0DET #endif #else #define X_STOP_PIN X_DIAG_PIN // X-STOP #endif #ifdef Y_STALL_SENSITIVITY #define Y_STOP_PIN Y_DIAG_PIN #if Y_HOME_TO_MIN #define Y_MAX_PIN E1_DIAG_PIN // E1DET #else #define Y_MIN_PIN E1_DIAG_PIN // E1DET #endif #elif NEEDS_Y_MINMAX #ifndef Y_MIN_PIN #define Y_MIN_PIN Y_DIAG_PIN // Y-STOP #endif #ifndef Y_MAX_PIN #define Y_MAX_PIN E1_DIAG_PIN // E1DET #endif #else #define Y_STOP_PIN Y_DIAG_PIN // Y-STOP #endif #ifdef Z_STALL_SENSITIVITY #define Z_STOP_PIN Z_DIAG_PIN #if Z_HOME_TO_MIN #define Z_MAX_PIN E2_DIAG_PIN // PWRDET #else #define Z_MIN_PIN E2_DIAG_PIN // PWRDET #endif #elif NEEDS_Z_MINMAX #ifndef Z_MIN_PIN #define Z_MIN_PIN Z_DIAG_PIN // Z-STOP #endif #ifndef Z_MAX_PIN #define Z_MAX_PIN E2_DIAG_PIN // PWRDET #endif #else #define Z_STOP_PIN Z_DIAG_PIN // Z-STOP #endif // // Z Probe (when not Z_MIN_PIN) // #ifndef Z_MIN_PROBE_PIN #define Z_MIN_PROBE_PIN PB7 #endif // // Probe enable // #if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) #define PROBE_ENABLE_PIN SERVO0_PIN #endif // // Filament Runout Sensor // #define FIL_RUNOUT_PIN PG12 // E0DET #define FIL_RUNOUT2_PIN PG13 // E1DET #define FIL_RUNOUT3_PIN PG14 // E2DET #define FIL_RUNOUT4_PIN PG15 // E3DET // // Power Supply Control // #ifndef PS_ON_PIN #define PS_ON_PIN PE11 // PS-ON #endif // // Power Loss Detection // #ifndef POWER_LOSS_PIN #define POWER_LOSS_PIN PC0 // PWRDET #endif // // Misc. Functions // #define LED_PIN PA13 // // Steppers // #define X_STEP_PIN PF13 // MOTOR 0 #define X_DIR_PIN PF12 #define X_ENABLE_PIN PF14 #ifndef X_CS_PIN #define X_CS_PIN PC4 #endif #define Y_STEP_PIN PG0 // MOTOR 1 #define Y_DIR_PIN PG1 #define Y_ENABLE_PIN PF15 #ifndef Y_CS_PIN #define Y_CS_PIN PD11 #endif #define Z_STEP_PIN PF11 // MOTOR 2 #define Z_DIR_PIN PG3 #define Z_ENABLE_PIN PG5 #ifndef Z_CS_PIN #define Z_CS_PIN PC6 #endif #define Z2_STEP_PIN PG4 // MOTOR 3 #define Z2_DIR_PIN PC1 #define Z2_ENABLE_PIN PA0 #ifndef Z2_CS_PIN #define Z2_CS_PIN PC7 #endif #define E0_STEP_PIN PF9 // MOTOR 4 #define E0_DIR_PIN PF10 #define E0_ENABLE_PIN PG2 #ifndef E0_CS_PIN #define E0_CS_PIN PF2 #endif #define E1_STEP_PIN PC13 // MOTOR 5 #define E1_DIR_PIN PF0 #define E1_ENABLE_PIN PF1 #ifndef E1_CS_PIN #define E1_CS_PIN PE4 #endif #define E2_STEP_PIN PE2 // MOTOR 6 #define E2_DIR_PIN PE3 #define E2_ENABLE_PIN PD4 #ifndef E2_CS_PIN #define E2_CS_PIN PE1 #endif #define E3_STEP_PIN PE6 // MOTOR 7 #define E3_DIR_PIN PA14 #define E3_ENABLE_PIN PE0 #ifndef E3_CS_PIN #define E3_CS_PIN PD3 #endif // // Temperature Sensors // #define TEMP_BED_PIN PF3 // TB #define TEMP_1_PIN PF5 // TH1 #define TEMP_2_PIN PF6 // TH2 #define TEMP_3_PIN PF7 // TH3 // // Heaters / Fans // #define HEATER_BED_PIN PA1 // Hotbed #define HEATER_0_PIN PA2 // Heater0 #define HEATER_1_PIN PA3 // Heater1 #define HEATER_2_PIN PB10 // Heater2 #define HEATER_3_PIN PB11 // Heater3 #define FAN0_PIN PA8 // Fan0 #define FAN1_PIN PE5 // Fan1 #define FAN2_PIN PD12 // Fan2 #define FAN3_PIN PD13 // Fan3 #define FAN4_PIN PD14 // Fan4 #define FAN5_PIN PD15 // Fan5 // // SD Support // #ifndef SDCARD_CONNECTION #if HAS_WIRED_LCD && DISABLED(NO_LCD_SDCARD) #define SDCARD_CONNECTION LCD #else #define SDCARD_CONNECTION ONBOARD #endif #endif // // SPI pins for TMC2130 stepper drivers // #ifndef TMC_SPI_MOSI #define TMC_SPI_MOSI PA7 #endif #ifndef TMC_SPI_MISO #define TMC_SPI_MISO PA6 #endif #ifndef TMC_SPI_SCK #define TMC_SPI_SCK PA5 #endif #if HAS_TMC_UART /** * TMC2208/TMC2209 stepper drivers * * Hardware serial communication ports. * If undefined software serial is used according to the pins below */ //#define X_HARDWARE_SERIAL Serial1 //#define X2_HARDWARE_SERIAL Serial1 //#define Y_HARDWARE_SERIAL Serial1 //#define Y2_HARDWARE_SERIAL Serial1 //#define Z_HARDWARE_SERIAL Serial1 //#define Z2_HARDWARE_SERIAL Serial1 //#define E0_HARDWARE_SERIAL Serial1 //#define E1_HARDWARE_SERIAL Serial1 //#define E2_HARDWARE_SERIAL Serial1 //#define E3_HARDWARE_SERIAL Serial1 //#define E4_HARDWARE_SERIAL Serial1 #define X_SERIAL_TX_PIN PC4 #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PD11 #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PC6 #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define Z2_SERIAL_TX_PIN PC7 #define Z2_SERIAL_RX_PIN Z2_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PF2 #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN PE4 #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN #define E2_SERIAL_TX_PIN PE1 #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN #define E3_SERIAL_TX_PIN PD3 #define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE #define TMC_BAUD_RATE 19200 #endif #endif // HAS_TMC_UART /** ------ ------ * (BEEPER) PE8 | 1 2 | PE7 (BTN_ENC) (MISO) PA6 | 1 2 | PA5 (SCK) * (LCD_EN) PE9 | 3 4 | PE10 (LCD_RS) (BTN_EN1) PB2 | 3 4 | PA4 (SD_SS) * (LCD_D4) PE12 5 6 | PE13 (LCD_D5) (BTN_EN2) PB1 5 6 | PA7 (MOSI) * (LCD_D6) PE14 | 7 8 | PE15 (LCD_D7) (SD_DETECT) PC15 | 7 8 | RESET * GND | 9 10 | 5V GND | 9 10 | -- * ------ ------ * EXP1 EXP2 */ #define EXP1_01_PIN PE8 #define EXP1_02_PIN PE7 #define EXP1_03_PIN PE9 #define EXP1_04_PIN PE10 #define EXP1_05_PIN PE12 #define EXP1_06_PIN PE13 #define EXP1_07_PIN PE14 #define EXP1_08_PIN PE15 #define EXP2_01_PIN PA6 #define EXP2_02_PIN PA5 #define EXP2_03_PIN PB1 #define EXP2_04_PIN PA4 #define EXP2_05_PIN PB2 #define EXP2_06_PIN PA7 #define EXP2_07_PIN PC15 #define EXP2_08_PIN -1 // // Onboard SD card // Must use soft SPI because Marlin's default hardware SPI is tied to LCD's EXP2 // #if SD_CONNECTION_IS(ONBOARD) #define ONBOARD_SDIO // Use SDIO for onboard SD #ifndef SD_DETECT_STATE #define SD_DETECT_STATE HIGH #elif SD_DETECT_STATE == LOW #error "BOARD_BTT_OCTOPUS_V1_0 onboard SD requires SD_DETECT_STATE set to HIGH." #endif #define SD_DETECT_PIN PC14 #elif SD_CONNECTION_IS(LCD) #define SDSS PA4 #define SD_SS_PIN SDSS #define SD_SCK_PIN PA5 #define SD_MISO_PIN PA6 #define SD_MOSI_PIN PA7 #define SD_DETECT_PIN PC15 #elif SD_CONNECTION_IS(CUSTOM_CABLE) #error "CUSTOM_CABLE is not a supported SDCARD_CONNECTION for this board" #endif #if ENABLED(BTT_MOTOR_EXPANSION) /** * ------ ------ * M3DIAG | 1 2 | M3RX M3STP | 1 2 | M3DIR * M2DIAG | 3 4 | M2RX M2STP | 3 4 | M2DIR * M1DIAG 5 6 | M1RX M1DIR 5 6 | M1STP * M3EN | 7 8 | M2EN M1EN | 7 8 | -- * GND | 9 10 | -- GND | 9 10 | -- * ------ ------ * EXP1 EXP2 */ // M1 on Driver Expansion Module #define E4_STEP_PIN EXP2_06_PIN #define E4_DIR_PIN EXP2_05_PIN #define E4_ENABLE_PIN EXP2_07_PIN #define E4_DIAG_PIN EXP1_05_PIN #define E4_CS_PIN EXP1_06_PIN #if HAS_TMC_UART #define E4_SERIAL_TX_PIN EXP1_06_PIN #define E4_SERIAL_RX_PIN E4_SERIAL_TX_PIN #endif // M2 on Driver Expansion Module #define E5_STEP_PIN EXP2_03_PIN #define E5_DIR_PIN EXP2_04_PIN #define E5_ENABLE_PIN EXP1_08_PIN #define E5_DIAG_PIN EXP1_03_PIN #define E5_CS_PIN EXP1_04_PIN #if HAS_TMC_UART #define E5_SERIAL_TX_PIN EXP1_04_PIN #define E5_SERIAL_RX_PIN E5_SERIAL_TX_PIN #endif // M3 on Driver Expansion Module #define E6_STEP_PIN EXP2_01_PIN #define E6_DIR_PIN EXP2_02_PIN #define E6_ENABLE_PIN EXP1_07_PIN #define E6_DIAG_PIN EXP1_01_PIN #define E6_CS_PIN EXP1_02_PIN #if HAS_TMC_UART #define E6_SERIAL_TX_PIN EXP1_02_PIN #define E6_SERIAL_RX_PIN E6_SERIAL_TX_PIN #endif #endif // BTT_MOTOR_EXPANSION // // LCD / Controller // #if IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) #define TFTGLCD_CS EXP2_03_PIN #endif #elif HAS_DWIN_E3V2 || IS_DWIN_MARLINUI /** * ------ ------ --- * | 1 2 | | 1 2 | 1 | * | 3 4 | RX | 3 4 | TX | 2 | RX * ENT 5 6 | BEEP ENT 5 6 | BEEP | 3 | TX * B | 7 8 | A B | 7 8 | A | 4 | * GND | 9 10 | VCC GND | 9 10 | VCC 5 | * ------ ------ --- * EXP1 DWIN TFT * * DWIN pins are labeled as printed on DWIN PCB. GND, VCC, A, B, ENT & BEEP can be connected in the same * orientation as the existing plug/DWIN to EXP1. TX/RX need to be connected to the TFT port, with TX->RX, RX->TX. */ #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING #error "CAUTION! Ender-3 V2 display requires a custom cable. See 'pins_BTT_OCTOPUS_V1_common.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" #endif #define BEEPER_PIN EXP1_06_PIN #define BTN_EN1 EXP1_08_PIN #define BTN_EN2 EXP1_07_PIN #define BTN_ENC EXP1_05_PIN #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_EN 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_EN 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 ANY(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 #if HAS_SPI_TFT #define TFT_CS_PIN EXP2_04_PIN #define TFT_A0_PIN EXP2_07_PIN #define TFT_SCK_PIN EXP2_02_PIN #define TFT_MISO_PIN EXP2_01_PIN #define TFT_MOSI_PIN EXP2_06_PIN #define TOUCH_INT_PIN EXP1_07_PIN #define TOUCH_MISO_PIN EXP1_06_PIN #define TOUCH_MOSI_PIN EXP1_03_PIN #define TOUCH_SCK_PIN EXP1_05_PIN #define TOUCH_CS_PIN EXP1_04_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN #define BTN_ENC EXP1_02_PIN #endif // // NeoPixel LED // #ifndef BOARD_NEOPIXEL_PIN #define BOARD_NEOPIXEL_PIN PB0 #endif #if ENABLED(WIFISUPPORT) // // WIFI // /** * ------- * GND | 9 | | 8 | 3.3V * (ESP-CS) PB12 | 10 | | 7 | PB15 (ESP-MOSI) * 3.3V | 11 | | 6 | PB14 (ESP-MISO) * (ESP-IO0) PD7 | 12 | | 5 | PB13 (ESP-CLK) * (ESP-IO4) PD10 | 13 | | 4 | -- * -- | 14 | | 3 | PE15 (ESP-EN) * (ESP-RX) PD8 | 15 | | 2 | -- * (ESP-TX) PD9 | 16 | | 1 | PE14 (ESP-RST) * ------- * WIFI */ #define ESP_WIFI_MODULE_COM 3 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this #define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2 #define ESP_WIFI_MODULE_RESET_PIN PG7 #define ESP_WIFI_MODULE_ENABLE_PIN PG8 #define ESP_WIFI_MODULE_GPIO0_PIN PD7 #define ESP_WIFI_MODULE_GPIO4_PIN PD10 #endif
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h
C
agpl-3.0
18,517
/** * 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 HAS_MULTI_HOTEND || 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 ANY(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 // // Probe enable // #if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) #define PROBE_ENABLE_PIN SERVO0_PIN #endif // // 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 BOARD_NEOPIXEL_PIN #define BOARD_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 static_assert(X_SLAVE_ADDRESS == 0, "X_SLAVE_ADDRESS must be 0 for BOARD_BTT_SKR_MINI_E3_V3_0_1."); static_assert(Y_SLAVE_ADDRESS == 2, "Y_SLAVE_ADDRESS must be 2 for BOARD_BTT_SKR_MINI_E3_V3_0_1."); static_assert(Z_SLAVE_ADDRESS == 1, "Z_SLAVE_ADDRESS must be 1 for BOARD_BTT_SKR_MINI_E3_V3_0_1."); static_assert(E0_SLAVE_ADDRESS == 3, "E0_SLAVE_ADDRESS must be 3 for BOARD_BTT_SKR_MINI_E3_V3_0_1."); #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 FAN0_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_EN 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_EN 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 ANY(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 ALL(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) && (ALL(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
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h
C
agpl-3.0
12,542
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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 #if HOTENDS > 3 || E_STEPPERS > 3 #error "BIGTREE SKR Pro V1.1 supports up to 3 hotends / E steppers." #endif #define BOARD_INFO_NAME "BTT SKR Pro V1.1" #include "pins_BTT_SKR_PRO_common.h"
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_V1_1.h
C
agpl-3.0
1,070
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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 #if HOTENDS > 3 || E_STEPPERS > 3 #error "BIGTREE SKR Pro V1.2 supports up to 3 hotends / E steppers." #endif #define BOARD_INFO_NAME "BTT SKR Pro V1.2" #include "pins_BTT_SKR_PRO_common.h"
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_V1_2.h
C
agpl-3.0
1,070
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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" #define USES_DIAG_PINS // If you have the BigTreeTech driver expansion module, enable BTT_MOTOR_EXPANSION // https://github.com/bigtreetech/BTT-Expansion-module/tree/master/BTT%20EXP-MOT //#define BTT_MOTOR_EXPANSION #if ALL(HAS_WIRED_LCD, BTT_MOTOR_EXPANSION) #if ANY(CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY) #define EXP_MOT_USE_EXP2_ONLY 1 #else #error "You can't use both an LCD and a Motor Expansion Module on EXP1/EXP2 at the same time." #endif #endif // Use one of these or SDCard-based Emulation will be used #if NO_EEPROM_SELECTED //#define SRAM_EEPROM_EMULATION // Use BackSRAM-based EEPROM emulation #define FLASH_EEPROM_EMULATION // Use Flash-based EEPROM emulation #endif #if ENABLED(FLASH_EEPROM_EMULATION) // Decrease delays and flash wear by spreading writes across the // 128 kB sector allocated for EEPROM emulation. #define FLASH_EEPROM_LEVELING #endif #define HAS_OTG_USB_HOST_SUPPORT // USB Flash Drive support // // Servos // #define SERVO0_PIN PA1 #define SERVO1_PIN PC9 // // Trinamic Stallguard pins // #define X_DIAG_PIN PB10 // X- #define Y_DIAG_PIN PE12 // Y- #define Z_DIAG_PIN PG8 // Z- #define E0_DIAG_PIN PE15 // E0 #define E1_DIAG_PIN PE10 // E1 #define E2_DIAG_PIN PG5 // E2 // // Limit Switches // #ifdef X_STALL_SENSITIVITY #define X_STOP_PIN X_DIAG_PIN #if X_HOME_TO_MIN #define X_MAX_PIN PE15 // E0 #else #define X_MIN_PIN PE15 // E0 #endif #else #define X_MIN_PIN PB10 // X- #define X_MAX_PIN PE15 // E0 #endif #ifdef Y_STALL_SENSITIVITY #define Y_STOP_PIN Y_DIAG_PIN #if Y_HOME_TO_MIN #define Y_MAX_PIN PE10 // E1 #else #define Y_MIN_PIN PE10 // E1 #endif #else #define Y_MIN_PIN PE12 // Y- #define Y_MAX_PIN PE10 // E1 #endif #ifdef Z_STALL_SENSITIVITY #define Z_STOP_PIN Z_DIAG_PIN #if Z_HOME_TO_MIN #define Z_MAX_PIN PG5 // E2 #else #define Z_MIN_PIN PG5 // E2 #endif #else #define Z_MIN_PIN PG8 // Z- #define Z_MAX_PIN PG5 // E2 #endif // // Z Probe must be this pin // #ifndef Z_MIN_PROBE_PIN #define Z_MIN_PROBE_PIN PA2 #endif // // Probe enable // #if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) #define PROBE_ENABLE_PIN SERVO0_PIN #endif // // Filament Runout Sensor // #ifndef FIL_RUNOUT_PIN #define FIL_RUNOUT_PIN PE15 #endif #ifndef FIL_RUNOUT2_PIN #define FIL_RUNOUT2_PIN PE10 #endif #ifndef FIL_RUNOUT3_PIN #define FIL_RUNOUT3_PIN PG5 #endif // // Steppers // #define X_STEP_PIN PE9 #define X_DIR_PIN PF1 #define X_ENABLE_PIN PF2 #ifndef X_CS_PIN #define X_CS_PIN PA15 #endif #define Y_STEP_PIN PE11 #define Y_DIR_PIN PE8 #define Y_ENABLE_PIN PD7 #ifndef Y_CS_PIN #define Y_CS_PIN PB8 #endif #define Z_STEP_PIN PE13 #define Z_DIR_PIN PC2 #define Z_ENABLE_PIN PC0 #ifndef Z_CS_PIN #define Z_CS_PIN PB9 #endif #define E0_STEP_PIN PE14 #define E0_DIR_PIN PA0 #define E0_ENABLE_PIN PC3 #ifndef E0_CS_PIN #define E0_CS_PIN PB3 #endif #define E1_STEP_PIN PD15 #define E1_DIR_PIN PE7 #define E1_ENABLE_PIN PA3 #ifndef E1_CS_PIN #define E1_CS_PIN PG15 #endif #define E2_STEP_PIN PD13 #define E2_DIR_PIN PG9 #define E2_ENABLE_PIN PF0 #ifndef E2_CS_PIN #define E2_CS_PIN PG12 #endif // // SPI pins for TMC2130 stepper drivers // #ifndef TMC_SPI_MOSI #define TMC_SPI_MOSI PC12 #endif #ifndef TMC_SPI_MISO #define TMC_SPI_MISO PC11 #endif #ifndef TMC_SPI_SCK #define TMC_SPI_SCK PC10 #endif #if HAS_TMC_UART /** * TMC2208/TMC2209 stepper drivers * * Hardware serial communication ports. * If undefined software serial is used according to the pins below */ //#define X_HARDWARE_SERIAL Serial1 //#define X2_HARDWARE_SERIAL Serial1 //#define Y_HARDWARE_SERIAL Serial1 //#define Y2_HARDWARE_SERIAL Serial1 //#define Z_HARDWARE_SERIAL Serial1 //#define Z2_HARDWARE_SERIAL Serial1 //#define E0_HARDWARE_SERIAL Serial1 //#define E1_HARDWARE_SERIAL Serial1 //#define E2_HARDWARE_SERIAL Serial1 //#define E3_HARDWARE_SERIAL Serial1 //#define E4_HARDWARE_SERIAL Serial1 #define X_SERIAL_TX_PIN PC13 #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 PE1 #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PD4 #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN PD1 #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN #define E2_SERIAL_TX_PIN PD6 #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE #define TMC_BAUD_RATE 19200 #endif #endif // HAS_TMC_UART // // Temperature Sensors // Use ADC pins without pullup for sensors that don't need a pullup. // #if TEMP_SENSOR_0_IS_AD8495 || TEMP_SENSOR_0 == 20 #define TEMP_0_PIN PF8 #else #define TEMP_0_PIN PF4 // T1 <-> E0 #endif #if TEMP_SENSOR_1_IS_AD8495 || TEMP_SENSOR_1 == 20 #define TEMP_1_PIN PF9 #else #define TEMP_1_PIN PF5 // T2 <-> E1 #endif #if TEMP_SENSOR_2_IS_AD8495 || TEMP_SENSOR_2 == 20 #define TEMP_2_PIN PF10 #else #define TEMP_2_PIN PF6 // T3 <-> E2 #endif #if TEMP_SENSOR_BED_IS_AD8495 || TEMP_SENSOR_BED == 20 #define TEMP_BED_PIN PF7 #else #define TEMP_BED_PIN PF3 // T0 <-> Bed #endif #if TEMP_SENSOR_PROBE && !defined(TEMP_PROBE_PIN) #if TEMP_SENSOR_PROBE_IS_AD8495 || TEMP_SENSOR_PROBE == 20 #if HOTENDS == 2 #define TEMP_PROBE_PIN PF10 #elif HOTENDS < 2 #define TEMP_PROBE_PIN PF9 #endif #else #if HOTENDS == 2 #define TEMP_PROBE_PIN TEMP_2_PIN #elif HOTENDS < 2 #define TEMP_PROBE_PIN TEMP_1_PIN #endif #endif #endif #if TEMP_SENSOR_CHAMBER && !defined(TEMP_CHAMBER_PIN) #if TEMP_SENSOR_CHAMBER_IS_AD8495 || TEMP_SENSOR_CHAMBER == 20 #define TEMP_CHAMBER_PIN PF10 #else #define TEMP_CHAMBER_PIN TEMP_2_PIN #endif #endif // // Heaters // #define HEATER_0_PIN PB1 // Heater0 #define HEATER_1_PIN PD14 // Heater1 #if TEMP_SENSOR_CHAMBER && HOTENDS < 3 #define HEATER_CHAMBER_PIN PB0 // Heater2 #else #define HEATER_2_PIN PB0 // Heater2 #endif #define HEATER_BED_PIN PD12 // Hotbed // // Fans // #define FAN0_PIN PC8 // Fan0 #define FAN1_PIN PE5 // Fan1 #ifndef E0_AUTO_FAN_PIN #define E0_AUTO_FAN_PIN FAN1_PIN #endif #if !defined(CONTROLLER_FAN_PIN) && ENABLED(USE_CONTROLLER_FAN) && HOTENDS < 2 #define CONTROLLER_FAN_PIN PE6 // Fan2 #else #define FAN2_PIN PE6 // Fan2 #endif // // Misc. Functions // #ifndef SDCARD_CONNECTION #define SDCARD_CONNECTION ONBOARD #endif /** ------ ------ * (BEEPER) PG4 | 1 2 | PA8 (BTN_ENC) (MISO) PB14 | 1 2 | PB13 (SCK) * (LCD_EN) PD11 | 3 4 | PD10 (LCD_RS) (BTN_EN1) PG10 | 3 4 | PB12 (SD_SS) * (LCD_D4) PG2 5 6 | PG3 (LCD_D5) (BTN_EN2) PF11 5 6 | PB15 (MOSI) * (LCD_D6) PG6 | 7 8 | PG7 (LCD_D7) (SD_DETECT) PF12 | 7 8 | RESET * GND | 9 10 | 5V GND | 9 10 | -- * ------ ------ * EXP1 EXP2 */ #define EXP1_01_PIN PG4 #define EXP1_02_PIN PA8 #define EXP1_03_PIN PD11 #define EXP1_04_PIN PD10 #define EXP1_05_PIN PG2 #define EXP1_06_PIN PG3 #define EXP1_07_PIN PG6 #define EXP1_08_PIN PG7 #define EXP2_01_PIN PB14 #define EXP2_02_PIN PB13 #define EXP2_03_PIN PG10 #define EXP2_04_PIN PB12 #define EXP2_05_PIN PF11 #define EXP2_06_PIN PB15 #define EXP2_07_PIN PF12 #define EXP2_08_PIN -1 // // Onboard SD card // Must use soft SPI because Marlin's default hardware SPI is tied to LCD's EXP2 // #if SD_CONNECTION_IS(LCD) #define SD_DETECT_PIN EXP2_07_PIN #define SDSS EXP2_04_PIN #elif SD_CONNECTION_IS(ONBOARD) // The SKR Pro's ONBOARD SD interface is on SPI1. // Due to a pull resistor on the clock line, it needs to use SPI Data Mode 3 to // function with Hardware SPI. This is not currently configurable in the HAL, // so force Software SPI to work around this issue. #define SOFTWARE_SPI #define SDSS PA4 #define SD_SCK_PIN PA5 #define SD_MISO_PIN PA6 #define SD_MOSI_PIN PB5 #define SD_DETECT_PIN PB11 #elif SD_CONNECTION_IS(CUSTOM_CABLE) #error "CUSTOM_CABLE is not a supported SDCARD_CONNECTION for this board" #endif #if ENABLED(BTT_MOTOR_EXPANSION) /** ----- ----- * -- | . . | GND -- | . . | GND * -- | . . | M1EN M2EN | . . | M3EN * M1STP | . . M1DIR M1RX | . . M1DIAG * M2DIR | . . | M2STP M2RX | . . | M2DIAG * M3DIR | . . | M3STP M3RX | . . | M3DIAG * ----- ----- * EXP2 EXP1 * * NB In EXP_MOT_USE_EXP2_ONLY mode EXP1 is not used and M2EN and M3EN need to be jumpered to M1EN */ // M1 on Driver Expansion Module #define E3_STEP_PIN EXP2_06_PIN #define E3_DIR_PIN EXP2_05_PIN #define E3_ENABLE_PIN EXP2_07_PIN #if !EXP_MOT_USE_EXP2_ONLY #define E3_DIAG_PIN EXP1_05_PIN #define E3_CS_PIN EXP1_06_PIN #if HAS_TMC_UART #define E3_SERIAL_TX_PIN EXP1_06_PIN #define E3_SERIAL_RX_PIN EXP1_06_PIN #endif #endif // M2 on Driver Expansion Module #define E4_STEP_PIN EXP2_03_PIN #define E4_DIR_PIN EXP2_04_PIN #if !EXP_MOT_USE_EXP2_ONLY #define E4_ENABLE_PIN EXP1_08_PIN #define E4_DIAG_PIN EXP1_03_PIN #define E4_CS_PIN EXP1_04_PIN #if HAS_TMC_UART #define E4_SERIAL_TX_PIN EXP1_04_PIN #define E4_SERIAL_RX_PIN EXP1_04_PIN #endif #else #define E4_ENABLE_PIN EXP2_07_PIN #endif // M3 on Driver Expansion Module #define E5_STEP_PIN EXP2_01_PIN #define E5_DIR_PIN EXP2_02_PIN #if !EXP_MOT_USE_EXP2_ONLY #define E5_ENABLE_PIN EXP1_07_PIN #define E5_DIAG_PIN EXP1_01_PIN #define E5_CS_PIN EXP1_02_PIN #if HAS_TMC_UART #define E5_SERIAL_TX_PIN EXP1_02_PIN #define E5_SERIAL_RX_PIN EXP1_02_PIN #endif #else #define E5_ENABLE_PIN EXP2_07_PIN #endif #endif // BTT_MOTOR_EXPANSION // // LCD / Controller // #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_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #elif ENABLED(MKS_MINI_12864) #define DOGLCD_A0 EXP1_07_PIN #define DOGLCD_CS EXP1_06_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN #elif ENABLED(WYH_L12864) #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING #error "CAUTION! WYH_L12864 requires wiring modifications. See 'pins_BTT_SKR_PRO_common.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" #endif /** * 1. Cut the tab off the LCD connector so it can be plugged into the "EXP1" connector the other way. * 2. Swap the LCD's +5V (Pin2) and GND (Pin1) wires. * * !!! If you are unsure, ask for help! Your motherboard may be damaged in some circumstances !!! * * The WYH_L12864 connector plug: * * BEFORE AFTER * ------ ------ * -- | 1 2 | MOSI -- | 1 2 | MOSI * BTN_ENC | 3 4 | SCK BTN_ENC | 3 4 | SCK * BTN_EN1 | 5 6 SID BTN_EN1 | 5 6 SID * BTN_EN2 | 7 8 | CS BTN_EN2 | 7 8 | CS * 5V | 9 10 | GND GND | 9 10 | 5V * ------ ------ * LCD LCD */ #undef BEEPER_PIN #undef BTN_ENC #define BTN_EN1 EXP1_05_PIN #define BTN_EN2 EXP1_07_PIN #define BTN_ENC EXP1_03_PIN #define DOGLCD_CS EXP1_08_PIN #define DOGLCD_A0 EXP1_06_PIN #define DOGLCD_SCK EXP1_04_PIN #define DOGLCD_MOSI EXP1_02_PIN #define LCD_BACKLIGHT_PIN -1 #else #define LCD_PINS_RS EXP1_04_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN #define LCD_PINS_EN 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 ANY(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 #ifndef BOARD_ST7920_DELAY_1 #define BOARD_ST7920_DELAY_1 125 #endif #ifndef BOARD_ST7920_DELAY_2 #define BOARD_ST7920_DELAY_2 90 #endif #ifndef BOARD_ST7920_DELAY_3 #define BOARD_ST7920_DELAY_3 600 #endif #endif #if ENABLED(WIFISUPPORT) // // WIFI // /** * ------ * RX | 8 7 | 3.3V GPIO0 PF14 ... Leave as unused (ESP3D software configures this with a pullup so OK to leave as floating) * GPIO0 | 6 5 | Reset GPIO2 PF15 ... must be high (ESP3D software configures this with a pullup so OK to leave as floating) * GPIO2 | 4 3 | Enable Reset PG0 ... active low, probably OK to leave floating * GND | 2 1 | TX Enable PG1 ... Must be high for module to run * ------ * W1 */ #define ESP_WIFI_MODULE_COM 6 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this #define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2 #define ESP_WIFI_MODULE_RESET_PIN PG0 #define ESP_WIFI_MODULE_ENABLE_PIN PG1 #define ESP_WIFI_MODULE_GPIO0_PIN PF14 #define ESP_WIFI_MODULE_GPIO2_PIN PF15 #endif
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h
C
agpl-3.0
18,798
/** * Marlin 3D Printer Firmware * Copyright (c) 2021 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_INFO_NAME "BTT SKR V2 Rev.A" #error "SKR V2 Rev.A requires modification or drivers may be damaged. See https://bit.ly/3t5d9JQ for more information. Comment out this line to continue." #define DISABLE_DRIVER_SAFE_POWER_PROTECT #include "pins_BTT_SKR_V2_0_common.h"
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_REV_A.h
C
agpl-3.0
1,156
/** * Marlin 3D Printer Firmware * Copyright (c) 2021 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_INFO_NAME "BTT SKR V2 Rev.B" #include "pins_BTT_SKR_V2_0_common.h"
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_REV_B.h
C
agpl-3.0
958
/** * Marlin 3D Printer Firmware * Copyright (c) 2021 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" #define USES_DIAG_JUMPERS // If you have the BigTreeTech driver expansion module, enable BTT_MOTOR_EXPANSION // https://github.com/bigtreetech/BTT-Expansion-module/tree/master/BTT%20EXP-MOT //#define BTT_MOTOR_EXPANSION #if ALL(HAS_WIRED_LCD, BTT_MOTOR_EXPANSION) #if ANY(CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY) #define EXP_MOT_USE_EXP2_ONLY 1 #else #error "You can't use both an LCD and a Motor Expansion Module on EXP1/EXP2 at the same time." #endif #endif // Use one of these or SDCard-based Emulation will be used #if NO_EEPROM_SELECTED //#define SRAM_EEPROM_EMULATION // Use BackSRAM-based EEPROM emulation #define FLASH_EEPROM_EMULATION // Use Flash-based EEPROM emulation #endif #if ENABLED(FLASH_EEPROM_EMULATION) // Decrease delays and flash wear by spreading writes across the // 128 kB sector allocated for EEPROM emulation. #define FLASH_EEPROM_LEVELING #endif #define HAS_OTG_USB_HOST_SUPPORT // USB Flash Drive support // Avoid conflict with TIMER_TONE #define STEP_TIMER 10 // // Servos // #define SERVO0_PIN PE5 // // Trinamic Stallguard pins // #define X_DIAG_PIN PC1 // X-STOP #define Y_DIAG_PIN PC3 // Y-STOP #define Z_DIAG_PIN PC0 // Z-STOP #define E0_DIAG_PIN PC2 // E0DET #define E1_DIAG_PIN PA0 // E1DET // // Limit Switches // #ifdef X_STALL_SENSITIVITY #define X_STOP_PIN X_DIAG_PIN #if X_HOME_TO_MIN #define X_MAX_PIN PC2 // E0DET #else #define X_MIN_PIN PC2 // E0DET #endif #elif ENABLED(X_DUAL_ENDSTOPS) #ifndef X_MIN_PIN #define X_MIN_PIN PC1 // X-STOP #endif #ifndef X_MAX_PIN #define X_MAX_PIN PC2 // E0DET #endif #else #define X_STOP_PIN PC1 // X-STOP #endif #ifdef Y_STALL_SENSITIVITY #define Y_STOP_PIN Y_DIAG_PIN #if Y_HOME_TO_MIN #define Y_MAX_PIN PA0 // E1DET #else #define Y_MIN_PIN PA0 // E1DET #endif #elif ENABLED(Y_DUAL_ENDSTOPS) #ifndef Y_MIN_PIN #define Y_MIN_PIN PC3 // Y-STOP #endif #ifndef Y_MAX_PIN #define Y_MAX_PIN PA0 // E1DET #endif #else #define Y_STOP_PIN PC3 // Y-STOP #endif #ifdef Z_STALL_SENSITIVITY #define Z_STOP_PIN Z_DIAG_PIN #if Z_HOME_TO_MIN #define Z_MAX_PIN PC15 // PWRDET #else #define Z_MIN_PIN PC15 // PWRDET #endif #elif ENABLED(Z_MULTI_ENDSTOPS) #ifndef Z_MIN_PIN #define Z_MIN_PIN PC0 // Z-STOP #endif #ifndef Z_MAX_PIN #define Z_MAX_PIN PC15 // PWRDET #endif #else #ifndef Z_STOP_PIN #define Z_STOP_PIN PC0 // Z-STOP #endif #endif // // Z Probe (when not Z_MIN_PIN) // #ifndef Z_MIN_PROBE_PIN #define Z_MIN_PROBE_PIN PE4 #endif // // Probe enable // #if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) #define PROBE_ENABLE_PIN SERVO0_PIN #endif // // Filament Runout Sensor // #define FIL_RUNOUT_PIN PC2 // E0DET #define FIL_RUNOUT2_PIN PA0 // E1DET // // Power Supply Control // #ifndef PS_ON_PIN #define PS_ON_PIN PE8 // PS-ON #endif // // Power Loss Detection // #ifndef POWER_LOSS_PIN #define POWER_LOSS_PIN PC15 // PWRDET #endif // // Control pin of driver/heater/fan power supply // #define SAFE_POWER_PIN PC13 // // Steppers // #define X_STEP_PIN PE2 #define X_DIR_PIN PE1 #define X_ENABLE_PIN PE3 #ifndef X_CS_PIN #define X_CS_PIN PE0 #endif #define Y_STEP_PIN PD5 #define Y_DIR_PIN PD4 #define Y_ENABLE_PIN PD6 #ifndef Y_CS_PIN #define Y_CS_PIN PD3 #endif #define Z_STEP_PIN PA15 #define Z_DIR_PIN PA8 #define Z_ENABLE_PIN PD1 #ifndef Z_CS_PIN #define Z_CS_PIN PD0 #endif #ifndef E0_STEP_PIN #define E0_STEP_PIN PD15 #endif #ifndef E0_DIR_PIN #define E0_DIR_PIN PD14 #endif #ifndef E0_ENABLE_PIN #define E0_ENABLE_PIN PC7 #endif #ifndef E0_CS_PIN #define E0_CS_PIN PC6 #endif #ifndef E1_STEP_PIN #define E1_STEP_PIN PD11 #endif #ifndef E1_DIR_PIN #define E1_DIR_PIN PD10 #endif #ifndef E1_ENABLE_PIN #define E1_ENABLE_PIN PD13 #endif #ifndef E1_CS_PIN #define E1_CS_PIN PD12 #endif // // Temperature Sensors // #ifndef TEMP_0_PIN #define TEMP_0_PIN PA2 // TH0 #endif #ifndef TEMP_1_PIN #define TEMP_1_PIN PA3 // TH1 #endif #ifndef TEMP_BED_PIN #define TEMP_BED_PIN PA1 // TB #endif #if HOTENDS == 1 && DISABLED(HEATERS_PARALLEL) #if TEMP_SENSOR_PROBE #define TEMP_PROBE_PIN TEMP_1_PIN #elif TEMP_SENSOR_CHAMBER #define TEMP_CHAMBER_PIN TEMP_1_PIN #endif #endif // // Heaters / Fans // #ifndef HEATER_0_PIN #define HEATER_0_PIN PB3 // Heater0 #endif #ifndef HEATER_1_PIN #define HEATER_1_PIN PB4 // Heater1 #endif #ifndef HEATER_BED_PIN #define HEATER_BED_PIN PD7 // Hotbed #endif #ifndef FAN0_PIN #define FAN0_PIN PB7 // Fan0 #endif #if HAS_CUTTER #ifndef SPINDLE_LASER_PWM_PIN #define SPINDLE_LASER_PWM_PIN PB5 #endif #ifndef SPINDLE_LASER_ENA_PIN #define SPINDLE_LASER_ENA_PIN PB6 #endif #else #ifndef FAN1_PIN #define FAN1_PIN PB6 // Fan1 #endif #ifndef FAN2_PIN #define FAN2_PIN PB5 // Fan2 #endif #endif // SPINDLE_FEATURE || LASER_FEATURE // // SPI pins for TMC2130 stepper drivers // #ifndef TMC_SPI_MOSI #define TMC_SPI_MOSI PE14 #endif #ifndef TMC_SPI_MISO #define TMC_SPI_MISO PA14 #endif #ifndef TMC_SPI_SCK #define TMC_SPI_SCK PE15 #endif #if HAS_TMC_UART /** * TMC2208/TMC2209 stepper drivers * * Hardware serial communication ports. * If undefined software serial is used according to the pins below */ //#define X_HARDWARE_SERIAL Serial1 //#define X2_HARDWARE_SERIAL Serial1 //#define Y_HARDWARE_SERIAL Serial1 //#define Y2_HARDWARE_SERIAL Serial1 //#define Z_HARDWARE_SERIAL Serial1 //#define Z2_HARDWARE_SERIAL Serial1 //#define E0_HARDWARE_SERIAL Serial1 //#define E1_HARDWARE_SERIAL Serial1 //#define E2_HARDWARE_SERIAL Serial1 //#define E3_HARDWARE_SERIAL Serial1 //#define E4_HARDWARE_SERIAL Serial1 // // Software serial // #define X_SERIAL_TX_PIN PE0 #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PD3 #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PD0 #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PC6 #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN PD12 #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE #define TMC_BAUD_RATE 19200 #endif #endif // HAS_TMC_UART // // SD Connection // #ifndef SDCARD_CONNECTION #define SDCARD_CONNECTION ONBOARD #endif /** * ------ ------ * (BEEPER) PC5 | 1 2 | PB0 (BTN_ENC) (MISO) PA6 | 1 2 | PA5 (SCK) * (LCD_EN) PB1 | 3 4 | PE9 (LCD_RS) (BTN_EN1) PE7 | 3 4 | PA4 (SD_SS) * (LCD_D4) PE10 | 5 6 PE11 (LCD_D5) (BTN_EN2) PB2 | 5 6 PA7 (MOSI) * (LCD_D6) PE12 | 7 8 | PE13 (LCD_D7) (SD_DETECT) PC4 | 7 8 | RESET * GND | 9 10 | 5V GND | 9 10 | -- * ------ ------ * EXP1 EXP2 */ #define EXP1_01_PIN PC5 #define EXP1_02_PIN PB0 #define EXP1_03_PIN PB1 #define EXP1_04_PIN PE9 #define EXP1_05_PIN PE10 #define EXP1_06_PIN PE11 #define EXP1_07_PIN PE12 #define EXP1_08_PIN PE13 #define EXP2_01_PIN PA6 #define EXP2_02_PIN PA5 #define EXP2_03_PIN PE7 #define EXP2_04_PIN PA4 #define EXP2_05_PIN PB2 #define EXP2_06_PIN PA7 #define EXP2_07_PIN PC4 #define EXP2_08_PIN -1 // // Onboard SD card // Must use soft SPI because Marlin's default hardware SPI is tied to LCD's EXP2 // #if SD_CONNECTION_IS(LCD) #define SDSS EXP2_04_PIN #define SD_SS_PIN SDSS #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(ONBOARD) #define ONBOARD_SDIO // Use SDIO for onboard SD #elif SD_CONNECTION_IS(CUSTOM_CABLE) #error "No custom SD drive cable defined for this board." #endif #if ENABLED(BTT_MOTOR_EXPANSION) /** ----- ----- * -- | . . | GND -- | . . | GND * -- | . . | M1EN M2EN | . . | M3EN * M1STP | . . M1DIR M1RX | . . M1DIAG * M2DIR | . . | M2STP M2RX | . . | M2DIAG * M3DIR | . . | M3STP M3RX | . . | M3DIAG * ----- ----- * EXP2 EXP1 * * NB In EXP_MOT_USE_EXP2_ONLY mode EXP1 is not used and M2EN and M3EN need to be jumpered to M1EN */ // M1 on Driver Expansion Module #define E2_STEP_PIN EXP2_06_PIN #define E2_DIR_PIN EXP2_05_PIN #define E2_ENABLE_PIN EXP2_07_PIN #if !EXP_MOT_USE_EXP2_ONLY #define E2_DIAG_PIN EXP1_05_PIN #define E2_CS_PIN EXP1_06_PIN #if HAS_TMC_UART #define E2_SERIAL_TX_PIN EXP1_06_PIN #define E2_SERIAL_RX_PIN EXP1_06_PIN #endif #endif // M2 on Driver Expansion Module #define E3_STEP_PIN EXP2_03_PIN #define E3_DIR_PIN EXP2_04_PIN #if !EXP_MOT_USE_EXP2_ONLY #define E3_ENABLE_PIN EXP1_08_PIN #define E3_DIAG_PIN EXP1_03_PIN #define E3_CS_PIN EXP1_04_PIN #if HAS_TMC_UART #define E3_SERIAL_TX_PIN EXP1_04_PIN #define E3_SERIAL_RX_PIN EXP1_04_PIN #endif #else #define E3_ENABLE_PIN EXP2_07_PIN #endif // M3 on Driver Expansion Module #define E4_STEP_PIN EXP2_01_PIN #define E4_DIR_PIN EXP2_02_PIN #if !EXP_MOT_USE_EXP2_ONLY #define E4_ENABLE_PIN EXP1_07_PIN #define E4_DIAG_PIN EXP1_01_PIN #define E4_CS_PIN EXP1_02_PIN #if HAS_TMC_UART #define E4_SERIAL_TX_PIN EXP1_02_PIN #define E4_SERIAL_RX_PIN EXP1_02_PIN #endif #else #define E4_ENABLE_PIN EXP2_07_PIN #endif #endif // BTT_MOTOR_EXPANSION // // LCD / Controller // #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_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #elif ENABLED(MKS_MINI_12864) #define DOGLCD_A0 EXP1_07_PIN #define DOGLCD_CS EXP1_06_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN #else #define LCD_PINS_RS EXP1_04_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN #define LCD_PINS_EN 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 ANY(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 #if HAS_SPI_TFT #define TFT_SCK_PIN EXP2_02_PIN #define TFT_MISO_PIN EXP2_01_PIN #define TFT_MOSI_PIN EXP2_06_PIN #define BTN_ENC EXP1_02_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN #ifndef TFT_WIDTH #define TFT_WIDTH 480 #endif #ifndef TFT_HEIGHT #define TFT_HEIGHT 320 #endif #if ENABLED(BTT_TFT35_SPI_V1_0) /** * ------ ------ * BEEPER | 1 2 | LCD-BTN MISO | 1 2 | CLK * T_MOSI | 3 4 | T_CS LCD-ENCA | 3 4 | TFTCS * T_CLK | 5 6 T_MISO LCD-ENCB | 5 6 MOSI * PENIRQ | 7 8 | F_CS RS | 7 8 | RESET * GND | 9 10 | VCC GND | 9 10 | NC * ------ ------ * EXP1 EXP2 * * 480x320, 3.5", SPI Display with Rotary Encoder. * Stock Display for the BIQU B1 SE Series. * Schematic: https://github.com/bigtreetech/TFT35-SPI/blob/master/v1/Hardware/BTT%20TFT35-SPI%20V1-SCH.pdf */ #define TFT_CS_PIN EXP2_04_PIN #define TFT_DC_PIN EXP2_07_PIN #define TFT_A0_PIN TFT_DC_PIN #define TOUCH_CS_PIN EXP1_04_PIN #define TOUCH_SCK_PIN EXP1_05_PIN #define TOUCH_MISO_PIN EXP1_06_PIN #define TOUCH_MOSI_PIN EXP1_03_PIN #define TOUCH_INT_PIN EXP1_07_PIN #ifndef TOUCH_CALIBRATION_X #define TOUCH_CALIBRATION_X 17540 #endif #ifndef TOUCH_CALIBRATION_Y #define TOUCH_CALIBRATION_Y -11388 #endif #ifndef TOUCH_OFFSET_X #define TOUCH_OFFSET_X -21 #endif #ifndef TOUCH_OFFSET_Y #define TOUCH_OFFSET_Y 337 #endif #ifndef TOUCH_ORIENTATION #define TOUCH_ORIENTATION TOUCH_LANDSCAPE #endif #elif ENABLED(MKS_TS35_V2_0) /** ------ ------ * BEEPER | 1 2 | BTN_ENC SPI1_MISO | 1 2 | SPI1_SCK * TFT_BKL / LCD_EN | 3 4 | TFT_RESET / LCD_RS BTN_EN1 | 3 4 | SPI1_CS * TOUCH_CS / LCD_D4 | 5 6 TOUCH_INT / LCD_D5 BTN_EN2 | 5 6 SPI1_MOSI * SPI1_CS / LCD_D6 | 7 8 | SPI1_RS / LCD_D7 SPI1_RS | 7 8 | RESET * GND | 9 10 | VCC GND | 9 10 | VCC * ------ ------ * EXP1 EXP2 */ #define TFT_CS_PIN EXP1_07_PIN // SPI1_CS #define TFT_DC_PIN EXP1_08_PIN // SPI1_RS #define TFT_A0_PIN TFT_DC_PIN #define TFT_RESET_PIN EXP1_04_PIN #define LCD_BACKLIGHT_PIN EXP1_03_PIN #define TFT_BACKLIGHT_PIN LCD_BACKLIGHT_PIN #define TOUCH_BUTTONS_HW_SPI #define TOUCH_BUTTONS_HW_SPI_DEVICE 1 #define TOUCH_CS_PIN EXP1_05_PIN // SPI1_NSS #define TOUCH_SCK_PIN EXP2_02_PIN // SPI1_SCK #define TOUCH_MISO_PIN EXP2_01_PIN // SPI1_MISO #define TOUCH_MOSI_PIN EXP2_06_PIN // SPI1_MOSI #define LCD_READ_ID 0xD3 #define LCD_USE_DMA_SPI #define TFT_BUFFER_WORDS 14400 #ifndef TOUCH_CALIBRATION_X #define TOUCH_CALIBRATION_X -17253 #endif #ifndef TOUCH_CALIBRATION_Y #define TOUCH_CALIBRATION_Y 11579 #endif #ifndef TOUCH_OFFSET_X #define TOUCH_OFFSET_X 514 #endif #ifndef TOUCH_OFFSET_Y #define TOUCH_OFFSET_Y -24 #endif #ifndef TOUCH_ORIENTATION #define TOUCH_ORIENTATION TOUCH_LANDSCAPE #endif #endif #endif // HAS_SPI_TFT // Alter timing for graphical display #if IS_U8GLIB_ST7920 #ifndef BOARD_ST7920_DELAY_1 #define BOARD_ST7920_DELAY_1 120 #endif #ifndef BOARD_ST7920_DELAY_2 #define BOARD_ST7920_DELAY_2 80 #endif #ifndef BOARD_ST7920_DELAY_3 #define BOARD_ST7920_DELAY_3 580 #endif #endif // // NeoPixel LED // #ifndef BOARD_NEOPIXEL_PIN #define BOARD_NEOPIXEL_PIN PE6 #endif #if ENABLED(WIFISUPPORT) // // WIFI // /** * ------- * GND | 9 | | 8 | 3.3V * (ESP-CS) PB12 | 10 | | 7 | PB15 (ESP-MOSI) * 3.3V | 11 | | 6 | PB14 (ESP-MISO) * (ESP-IO0) PB10 | 12 | | 5 | PB13 (ESP-CLK) * (ESP-IO4) PB11 | 13 | | 4 | -- * -- | 14 | | 3 | 3.3V (ESP-EN) * (ESP-RX) PD8 | 15 | | 2 | -- * (ESP-TX) PD9 | 16 | | 1 | PC14 (ESP-RST) * ------- * WIFI */ #define ESP_WIFI_MODULE_COM 3 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this #define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2 #define ESP_WIFI_MODULE_RESET_PIN PC14 #define ESP_WIFI_MODULE_GPIO0_PIN PB10 #define ESP_WIFI_MODULE_GPIO4_PIN PB11 #endif
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h
C
agpl-3.0
20,562
/** * Marlin 3D Printer Firmware * Copyright (c) 2023 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/>. * */ /** * Creality CREALITY_CR4NTXXC10 (STM32F401RET6) board pin assignments * * Sold as "E3 Free-runs Silent Motherboard" */ #include "env_validate.h" #if HOTENDS > 1 || E_STEPPERS > 1 #error "CR4NT220622C10 only supports one hotend / E-stepper." #endif #if !AXIS_DRIVER_TYPE_X(TMC2209) || !AXIS_DRIVER_TYPE_Y(TMC2209) || !AXIS_DRIVER_TYPE_Z(TMC2209) || !AXIS_DRIVER_TYPE_E0(TMC2209) #error "This board has onboard TMC2209 drivers for X, Y, Z, and E0." #endif #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "CR4NT220622C10" #endif #ifndef DEFAULT_MACHINE_NAME #define DEFAULT_MACHINE_NAME "Ender-3 Series" #endif #define BOARD_WEBSITE_URL "www.creality.com" #define BOARD_NO_NATIVE_USB //#undef DISABLE_DEBUG // DISABLE_(DEBUG|JTAG) is not supported for STM32F4. //#define DISABLE_JTAG // // EEPROM // #if NO_EEPROM_SELECTED #define IIC_BL24CXX_EEPROM // EEPROM on I2C-0 //#define SDCARD_EEPROM_EMULATION #undef NO_EEPROM_SELECTED #endif #if ENABLED(IIC_BL24CXX_EEPROM) #define IIC_EEPROM_SDA PA11 #define IIC_EEPROM_SCL PA12 #define MARLIN_EEPROM_SIZE 0x800 // 2K (24C16) #elif ENABLED(SDCARD_EEPROM_EMULATION) #define MARLIN_EEPROM_SIZE 0x800 // 2K #endif // // Servos // #define SERVO0_PIN PB0 // BLTouch PWM-OUT PIN (TOUCH pins in the schematic have changed) // // Limit Switches // #define X_STOP_PIN PA5 #define Y_STOP_PIN PA6 #if ENABLED(BLTOUCH) #define Z_MIN_PIN PB1 // BLTouch IN PIN (TOUCH pins in the schematic have changed) #define Z_MAX_PIN PA7 #else #define Z_STOP_PIN PA7 // Z-axis limit switch #endif #ifndef Z_MIN_PROBE_PIN #define Z_MIN_PROBE_PIN PB1 // BLTouch IN #endif // // Probe enable // #if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) #define PROBE_ENABLE_PIN SERVO0_PIN #endif // // Filament Runout Sensor // #ifndef FIL_RUNOUT_PIN #define FIL_RUNOUT_PIN PA4 // "Pulled-high" #endif // // Steppers // #define X_ENABLE_PIN PC3 #define X_STEP_PIN PC2 #define X_DIR_PIN PB9 #define Y_ENABLE_PIN X_ENABLE_PIN #define Y_STEP_PIN PB8 #define Y_DIR_PIN PB7 #define Z_ENABLE_PIN X_ENABLE_PIN #define Z_STEP_PIN PB6 #define Z_DIR_PIN PB5 #define E0_ENABLE_PIN X_ENABLE_PIN #define E0_STEP_PIN PB4 #define E0_DIR_PIN PB3 // // 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 PB10 // HOT BED #ifndef FAN0_PIN #define FAN0_PIN PA0 // FAN #endif #if PIN_EXISTS(FAN0) #define FAN_SOFT_PWM #endif #if HAS_TMC_UART // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 /** * TMC2208/TMC2209 stepper drivers * * Hardware serial communication ports. * If undefined software serial is used according to the pins below */ #define X_HARDWARE_SERIAL Serial6 #define Y_HARDWARE_SERIAL X_HARDWARE_SERIAL #define Z_HARDWARE_SERIAL X_HARDWARE_SERIAL #define E0_HARDWARE_SERIAL X_HARDWARE_SERIAL // Default TMC slave addresses #ifndef X_SLAVE_ADDRESS #define X_SLAVE_ADDRESS 0 #endif #ifndef Y_SLAVE_ADDRESS #define Y_SLAVE_ADDRESS 1 #endif #ifndef Z_SLAVE_ADDRESS #define Z_SLAVE_ADDRESS 2 #endif #ifndef E0_SLAVE_ADDRESS #define E0_SLAVE_ADDRESS 3 #endif static_assert(X_SLAVE_ADDRESS == 0, "X_SLAVE_ADDRESS must be 0 for BOARD_CREALITY_CR4NTXXC10."); static_assert(Y_SLAVE_ADDRESS == 1, "Y_SLAVE_ADDRESS must be 1 for BOARD_CREALITY_CR4NTXXC10."); static_assert(Z_SLAVE_ADDRESS == 2, "Z_SLAVE_ADDRESS must be 2 for BOARD_CREALITY_CR4NTXXC10."); static_assert(E0_SLAVE_ADDRESS == 3, "E0_SLAVE_ADDRESS must be 3 for BOARD_CREALITY_CR4NTXXC10."); // Software serial #define X_SERIAL_TX_PIN PC6 #define X_SERIAL_RX_PIN PC7 #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 X_SERIAL_TX_PIN #define E1_SERIAL_RX_PIN X_SERIAL_RX_PIN #define X_DIAG_PIN PC13 #define Y_DIAG_PIN PC14 #define Z_DIAG_PIN PC15 #define E0_DIAG_PIN PA15 #endif // HAS_TMC_UART // // SD Card // #define SD_DETECT_PIN PC1 #define SDCARD_CONNECTION ONBOARD #define ONBOARD_SDIO #define SDIO_CLOCK 4500000 #define SDIO_READ_RETRIES 16 #define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer /** * ------ * PC0 | 1 2 | PB2 * TX2 PA2 | 3 4 | PA3 RX2 * SPI2_MISO PB14 | 5 6 | PB13 SPI2_SCK * SPI2_NSS PB12 | 7 8 | PB15 SPI2_MOSI * GND | 9 10 | 5V * ------ * EXP1 */ #define EXP1_01_PIN PC0 #define EXP1_02_PIN PB2 #define EXP1_03_PIN PA2 #define EXP1_04_PIN PA3 #define EXP1_05_PIN PB14 #define EXP1_06_PIN PB13 #define EXP1_07_PIN PB12 #define EXP1_08_PIN PB15 #if ENABLED(CR10_STOCKDISPLAY) #define LCD_PINS_RS EXP1_07_PIN #define LCD_PINS_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #define BTN_ENC EXP1_02_PIN #define BTN_EN1 EXP1_03_PIN #define BTN_EN2 EXP1_05_PIN #ifndef HAS_PIN_27_BOARD #define BEEPER_PIN EXP1_01_PIN #endif #elif ENABLED(DWIN_CREALITY_LCD) // DWIN ENCODER LCD #define BTN_ENC EXP1_05_PIN #define BTN_EN1 EXP1_08_PIN #define BTN_EN2 EXP1_07_PIN //#define LCD_LED_PIN EXP1_02_PIN #ifndef BEEPER_PIN #define BEEPER_PIN EXP1_06_PIN #define NO_SPEAKER #endif #endif
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_CREALITY_CR4NTXXC10.h
C
agpl-3.0
7,808
/** * Marlin 3D Printer Firmware * Copyright (c) 2023 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" #define BOARD_INFO_NAME "STM32F401RET6" #define DEFAULT_MACHINE_NAME "Ender-5 S1" #define IIC_BL24CXX_EEPROM // EEPROM on I2C-0 used only for display settings #if ENABLED(IIC_BL24CXX_EEPROM) #define IIC_EEPROM_SDA PA11 #define IIC_EEPROM_SCL PA12 #define MARLIN_EEPROM_SIZE 0x800 // 2Kb (24C16) #else #define SDCARD_EEPROM_EMULATION // SD EEPROM until all EEPROM is BL24CXX #define MARLIN_EEPROM_SIZE 0x800 // 2Kb #endif // SPI //#define SPI_EEPROM // EEPROM on SPI-0 //#define SPI_CHAN_EEPROM1 ? //#define SPI_EEPROM1_CS ? // 2K EEPROM //#define SPI_EEPROM2_CS ? // 32Mb FLASH //#define SPI_FLASH_CS ? // // Servos // #define SERVO0_PIN PC13 // BLTouch OUT // // Limit Switches // #define X_STOP_PIN PA5 #define Y_STOP_PIN PA6 #if ENABLED(BLTOUCH) #define Z_MAX_PIN PA15 // ROCK_20220730 #define Z_MIN_PIN PC14 //#define Z_STOP_PIN_NADD PA15 // Added z-axis limit switch #elif ENABLED(PROBE_ACTIVATION_SWITCH) #define Z_MIN_PIN PA15 #define PROBE_TARE_PIN PC14 #define PROBE_ACTIVATION_SWITCH_PIN PB2 #else #define Z_MIN_PIN PA15 #endif // // Filament runout // #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_PIN PC15 #endif // // Steppers Motor drive chip power control // #define X_ENABLE_PIN PC3 #define X_STEP_PIN PC2 #define X_DIR_PIN PB9 #define Y_ENABLE_PIN PC3 #define Y_STEP_PIN PB8 #define Y_DIR_PIN PB7 #define Z_ENABLE_PIN PC3 #define Z_STEP_PIN PB6 #define Z_DIR_PIN PB5 #define E0_ENABLE_PIN PC3 #define E0_STEP_PIN PB4 #define E0_DIR_PIN PB3 // // Temperature Sensors // #ifndef TEMP_0_PIN #define TEMP_0_PIN PC5 // E1_THERMISTOR PA0 -> PT100 #endif #define TEMP_BED_PIN PC4 // BED_THERMISTOR_1 // // Heaters / Fans // #define HEATER_0_PIN PA1 // E1_HEAT_PWM #define HEATER_BED_PIN PA7 // BED_HEAT_1 FET #define FAN0_PIN PA0 // Part cooling fan FET //#define FAN1_PIN PE11 // Extruder fan FET //#define FAN2_PIN PE1 // Controller fan FET #ifndef E0_AUTO_FAN_PIN #define E0_AUTO_FAN_PIN PA1 // FAN1_PIN #endif // // SD Card // #define SD_DETECT_PIN PC7 #define SDCARD_CONNECTION ONBOARD #define ONBOARD_SPI_DEVICE 1 #define ONBOARD_SD_CS_PIN PC12 // SDSS #define ONBOARD_SDIO #define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer // SPI 2 #if ENABLED(RET6_12864_LCD) #define LCD_PINS_RS PB12 #define LCD_PINS_EN PB15 #define LCD_PINS_D4 PB13 #define BTN_EN2 PB14 #endif //#define LED_CONTROL_PIN PA7 // // WiFi Reset // #ifdef MENU_RESET_WIFI #define RESET_WIFI_PIN PB12 #endif // // Backpower // #ifndef BACKPOWER_CTRL_PIN #define BACKPOWER_CTRL_PIN PA4 // Pull down on the electricity, When the ADC detects that the 24V power supply is below 20V, Save the continued call data first, PA4 = 1 #endif #ifndef CHECK_24V_PIN #define POWER_DETECTION_PIN PB0 // Detect ADC input pin of 24V power supply #endif /** * Logical pin vs. port/pin cross reference * * PA0 54 // E1_THERMISTOR PA9 0 // TX * PA1 55 // E2_THERMISTOR PA10 1 // RX * PA2 56 // E3_THERMISTOR PD3 2 // CTS * PA3 53 // BED_THERMISTOR_3 PD4 3 // RTS * PA4 16 // SPI_CS PD5 4 // TX * PA5 17 // SPI_SCK PD6 5 // RX * PA6 18 // SPI_MISO PB5 6 // WIFI_WAKEUP * PA7 19 // SPI_MOSI PE11 7 // WIFI_RESET * PA8 43 // V_STOP PE12 8 // WIFI_BOOT * PA9 0 // TX PE1 9 // STATUS_LED * PA10 1 // RX PB12 10 // SPI_CS * PA11 30 // OTG_DM PB15 11 // SPI_MOSI * PA12 31 // OTG_DP PB14 12 // SPI_MISO * PA13 20 // JTAG_TMS/SWDIO PB13 13 // SPI_SCK * PA14 21 // JTAG_TCK/SWCLK PB7 14 // SDA * PA15 25 // SD_CARD_DETECT PB6 15 // SCL * PB0 49 // E2_HEAT_PWM PA4 16 // SPI_CS * PB1 50 // E3_HEAT_PWM PA5 17 // SPI_SCK * PB3 22 // JTAG_TDO/SWO PA6 18 // SPI_MISO * PB4 37 // USER4 PA7 19 // SPI_MOSI * PB5 6 // WIFI_WAKEUP PA13 20 // JTAG_TMS/SWDIO * PB6 15 // SCL PA14 21 // JTAG_TCK/SWCLK * PB7 14 // SDA PB3 22 // JTAG_TDO/SWO * PB8 77 // E3_PWM PC8 23 // SDIO_D0 * PB9 35 // USER1 PC9 24 // SDIO_D1 * PB10 64 // Y_PWM PA15 25 // SD_CARD_DETECT * PB12 10 // SPI_CS PC10 26 // SDIO_D2 * PB13 13 // SPI_SCK PC11 27 // SDIO_D3 * PB14 12 // SPI_MISO PC12 28 // SDIO_CK * PB15 11 // SPI_MOSI PD2 29 // SDIO_CMD * PC0 68 // Z_DIR PA11 30 // OTG_DM * PC1 33 // IR_ON PA12 31 // OTG_DP * PC2 51 // BED_THERMISTOR_1 PD1 32 // IR_OUT * PC3 52 // BED_THERMISTOR_2 PC1 33 // IR_ON * PC4 57 // E1_FAN PD7 34 // USER3 * PC5 58 // E2_FAN PB9 35 // USER1 * PC6 67 // Z_PWM PE0 36 // USER2 * PC7 48 // E1_HEAT_PWM PB4 37 // USER4 * PC8 23 // SDIO_D0 PE7 38 // USER_BUTTON * PC9 24 // SDIO_D1 PD8 39 // X_STOP * PC10 26 // SDIO_D2 PD9 40 // Y_STOP * PC11 27 // SDIO_D3 PD10 41 // Z_STOP * PC12 28 // SDIO_CK PD11 42 // U_STOP * PC13 70 // E1_DIR PA8 43 // V_STOP * PC14 69 // E1_RESET PD0 44 // W_STOP * PC15 66 // Z_RESET PD13 45 // BED_HEAT_2 * PD0 44 // W_STOP PD14 46 // BED_HEAT_1 * PD1 32 // IR_OUT PD15 47 // BED_HEAT_3 * PD2 29 // SDIO_CMD PC7 48 // E1_HEAT_PWM * PD3 2 // CTS PB0 49 // E2_HEAT_PWM * PD4 3 // RTS PB1 50 // E3_HEAT_PWM * PD5 4 // TX PC2 51 // BED_THERMISTOR_1 * PD6 5 // RX PC3 52 // BED_THERMISTOR_2 * PD7 34 // USER3 PA3 53 // BED_THERMISTOR_3 * PD8 39 // X_STOP PA0 54 // E1_THERMISTOR * PD9 40 // Y_STOP PA1 55 // E2_THERMISTOR * PD10 41 // Z_STOP PA2 56 // E3_THERMISTOR * PD11 42 // U_STOP PC4 57 // E1_FAN * PD12 71 // E1_PWM PC5 58 // E2_FAN * PD13 45 // BED_HEAT_2 PE8 59 // E3_FAN * PD14 46 // BED_HEAT_1 PE13 60 // X_RESET * PD15 47 // BED_HEAT_3 PE14 61 // X_PWM * PE0 36 // USER2 PE15 62 // X_DIR * PE1 9 // STATUS_LED PE10 63 // Y_RESET * PE2 76 // E3_DIR PB10 64 // Y_PWM * PE3 75 // E3_RESET PE9 65 // Y_DIR * PE4 72 // E2_RESET PC15 66 // Z_RESET * PE5 73 // E2_PWM PC6 67 // Z_PWM * PE6 74 // E2_DIR PC0 68 // Z_DIR * PE7 38 // USER_BUTTON PC14 69 // E1_RESET * PE8 59 // E3_FAN PC13 70 // E1_DIR * PE9 65 // Y_DIR PD12 71 // E1_PWM * PE10 63 // Y_RESET PE4 72 // E2_RESET * PE11 7 // WIFI_RESET PE5 73 // E2_PWM * PE12 8 // WIFI_BOOT PE6 74 // E2_DIR * PE13 60 // X_RESET PE3 75 // E3_RESET * PE14 61 // X_PWM PE2 76 // E3_DIR * PE15 62 // X_DIR PB8 77 // E3_PWM */
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_CREALITY_F401.h
C
agpl-3.0
9,544
/** * 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 V24S1_301F4 (STM32F401RC) board pin assignments as found on Ender-3 S1. */ #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "Creality V24S1-301F4" #endif #ifndef DEFAULT_MACHINE_NAME #define DEFAULT_MACHINE_NAME "Ender-3 S1 F4" #endif #define DISABLE_DEBUG false // DISABLE_(DEBUG|JTAG) is not supported for STM32F4. #define ALLOW_STM32F4 #define EEPROM_EXCL_ZONE 916,926 // Ender-3S1 STM32F401 Bootloader EEPROM exclusion zone #include "../stm32f1/pins_CREALITY_V24S1_301.h"
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_CREALITY_V24S1_301F4.h
C
agpl-3.0
1,377
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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 ALLOW_STM32DUINO #include "env_validate.h" #if HOTENDS > 6 || E_STEPPERS > 6 #error "FLYF407ZG supports up to 6 hotends / E steppers." #endif #define BOARD_INFO_NAME "FLYF407ZG" #define BOARD_WEBSITE_URL "github.com/FLYmaker/FLYF407ZG" #define DEFAULT_MACHINE_NAME BOARD_INFO_NAME // Avoid conflict with fans and TIMER_TONE #define TEMP_TIMER 3 #define STEP_TIMER 5 // // EEPROM Emulation // #if NO_EEPROM_SELECTED #define FLASH_EEPROM_EMULATION //#define SRAM_EEPROM_EMULATION //#define I2C_EEPROM #endif #if ENABLED(FLASH_EEPROM_EMULATION) // Decrease delays and flash wear by spreading writes across // the 128kB sector allocated for EEPROM emulation. #define FLASH_EEPROM_LEVELING #elif ENABLED(I2C_EEPROM) #define MARLIN_EEPROM_SIZE 0x2000 // 8K #endif #ifndef MARLIN_EEPROM_SIZE #define MARLIN_EEPROM_SIZE 0x1000 // 4K #endif // // Servos // #define SERVO0_PIN PE11 // // Limit Switches // #define X_MIN_PIN PC3 #define X_MAX_PIN PC2 #define Y_MIN_PIN PF2 #define Y_MAX_PIN PF1 #define Z_MIN_PIN PF0 #define Z_MAX_PIN PC15 // // Z Probe (when not Z_MIN_PIN) // #define Z_MIN_PROBE_PIN PC14 // Z3_PIN // // Steppers // #define X_STEP_PIN PB9 #define X_DIR_PIN PE0 #define X_ENABLE_PIN PE1 #ifndef X_CS_PIN #define X_CS_PIN PG13 #endif #define Y_STEP_PIN PB8 #define Y_DIR_PIN PG11 #define Y_ENABLE_PIN PG12 #ifndef Y_CS_PIN #define Y_CS_PIN PG10 #endif #define Z_STEP_PIN PA8 #define Z_DIR_PIN PD6 #define Z_ENABLE_PIN PD7 #ifndef Z_CS_PIN #define Z_CS_PIN PD5 #endif #define E0_STEP_PIN PC7 #define E0_DIR_PIN PD3 #define E0_ENABLE_PIN PD4 #ifndef E0_CS_PIN #define E0_CS_PIN PD1 #endif #define E1_STEP_PIN PC6 #define E1_DIR_PIN PA15 #define E1_ENABLE_PIN PD0 #ifndef E1_CS_PIN #define E1_CS_PIN PA14 #endif #define E2_STEP_PIN PD15 #define E2_DIR_PIN PG7 #define E2_ENABLE_PIN PG8 #ifndef E2_CS_PIN #define E2_CS_PIN PG6 #endif #define E3_STEP_PIN PD14 #define E3_DIR_PIN PG4 #define E3_ENABLE_PIN PG5 #ifndef E3_CS_PIN #define E3_CS_PIN PG3 #endif #define E4_STEP_PIN PD13 #define E4_DIR_PIN PD11 #define E4_ENABLE_PIN PG2 #ifndef E4_CS_PIN #define E4_CS_PIN PD10 #endif #define E5_STEP_PIN PD12 #define E5_DIR_PIN PD8 #define E5_ENABLE_PIN PD9 #ifndef E5_CS_PIN #define E5_CS_PIN PB12 #endif // // Temperature Sensors // #define TEMP_0_PIN PA0 // Analog Input #define TEMP_1_PIN PC1 // Analog Input #define TEMP_2_PIN PC0 // Analog Input #define TEMP_3_PIN PF10 // Analog Input #define TEMP_4_PIN PF5 // Analog Input #define TEMP_5_PIN PF4 // Analog Input #define TEMP_BED_PIN PF3 // Analog Input // // Heaters / Fans // #define HEATER_0_PIN PF7 #define HEATER_1_PIN PF6 #define HEATER_2_PIN PE6 #define HEATER_3_PIN PE5 #define HEATER_4_PIN PE4 #define HEATER_5_PIN PE3 #define HEATER_BED_PIN PE2 #ifndef FAN0_PIN #define FAN0_PIN PF8 #endif #define FAN1_PIN PF9 #define FAN2_PIN PA2 #define FAN3_PIN PA1 #define FAN4_PIN PE13 #define FAN5_PIN PB11 /** * ------ ------ * PB10 | 1 2 | PE15 PB14 | 1 2 | PB13 * PE14 | 3 4 | PE12 PC5 | 3 4 | PF11 * PE10 5 6 | PE9 PC4 5 6 | PB15 * PE8 | 7 8 | PE7 PB2 | 7 8 | RESET * GND | 9 10 | 5V GND | 9 10 | -- * ------ ------ * EXP1 EXP2 */ #define EXP1_01_PIN PB10 #define EXP1_02_PIN PE15 #define EXP1_03_PIN PE14 #define EXP1_04_PIN PE12 #define EXP1_05_PIN PE10 #define EXP1_06_PIN PE9 #define EXP1_07_PIN PE8 #define EXP1_08_PIN PE7 #define EXP2_01_PIN PB14 #define EXP2_02_PIN PB13 #define EXP2_03_PIN PC5 #define EXP2_04_PIN PF11 #define EXP2_05_PIN PC4 #define EXP2_06_PIN PB15 #define EXP2_07_PIN PB2 #define EXP2_08_PIN -1 // RESET // // Onboard SD support // //#define SD_CARD_DETECT_PIN PC13 #ifndef SDCARD_CONNECTION #define SDCARD_CONNECTION ONBOARD #endif #if SD_CONNECTION_IS(ONBOARD) #define ONBOARD_SDIO // Use SDIO for onboard SD #if DISABLED(ONBOARD_SDIO) #define SOFTWARE_SPI // Use soft SPI for onboard SD #define SDSS PC11 #define SD_SCK_PIN PC12 #define SD_MISO_PIN PC8 #define SD_MOSI_PIN PD2 #endif #elif SD_CONNECTION_IS(LCD) #define SD_SCK_PIN EXP2_02_PIN #define SD_MISO_PIN EXP2_01_PIN #define SD_MOSI_PIN EXP2_06_PIN #define SDSS EXP2_04_PIN #define SD_DETECT_PIN EXP2_07_PIN #endif // // Trinamic SPI // #ifndef TMC_SPI_SCK #define TMC_SPI_SCK EXP2_02_PIN #endif #ifndef TMC_SPI_MISO #define TMC_SPI_MISO EXP2_01_PIN #endif #ifndef TMC_SPI_MOSI #define TMC_SPI_MOSI EXP2_06_PIN #endif // // Trinamic Software Serial // #if HAS_TMC_UART #define X_SERIAL_TX_PIN PG13 #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PG10 #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PD5 #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PD1 #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN PA14 #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN #define E2_SERIAL_TX_PIN PG6 #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN #define E3_SERIAL_TX_PIN PG3 #define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN #define E4_SERIAL_TX_PIN PD10 #define E4_SERIAL_RX_PIN E4_SERIAL_TX_PIN #define E5_SERIAL_TX_PIN PB12 #define E5_SERIAL_RX_PIN E5_SERIAL_TX_PIN #endif // // LCD / Controller // #if IS_RRD_SC #define BEEPER_PIN EXP1_01_PIN #define LCD_PINS_RS EXP1_04_PIN #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN #define LCD_PINS_D5 EXP1_06_PIN #define LCD_PINS_D6 EXP1_07_PIN #define LCD_PINS_D7 EXP1_08_PIN #define BTN_EN1 EXP2_05_PIN #define BTN_EN2 EXP2_03_PIN #define BTN_ENC EXP1_02_PIN #endif // // Filament runout // #define FIL_RUNOUT_PIN PA3 // Alter timing for graphical display #if IS_U8GLIB_ST7920 #define BOARD_ST7920_DELAY_1 96 #define BOARD_ST7920_DELAY_2 48 #define BOARD_ST7920_DELAY_3 715 #endif
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_FLYF407ZG.h
C
agpl-3.0
9,448
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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" #define BOARD_INFO_NAME "FYSETC Cheetah V2.0" #define BOARD_WEBSITE_URL "github.com/FYSETC/FYSETC-Cheetah-v2" // USB Flash Drive support //#define HAS_OTG_USB_HOST_SUPPORT // Ignore temp readings during development. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 #if ANY(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) #define FLASH_EEPROM_EMULATION #define FLASH_EEPROM_LEVELING #define FLASH_SECTOR 1 #define FLASH_UNIT_SIZE 0x4000 // 16k #define FLASH_ADDRESS_START 0x8004000 #endif #define SERVO0_PIN PB1 // BL-TOUCH/PWM // // Limit Switches // #define X_STOP_PIN PB4 // X-MIN #define Y_STOP_PIN PC8 // Y-MIN #define Z_STOP_PIN PA0 // Z-MIN // // Z Probe // #if ENABLED(BLTOUCH) #error "You need to set jumper to 5V for BLTouch, then comment out this line to proceed." #endif #ifndef Z_MIN_PROBE_PIN #define Z_MIN_PROBE_PIN PB1 // BL-TOUCH/PWM repurposed #endif // // Filament runout // #define FIL_RUNOUT_PIN PB5 // // Steppers // #define X_STEP_PIN PC0 #define X_DIR_PIN PC1 #define X_ENABLE_PIN PA8 #define Y_STEP_PIN PC14 #define Y_DIR_PIN PC13 #define Y_ENABLE_PIN PC15 #define Z_STEP_PIN PB9 #define Z_DIR_PIN PB8 #define Z_ENABLE_PIN PC2 #define E0_STEP_PIN PB2 #define E0_DIR_PIN PA15 #define E0_ENABLE_PIN PD2 #if HAS_TMC_UART #define X_HARDWARE_SERIAL Serial2 #define Y_HARDWARE_SERIAL Serial2 #define Z_HARDWARE_SERIAL Serial2 #define E0_HARDWARE_SERIAL Serial2 // 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 static_assert(X_SLAVE_ADDRESS == 0, "X_SLAVE_ADDRESS must be 0 for BOARD_FYSETC_CHEETAH_V20."); static_assert(Y_SLAVE_ADDRESS == 2, "Y_SLAVE_ADDRESS must be 2 for BOARD_FYSETC_CHEETAH_V20."); static_assert(Z_SLAVE_ADDRESS == 1, "Z_SLAVE_ADDRESS must be 1 for BOARD_FYSETC_CHEETAH_V20."); static_assert(E0_SLAVE_ADDRESS == 3, "E0_SLAVE_ADDRESS must be 3 for BOARD_FYSETC_CHEETAH_V20."); #endif // // Heaters / Fans // #define HEATER_0_PIN PC6 #define HEATER_BED_PIN PC7 #ifndef FAN0_PIN #define FAN0_PIN PA14 #endif #define FAN1_PIN PA13 #define FAN2_PIN PA1 // // Temperature Sensors // #define TEMP_BED_PIN PC5 // Analog Input #define TEMP_0_PIN PC4 // Analog Input // // Misc. Functions // #define SDSS PA4 #define SD_DETECT_PIN PC3 #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN PB0 #endif #ifndef RGB_LED_G_PIN #define RGB_LED_G_PIN PB7 #endif #ifndef RGB_LED_B_PIN #define RGB_LED_B_PIN PB6 #endif /** * ------ ------ * (SD_MISO) PA6 | 1 2 | PA5 (SD_SCK) (BEEPER) PC9 | 1 2 | PC12 (BTN_ENC) * (BTN_EN1) PC10 | 3 4 | PA4 (SD_SS) (LCD_EN) PB15 | 3 4 | PB12 (LCD_RS) * (BTN_EN2) PC11 5 6 | PA7 (SD_MOSI) (LCD_D4) PB13 5 6 | PB14 (LCD_D5) * (SD_DETECT) PC3 | 7 8 | RESET (LCD_D6) PB6 | 7 8 | PB7 (LCD_D7) * GND | 9 10 | 5V GND | 9 10 | 5V * ------ ------ * EXP2 EXP1 * * ------ * (BEEPER) PC9 | 1 2 | PC12 (BTN_ENC) * (BTN_EN1) PC10 | 3 4 | PB14 (LCD_D5/MISO) * (BTN_EN2) PC11 5 6 | PB13 (LCD_D4/SCK) * (LCD_RS) PB12 | 7 8 | PB15 (LCD_EN/MOSI) * GND | 9 10 | 5V * ------ * EXP3 */ #define EXP1_01_PIN PC9 #define EXP1_02_PIN PC12 #define EXP1_03_PIN PB15 #define EXP1_04_PIN PB12 #define EXP1_05_PIN PB13 #define EXP1_06_PIN PB14 #define EXP1_07_PIN PB6 #define EXP1_08_PIN PB7 #define EXP2_01_PIN PA6 #define EXP2_02_PIN PA5 #define EXP2_03_PIN PC10 #define EXP2_04_PIN PA4 #define EXP2_05_PIN PC11 #define EXP2_06_PIN PA7 #define EXP2_07_PIN PC3 #define EXP2_08_PIN -1 #define EXP3_01_PIN PC9 #define EXP3_02_PIN PC12 #define EXP3_03_PIN PC10 #define EXP3_04_PIN PB14 #define EXP3_05_PIN PC11 #define EXP3_06_PIN PB13 #define EXP3_07_PIN PB12 #define EXP3_08_PIN PB15 #if ENABLED(CR10_STOCKDISPLAY) #define BEEPER_PIN EXP3_01_PIN #define BTN_ENC EXP3_02_PIN #define BTN_EN1 EXP3_03_PIN #define BTN_EN2 EXP3_05_PIN #define LCD_PINS_D4 EXP3_06_PIN #define LCD_PINS_RS EXP3_07_PIN #define LCD_PINS_EN EXP3_08_PIN #elif HAS_WIRED_LCD #define BEEPER_PIN EXP1_01_PIN #define BTN_ENC EXP1_02_PIN #if ENABLED(MKS_MINI_12864) #define DOGLCD_A0 EXP1_07_PIN #define DOGLCD_CS EXP1_06_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN #else #define LCD_PINS_RS EXP1_04_PIN #define BTN_EN1 EXP2_05_PIN #define BTN_EN2 EXP2_03_PIN #define LCD_PINS_EN 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 ANY(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 96 #define BOARD_ST7920_DELAY_2 48 #define BOARD_ST7920_DELAY_3 600 #endif #if ENABLED(TOUCH_UI_FTDI_EVE) #define BEEPER_PIN EXP1_01_PIN #define CLCD_MOD_RESET EXP2_03_PIN #define CLCD_SPI_CS EXP2_05_PIN #endif
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h
C
agpl-3.0
8,986
/** * Marlin 3D Printer Firmware * Copyright (c) 2023 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" #define BOARD_INFO_NAME "FYSETC Cheetah V3.0" #define BOARD_WEBSITE_URL "github.com/FYSETC/Cheetah_V3.0" // USB Flash Drive support //#define HAS_OTG_USB_HOST_SUPPORT // Ignore temp readings during development. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 #if ANY(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) #define FLASH_EEPROM_EMULATION #define FLASH_EEPROM_LEVELING #endif // // Z Probe // #if ENABLED(BLTOUCH) #error "You need to set jumper to 5V for BLTouch, then comment out this line to proceed." #define SERVO0_PIN PA0 // PROBE #elif !defined(Z_MIN_PROBE_PIN) #define Z_MIN_PROBE_PIN PA0 #endif // // Limit Switches // #define X_STOP_PIN PA2 #define Y_STOP_PIN PA3 #define Z_STOP_PIN PC4 // // Filament runout // #define FIL_RUNOUT_PIN PA1 // FIL-D // // Steppers // #define X_STEP_PIN PC0 #define X_DIR_PIN PC1 #define X_ENABLE_PIN PC3 #define Y_STEP_PIN PC14 #define Y_DIR_PIN PC13 #define Y_ENABLE_PIN PC15 #define Z_STEP_PIN PB4 #define Z_DIR_PIN PB5 #define Z_ENABLE_PIN PC2 #define E0_STEP_PIN PB2 #define E0_DIR_PIN PA15 #define E0_ENABLE_PIN PD2 #if HAS_TMC_UART /** * TMC2208/TMC2209 stepper drivers * * Hardware serial communication ports. * If undefined software serial is used according to the pins below */ //#define X_HARDWARE_SERIAL Serial2 //#define Y_HARDWARE_SERIAL Serial2 //#define Z_HARDWARE_SERIAL Serial2 //#define E0_HARDWARE_SERIAL Serial2 #ifndef X_SERIAL_TX_PIN #define X_SERIAL_TX_PIN PB3 #endif #ifndef X_SERIAL_RX_PIN #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #endif #ifndef Y_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PB3 #endif #ifndef Y_SERIAL_RX_PIN #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #endif #ifndef Z_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PB3 #endif #ifndef Z_SERIAL_RX_PIN #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #endif #ifndef E0_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PB3 #endif #ifndef E0_SERIAL_RX_PIN #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #endif // 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 static_assert(X_SLAVE_ADDRESS == 0, "X_SLAVE_ADDRESS must be 0 for BOARD_FYSETC_CHEETAH_V30."); static_assert(Y_SLAVE_ADDRESS == 2, "Y_SLAVE_ADDRESS must be 2 for BOARD_FYSETC_CHEETAH_V30."); static_assert(Z_SLAVE_ADDRESS == 1, "Z_SLAVE_ADDRESS must be 1 for BOARD_FYSETC_CHEETAH_V30."); static_assert(E0_SLAVE_ADDRESS == 3, "E0_SLAVE_ADDRESS must be 3 for BOARD_FYSETC_CHEETAH_V30."); #endif // // Heaters / Fans // #define HEATER_0_PIN PC7 // PWM #define HEATER_BED_PIN PC8 // PWM #ifndef FAN0_PIN #define FAN0_PIN PA14 #endif #define FAN1_PIN PA13 #define FAN2_PIN PA8 // // Temperature Sensors // #define TEMP_0_PIN PC5 // Analog Input T0 ADC #define TEMP_BED_PIN PB1 // Analog Input ADC #define TEMP_CHAMBER_PIN PB0 // Analog Input T1 ADC // // Misc. Functions // #if 0 #define SDSS PA4 #define SD_DETECT_PIN PC3 #endif #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN PB0 #endif #ifndef RGB_LED_G_PIN #define RGB_LED_G_PIN PB7 #endif #ifndef RGB_LED_B_PIN #define RGB_LED_B_PIN PB6 #endif /** * ----- ----- * (KILL?) 5V | 1 2 | GND 5V | 1 2 | GND * (RST) RESET | 3 4 | PC12 ((SD_DET?)CD) (LCD_D7 BLUE) PB7 | 3 4 | PB6 (LCD_D6 GREEN) * ((SD?)MOSI PA7 | 5 6 | PC11 (BTN_EN2) (LCD_D5 RED DIN) PB14 | 5 6 | PB13 (LCD_D4 LCD_RST) * ((SD?)SS) PA4 | 7 8 | PC10 (BTN_EN1) (LCD_RS LCD_A0) PB12 | 7 8 | PB15 (LCD_EN LCD CS) * ((SD?)SCK) PA5 | 9 10| PA6 ((SD?)MISO) (BTN_ENC) PC6 | 9 10| PB10 (BEEPER) * ----- ----- * EXP2 EXP1 */ /** * ----- * (BEEPER) PC9 | 1 2 | PC12 (BTN_ENC) * (BTN_EN1) PC10 | 3 4 | PB14 (LCD_D5/MISO) * (BTN_EN2) PC11 5 6 | PB13 (LCD_D4/SCK) * (LCD_RS) PB12 | 7 8 | PB15 (LCD_EN/MOSI) * GND | 9 10| 5V * ----- * EXP3 */ #define EXP1_03_PIN PB7 #define EXP1_04_PIN PB6 #define EXP1_05_PIN PB14 #define EXP1_06_PIN PB13 #define EXP1_07_PIN PB12 #define EXP1_08_PIN PB15 #define EXP1_09_PIN PC6 #define EXP1_10_PIN PB10 #define EXP2_03_PIN -1 // RESET #define EXP2_04_PIN PC12 #define EXP2_05_PIN PA7 #define EXP2_06_PIN PC11 #define EXP2_07_PIN PA4 #define EXP2_08_PIN PC10 #define EXP2_09_PIN PA5 #define EXP2_10_PIN PA6 // // SPI / SD Card // #define SD_SCK_PIN EXP2_09_PIN #define SD_MISO_PIN EXP2_10_PIN #define SD_MOSI_PIN EXP2_05_PIN #define SDSS EXP2_07_PIN #define SD_DETECT_PIN EXP2_04_PIN #if HAS_WIRED_LCD #define BEEPER_PIN EXP1_10_PIN #define BTN_ENC EXP1_09_PIN #if ENABLED(CR10_STOCKDISPLAY) #define LCD_PINS_RS EXP1_07_PIN #define BTN_EN1 EXP2_08_PIN #define BTN_EN2 EXP2_06_PIN #define LCD_PINS_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #elif ENABLED(MKS_MINI_12864) #define DOGLCD_A0 EXP1_04_PIN #define DOGLCD_CS EXP1_05_PIN #define BTN_EN1 EXP2_08_PIN #define BTN_EN2 EXP2_06_PIN #else #define LCD_PINS_RS EXP1_07_PIN #define BTN_EN1 EXP2_06_PIN #define BTN_EN2 EXP2_08_PIN #define LCD_PINS_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #if ENABLED(FYSETC_MINI_12864) #define DOGLCD_CS EXP1_08_PIN #define DOGLCD_A0 EXP1_07_PIN //#define LCD_BACKLIGHT_PIN -1 #define LCD_RESET_PIN EXP1_06_PIN // Must be high or open for LCD to operate normally. #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN EXP1_05_PIN #endif #ifndef RGB_LED_G_PIN #define RGB_LED_G_PIN EXP1_04_PIN #endif #ifndef RGB_LED_B_PIN #define RGB_LED_B_PIN EXP1_03_PIN #endif #elif ENABLED(FYSETC_MINI_12864_2_1) #define NEOPIXEL_PIN EXP1_05_PIN #endif #endif // !FYSETC_MINI_12864 #if IS_ULTIPANEL #define LCD_PINS_D5 EXP1_05_PIN #define LCD_PINS_D6 EXP1_04_PIN #define LCD_PINS_D7 EXP1_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 #endif #endif // HAS_WIRED_LCD // Alter timing for graphical display #if ENABLED(U8GLIB_ST7920) #define BOARD_ST7920_DELAY_1 96 #define BOARD_ST7920_DELAY_2 48 #define BOARD_ST7920_DELAY_3 600 #endif #if ENABLED(TOUCH_UI_FTDI_EVE) #define BEEPER_PIN EXP1_10_PIN #define CLCD_MOD_RESET EXP2_08_PIN #define CLCD_SPI_CS EXP2_06_PIN #endif #define NEOPIXEL2_PIN PC9
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V30.h
C
agpl-3.0
9,763
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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 "FYSETC S6 supports up to 3 hotends / E steppers." #endif #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "FYSETC S6" #endif #ifndef DEFAULT_MACHINE_NAME #define DEFAULT_MACHINE_NAME BOARD_INFO_NAME #endif // Avoid conflict with TIMER_TONE defined in variant #define STEP_TIMER 10 // // EEPROM Emulation // #if NO_EEPROM_SELECTED #define FLASH_EEPROM_EMULATION //#define I2C_EEPROM #endif #if ENABLED(FLASH_EEPROM_EMULATION) // Decrease delays and flash wear by spreading writes across the // 128 kB sector allocated for EEPROM emulation. #define FLASH_EEPROM_LEVELING #elif ENABLED(I2C_EEPROM) #define MARLIN_EEPROM_SIZE 0x1000 // 4K #endif // // Servos // #ifndef SERVO0_PIN #define SERVO0_PIN PA3 #endif // // Limit Switches // #define X_MIN_PIN PB14 #define X_MAX_PIN PA1 #define Y_MIN_PIN PB13 #define Y_MAX_PIN PA2 #define Z_MIN_PIN PA0 #define Z_MAX_PIN PA3 // // Filament Sensor // share with X_MAX_PIN // #ifndef FIL_RUNOUT_PIN #define FIL_RUNOUT_PIN PA1 #endif // // Steppers // #define X_STEP_PIN PE11 #define X_DIR_PIN PE10 #ifndef X_ENABLE_PIN #define X_ENABLE_PIN PE12 #endif #define X_CS_PIN PE7 #define Y_STEP_PIN PD8 #define Y_DIR_PIN PB12 #define Y_ENABLE_PIN PD9 #define Y_CS_PIN PE15 #define Z_STEP_PIN PD14 #define Z_DIR_PIN PD13 #define Z_ENABLE_PIN PD15 #define Z_CS_PIN PD10 #define E0_STEP_PIN PD5 #define E0_DIR_PIN PD6 #define E0_ENABLE_PIN PD4 #define E0_CS_PIN PD7 #define E1_STEP_PIN PE6 #define E1_DIR_PIN PC13 #define E1_ENABLE_PIN PE5 #define E1_CS_PIN PC14 #define E2_STEP_PIN PE2 #define E2_DIR_PIN PE4 #define E2_ENABLE_PIN PE3 #define E2_CS_PIN PC15 #if HAS_TMC_UART // // TMC2208/TMC2209 stepper drivers // #ifndef X_SERIAL_TX_PIN #define X_SERIAL_TX_PIN PE9 #endif #ifndef X_SERIAL_RX_PIN #define X_SERIAL_RX_PIN PE8 #endif #ifndef Y_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PE14 #endif #ifndef Y_SERIAL_RX_PIN #define Y_SERIAL_RX_PIN PE13 #endif #ifndef Z_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PD11 #endif #ifndef Z_SERIAL_RX_PIN #define Z_SERIAL_RX_PIN PD12 #endif #ifndef E0_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PD3 #endif #ifndef E0_SERIAL_RX_PIN #define E0_SERIAL_RX_PIN PA15 #endif #ifndef E1_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN PC4 #endif #ifndef E1_SERIAL_RX_PIN #define E1_SERIAL_RX_PIN PC5 #endif #ifndef E2_SERIAL_TX_PIN #define E2_SERIAL_TX_PIN PE1 #endif #ifndef E2_SERIAL_RX_PIN #define E2_SERIAL_RX_PIN PE0 #endif #endif // // Temperature Sensors // #define TEMP_0_PIN PC0 #define TEMP_1_PIN PC1 #define TEMP_2_PIN PC2 #ifndef TEMP_BED_PIN #define TEMP_BED_PIN PC3 #endif // // Heaters / Fans // #ifndef HEATER_0_PIN #define HEATER_0_PIN PB3 #endif #ifndef HEATER_1_PIN #define HEATER_1_PIN PB4 #endif #ifndef HEATER_2_PIN #define HEATER_2_PIN PB15 #endif #ifndef HEATER_BED_PIN #define HEATER_BED_PIN PC8 #endif #ifndef FAN0_PIN #define FAN0_PIN PB0 #endif #ifndef FAN1_PIN #define FAN1_PIN PB1 #endif #define FAN2_PIN PB2 // // Misc. Functions // //#define LED_PIN PB14 //#define PS_ON_PIN PE11 //#define KILL_PIN PC5 /** * ------ ------ * PC9 | 1 2 | PA8 PA6 | 1 2 | PA5 * PC11 | 3 4 | PD2 PC6 | 3 4 | PA4 * PC10 5 6 | PC12 PC7 5 6 | PA7 * PD0 | 7 8 | PD1 PB10 | 7 8 | RESET * GND | 9 10 | 5V GND | 9 10 | 5V * ------ ------ * EXP1 EXP2 */ #define EXP1_01_PIN PC9 #define EXP1_02_PIN PA8 #define EXP1_03_PIN PC11 #define EXP1_04_PIN PD2 #define EXP1_05_PIN PC10 #define EXP1_06_PIN PC12 #define EXP1_07_PIN PD0 #define EXP1_08_PIN PD1 #define EXP2_01_PIN PA6 #define EXP2_02_PIN PA5 #define EXP2_03_PIN PC6 #define EXP2_04_PIN PA4 #define EXP2_05_PIN PC7 #define EXP2_06_PIN PA7 #define EXP2_07_PIN PB10 #define EXP2_08_PIN -1 // RESET // // SPI / SD Card // #define SD_SCK_PIN EXP2_02_PIN #define SD_MISO_PIN EXP2_01_PIN #define SD_MOSI_PIN EXP2_06_PIN #define SDSS EXP2_04_PIN #define SD_DETECT_PIN EXP2_07_PIN // // LCD / Controller // #if ENABLED(FYSETC_242_OLED_12864) #define BTN_EN1 EXP1_01_PIN #define BTN_EN2 EXP1_08_PIN #define BTN_ENC EXP1_02_PIN #define BEEPER_PIN EXP2_03_PIN #define LCD_PINS_DC EXP1_06_PIN #define LCD_PINS_RS EXP2_05_PIN // LCD_RST #define DOGLCD_CS EXP1_04_PIN #define DOGLCD_MOSI EXP1_05_PIN #define DOGLCD_SCK EXP1_03_PIN #define DOGLCD_A0 LCD_PINS_DC #define FORCE_SOFT_SPI #define KILL_PIN -1 // NC #define BOARD_NEOPIXEL_PIN EXP1_07_PIN #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_EN 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_SDSS EXP2_04_PIN #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN #if ENABLED(FYSETC_MINI_12864) // See https://wiki.fysetc.com/Mini12864_Panel #define DOGLCD_CS EXP1_03_PIN #define DOGLCD_A0 EXP1_04_PIN #if ENABLED(FYSETC_GENERIC_12864_1_1) #define LCD_BACKLIGHT_PIN EXP1_07_PIN #endif #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. #if ANY(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 #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 96 #define BOARD_ST7920_DELAY_2 48 #define BOARD_ST7920_DELAY_3 640 #endif #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN PB6 #endif #ifndef RGB_LED_G_PIN #define RGB_LED_G_PIN PB5 #endif #ifndef RGB_LED_B_PIN #define RGB_LED_B_PIN PB7 #endif #ifndef RGB_LED_W_PIN #define RGB_LED_W_PIN -1 #endif
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_FYSETC_S6.h
C
agpl-3.0
9,979
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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_INFO_NAME "FYSETC S6 2.0" // // EEPROM Emulation // #if NO_EEPROM_SELECTED #undef NO_EEPROM_SELECTED //#define FLASH_EEPROM_EMULATION #define I2C_EEPROM #endif // // Steppers // #define X_ENABLE_PIN PE9 #if HAS_TMC_UART #define X_SERIAL_TX_PIN PE8 #define X_SERIAL_RX_PIN PE8 #define Y_SERIAL_TX_PIN PC4 #define Y_SERIAL_RX_PIN PC4 #define Z_SERIAL_TX_PIN PD12 #define Z_SERIAL_RX_PIN PD12 #define E0_SERIAL_TX_PIN PA15 #define E0_SERIAL_RX_PIN PA15 #define E1_SERIAL_TX_PIN PC5 #define E1_SERIAL_RX_PIN PC5 #define E2_SERIAL_TX_PIN PE0 #define E2_SERIAL_RX_PIN PE0 #endif // // SPI pins for TMC2130 stepper drivers // #define TMC_USE_SW_SPI #ifndef TMC_SPI_MOSI #define TMC_SPI_MOSI PE14 #endif #ifndef TMC_SPI_MISO #define TMC_SPI_MISO PE13 #endif #ifndef TMC_SPI_SCK #define TMC_SPI_SCK PE12 #endif #include "pins_FYSETC_S6.h"
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_FYSETC_S6_V2_0.h
C
agpl-3.0
2,058
/** * Marlin 3D Printer Firmware * Copyright (c) 2021 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 #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "FYSETC SPIDER" #endif #ifndef DEFAULT_MACHINE_NAME #define DEFAULT_MACHINE_NAME BOARD_INFO_NAME #endif // // EEPROM Emulation // #if NO_EEPROM_SELECTED #undef NO_EEPROM_SELECTED //#define FLASH_EEPROM_EMULATION //#define SRAM_EEPROM_EMULATION #define I2C_EEPROM #endif #if ENABLED(I2C_EEPROM) #define MARLIN_EEPROM_SIZE 0x1000 // 4K #endif // // Steppers // #define X2_STEP_PIN PD12 #define X2_DIR_PIN PC4 #define X2_ENABLE_PIN PE8 #define X2_CS_PIN PA15 #define Z2_STEP_PIN PE1 #define Z2_DIR_PIN PE0 #define Z2_ENABLE_PIN PC5 #define Z2_CS_PIN PD11 // // Heaters / Fans // #define HEATER_0_PIN PB15 #define HEATER_1_PIN PC8 #define HEATER_2_PIN PB3 #define HEATER_BED_PIN PB4 // // Steppers // #define X_ENABLE_PIN PE9 // // Servos // Z_MAX_PIN only works in input mode // #define SERVO0_PIN PA2 #if HAS_TMC_UART #define X_SERIAL_TX_PIN PE7 #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define X2_SERIAL_TX_PIN PA15 #define X2_SERIAL_RX_PIN X2_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PE15 #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PD10 #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define Z2_SERIAL_TX_PIN PD11 #define Z2_SERIAL_RX_PIN Z2_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PD7 #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN PC14 #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN #define E2_SERIAL_TX_PIN PC15 #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN #endif // // SPI pins for TMC2130 stepper drivers // #define TMC_USE_SW_SPI #ifndef TMC_SPI_MOSI #define TMC_SPI_MOSI PE14 #endif #ifndef TMC_SPI_MISO #define TMC_SPI_MISO PE13 #endif #ifndef TMC_SPI_SCK #define TMC_SPI_SCK PE12 #endif #if HOTENDS > 3 || E_STEPPERS > 3 #error "FYSETC SPIDER supports up to 3 hotends / E steppers." #else #include "pins_FYSETC_S6.h" #endif
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h
C
agpl-3.0
3,346
/** * Marlin 3D Printer Firmware * Copyright (c) 2023 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 > 5 || E_STEPPERS > 5 #error "FYSETC SPIDER KING supports up to 5 hotends / E-steppers." #endif #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "FYSETC SPIDER KING" #endif #ifndef DEFAULT_MACHINE_NAME #define DEFAULT_MACHINE_NAME BOARD_INFO_NAME #endif // // EEPROM Emulation // #if NO_EEPROM_SELECTED #undef NO_EEPROM_SELECTED //#define FLASH_EEPROM_EMULATION //#define SRAM_EEPROM_EMULATION #define I2C_EEPROM #endif #if ENABLED(I2C_EEPROM) #define I2C_EEPROM #define I2C_SCL_PIN PF1 #define I2C_SDA_PIN PF0 #define MARLIN_EEPROM_SIZE 0x1000 // 4KB #endif // // Servos // #define SERVO0_PIN PA1 // // Software SPI pins for TMC2130 stepper drivers // #define TMC_USE_SW_SPI #if ENABLED(TMC_USE_SW_SPI) #ifndef TMC_SPI_MOSI #define TMC_SPI_MOSI PE14 #endif #ifndef TMC_SPI_MISO #define TMC_SPI_MISO PE13 #endif #ifndef TMC_SPI_SCK #define TMC_SPI_SCK PE12 #endif #endif // // Limit Switches // #define X_MIN_PIN PC5 #define Y_MIN_PIN PC4 #define Z_MIN_PIN PB6 #define X_MAX_PIN PB5 #define Y_MAX_PIN PF13 #define Z_MAX_PIN PF14 #ifndef Z_MIN_PROBE_PIN #define Z_MIN_PROBE_PIN PA0 #endif // // Steppers // #define X_STEP_PIN PG7 // "MOT1" #define X_DIR_PIN PG6 #define X_ENABLE_PIN PE11 #define X_CS_PIN PD2 #define X2_STEP_PIN PD11 // "MOT2" #define X2_DIR_PIN PD10 #define X2_ENABLE_PIN PG10 #define X2_CS_PIN PE15 #define Y_STEP_PIN PG14 // "MOT3" #define Y_DIR_PIN PG12 #define Y_ENABLE_PIN PG15 #define Y_CS_PIN PD8 #define Z_STEP_PIN PD4 // "MOT4" #define Z_DIR_PIN PD6 #define Z_ENABLE_PIN PD5 #define Z_CS_PIN PD7 #define Z2_STEP_PIN PE5 // "MOT5" #define Z2_DIR_PIN PC13 #define Z2_ENABLE_PIN PE6 #define Z2_CS_PIN PC14 #define E0_STEP_PIN PE3 // "MOT6" #define E0_DIR_PIN PE4 #define E0_ENABLE_PIN PE2 #define E0_CS_PIN PC15 #define E1_STEP_PIN PG13 // "MOT7" #define E1_DIR_PIN PG8 #define E1_ENABLE_PIN PG9 #define E1_CS_PIN PG3 #define E2_STEP_PIN PE1 // "MOT8" #define E2_DIR_PIN PE0 #define E2_ENABLE_PIN PB2 #define E2_CS_PIN PD9 #define E3_STEP_PIN PF4 // "MOT9" #define E3_DIR_PIN PF3 #define E3_ENABLE_PIN PF2 #define E3_CS_PIN PF5 #define E4_STEP_PIN PF15 // "MOT10" #define E4_DIR_PIN PG0 #define E4_ENABLE_PIN PG5 #define E4_CS_PIN PG11 #if HAS_TMC_UART // // TMC2208/TMC2209 stepper drivers // #define X_SERIAL_TX_PIN PD2 #define X_SERIAL_RX_PIN PD2 #define X2_SERIAL_TX_PIN PE15 #define X2_SERIAL_RX_PIN PE15 #define Y_SERIAL_TX_PIN PD8 #define Y_SERIAL_RX_PIN PD8 #define Z_SERIAL_TX_PIN PD7 #define Z_SERIAL_RX_PIN PD7 #define Z2_SERIAL_TX_PIN PC14 #define Z2_SERIAL_RX_PIN PC14 #define E0_SERIAL_TX_PIN PC15 #define E0_SERIAL_RX_PIN PC15 #define E1_SERIAL_TX_PIN PG3 #define E1_SERIAL_RX_PIN PG3 #define E2_SERIAL_TX_PIN PD9 #define E2_SERIAL_RX_PIN PD9 #define E3_SERIAL_TX_PIN PF5 #define E3_SERIAL_RX_PIN PF5 #define E4_SERIAL_TX_PIN PG11 #define E4_SERIAL_RX_PIN PG11 // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 #endif // // Temperature Sensors // #define TEMP_0_PIN PC1 #define TEMP_1_PIN PF9 #define TEMP_2_PIN PC3 #define TEMP_3_PIN PC2 #define TEMP_4_PIN PC0 //#define TEMP_CHAMBER_PIN PC0 #ifndef TEMP_BED_PIN #define TEMP_BED_PIN PF10 #endif // // Heaters / Fans // #ifndef HEATER_0_PIN #define HEATER_0_PIN PB4 #endif #ifndef HEATER_1_PIN #define HEATER_1_PIN PB0 #endif #ifndef HEATER_2_PIN #define HEATER_2_PIN PD13 #endif #ifndef HEATER_3_PIN #define HEATER_3_PIN PC8 #endif #ifndef HEATER_4_PIN #define HEATER_4_PIN PA15 #endif #ifndef HEATER_BED_PIN #define HEATER_BED_PIN PE10 #endif #ifndef FAN0_PIN #define FAN0_PIN PE8 #endif #ifndef FAN1_PIN #define FAN1_PIN PE9 #endif #ifndef FAN2_PIN #define FAN2_PIN PD15 #endif #ifndef FAN3_PIN #define FAN3_PIN PD12 #endif #ifndef FAN4_PIN #define FAN4_PIN PD14 #endif /** * ------ ------ ------ * PA2 |10 9 | PA3 PA6 |10 9 | PA5 PC9 |10 9 | PA8 * -1 | 8 7 | PB10 PC6 | 8 7 | PA4 PC12 | 8 7 | PD0 * PA6 6 5 | PA7 PC7 | 6 5 PA7 PC10 | 6 5 PC11 * PA5 | 4 3 | PA4 PB10 | 4 3 | RESET PG4 | 4 3 | PE7 * GND | 2 1 | 5V GND | 2 1 | 5V GND | 2 1 | 5V * ------ ------ ------ * EXP3 EXP2 EXP1 */ #define EXP1_03_PIN PE7 // LCD_D7 #define EXP1_04_PIN PG4 // LCD_D6 #define EXP1_05_PIN PC11 // LCD_D5 #define EXP1_06_PIN PC10 // LCD_D4 #define EXP1_07_PIN PD0 // LCD_RS #define EXP1_08_PIN PC12 // LCD_EN #define EXP1_09_PIN PA8 // BTN_ENC #define EXP1_10_PIN PC9 // BEEP #define EXP2_03_PIN -1 // RESET #define EXP2_04_PIN PB10 // CD #define EXP2_05_PIN PA7 // MOSI #define EXP2_06_PIN PC7 // BTN_EN2 #define EXP2_07_PIN PA4 // SS #define EXP2_08_PIN PC6 // BTN_EN1 #define EXP2_09_PIN PA5 // SCK #define EXP2_10_PIN PA6 // MISO #define EXP3_03_PIN PA4 // SS #define EXP3_04_PIN PA5 // SCK #define EXP3_05_PIN PA7 // MOSI #define EXP3_06_PIN PA6 // MISO #define EXP3_07_PIN PB10 // CD #define EXP3_08_PIN -1 // 3V3 #define EXP3_09_PIN PA3 // LCD_RX/RX #define EXP3_10_PIN PA2 // LCD_TX/TX // // SPI / SD Card // #define SD_SCK_PIN EXP2_09_PIN #define SD_MISO_PIN EXP2_10_PIN #define SD_MOSI_PIN EXP2_05_PIN #define SDSS EXP2_07_PIN #define SD_DETECT_PIN EXP2_04_PIN // // LCD / Controller // #if ENABLED(FYSETC_242_OLED_12864) #define BEEPER_PIN EXP2_08_PIN #define BTN_EN1 EXP1_10_PIN #define BTN_EN2 EXP1_03_PIN #define BTN_ENC EXP1_09_PIN #define LCD_PINS_DC EXP1_05_PIN #define LCD_PINS_RS EXP2_06_PIN // LCD_RST #define DOGLCD_CS EXP1_07_PIN #define DOGLCD_MOSI EXP1_06_PIN #define DOGLCD_SCK EXP1_08_PIN #define DOGLCD_A0 LCD_PINS_DC #define FORCE_SOFT_SPI //#define KILL_PIN -1 // NC #define NEOPIXEL_PIN EXP1_04_PIN #elif HAS_WIRED_LCD #define BEEPER_PIN EXP1_10_PIN #define BTN_ENC EXP1_09_PIN #define LCD_PINS_RS EXP1_07_PIN #define BTN_EN1 EXP2_08_PIN #define BTN_EN2 EXP2_06_PIN #define LCD_SDSS EXP2_07_PIN #define LCD_PINS_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #if ENABLED(FYSETC_MINI_12864) // See https://wiki.fysetc.com/Mini12864_Panel #define DOGLCD_CS EXP1_08_PIN #define DOGLCD_A0 EXP1_07_PIN #if ENABLED(FYSETC_GENERIC_12864_1_1) #define LCD_BACKLIGHT_PIN EXP1_04_PIN #endif #define LCD_RESET_PIN EXP1_06_PIN // Must be high or open for LCD to operate normally. #if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN EXP1_05_PIN #endif #ifndef RGB_LED_G_PIN #define RGB_LED_G_PIN EXP1_04_PIN #endif #ifndef RGB_LED_B_PIN #define RGB_LED_B_PIN EXP1_03_PIN #endif #elif ENABLED(FYSETC_MINI_12864_2_1) #define NEOPIXEL_PIN EXP1_05_PIN #endif #endif #if IS_ULTIPANEL #define LCD_PINS_D5 EXP1_05_PIN #define LCD_PINS_D6 EXP1_04_PIN #define LCD_PINS_D7 EXP1_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 #endif // HAS_WIRED_LCD // Alter timing for graphical display #if IS_U8GLIB_ST7920 #define BOARD_ST7920_DELAY_1 96 #define BOARD_ST7920_DELAY_2 48 #define BOARD_ST7920_DELAY_3 640 #endif // // Wifi module // #define ESP_WIFI_MODULE_COM 1 // Set either SERIAL_PORT or SERIAL_PORT_2 to this #define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Use the same BAUDRATE as SERIAL_PORT or SERIAL_PORT_2 #define ESP_WIFI_MODULE_RESET_PIN PB3 #define ESP_WIFI_MODULE_ENABLE_PIN PD1 // PC8 #define ESP_WIFI_MODULE_GPIO0_PIN PG2 // PB4 #define ESP_WIFI_MODULE_GPIO4_PIN PG1 // PB7 // // NeoPixel LED // #ifndef NEOPIXEL_PIN #define NEOPIXEL_PIN PD3 #endif
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER_KING407.h
C
agpl-3.0
12,148
/** * Marlin 3D Printer Firmware * Copyright (c) 2021 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_INFO_NAME "FYSETC SPIDER V22" #define DEFAULT_MACHINE_NAME BOARD_INFO_NAME #define TEMP_3_PIN PC3 #define TEMP_4_PIN PB1 #define TEMP_BED_PIN PB0 #define FAN0_PIN PA13 #define FAN1_PIN PA14 #include "pins_FYSETC_SPIDER.h"
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER_V2_2.h
C
agpl-3.0
1,242
/** * Marlin 3D Printer Firmware * Copyright (c) 2023 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 "I3DBEEZ9 supports up to 3 hotends / E-steppers." #endif #define BOARD_INFO_NAME "3DBEE_Z9 V1.0" #define USES_DIAG_JUMPERS //#define MOTOR_EXPANSION #if ALL(HAS_WIRED_LCD, MOTOR_EXPANSION) #if ANY(CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY) #define EXP_MOT_USE_EXP2_ONLY 1 #else #error "You can't use both an LCD and a Motor Expansion Module on EXP1/EXP2 at the same time." #endif #endif // Use one of these or SDCard-based Emulation will be used #if NO_EEPROM_SELECTED //#define SRAM_EEPROM_EMULATION // Use BackSRAM-based EEPROM emulation #define FLASH_EEPROM_EMULATION // Use Flash-based EEPROM emulation #endif #if ENABLED(FLASH_EEPROM_EMULATION) // Decrease delays and flash wear by spreading writes across the // 128 kB sector allocated for EEPROM emulation. #define FLASH_EEPROM_LEVELING #endif #define HAS_OTG_USB_HOST_SUPPORT // USB Flash Drive support // // Servos // #define SERVO0_PIN PA1 #define SERVO1_PIN PC9 // // Trinamic Stallguard pins // #define X_DIAG_PIN PB10 // X- #define Y_DIAG_PIN PE12 // Y- #define Z_DIAG_PIN PG8 // Z- #define E0_DIAG_PIN PE15 // E0 #define E1_DIAG_PIN PE10 // E1 #define E2_DIAG_PIN PG5 // E2 #define E3_DIAG_PIN PD0 // E3 #define E4_DIAG_PIN PD6 // E4 #define E5_DIAG_PIN PD1 // E5 // // Limit Switches // #ifdef X_STALL_SENSITIVITY #define X_STOP_PIN X_DIAG_PIN #if X_HOME_TO_MIN #define X_MAX_PIN PE15 // E0 #else #define X_MIN_PIN PE15 // E0 #endif #else #define X_MIN_PIN PB10 // X- #define X_MAX_PIN PE15 // E0 #endif #ifdef Y_STALL_SENSITIVITY #define Y_STOP_PIN Y_DIAG_PIN #if Y_HOME_TO_MIN #define Y_MAX_PIN PE10 // E1 #else #define Y_MIN_PIN PE10 // E1 #endif #else #define Y_MIN_PIN PE12 // Y- #define Y_MAX_PIN PE10 // E1 #endif #ifdef Z_STALL_SENSITIVITY #define Z_STOP_PIN Z_DIAG_PIN #if Z_HOME_TO_MIN #define Z_MAX_PIN PG5 // E2 #else #define Z_MIN_PIN PG5 // E2 #endif #else #define Z_MIN_PIN PG8 // Z- #define Z_MAX_PIN PG5 // E2 #endif #ifdef Z2_STALL_SENSITIVITY #define Z2_STOP_PIN E1_DIAG_PIN #if Z2_HOME_TO_MIN #define Z2_MAX_PIN PD0 // E3 #else #define Z2_MIN_PIN PD0 // E3 #endif #else #define Z2_MIN_PIN PD0 // Z2- [E3] #define Z2_MAX_PIN PD6 // E4 #endif // // Z Probe must be this pin // #ifndef Z_MIN_PROBE_PIN #define Z_MIN_PROBE_PIN PA2 #endif // // Filament Runout Sensor // #ifndef FIL_RUNOUT_PIN #define FIL_RUNOUT_PIN PE15 #endif #ifndef FIL_RUNOUT2_PIN #define FIL_RUNOUT2_PIN PE10 #endif #ifndef FIL_RUNOUT3_PIN #define FIL_RUNOUT3_PIN PG5 #endif #ifndef FIL_RUNOUT4_PIN #define FIL_RUNOUT4_PIN PD0 #endif #ifndef FIL_RUNOUT5_PIN #define FIL_RUNOUT5_PIN PD6 #endif #ifndef FIL_RUNOUT6_PIN #define FIL_RUNOUT6_PIN PD1 #endif // // Steppers // #define X_STEP_PIN PE9 #define X_DIR_PIN PF1 #define X_ENABLE_PIN PF2 #ifndef X_CS_PIN #define X_CS_PIN PA15 #endif #define Y_STEP_PIN PE11 #define Y_DIR_PIN PE1 #define Y_ENABLE_PIN PD7 #ifndef Y_CS_PIN #define Y_CS_PIN PB8 #endif #define Z_STEP_PIN PE13 #define Z_DIR_PIN PC2 #define Z_ENABLE_PIN PC0 #ifndef Z_CS_PIN #define Z_CS_PIN PB9 #endif #define E0_STEP_PIN PE14 #define E0_DIR_PIN PA0 #define E0_ENABLE_PIN PC3 #ifndef E0_CS_PIN #define E0_CS_PIN PB3 #endif #define E1_STEP_PIN PD15 #define E1_DIR_PIN PE7 #define E1_ENABLE_PIN PA3 #ifndef E1_CS_PIN #define E1_CS_PIN PG15 #endif #define E2_STEP_PIN PD13 #define E2_DIR_PIN PG9 #define E2_ENABLE_PIN PF0 #ifndef E2_CS_PIN #define E2_CS_PIN PG12 #endif #define E3_STEP_PIN PE4 #define E3_DIR_PIN PE3 #define E3_ENABLE_PIN PC13 #ifndef E3_CS_PIN #define E3_CS_PIN PE2 #endif #define E4_STEP_PIN PG14 #define E4_DIR_PIN PG13 #define E4_ENABLE_PIN PE0 #ifndef E4_CS_PIN #define E4_CS_PIN PG11 #endif #define E5_STEP_PIN PD4 #define E5_DIR_PIN PD3 #define E5_ENABLE_PIN PD5 #ifndef E5_CS_PIN #define E5_CS_PIN PD2 #endif // // SPI pins for TMC2130 stepper drivers // #ifndef TMC_SPI_MOSI #define TMC_SPI_MOSI PC12 #endif #ifndef TMC_SPI_MISO #define TMC_SPI_MISO PC11 #endif #ifndef TMC_SPI_SCK #define TMC_SPI_SCK PC10 #endif #if HAS_TMC_UART /** * TMC2208/TMC2209 stepper drivers * * Hardware serial communication ports. * If undefined software serial is used according to the pins below */ //#define X_HARDWARE_SERIAL Serial1 //#define X2_HARDWARE_SERIAL Serial1 //#define Y_HARDWARE_SERIAL Serial1 //#define Y2_HARDWARE_SERIAL Serial1 //#define Z_HARDWARE_SERIAL Serial1 //#define Z2_HARDWARE_SERIAL Serial1 //#define E0_HARDWARE_SERIAL Serial1 //#define E1_HARDWARE_SERIAL Serial1 //#define E2_HARDWARE_SERIAL Serial1 //#define E3_HARDWARE_SERIAL Serial1 //#define E4_HARDWARE_SERIAL Serial1 #define X_SERIAL_TX_PIN PA15 #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PB8 #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PB9 #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 PG15 #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN #define E2_SERIAL_TX_PIN PG12 #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN #define E3_SERIAL_TX_PIN PE2 #define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN #define E4_SERIAL_TX_PIN PG11 #define E4_SERIAL_RX_PIN E4_SERIAL_TX_PIN #define E5_SERIAL_TX_PIN PD2 #define E5_SERIAL_RX_PIN E5_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 #endif // // Temperature Sensors // Use ADC pins without pullup for sensors that don't need a pullup. // #if TEMP_SENSOR_0_IS_AD8495 || TEMP_SENSOR_0 == 20 #define TEMP_0_PIN PF8 #else #define TEMP_0_PIN PF4 // T1 <-> E0 #endif #if TEMP_SENSOR_1_IS_AD8495 || TEMP_SENSOR_1 == 20 #define TEMP_1_PIN PF9 #else #define TEMP_1_PIN PF5 // T2 <-> E1 #endif #if TEMP_SENSOR_2_IS_AD8495 || TEMP_SENSOR_2 == 20 #define TEMP_2_PIN PF10 #else #define TEMP_2_PIN PF6 // T3 <-> E2 #endif #if TEMP_SENSOR_BED_IS_AD8495 || TEMP_SENSOR_BED == 20 #define TEMP_BED_PIN PF7 #else #define TEMP_BED_PIN PF3 // T0 <-> Bed #endif #if TEMP_SENSOR_PROBE && !defined(TEMP_PROBE_PIN) #if TEMP_SENSOR_PROBE_IS_AD8495 || TEMP_SENSOR_PROBE == 20 #if HOTENDS == 2 #define TEMP_PROBE_PIN PF10 #elif HOTENDS < 2 #define TEMP_PROBE_PIN PF9 #endif #else #if HOTENDS == 2 #define TEMP_PROBE_PIN TEMP_2_PIN #elif HOTENDS < 2 #define TEMP_PROBE_PIN TEMP_1_PIN #endif #endif #endif #if TEMP_SENSOR_CHAMBER && !defined(TEMP_CHAMBER_PIN) #if TEMP_SENSOR_CHAMBER_IS_AD8495 || TEMP_SENSOR_CHAMBER == 20 #define TEMP_CHAMBER_PIN PF10 #else #define TEMP_CHAMBER_PIN TEMP_2_PIN #endif #endif // // Heaters // #define HEATER_0_PIN PB1 // Heater0 #define HEATER_1_PIN PD14 // Heater1 #if TEMP_SENSOR_CHAMBER && HOTENDS < 3 #define HEATER_CHAMBER_PIN PB0 // Heater2 #else #define HEATER_2_PIN PB0 // Heater2 #endif #define HEATER_BED_PIN PD12 // Hotbed // // Fans // #define FAN0_PIN PC8 // Fan0 #define FAN1_PIN PE5 // Fan1 #ifndef E0_AUTO_FAN_PIN #define E0_AUTO_FAN_PIN FAN1_PIN #endif #if !defined(CONTROLLER_FAN_PIN) && ENABLED(USE_CONTROLLER_FAN) && HOTENDS < 2 #define CONTROLLER_FAN_PIN PE6 // Fan2 #else #define FAN2_PIN PE6 // Fan2 #endif // // Misc. Functions // #ifndef SDCARD_CONNECTION #define SDCARD_CONNECTION ONBOARD #endif /** ------ ------ * (BEEPER) PG4 | 1 2 | PA8 (BTN_ENC) (MISO) PB14 | 1 2 | PB13 (SCK) * (LCD_EN) PD11 | 3 4 | PD10 (LCD_RS) (BTN_EN1) PG10 | 3 4 | PB12 (SD_SS) * (LCD_D4) PG2 5 6 | PG3 (LCD_D5) (BTN_EN2) PF11 5 6 | PB15 (MOSI) * (LCD_D6) PG6 | 7 8 | PG7 (LCD_D7) (SD_DETECT) PF12 | 7 8 | RESET * GND | 9 10 | 5V GND | 9 10 | -- * ------ ------ * EXP1 EXP2 */ #define EXP1_01_PIN PG4 #define EXP1_02_PIN PA8 #define EXP1_03_PIN PD11 #define EXP1_04_PIN PD10 #define EXP1_05_PIN PG2 #define EXP1_06_PIN PG3 #define EXP1_07_PIN PG6 #define EXP1_08_PIN PG7 #define EXP2_01_PIN PB14 #define EXP2_02_PIN PB13 #define EXP2_03_PIN PG10 #define EXP2_04_PIN PB12 #define EXP2_05_PIN PF11 #define EXP2_06_PIN PB15 #define EXP2_07_PIN PF12 #define EXP2_08_PIN -1 // // Onboard SD card // Must use soft SPI because Marlin's default hardware SPI is tied to LCD's EXP2 // #if SD_CONNECTION_IS(LCD) #define SD_DETECT_PIN EXP2_07_PIN #define SDSS EXP2_04_PIN #elif SD_CONNECTION_IS(ONBOARD) // The I3DBEEZ9's ONBOARD SD interface is on SPI1. // Due to a pull resistor on the clock line, it needs to use SPI Data Mode 3 to // function with Hardware SPI. This is not currently configurable in the HAL, // so force Software SPI to work around this issue. #define SOFTWARE_SPI #define SDSS PA4 #define SD_SCK_PIN PA5 #define SD_MISO_PIN PA6 #define SD_MOSI_PIN PB5 #define SD_DETECT_PIN PB11 #elif SD_CONNECTION_IS(CUSTOM_CABLE) #error "CUSTOM_CABLE is not a supported SDCARD_CONNECTION for this board" #endif #if ENABLED(MOTOR_EXPANSION) /** ----- ----- * -- | . . | GND -- | . . | GND * -- | . . | M1EN M2EN | . . | M3EN * M1STP | . . M1DIR M1RX | . . M1DIAG * M2DIR | . . | M2STP M2RX | . . | M2DIAG * M3DIR | . . | M3STP M3RX | . . | M3DIAG * ----- ----- * EXP2 EXP1 * * NB In EXP_MOT_USE_EXP2_ONLY mode EXP1 is not used and M2EN and M3EN need to be jumpered to M1EN */ // M1 on Driver Expansion Module #define E6_STEP_PIN EXP2_06_PIN #define E6_DIR_PIN EXP2_05_PIN #define E6_ENABLE_PIN EXP2_07_PIN #if !EXP_MOT_USE_EXP2_ONLY #define E6_DIAG_PIN EXP1_05_PIN #define E6_CS_PIN EXP1_06_PIN #if HAS_TMC_UART #define E6_SERIAL_TX_PIN EXP1_06_PIN #define E6_SERIAL_RX_PIN EXP1_06_PIN #endif #endif // M2 on Driver Expansion Module #define E7_STEP_PIN EXP2_03_PIN #define E7_DIR_PIN EXP2_04_PIN #if !EXP_MOT_USE_EXP2_ONLY #define E7_ENABLE_PIN EXP1_08_PIN #define E7_DIAG_PIN EXP1_03_PIN #define E7_CS_PIN EXP1_04_PIN #if HAS_TMC_UART #define E7_SERIAL_TX_PIN EXP1_04_PIN #define E7_SERIAL_RX_PIN EXP1_04_PIN #endif #else #define E7_ENABLE_PIN EXP2_07_PIN #endif // M3 on Driver Expansion Module #define E8_STEP_PIN EXP2_01_PIN #define E8_DIR_PIN EXP2_02_PIN #if !EXP_MOT_USE_EXP2_ONLY #define E8_ENABLE_PIN EXP1_07_PIN #define E8_DIAG_PIN EXP1_01_PIN #define E8_CS_PIN EXP1_02_PIN #if HAS_TMC_UART #define E8_SERIAL_TX_PIN EXP1_02_PIN #define E8_SERIAL_RX_PIN EXP1_02_PIN #endif #else #define E8_ENABLE_PIN EXP2_07_PIN #endif #endif // // LCD / Controller // #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_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #elif ENABLED(MKS_MINI_12864) #define DOGLCD_A0 EXP1_07_PIN #define DOGLCD_CS EXP1_06_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN #elif ENABLED(WYH_L12864) #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING #error "CAUTION! WYH_L12864 requires wiring modifications. See 'pins_I3DBEEZ9.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" #endif /** * 1. Cut the tab off the LCD connector so it can be plugged into the "EXP1" connector the other way. * 2. Swap the LCD's +5V (Pin2) and GND (Pin1) wires. * * !!! If you are unsure, ask for help! Your motherboard may be damaged in some circumstances !!! * * The WYH_L12864 connector plug: * * BEFORE AFTER * ------ ------ * -- | 1 2 | MOSI -- | 1 2 | MOSI * BTN_ENC | 3 4 | SCK BTN_ENC | 3 4 | SCK * BTN_EN1 | 5 6 SID BTN_EN1 | 5 6 SID * BTN_EN2 | 7 8 | CS BTN_EN2 | 7 8 | CS * 5V | 9 10 | GND GND | 9 10 | 5V * ------ ------ * LCD LCD */ #undef BEEPER_PIN #undef BTN_ENC #define BTN_EN1 EXP1_05_PIN #define BTN_EN2 EXP1_07_PIN #define BTN_ENC EXP1_03_PIN #define DOGLCD_CS EXP1_08_PIN #define DOGLCD_A0 EXP1_06_PIN #define DOGLCD_SCK EXP1_04_PIN #define DOGLCD_MOSI EXP1_02_PIN #define LCD_BACKLIGHT_PIN -1 #else #define LCD_PINS_RS EXP1_04_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN #define LCD_PINS_EN 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 ANY(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 #ifndef BOARD_ST7920_DELAY_1 #define BOARD_ST7920_DELAY_1 125 #endif #ifndef BOARD_ST7920_DELAY_2 #define BOARD_ST7920_DELAY_2 90 #endif #ifndef BOARD_ST7920_DELAY_3 #define BOARD_ST7920_DELAY_3 600 #endif #endif #if ENABLED(WIFISUPPORT) // // WIFI // /** * ------ * RX | 8 7 | 3.3V GPIO0 PF14 ... Leave as unused (ESP3D software configures this with a pullup so OK to leave as floating) * GPIO0 | 6 5 | Reset GPIO2 PF15 ... must be high (ESP3D software configures this with a pullup so OK to leave as floating) * GPIO2 | 4 3 | Enable Reset PG0 ... active low, probably OK to leave floating * GND | 2 1 | TX Enable PG1 ... Must be high for module to run * ------ * W1 */ #define ESP_WIFI_MODULE_COM 6 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this #define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2 #define ESP_WIFI_MODULE_RESET_PIN PG0 #define ESP_WIFI_MODULE_ENABLE_PIN PG1 #define ESP_WIFI_MODULE_GPIO0_PIN PF14 #define ESP_WIFI_MODULE_GPIO2_PIN PF15 #endif
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_I3DBEEZ9.h
C
agpl-3.0
20,261
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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 ALLOW_STM32DUINO #include "env_validate.h" #if HOTENDS > 2 || E_STEPPERS > 2 #error "LERDGE K supports up to 2 hotends / E steppers." #endif #define BOARD_INFO_NAME "Lerdge K" #define DEFAULT_MACHINE_NAME "LERDGE" // EEPROM #if NO_EEPROM_SELECTED #define I2C_EEPROM #define SOFT_I2C_EEPROM // Force the use of Software I2C #define I2C_SCL_PIN PG14 #define I2C_SDA_PIN PG13 #define MARLIN_EEPROM_SIZE 0x10000 #endif #define HAS_OTG_USB_HOST_SUPPORT // USB Flash Drive support // // Servos // #define SERVO0_PIN PB11 // // Limit Switches // #define X_STOP_PIN PG3 #define Y_STOP_PIN PG4 #define Z_STOP_PIN PG5 // // Z Probe (when not Z_MIN_PIN) // //#ifndef Z_MIN_PROBE_PIN // #define Z_MIN_PROBE_PIN PG6 //#endif // // Filament runout // #define FIL_RUNOUT_PIN PE5 #define FIL_RUNOUT2_PIN PE6 // // Steppers // #define X_STEP_PIN PG1 #define X_DIR_PIN PB10 #define X_ENABLE_PIN PG0 //#ifndef X_CS_PIN // #define X_CS_PIN PB2 //#endif #define Y_STEP_PIN PF14 #define Y_DIR_PIN PF15 #define Y_ENABLE_PIN PF13 //#ifndef Y_CS_PIN // #define Y_CS_PIN PE2 //#endif #define Z_STEP_PIN PF11 #define Z_DIR_PIN PF12 #define Z_ENABLE_PIN PC5 //#ifndef Z_CS_PIN // #define Z_CS_PIN PE3 //#endif #define E0_STEP_PIN PC14 #define E0_DIR_PIN PC13 #define E0_ENABLE_PIN PC15 //#ifndef E0_CS_PIN // #define E0_CS_PIN PE4 //#endif #define E1_STEP_PIN PF1 #define E1_DIR_PIN PF0 #define E1_ENABLE_PIN PF2 //#ifndef E1_CS_PIN // #define E1_CS_PIN PE1 //#endif //#define Z2_STEP_PIN PF4 //#define Z2_DIR_PIN PF3 //#define Z2_ENABLE_PIN PF5 //#define Z2_STOP_PIN PG2 //#ifndef Z2_CS_PIN // #define Z2_CS_PIN PE0 //#endif #if HAS_TMC_UART /** * TMC2208/TMC2209 stepper drivers */ #ifndef X_SERIAL_TX_PIN #define X_SERIAL_TX_PIN PB2 #endif #ifndef X_SERIAL_RX_PIN #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #endif #ifndef Y_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PE2 #endif #ifndef Y_SERIAL_RX_PIN #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #endif #ifndef Z_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PE3 #endif #ifndef Z_SERIAL_RX_PIN #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #endif #ifndef E0_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PE4 #endif #ifndef E0_SERIAL_RX_PIN #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #endif #ifndef E1_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN PE1 #endif #ifndef E1_SERIAL_RX_PIN #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN #endif // Ex-motor can be any... X2/Y2/Z2 or E2 #ifndef EX_SERIAL_TX_PIN #define EX_SERIAL_TX_PIN PE0 #endif #ifndef EX_SERIAL_RX_PIN #define EX_SERIAL_RX_PIN EX_SERIAL_TX_PIN #endif //#define Z2_SERIAL_RX_PIN EX_SERIAL_RX_PIN //#define Z2_SERIAL_TX_PIN EX_SERIAL_TX_PIN //#define E2_SERIAL_RX_PIN EX_SERIAL_RX_PIN //#define E2_SERIAL_TX_PIN EX_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE #define TMC_BAUD_RATE 19200 #endif #endif // HAS_TMC_UART // // Temperature Sensors // #define TEMP_0_PIN PC1 // Analog Input #define TEMP_1_PIN PC2 // Analog Input #define TEMP_BED_PIN PC0 // Analog Input // Lergde-K can choose thermocouple/thermistor mode in software. // For use with thermistors, these pins must be OUT/LOW. // This is done automatically. #define TEMP_0_TR_ENABLE_PIN PF10 #define TEMP_1_TR_ENABLE_PIN PF9 // // Heaters / Fans // #define HEATER_0_PIN PA1 #define HEATER_1_PIN PA0 #define HEATER_BED_PIN PA2 #ifndef FAN0_PIN #define FAN0_PIN PF7 #endif #define FAN1_PIN PF6 #ifndef E0_AUTO_FAN_PIN #define E0_AUTO_FAN_PIN PB1 #endif #ifndef E1_AUTO_FAN_PIN #define E1_AUTO_FAN_PIN PB0 #endif #define CONTROLLER_FAN_PIN PF8 // // LED / Lighting // #define LED_PIN PA15 // Status LED //#define CASE_LIGHT_PIN PB6 // LED Ribbon Connector (PWM TIM4_CH1) #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN PB8 // swap R and G pin for compatibility with real wires #endif #ifndef RGB_LED_G_PIN #define RGB_LED_G_PIN PB7 #endif #ifndef RGB_LED_B_PIN #define RGB_LED_B_PIN PB9 #endif // // SD support // #define ONBOARD_SDIO #define SDIO_CLOCK 4800000 #define SD_DETECT_PIN PA8 #if DISABLED(ONBOARD_SDIO) #define SOFTWARE_SPI #define SD_SCK_PIN PC12 #define SD_MISO_PIN PC8 #define SD_MOSI_PIN PD2 #define SD_SS_PIN PC11 #define SDSS PC11 #endif // // Misc. Functions // #define PS_ON_PIN PA4 #define KILL_PIN -1 #define POWER_LOSS_PIN PA4 // Power-loss / nAC_FAULT // // TFT with FSMC interface // #if HAS_FSMC_TFT #ifndef TFT_DRIVER #define TFT_DRIVER ST7796 #endif #define ST7796S_INVERTED #define TFT_RESET_PIN PD6 #define TFT_BACKLIGHT_PIN PD3 #define FSMC_CS_PIN PD7 #define FSMC_RS_PIN PD11 #define TFT_CS_PIN FSMC_CS_PIN #define TFT_RS_PIN FSMC_RS_PIN #define TOUCH_CS_PIN PG15 #define TOUCH_SCK_PIN PB3 #define TOUCH_MOSI_PIN PB5 #define TOUCH_MISO_PIN PB4 #define TOUCH_INT_PIN PG12 #endif #if IS_NEWPANEL #define BEEPER_PIN PC7 #define BTN_EN1 PG11 #define BTN_EN2 PG10 #define BTN_ENC PG9 #ifndef ENCODER_STEPS_PER_MENU_ITEM #define ENCODER_STEPS_PER_MENU_ITEM 2 #endif #endif
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_LERDGE_K.h
C
agpl-3.0
7,929
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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 ALLOW_STM32DUINO #include "env_validate.h" #if HOTENDS > 2 || E_STEPPERS > 2 #error "LERDGE S supports up to 2 hotends / E steppers." #endif #define BOARD_INFO_NAME "Lerdge S" #define DEFAULT_MACHINE_NAME "LERDGE" #define STEP_TIMER 4 #define TEMP_TIMER 2 #define HAS_OTG_USB_HOST_SUPPORT // USB Flash Drive support // // Servos // #define SERVO0_PIN PD12 //#define SERVO1_PIN -1 // // Limit Switches // #define X_MIN_PIN PG9 #define Y_MIN_PIN PG10 #define Z_MIN_PIN PG11 #define X_MAX_PIN PG12 #define Y_MAX_PIN PG13 #define Z_MAX_PIN PG14 // // Filament runout // #define FIL_RUNOUT_PIN PC5 // // Z Probe (when not Z_MIN_PIN) // #ifndef Z_MIN_PROBE_PIN #define Z_MIN_PROBE_PIN PG8 #endif // // Steppers // #define X_STEP_PIN PF7 #define X_DIR_PIN PF8 #define X_ENABLE_PIN PF6 #define Y_STEP_PIN PF10 #define Y_DIR_PIN PF11 #define Y_ENABLE_PIN PF9 #define Z_STEP_PIN PF13 #define Z_DIR_PIN PF14 #define Z_ENABLE_PIN PF12 #define E0_STEP_PIN PG0 #define E0_DIR_PIN PG1 #define E0_ENABLE_PIN PF15 #define E1_STEP_PIN PG3 #define E1_DIR_PIN PG4 #define E1_ENABLE_PIN PG2 // // Temperature Sensors // #define TEMP_0_PIN PC0 // See below for activation of thermistor readings #define TEMP_1_PIN PC1 // See below for activation of thermistor readings #define TEMP_BED_PIN PC3 // Lergde-S can choose thermocouple/thermistor mode in software. // For use with thermistors, these pins must be OUT/LOW. // This is done automatically. #define TEMP_0_TR_ENABLE_PIN PF3 #define TEMP_1_TR_ENABLE_PIN PF4 // MAX6675 Cold-Junction-Compensated K-Thermocouple to Digital Converter (0°C to +1024°C) // https://datasheets.maximintegrated.com/en/ds/MAX6675.pdf #define TEMP_0_CS_PIN PC4 // max6675 datasheet: /CS pin, found with multimeter, not tested and likely wrong #define TEMP_0_SCK_PIN PB3 // max6675 datasheet: SCK pin, found with multimeter, not tested #define TEMP_0_MISO_PIN PB4 // max6675 datasheet: SO pin, found with multimeter, not tested // Expansion board with second max6675 // Warning: Some boards leave the slot unpopulated. //#define TEMP_1_CS_PIN PF1 // max6675 datasheet: /CS pin, found with multimeter, not tested //#define TEMP_1_SCK_PIN PB3 // max6675 datasheet: SCK pin, found with multimeter, not tested //#define TEMP_1_MISO_PIN PB4 // max6675 datasheet: SO pin, found with multimeter, not tested // // Heaters / Fans // #define HEATER_0_PIN PA0 #define HEATER_1_PIN PA1 #define HEATER_BED_PIN PA3 #define FAN0_PIN PA15 // heater 0 fan 1 #define FAN1_PIN PB10 // heater 1 fan 2 #define FAN2_PIN PF5 // heater 0 fan 2 and heater 1 fan 1 (two sockets, switched together) #ifndef E0_AUTO_FAN_PIN #define E0_AUTO_FAN_PIN PF5 #endif // // Průša i3 MK2 Multi Material Multiplexer Support // #if HAS_PRUSA_MMU1 //#define E_MUX0_PIN -1 //#define E_MUX1_PIN -1 #endif // // LED / Lighting // //Lerdge-S board has two LED connectors (this is the one on the mainboard) #define CASE_LIGHT_PIN PC7 //on the dual extrusion addon board is a RGB connector #define RGB_LED_R_PIN PC7 // Shared with the mainboard LED light connector (CASE_LIGHT_PIN) #define RGB_LED_G_PIN PB0 #define RGB_LED_B_PIN PB1 // // Misc. Functions // #define LED_PIN PC6 // Mainboard soldered green LED #define PS_ON_PIN PB2 // Board has a power module connector #define KILL_PIN -1 // There is no reset button on the LCD #define POWER_LOSS_PIN -1 // PB2 could be used for this as well // // SD support // #define ONBOARD_SDIO #define SDIO_CLOCK 4800000 #define SD_DETECT_PIN PG15 #if DISABLED(ONBOARD_SDIO) #define SOFTWARE_SPI #define SD_SCK_PIN PC12 #define SD_MISO_PIN PC8 #define SD_MOSI_PIN PD2 #define SD_SS_PIN PC11 #define SDSS PC11 #endif // // Persistent Storage // If no option is selected below the SD Card will be used // Prefer the I2C option (F-RAM) to store Marlin settings, SPI option is not working yet //#define SPI_EEPROM //#define I2C_EEPROM #if ENABLED(SPI_EEPROM) // SPI EEPROM Winbond W25Q128 (128Mbits) https://www.pjrc.com/teensy/W25Q128FV.pdf #define SPI_CHAN_EEPROM1 1 #define SPI_EEPROM1_CS_PIN PB12 // datasheet: /CS pin, found with multimeter, not tested #define EEPROM_SCK_PIN PB13 // datasheet: CLK pin, found with multimeter, not tested #define EEPROM_MISO_PIN PB14 // datasheet: DO pin, found with multimeter, not tested #define EEPROM_MOSI_PIN PB15 // datasheet: DI pin, found with multimeter, not tested #define EEPROM_PAGE_SIZE 0x1000U // 4K (from datasheet) #define MARLIN_EEPROM_SIZE 16UL * (EEPROM_PAGE_SIZE) // Limit to 64K for now... #elif ENABLED(I2C_EEPROM) // FM24CL64BG (CYP1813) 64Kbit F-RAM #define SOFT_I2C_EEPROM // Force the use of Software I2C #define I2C_SDA_PIN PG13 #define I2C_SCL_PIN PG14 // To be confirmed on the Lerdge S, but probably same as the K #define MARLIN_EEPROM_SIZE 0x2000U // 8K #else #define MARLIN_EEPROM_SIZE 0x800U // On SD, Limit to 2K, require this amount of RAM #endif // // TFT with FSMC interface // #if HAS_FSMC_TFT #ifndef TFT_DRIVER #define TFT_DRIVER ST7796 #endif #define ST7796S_INVERTED #define TFT_RESET_PIN PD6 #define TFT_BACKLIGHT_PIN PD3 #define FSMC_CS_PIN PD7 #define FSMC_RS_PIN PD11 #define TFT_CS_PIN FSMC_CS_PIN #define TFT_RS_PIN FSMC_RS_PIN #define TOUCH_CS_PIN PB6 #define TOUCH_SCK_PIN PB3 #define TOUCH_MOSI_PIN PB5 #define TOUCH_MISO_PIN PB4 #endif #if IS_NEWPANEL #define BEEPER_PIN PD13 #define BTN_EN1 PC15 #define BTN_EN2 PC14 #define BTN_ENC PC13 #ifndef ENCODER_STEPS_PER_MENU_ITEM #define ENCODER_STEPS_PER_MENU_ITEM 2 #endif #endif
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_LERDGE_S.h
C
agpl-3.0
8,443
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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 ALLOW_STM32DUINO #include "env_validate.h" #if HAS_MULTI_HOTEND || E_STEPPERS > 1 #error "LERDGE X only supports 1 hotend / E stepper." #endif #define BOARD_INFO_NAME "Lerdge X" #define DEFAULT_MACHINE_NAME "LERDGE" #define STEP_TIMER 4 #define TEMP_TIMER 2 #define I2C_EEPROM #define I2C_SCL_PIN PB8 #define I2C_SDA_PIN PB9 #define MARLIN_EEPROM_SIZE 0x10000 // FM24CL64 F-RAM 64K (8Kx8) #define HAS_OTG_USB_HOST_SUPPORT // USB Flash Drive support // // Servos // //#define SERVO0_PIN PD13 // // Limit Switches // #define X_STOP_PIN PB12 #define Y_STOP_PIN PB13 #define Z_STOP_PIN PB14 // // Filament runout // #define FIL_RUNOUT_PIN PE1 // // Z Probe (when not Z_MIN_PIN) // //#ifndef Z_MIN_PROBE_PIN // #define Z_MIN_PROBE_PIN PB15 //#endif // // Steppers // #define X_STEP_PIN PB10 #define X_DIR_PIN PB2 #define X_ENABLE_PIN PB11 #define Y_STEP_PIN PB0 #define Y_DIR_PIN PC5 #define Y_ENABLE_PIN PB1 #define Z_STEP_PIN PA7 #define Z_DIR_PIN PA6 #define Z_ENABLE_PIN PC4 #define E0_STEP_PIN PA4 #define E0_DIR_PIN PA3 #define E0_ENABLE_PIN PA5 // // Temperature Sensors // #define TEMP_0_PIN PC0 // Analog Input #define TEMP_1_PIN -1 // Analog Input #define TEMP_BED_PIN PC1 // Analog Input // // Heaters / Fans // #define HEATER_0_PIN PA1 #define HEATER_1_PIN -1 #define HEATER_BED_PIN PA2 //#ifndef FAN0_PIN // #define FAN0_PIN PC15 //#endif #define FAN1_PIN PC15 #define FAN2_PIN PA0 #ifndef E0_AUTO_FAN_PIN #define E0_AUTO_FAN_PIN PC15 // FAN1_PIN #endif // // LED / Lighting // //#define CASE_LIGHT_PIN_CI -1 //#define CASE_LIGHT_PIN_DO -1 // // SD support (On board) // #define ONBOARD_SDIO #define SD_DETECT_PIN PA8 #define SDIO_CLOCK 4800000 #if DISABLED(ONBOARD_SDIO) #define SOFTWARE_SPI #define SD_SCK_PIN PC12 #define SD_MISO_PIN PC8 #define SD_MOSI_PIN PD2 #define SD_SS_PIN PC11 #define SDSS PC11 #endif // // Misc. Functions // #define LED_PIN PC7 // Alive #define PS_ON_PIN -1 #define KILL_PIN -1 // Lerdge supports auto-power off and power loss sense through a single pin. #define POWER_LOSS_PIN PC14 // Power-loss / nAC_FAULT // // TFT with FSMC interface // #if HAS_FSMC_TFT #ifndef TFT_DRIVER #define TFT_DRIVER ST7796 #endif #define ST7796S_INVERTED #define FSMC_CS_PIN PD7 #define FSMC_RS_PIN PD11 #define TFT_RESET_PIN PD6 #define TFT_BACKLIGHT_PIN PD3 #define TFT_CS_PIN FSMC_CS_PIN #define TFT_RS_PIN FSMC_RS_PIN #define TOUCH_CS_PIN PB6 #define TOUCH_SCK_PIN PB3 #define TOUCH_MOSI_PIN PB5 #define TOUCH_MISO_PIN PB4 #endif #if IS_NEWPANEL #define BEEPER_PIN PD12 #define BTN_EN1 PE4 #define BTN_EN2 PE3 #define BTN_ENC PE2 #ifndef ENCODER_STEPS_PER_MENU_ITEM #define ENCODER_STEPS_PER_MENU_ITEM 2 #endif #endif
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_LERDGE_X.h
C
agpl-3.0
4,986
/** * Marlin 3D Printer Firmware * Copyright (c) 2023 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 #if NOT_TARGET(STM32F4) #error "Oops! Select an STM32F4 board in 'Tools > Board.'" #endif #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "Mellow Fly E3 V2" #endif // If you have the BigTreeTech driver expansion module, enable BTT_MOTOR_EXPANSION // https://github.com/bigtreetech/BTT-Expansion-module/tree/master/BTT%20EXP-MOT //#define BTT_MOTOR_EXPANSION #if ALL(HAS_WIRED_LCD, BTT_MOTOR_EXPANSION) #if ANY(CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY) #define EXP_MOT_USE_EXP2_ONLY 1 #else #error "You can't use both an LCD and a Motor Expansion Module on EXP1/EXP2 at the same time." #endif #endif // Use one of these or SDCard-based Emulation will be used #if NO_EEPROM_SELECTED //#define SRAM_EEPROM_EMULATION // Use BackSRAM-based EEPROM emulation #define FLASH_EEPROM_EMULATION // Use Flash-based EEPROM emulation #endif #if ENABLED(FLASH_EEPROM_EMULATION) // Decrease delays and flash wear by spreading writes across the // 128 kB sector allocated for EEPROM emulation. #define FLASH_EEPROM_LEVELING #endif // // Servos // #define SERVO0_PIN PE6 // SERVOS // // Trinamic Stallguard pins // #define X_DIAG_PIN PE7 // X-STOP #define Y_DIAG_PIN PE8 // Y-STOP #define Z_DIAG_PIN PE9 // Z-STOP // // Limit Switches // #ifdef X_STALL_SENSITIVITY #define X_STOP_PIN X_DIAG_PIN #else #define X_STOP_PIN PE7 // X-STOP #endif #ifdef Y_STALL_SENSITIVITY #define Y_STOP_PIN Y_DIAG_PIN #else #define Y_STOP_PIN PE8 // Y-STOP #endif #ifdef Z_STALL_SENSITIVITY #define Z_STOP_PIN Z_DIAG_PIN #else #ifndef Z_STOP_PIN #define Z_STOP_PIN PE9 // Z-STOP #endif #endif // // Z Probe must be this pin // #define Z_MIN_PROBE_PIN PC2 // PROBE // // Probe enable // #if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) #define PROBE_ENABLE_PIN SERVO0_PIN #endif // // Steppers // #define X_ENABLE_PIN PC1 #define X_STEP_PIN PE5 #define X_DIR_PIN PC0 #ifndef X_CS_PIN #define X_CS_PIN PC15 #endif #define Y_ENABLE_PIN PC14 #define Y_STEP_PIN PE4 #define Y_DIR_PIN PC13 #ifndef Y_CS_PIN #define Y_CS_PIN PB6 #endif #define Z_ENABLE_PIN PE3 #define Z_STEP_PIN PE1 #define Z_DIR_PIN PB7 #ifndef Z_CS_PIN #define Z_CS_PIN PD7 #endif #define E0_ENABLE_PIN PD6 #define E0_STEP_PIN PE2 #define E0_DIR_PIN PD5 #ifndef E0_CS_PIN #define E0_CS_PIN PD4 #endif #define E1_ENABLE_PIN PD3 #define E1_STEP_PIN PE0 #define E1_DIR_PIN PD1 #ifndef E1_CS_PIN #define E1_CS_PIN PD0 #endif // // Temperature Sensors // #define TEMP_BED_PIN PB1 // Analog Input "TB" #define TEMP_0_PIN PC4 // Analog Input "TH0" #define TEMP_1_PIN PC5 // Analog Input "TH0" // // Heaters / Fans // #ifndef HEATER_BED_PIN #define HEATER_BED_PIN PB0 // "HB" #endif #ifndef HEATER_0_PIN #define HEATER_0_PIN PC6 // "HE0" #endif #ifndef HEATER_1_PIN #define HEATER_1_PIN PC7 // "HE0" #endif #ifndef FAN0_PIN #define FAN0_PIN PA0 // "FAN0" #endif #ifndef FAN1_PIN #define FAN1_PIN PA1 #endif #ifndef FAN2_PIN #define FAN2_PIN PA2 #endif #ifndef FAN3_PIN #define FAN3_PIN PA3 #endif #ifndef TMC_SPI_MOSI #define TMC_SPI_MOSI PB5 #endif #ifndef TMC_SPI_MISO #define TMC_SPI_MISO PB4 #endif #ifndef TMC_SPI_SCK #define TMC_SPI_SCK PB3 #endif #if HAS_TMC_UART /** * TMC2208/TMC2209 stepper drivers * * Hardware serial communication ports. * If undefined software serial is used according to the pins below */ //#define X_HARDWARE_SERIAL Serial1 //#define X2_HARDWARE_SERIAL Serial1 //#define Y_HARDWARE_SERIAL Serial1 //#define Y2_HARDWARE_SERIAL Serial1 //#define Z_HARDWARE_SERIAL Serial1 //#define Z2_HARDWARE_SERIAL Serial1 //#define E0_HARDWARE_SERIAL Serial1 //#define E1_HARDWARE_SERIAL Serial1 //#define E2_HARDWARE_SERIAL Serial1 //#define E3_HARDWARE_SERIAL Serial1 //#define E4_HARDWARE_SERIAL Serial1 // // Software serial // #define X_SERIAL_TX_PIN PC15 #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PB6 #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PD7 #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PD4 #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN PD0 #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE #define TMC_BAUD_RATE 19200 #endif #endif // HAS_TMC_UART #ifndef SDCARD_CONNECTION #define SDCARD_CONNECTION ONBOARD #endif /** * Fly-E3-v2 * ------ ------ * (BEEPER) PD10 | 1 2 | PA9 (BTN_ENC) (MISO) PA6 | 1 2 | PA5 (SCK) * (LCD_EN) PA8 | 3 4 | PA10 (LCD_RS) (BTN_EN1) PB11 | 3 4 | PA4 (SD_SS) * (LCD_D4) PE15 | 5 6 PE14 (LCD_D5) (BTN_EN2) PB10 | 5 6 | PA7 (MOSI) * (LCD_D6) PA14 | 7 8 | PA13 (LCD_D7) (SD_DETECT) PE13 | 7 8 | RESET * GND | 9 10 | 5V GND | 9 10 | -- * ------ ------ * EXP1 EXP2 */ #define EXP1_01_PIN PD10 #define EXP1_02_PIN PA9 #define EXP1_03_PIN PA8 #define EXP1_04_PIN PA10 #define EXP1_05_PIN PE15 #define EXP1_06_PIN PE14 #define EXP1_07_PIN PA14 #define EXP1_08_PIN PA13 #define EXP2_01_PIN PA6 #define EXP2_02_PIN PA5 #define EXP2_03_PIN PB11 #define EXP2_04_PIN PA4 #define EXP2_05_PIN PB10 #define EXP2_06_PIN PA7 #define EXP2_07_PIN PE13 #define EXP2_08_PIN -1 // // Onboard SD card // Must use soft SPI because Marlin's default hardware SPI is tied to LCD's EXP2 // #if SD_CONNECTION_IS(LCD) #define SDSS EXP2_04_PIN #define SD_SS_PIN SDSS #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(ONBOARD) #define ONBOARD_SDIO // Use SDIO for onboard SD #elif SD_CONNECTION_IS(CUSTOM_CABLE) #error "No custom SD drive cable defined for this board." #endif #if ENABLED(BTT_MOTOR_EXPANSION) /** ----- ----- * -- | . . | GND -- | . . | GND * -- | . . | M1EN M2EN | . . | M3EN * M1STP | . . M1DIR M1RX | . . M1DIAG * M2DIR | . . | M2STP M2RX | . . | M2DIAG * M3DIR | . . | M3STP M3RX | . . | M3DIAG * ----- ----- * EXP2 EXP1 * * NB In EXP_MOT_USE_EXP2_ONLY mode EXP1 is not used and M2EN and M3EN need to be jumpered to M1EN */ // M1 on Driver Expansion Module #define E2_STEP_PIN EXP2_06_PIN #define E2_DIR_PIN EXP2_05_PIN #define E2_ENABLE_PIN EXP2_07_PIN #if !EXP_MOT_USE_EXP2_ONLY #define E2_DIAG_PIN EXP1_05_PIN #define E2_CS_PIN EXP1_06_PIN #if HAS_TMC_UART #define E2_SERIAL_TX_PIN EXP1_06_PIN #define E2_SERIAL_RX_PIN EXP1_06_PIN #endif #endif // M2 on Driver Expansion Module #define E3_STEP_PIN EXP2_03_PIN #define E3_DIR_PIN EXP2_04_PIN #if !EXP_MOT_USE_EXP2_ONLY #define E3_ENABLE_PIN EXP1_08_PIN #define E3_DIAG_PIN EXP1_03_PIN #define E3_CS_PIN EXP1_04_PIN #if HAS_TMC_UART #define E3_SERIAL_TX_PIN EXP1_04_PIN #define E3_SERIAL_RX_PIN EXP1_04_PIN #endif #else #define E3_ENABLE_PIN EXP2_07_PIN #endif // M3 on Driver Expansion Module #define E4_STEP_PIN EXP2_01_PIN #define E4_DIR_PIN EXP2_02_PIN #if !EXP_MOT_USE_EXP2_ONLY #define E4_ENABLE_PIN EXP1_07_PIN #define E4_DIAG_PIN EXP1_01_PIN #define E4_CS_PIN EXP1_02_PIN #if HAS_TMC_UART #define E4_SERIAL_TX_PIN EXP1_02_PIN #define E4_SERIAL_RX_PIN EXP1_02_PIN #endif #else #define E4_ENABLE_PIN EXP2_07_PIN #endif #endif // BTT_MOTOR_EXPANSION // // LCD / Controller // #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_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #elif ENABLED(MKS_MINI_12864) #define DOGLCD_A0 EXP1_07_PIN #define DOGLCD_CS EXP1_06_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN #else #define LCD_PINS_RS EXP1_04_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN #define LCD_PINS_EN 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 ANY(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 #if HAS_SPI_TFT #define TFT_SCK_PIN EXP2_02_PIN #define TFT_MISO_PIN EXP2_01_PIN #define TFT_MOSI_PIN EXP2_06_PIN #define BTN_ENC EXP1_02_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN #ifndef TFT_WIDTH #define TFT_WIDTH 480 #endif #ifndef TFT_HEIGHT #define TFT_HEIGHT 320 #endif #if ENABLED(BTT_TFT35_SPI_V1_0) // 480x320, 3.5", SPI Display with Rotary Encoder. // Stock Display for the BIQU B1 SE. #define TFT_CS_PIN EXP2_04_PIN #define TFT_DC_PIN EXP2_07_PIN #define TFT_A0_PIN TFT_DC_PIN #define TOUCH_CS_PIN EXP1_04_PIN #define TOUCH_SCK_PIN EXP1_05_PIN #define TOUCH_MISO_PIN EXP1_06_PIN #define TOUCH_MOSI_PIN EXP1_03_PIN #define TOUCH_INT_PIN EXP1_07_PIN #ifndef TOUCH_CALIBRATION_X #define TOUCH_CALIBRATION_X 17540 #endif #ifndef TOUCH_CALIBRATION_Y #define TOUCH_CALIBRATION_Y -11388 #endif #ifndef TOUCH_OFFSET_X #define TOUCH_OFFSET_X -21 #endif #ifndef TOUCH_OFFSET_Y #define TOUCH_OFFSET_Y 337 #endif #ifndef TOUCH_ORIENTATION #define TOUCH_ORIENTATION TOUCH_LANDSCAPE #endif #elif ENABLED(MKS_TS35_V2_0) /** ------ ------ * BEEPER | 1 2 | BTN_ENC SPI1_MISO | 1 2 | SPI1_SCK * TFT_BKL / LCD_EN | 3 4 | TFT_RESET / LCD_RS BTN_EN1 | 3 4 | SPI1_CS * TOUCH_CS / LCD_D4 | 5 6 TOUCH_INT / LCD_D5 BTN_EN2 | 5 6 SPI1_MOSI * SPI1_CS / LCD_D6 | 7 8 | SPI1_RS / LCD_D7 SPI1_RS | 7 8 | RESET * GND | 9 10 | VCC GND | 9 10 | VCC * ------ ------ * EXP1 EXP2 */ #define TFT_CS_PIN EXP1_07_PIN // SPI1_CS #define TFT_DC_PIN EXP1_08_PIN // SPI1_RS #define TFT_A0_PIN TFT_DC_PIN #define TFT_RESET_PIN EXP1_04_PIN #define LCD_BACKLIGHT_PIN EXP1_03_PIN #define TFT_BACKLIGHT_PIN LCD_BACKLIGHT_PIN #define TOUCH_BUTTONS_HW_SPI #define TOUCH_BUTTONS_HW_SPI_DEVICE 1 #define TOUCH_CS_PIN EXP1_05_PIN // SPI1_NSS #define TOUCH_SCK_PIN EXP2_02_PIN // SPI1_SCK #define TOUCH_MISO_PIN EXP2_01_PIN // SPI1_MISO #define TOUCH_MOSI_PIN EXP2_06_PIN // SPI1_MOSI #define LCD_READ_ID 0xD3 #define LCD_USE_DMA_SPI #define TFT_BUFFER_SIZE 14400 #endif #endif // HAS_SPI_TFT // Alter timing for graphical display #if IS_U8GLIB_ST7920 #ifndef BOARD_ST7920_DELAY_1 #define BOARD_ST7920_DELAY_1 120 #endif #ifndef BOARD_ST7920_DELAY_2 #define BOARD_ST7920_DELAY_2 80 #endif #ifndef BOARD_ST7920_DELAY_3 #define BOARD_ST7920_DELAY_3 580 #endif #endif //#define POWER_MONITOR_VOLTAGE_PIN PC3 // // WiFi // #if ENABLED(WIFISUPPORT) #define ESP_WIFI_MODULE_COM 3 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this #define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2 #define ESP_WIFI_MODULE_RESET_PIN PE11 #define ESP_WIFI_MODULE_GPIO0_PIN PE10 #define ESP_WIFI_MODULE_GPIO4_PIN PE12 #endif
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_MELLOW_FLY_E3_V2.h
C
agpl-3.0
16,552
/** * Marlin 3D Printer Firmware * Copyright (c) 2021 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 ALLOW_STM32DUINO #include "env_validate.h" #if HOTENDS > 2 || E_STEPPERS > 2 #error "MKS Eagle supports up to 2 hotends / E steppers." #elif HAS_FSMC_TFT #error "MKS Eagle doesn't support FSMC-based TFT displays." #endif #define BOARD_INFO_NAME "MKS Eagle" #include "pins_MKS_ROBIN_NANO_V3_common.h"
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_MKS_EAGLE.h
C
agpl-3.0
1,191
/** * 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_INFO_NAME "MKS Monster8 V1" // // Limit Switches // #define X_MIN_PIN PA14 #define X_MAX_PIN PA13 #define Y_MIN_PIN PA15 #define Y_MAX_PIN PC5 // // Steppers // #define E4_ENABLE_PIN PD14 // Driver7 // // Misc. Functions // #define PW_DET PC5 // Y+ #define PW_OFF PB12 // Z+ #define MT_DET_1_PIN PW_DET #define MT_DET_2_PIN PW_OFF #ifndef FIL_RUNOUT_PIN #define FIL_RUNOUT_PIN MT_DET_1_PIN #endif #ifndef FIL_RUNOUT2_PIN #define FIL_RUNOUT2_PIN MT_DET_2_PIN #endif #include "pins_MKS_MONSTER8_common.h"
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_V1.h
C
agpl-3.0
1,652
/** * 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_INFO_NAME "MKS Monster8 V2" // // Limit Switches // #define X_STOP_PIN PA14 #define Y_STOP_PIN PA15 // // Steppers // #define E4_ENABLE_PIN PB6 // Driver7 // // Misc. Functions // #define PW_DET PA13 // MT_DET #define PW_OFF PB12 // Z+ #define MT_DET_1_PIN PW_DET #define MT_DET_2_PIN PW_OFF #ifndef FIL_RUNOUT_PIN #define FIL_RUNOUT_PIN MT_DET_1_PIN #endif #ifndef FIL_RUNOUT2_PIN #define FIL_RUNOUT2_PIN MT_DET_2_PIN #endif // // MKS WIFI MODULE // //#define WIFI_SERIAL_PORT 1 // USART1 #if ENABLED(MKS_WIFI_MODULE) #define WIFI_IO0_PIN PB14 // MKS ESP WIFI IO0 PIN #define WIFI_IO1_PIN PB15 // MKS ESP WIFI IO1 PIN #define WIFI_RESET_PIN PD14 // MKS ESP WIFI RESET PIN #endif // The FYSETC_MINI_12864_2_1 uses one of the EXP pins #define BOARD_NEOPIXEL_PIN PC5 #include "pins_MKS_MONSTER8_common.h"
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_V2.h
C
agpl-3.0
2,008
/** * Marlin 3D Printer Firmware * Copyright (c) 2021 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 ALLOW_STM32DUINO #include "env_validate.h" #if HOTENDS > 3 || E_STEPPERS > 5 #error "MKS Monster supports up to 3 hotends and 5 E steppers." #elif HAS_FSMC_TFT #error "MKS Monster doesn't support FSMC-based TFT displays." #endif #define HAS_OTG_USB_HOST_SUPPORT // USB Flash Drive support #define USES_DIAG_JUMPERS //#define DISABLE_DEBUG // Avoid conflict with TIMER_TONE #define STEP_TIMER 10 // Use one of these or SDCard-based Emulation will be used //#define SRAM_EEPROM_EMULATION // Use BackSRAM-based EEPROM emulation //#define FLASH_EEPROM_EMULATION // Use Flash-based EEPROM emulation #define I2C_EEPROM // Need use jumpers set i2c for EEPROM #define MARLIN_EEPROM_SIZE 0x1000 // 4K #define I2C_SCL_PIN PB8 // I2C_SCL and CAN_RX #define I2C_SDA_PIN PB9 // I2C_SDA and CAN_TX // // Servos // #define SERVO0_PIN PA8 // Enable BLTOUCH // // Limit Switches for diag signals // #define X_DIAG_PIN PA14 // Driver0 diag signal is connected to X- #define Y_DIAG_PIN PA15 // Driver1 diag signal is connected to Y- #define Z_DIAG_PIN PB13 // Driver2 diag signal is connected to Z- #define E0_DIAG_PIN PA13 // Driver3 diag signal is connected to X+ #define E1_DIAG_PIN PC5 // Driver4 diag signal is connected to Y+ #define E2_DIAG_PIN PB12 // Driver5 diag signal is connected to Z+ #define E3_DIAG_PIN -1 // Driver6 diag signal is not connected #define E4_DIAG_PIN -1 // Driver7 diag signal is not connected // Limit Switches for endstops #define Z_MIN_PIN PB13 #define Z_MAX_PIN PB12 // // Probe enable // #if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) #define PROBE_ENABLE_PIN SERVO0_PIN #endif // // Steppers // #define X_ENABLE_PIN PC15 // Driver0 #define X_STEP_PIN PC14 #define X_DIR_PIN PC13 #ifndef X_CS_PIN #define X_CS_PIN PE6 #endif #define Y_ENABLE_PIN PC15 // Driver1 #define Y_STEP_PIN PE5 #define Y_DIR_PIN PE4 #ifndef Y_CS_PIN #define Y_CS_PIN PE3 #endif #define Z_ENABLE_PIN PE2 // Driver2 #define Z_STEP_PIN PE1 #define Z_DIR_PIN PE0 #ifndef Z_CS_PIN #define Z_CS_PIN PB7 #endif #define E0_ENABLE_PIN PB6 // Driver3 #define E0_STEP_PIN PB5 #define E0_DIR_PIN PB4 #ifndef E0_CS_PIN #define E0_CS_PIN PB3 #endif #define E1_ENABLE_PIN PD7 // Driver4 #define E1_STEP_PIN PD6 #define E1_DIR_PIN PD5 #ifndef E1_CS_PIN #define E1_CS_PIN PD4 #endif #define E2_ENABLE_PIN PD3 // Driver5 #define E2_STEP_PIN PD2 #define E2_DIR_PIN PD1 #ifndef E2_CS_PIN #define E2_CS_PIN PD0 #endif #define E3_ENABLE_PIN PC8 // Driver6 #define E3_STEP_PIN PC7 #define E3_DIR_PIN PC6 #ifndef E3_CS_PIN #define E3_CS_PIN PD15 #endif #define E4_STEP_PIN PD13 // Driver7 #define E4_DIR_PIN PD12 #ifndef E4_CS_PIN #define E4_CS_PIN PD11 #endif // // Default pins for TMC software SPI // This board only supports SW SPI for stepper drivers // #if HAS_TMC_SPI #define TMC_USE_SW_SPI #endif #if !defined(TMC_SPI_MOSI) || TMC_SPI_MOSI == -1 #undef TMC_SPI_MOSI #define TMC_SPI_MOSI PE14 #endif #if !defined(TMC_SPI_MISO) || TMC_SPI_MISO == -1 #undef TMC_SPI_MISO #define TMC_SPI_MISO PE13 #endif #if !defined(TMC_SPI_SCK) || TMC_SPI_SCK == -1 #undef TMC_SPI_SCK #define TMC_SPI_SCK PE12 #endif #if HAS_TMC_UART // // Software serial // No Hardware serial for steppers // #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 #define E4_SERIAL_TX_PIN PD11 #define E4_SERIAL_RX_PIN E4_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE #define TMC_BAUD_RATE 19200 #endif #endif // HAS_TMC_UART // // Temperature Sensors // #define TEMP_0_PIN PC1 // TH0 #define TEMP_1_PIN PC2 // TH1 #define TEMP_2_PIN PC3 // TH2 #define TEMP_BED_PIN PC0 // TB // // Heaters / Fans // #define HEATER_0_PIN PB1 // HE0 #define HEATER_1_PIN PB0 // HE1 #define HEATER_2_PIN PA3 // HE2 #define HEATER_BED_PIN PB10 // H-BED #define FAN0_PIN PA2 // FAN0 #define FAN1_PIN PA1 // FAN1 #define FAN2_PIN PA0 // FAN2 // // Power Supply Control // #if ENABLED(MKS_PWC) #define PS_ON_PIN PW_OFF #define KILL_PIN PW_DET #define KILL_PIN_STATE HIGH #endif /** * ------ ------ * (BEEPER) PB2 | 1 2 | PE10 (BTN_ENC) (SPI1 MISO) PA6 | 1 2 | PA5 (SPI1 SCK) * (LCD_EN) PE11 | 3 4 | PD10 (LCD_RS) (BTN_EN1) PE9 | 3 4 | PA4 (SPI1 CS) * (LCD_D4) PD9 5 6 | PD8 (LCD_D5) (BTN_EN2) PE8 5 6 | PA7 (SPI1 MOSI) * (LCD_D6) PE15 | 7 8 | PE7 (LCD_D7) (SPI1_RS) PB11 | 7 8 | RESET * GND | 9 10 | 5V GND | 9 10 | 3.3V * ------ ------ * 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 PB11 #define EXP2_08_PIN -1 // RESET // // SD Support // #ifndef SDCARD_CONNECTION #if HAS_WIRED_LCD && DISABLED(NO_LCD_SDCARD) #define SDCARD_CONNECTION LCD #else #define SDCARD_CONNECTION ONBOARD #endif #endif // // Onboard SD card // Must use soft SPI because Marlin's default hardware SPI is tied to LCD's EXP2 // #if SD_CONNECTION_IS(ONBOARD) #define ENABLE_SPI3 #define SD_SS_PIN -1 #define SDSS PC9 #define SD_SCK_PIN PC10 #define SD_MISO_PIN PC11 #define SD_MOSI_PIN PC12 #define SD_DETECT_PIN PC4 // SD_DETECT_PIN doesn't work with NO_SD_HOST_DRIVE disabled #elif SD_CONNECTION_IS(LCD) #define ENABLE_SPI1 #define SDSS 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 BOARD_MKS_MONSTER8_V1/V2." #endif #if 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_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #else #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_RS EXP1_04_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN // MKS MINI12864 and MKS LCD12864B; If using MKS LCD12864A (Need to remove RPK2 resistor) #if ENABLED(MKS_MINI_12864) #define ENABLE_SPI1 #define FORCE_SOFT_SPI #define DOGLCD_A0 EXP1_07_PIN #define DOGLCD_CS EXP1_06_PIN #define DOGLCD_SCK EXP2_02_PIN #define DOGLCD_MOSI EXP2_06_PIN //#define LCD_BACKLIGHT_PIN -1 //#define LCD_RESET_PIN -1 #elif ENABLED(FYSETC_MINI_12864_2_1) #define LCD_PINS_DC EXP1_04_PIN #define DOGLCD_CS EXP1_03_PIN #define DOGLCD_A0 LCD_PINS_DC #define LCD_BACKLIGHT_PIN -1 #define LCD_RESET_PIN EXP1_05_PIN #define NEOPIXEL_PIN EXP1_06_PIN #define DOGLCD_MOSI EXP2_06_PIN #define DOGLCD_SCK EXP2_02_PIN #if SD_CONNECTION_IS(ONBOARD) #define FORCE_SOFT_SPI #endif //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 #else #define LCD_PINS_D4 EXP1_05_PIN #if IS_ULTIPANEL #define LCD_PINS_D5 EXP1_06_PIN #define LCD_PINS_D6 EXP1_07_PIN #define LCD_PINS_D7 EXP1_08_PIN #endif #ifndef BOARD_ST7920_DELAY_1 #define BOARD_ST7920_DELAY_1 96 #endif #ifndef BOARD_ST7920_DELAY_2 #define BOARD_ST7920_DELAY_2 48 #endif #ifndef BOARD_ST7920_DELAY_3 #define BOARD_ST7920_DELAY_3 600 #endif #endif #endif #endif // HAS_WIRED_LCD #if HAS_SPI_TFT // Config for Classic UI (emulated DOGM) and Color UI #define TFT_SCK_PIN EXP2_02_PIN #define TFT_MISO_PIN EXP2_01_PIN #define TFT_MOSI_PIN EXP2_06_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN #ifndef TFT_WIDTH #define TFT_WIDTH 480 #endif #ifndef TFT_HEIGHT #define TFT_HEIGHT 320 #endif #if ENABLED(BTT_TFT35_SPI_V1_0) /** * ------ ------ * BEEPER | 1 2 | LCD-BTN MISO | 1 2 | CLK * T_MOSI | 3 4 | T_CS LCD-ENCA | 3 4 | TFTCS * T_CLK | 5 6 T_MISO LCD-ENCB | 5 6 MOSI * PENIRQ | 7 8 | F_CS RS | 7 8 | RESET * GND | 9 10 | VCC GND | 9 10 | NC * ------ ------ * EXP1 EXP2 * * 480x320, 3.5", SPI Display with Rotary Encoder. * Stock Display for the BIQU B1 SE Series. * Schematic: https://github.com/bigtreetech/TFT35-SPI/blob/master/v1/Hardware/BTT%20TFT35-SPI%20V1-SCH.pdf */ #define TFT_CS_PIN EXP2_04_PIN #define TFT_DC_PIN EXP2_07_PIN #define TFT_A0_PIN TFT_DC_PIN #define TOUCH_CS_PIN EXP1_04_PIN #define TOUCH_SCK_PIN EXP1_05_PIN #define TOUCH_MISO_PIN EXP1_06_PIN #define TOUCH_MOSI_PIN EXP1_03_PIN #define TOUCH_INT_PIN EXP1_07_PIN #ifndef TOUCH_CALIBRATION_X #define TOUCH_CALIBRATION_X 17540 #endif #ifndef TOUCH_CALIBRATION_Y #define TOUCH_CALIBRATION_Y -11388 #endif #ifndef TOUCH_OFFSET_X #define TOUCH_OFFSET_X -21 #endif #ifndef TOUCH_OFFSET_Y #define TOUCH_OFFSET_Y 337 #endif #ifndef TOUCH_ORIENTATION #define TOUCH_ORIENTATION TOUCH_LANDSCAPE #endif #elif ENABLED(MKS_TS35_V2_0) /** ------ ------ * BEEPER | 1 2 | BTN_ENC SPI1_MISO | 1 2 | SPI1_SCK * TFT_BKL / LCD_EN | 3 4 | TFT_RESET / LCD_RS BTN_EN1 | 3 4 | SPI1_CS * TOUCH_CS / LCD_D4 | 5 6 TOUCH_INT / LCD_D5 BTN_EN2 | 5 6 SPI1_MOSI * SPI1_CS / LCD_D6 | 7 8 | SPI1_RS / LCD_D7 SPI1_RS | 7 8 | RESET * GND | 9 10 | VCC GND | 9 10 | VCC * ------ ------ * EXP1 EXP2 */ #define TFT_CS_PIN EXP1_07_PIN // SPI1_CS #define TFT_DC_PIN EXP1_08_PIN // SPI1_RS #define TFT_A0_PIN TFT_DC_PIN #define TFT_RESET_PIN EXP1_04_PIN #define LCD_BACKLIGHT_PIN EXP1_03_PIN #define TFT_BACKLIGHT_PIN LCD_BACKLIGHT_PIN #define TOUCH_BUTTONS_HW_SPI #define TOUCH_BUTTONS_HW_SPI_DEVICE 1 #define TOUCH_CS_PIN EXP1_05_PIN // SPI1_NSS #define TOUCH_SCK_PIN EXP2_02_PIN // SPI1_SCK #define TOUCH_MISO_PIN EXP2_01_PIN // SPI1_MISO #define TOUCH_MOSI_PIN EXP2_06_PIN // SPI1_MOSI #define LCD_READ_ID 0xD3 #define LCD_USE_DMA_SPI #define TFT_BUFFER_WORDS 14400 #ifndef TOUCH_CALIBRATION_X #define TOUCH_CALIBRATION_X -17253 #endif #ifndef TOUCH_CALIBRATION_Y #define TOUCH_CALIBRATION_Y 11579 #endif #ifndef TOUCH_OFFSET_X #define TOUCH_OFFSET_X 514 #endif #ifndef TOUCH_OFFSET_Y #define TOUCH_OFFSET_Y -24 #endif #ifndef TOUCH_ORIENTATION #define TOUCH_ORIENTATION TOUCH_LANDSCAPE #endif #endif #endif
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h
C
agpl-3.0
16,096
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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 > 2 || E_STEPPERS > 2 #error "MKS_ROBIN2 supports up to 2 hotends / E steppers." #endif #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "MKS_ROBIN2" #endif #ifndef DEFAULT_MACHINE_NAME #define DEFAULT_MACHINE_NAME BOARD_INFO_NAME #endif #define SRAM_EEPROM_EMULATION // // Servos // #define SERVO0_PIN PB0 // XS2-5 #define SERVO1_PIN PF7 // XS1-5 #define SERVO2_PIN PF8 // XS1-6 // // Limit Switches // #define X_MIN_PIN PG8 #define X_MAX_PIN PG7 #define Y_MIN_PIN PG6 #define Y_MAX_PIN PG5 #define Z_MIN_PIN PG4 #define Z_MAX_PIN PG3 // // Probe enable // #if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) #define PROBE_ENABLE_PIN SERVO0_PIN #endif // // Steppers // #define X_STEP_PIN PE6 #define X_DIR_PIN PE5 #define X_ENABLE_PIN PC13 #define Y_STEP_PIN PE3 #define Y_DIR_PIN PE2 #define Y_ENABLE_PIN PE4 #define Z_STEP_PIN PE0 #define Z_DIR_PIN PB9 #define Z_ENABLE_PIN PE1 #define E0_STEP_PIN PG10 #define E0_DIR_PIN PG9 #define E0_ENABLE_PIN PB8 #define E1_STEP_PIN PD3 #define E1_DIR_PIN PA15 #define E1_ENABLE_PIN PD6 // // Temperature Sensors // #define TEMP_0_PIN PC1 // T1 <-> E0 #define TEMP_1_PIN PC2 // T2 <-> E1 #define TEMP_BED_PIN PC0 // T0 <-> Bed // // Heaters / Fans // #define HEATER_0_PIN PF3 // Heater0 #define HEATER_1_PIN PF2 // Heater1 #define HEATER_BED_PIN PF4 // Hotbed #define FAN0_PIN PA7 // Fan0 // // Misc. Functions // #define SDSS -1 // PB12 #define SD_DETECT_PIN PF9 #define BEEPER_PIN PG2 // // TFT with FSMC interface // #if HAS_FSMC_TFT /** * Note: MKS Robin TFT screens use various TFT controllers. * If the screen stays white, disable 'LCD_RESET_PIN' * to let the bootloader init the screen. */ #define LCD_RESET_PIN PD13 #define LCD_BACKLIGHT_PIN PD12 #define TFT_RESET_PIN LCD_RESET_PIN #define TFT_BACKLIGHT_PIN LCD_BACKLIGHT_PIN #define FSMC_CS_PIN PG12 // NE4 #define FSMC_RS_PIN PF12 // A0 #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT #define TFT_CS_PIN FSMC_CS_PIN #define TFT_RS_PIN FSMC_RS_PIN #define TFT_BUFFER_WORDS 14400 #define BEEPER_PIN PG2 #if NEED_TOUCH_PINS #define TOUCH_BUTTONS_HW_SPI #define TOUCH_BUTTONS_HW_SPI_DEVICE 1 #define TOUCH_CS_PIN PD11 // SPI1_NSS #define TOUCH_SCK_PIN PB3 // SPI1_SCK #define TOUCH_MISO_PIN PB4 // SPI1_MISO #define TOUCH_MOSI_PIN PB5 // SPI1_MOSI #endif #endif
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_MKS_ROBIN2.h
C
agpl-3.0
4,453
/** * Marlin 3D Printer Firmware * Copyright (c) 2021 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 /** * MKS Robin nano V1.3 (STM32F407VET6) board pin assignments * https://github.com/makerbase-mks/MKS-Robin-Nano-V1.X/tree/master/hardware */ #define ALLOW_STM32DUINO #include "env_validate.h" #define BOARD_INFO_NAME "MKS Robin Nano V1.3" // // EEPROM // Use one of these or SDCard-based Emulation will be used // #if NO_EEPROM_SELECTED //#define SRAM_EEPROM_EMULATION // Use BackSRAM-based EEPROM emulation //#define FLASH_EEPROM_EMULATION // Use Flash-based EEPROM emulation #endif #include "../stm32f1/pins_MKS_ROBIN_NANO_common.h"
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V1_3_F4.h
C
agpl-3.0
1,454
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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 ALLOW_STM32DUINO #include "env_validate.h" #if HOTENDS > 2 || E_STEPPERS > 2 #error "MKS Robin Nano V3 supports up to 2 hotends / E steppers." #elif HAS_FSMC_TFT #error "MKS Robin Nano V3 doesn't support FSMC-based TFT displays." #endif #define BOARD_INFO_NAME "MKS Robin Nano V3" #define USES_DIAG_JUMPERS #ifndef X_CS_PIN #define X_CS_PIN PD5 #endif #ifndef Y_CS_PIN #define Y_CS_PIN PD7 #endif #ifndef Z_CS_PIN #define Z_CS_PIN PD4 #endif #ifndef E0_CS_PIN #define E0_CS_PIN PD9 #endif #ifndef E1_CS_PIN #define E1_CS_PIN PD8 #endif // // SPI pins for TMC2130 stepper drivers // This board only supports SW SPI for stepper drivers // #if HAS_TMC_SPI #define TMC_USE_SW_SPI #endif #if !defined(TMC_SPI_MOSI) || TMC_SPI_MOSI == -1 #undef TMC_SPI_MOSI #define TMC_SPI_MOSI PD14 #endif #if !defined(TMC_SPI_MISO) || TMC_SPI_MISO == -1 #undef TMC_SPI_MISO #define TMC_SPI_MISO PD1 #endif #if !defined(TMC_SPI_SCK) || TMC_SPI_SCK == -1 #undef TMC_SPI_SCK #define TMC_SPI_SCK PD0 #endif #include "pins_MKS_ROBIN_NANO_V3_common.h"
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h
C
agpl-3.0
2,131
/** * Marlin 3D Printer Firmware * Copyright (c) 2021 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 // // MKS Robin Nano V3, MKS Eagle pinmap // #define HAS_OTG_USB_HOST_SUPPORT // USB Flash Drive support // Avoid conflict with TIMER_TONE #define STEP_TIMER 10 // Use one of these or SDCard-based Emulation will be used //#define SRAM_EEPROM_EMULATION // Use BackSRAM-based EEPROM emulation //#define FLASH_EEPROM_EMULATION // Use Flash-based EEPROM emulation #if ANY(NO_EEPROM_SELECTED, I2C_EEPROM) #define I2C_EEPROM #define MARLIN_EEPROM_SIZE 0x1000 // 4K #define I2C_SCL_PIN PB6 #define I2C_SDA_PIN PB7 #endif // // Release PB4 (Z_DIR_PIN) from JTAG NRST role // //#define DISABLE_DEBUG // // Servos // #define SERVO0_PIN PA8 // Enable BLTOUCH // // Limit Switches // #define X_DIAG_PIN PA15 #define Y_DIAG_PIN PD2 #define Z_DIAG_PIN PC8 #define E0_DIAG_PIN PC4 #define E1_DIAG_PIN PE7 #define X_STOP_PIN X_DIAG_PIN #define Y_STOP_PIN Y_DIAG_PIN #define Z_MIN_PIN Z_DIAG_PIN #define Z_MAX_PIN E0_DIAG_PIN // // Probe enable // #if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) #define PROBE_ENABLE_PIN SERVO0_PIN #endif // // Steppers // #define X_ENABLE_PIN PE4 #define X_STEP_PIN PE3 #define X_DIR_PIN PE2 #define Y_ENABLE_PIN PE1 #define Y_STEP_PIN PE0 #define Y_DIR_PIN PB9 #define Z_ENABLE_PIN PB8 #define Z_STEP_PIN PB5 #define Z_DIR_PIN PB4 #define E0_ENABLE_PIN PB3 #define E0_STEP_PIN PD6 #define E0_DIR_PIN PD3 #define E1_ENABLE_PIN PA3 #define E1_STEP_PIN PD15 #define E1_DIR_PIN PA1 #if HAS_TMC_UART // // Software serial // No Hardware serial for steppers // #define X_SERIAL_TX_PIN PD5 #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PD7 #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PD4 #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PD9 #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN PD8 #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE #define TMC_BAUD_RATE 19200 #endif #endif // HAS_TMC_UART // // Temperature Sensors // #define TEMP_0_PIN PC1 // TH1 #define TEMP_1_PIN PA2 // TH2 #define TEMP_BED_PIN PC0 // TB1 #if HOTENDS == 1 && !REDUNDANT_TEMP_MATCH(SOURCE, E1) #if TEMP_SENSOR_PROBE #define TEMP_PROBE_PIN TEMP_1_PIN #elif TEMP_SENSOR_CHAMBER #define TEMP_CHAMBER_PIN TEMP_1_PIN #endif #endif // // Heaters / Fans // #define HEATER_0_PIN PE5 // HEATER1 #define HEATER_1_PIN PB0 // HEATER2 #define HEATER_BED_PIN PA0 // HOT BED #define FAN0_PIN PC14 // FAN #define FAN1_PIN PB1 // FAN1 // // Thermocouples // //#define TEMP_0_CS_PIN HEATER_0_PIN // TC1 - CS1 //#define TEMP_0_CS_PIN HEATER_1_PIN // TC2 - CS2 // // Misc. Functions // #if HAS_TFT_LVGL_UI #define MT_DET_1_PIN PA4 // MT_DET #define MT_DET_2_PIN PE6 #define MT_DET_PIN_STATE LOW #endif #ifndef FIL_RUNOUT_PIN #define FIL_RUNOUT_PIN PA4 #endif #ifndef FIL_RUNOUT2_PIN #define FIL_RUNOUT2_PIN PE6 #endif #ifndef POWER_LOSS_PIN #define POWER_LOSS_PIN PA13 // PW_DET #endif //#define SUICIDE_PIN PB2 //#define LED_PIN PB2 //#define KILL_PIN PA2 //#define KILL_PIN_STATE LOW // // Power Supply Control // #if ENABLED(MKS_PWC) #if ENABLED(TFT_LVGL_UI) #if ENABLED(PSU_CONTROL) #error "PSU_CONTROL is incompatible with MKS_PWC plus TFT_LVGL_UI." #endif #undef MKS_PWC #define SUICIDE_PIN PB2 #define SUICIDE_PIN_STATE LOW #else #define PS_ON_PIN PB2 // PW_OFF #endif #define KILL_PIN PA13 // PW_DET #define KILL_PIN_STATE HIGH #endif #ifndef SDCARD_CONNECTION #define SDCARD_CONNECTION ONBOARD #endif // // MKS WiFi Module // #if ENABLED(MKS_WIFI_MODULE) #define WIFI_IO0_PIN PC13 #define WIFI_IO1_PIN PC7 #define WIFI_RESET_PIN PE9 #define MKS_WIFI_MODULE_SERIAL 1 // USART1 #define MKS_WIFI_MODULE_SPI 2 // SPI2 #else #define WIFI_SERIAL_PORT 3 // USART3 #endif // // MKS Testing for code in lcd/extui/mks_ui // #if ALL(TFT_LVGL_UI, MKS_TEST) #define MKS_TEST_POWER_LOSS_PIN PA13 // PW_DET #define MKS_TEST_PS_ON_PIN PB2 // PW_OFF #endif // // Onboard SD card // Detect pin doesn't work when ONBOARD and NO_SD_HOST_DRIVE disabled // #if SD_CONNECTION_IS(ONBOARD) #define ENABLE_SPI3 #define SD_SS_PIN -1 #define SDSS PC9 #define SD_SCK_PIN PC10 #define SD_MISO_PIN PC11 #define SD_MOSI_PIN PC12 #define SD_DETECT_PIN PD12 #endif #define SPI_FLASH #if ENABLED(SPI_FLASH) #define SPI_DEVICE 2 // Maple #define SPI_FLASH_SIZE 0x1000000 // 16MB #define SPI_FLASH_CS_PIN PB12 #define SPI_FLASH_SCK_PIN PB13 #define SPI_FLASH_MISO_PIN PC2 #define SPI_FLASH_MOSI_PIN PC3 #endif /** * ------ ------ * (BEEPER) PC5 | 1 2 | PE13 (BTN_ENC) (SPI1 MISO) PA6 | 1 2 | PA5 (SPI1 SCK) * (LCD_EN) PD13 | 3 4 | PC6 (LCD_RS) (BTN_EN1) PE8 | 3 4 | PE10 (SPI1 CS) * (LCD_D4) PE14 5 6 | PE15 (LCD_D5) (BTN_EN2) PE11 5 6 | PA7 (SPI1 MOSI) * (LCD_D6) PD11 | 7 8 | PD10 (LCD_D7) (SPI1_RS) PE12 | 7 8 | RESET * GND | 9 10 | 5V GND | 9 10 | 3.3V * ------ ------ * EXP1 EXP2 */ #define EXP1_01_PIN PC5 #define EXP1_02_PIN PE13 #define EXP1_03_PIN PD13 #define EXP1_04_PIN PC6 #define EXP1_05_PIN PE14 #define EXP1_06_PIN PE15 #define EXP1_07_PIN PD11 #define EXP1_08_PIN PD10 #define EXP2_01_PIN PA6 #define EXP2_02_PIN PA5 #define EXP2_03_PIN PE8 #define EXP2_04_PIN PE10 #define EXP2_05_PIN PE11 #define EXP2_06_PIN PA7 #define EXP2_07_PIN PE12 #define EXP2_08_PIN -1 // RESET // // SPI SD Card // #if SD_CONNECTION_IS(LCD) #define ENABLE_SPI1 #define SDSS 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 #endif // // LCD / Controller // #if ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI) #define TFT_CS_PIN EXP1_07_PIN #define TFT_SCK_PIN EXP2_02_PIN #define TFT_MISO_PIN EXP2_01_PIN #define TFT_MOSI_PIN EXP2_06_PIN #define TFT_DC_PIN EXP1_08_PIN #define TFT_A0_PIN TFT_DC_PIN #define TFT_RESET_PIN EXP1_04_PIN #define LCD_BACKLIGHT_PIN EXP1_03_PIN #define TFT_BACKLIGHT_PIN LCD_BACKLIGHT_PIN #define TOUCH_BUTTONS_HW_SPI #define TOUCH_BUTTONS_HW_SPI_DEVICE 1 #ifndef TFT_WIDTH #define TFT_WIDTH 480 #endif #ifndef TFT_HEIGHT #define TFT_HEIGHT 320 #endif #define TOUCH_CS_PIN EXP1_05_PIN // SPI1_NSS #define TOUCH_SCK_PIN EXP2_02_PIN // SPI1_SCK #define TOUCH_MISO_PIN EXP2_01_PIN // SPI1_MISO #define TOUCH_MOSI_PIN EXP2_06_PIN // SPI1_MOSI #define LCD_READ_ID 0xD3 #define LCD_USE_DMA_SPI #define TFT_BUFFER_WORDS 14400 #ifndef TOUCH_CALIBRATION_X #define TOUCH_CALIBRATION_X -17253 #endif #ifndef TOUCH_CALIBRATION_Y #define TOUCH_CALIBRATION_Y 11579 #endif #ifndef TOUCH_OFFSET_X #define TOUCH_OFFSET_X 514 #endif #ifndef TOUCH_OFFSET_Y #define TOUCH_OFFSET_Y -24 #endif #ifndef TOUCH_ORIENTATION #define TOUCH_ORIENTATION TOUCH_LANDSCAPE #endif #elif HAS_WIRED_LCD #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_RS EXP1_04_PIN #define LCD_BACKLIGHT_PIN -1 // MKS MINI12864 and MKS LCD12864B; If using MKS LCD12864A (Need to remove RPK2 resistor) #if ENABLED(MKS_MINI_12864) //#define LCD_BACKLIGHT_PIN -1 //#define LCD_RESET_PIN -1 #define DOGLCD_A0 EXP1_07_PIN #define DOGLCD_CS EXP1_06_PIN //#define DOGLCD_SCK EXP2_02_PIN //#define DOGLCD_MOSI EXP2_06_PIN // Required for MKS_MINI_12864 with this board //#define MKS_LCD12864B #elif ENABLED(FYSETC_MINI_12864_2_1) #define LCD_PINS_DC EXP1_04_PIN #define DOGLCD_CS EXP1_03_PIN #define DOGLCD_A0 LCD_PINS_DC #define LCD_BACKLIGHT_PIN -1 #define LCD_RESET_PIN EXP1_05_PIN #define NEOPIXEL_PIN EXP1_06_PIN #define DOGLCD_MOSI EXP2_06_PIN #define DOGLCD_SCK EXP2_02_PIN #if SD_CONNECTION_IS(ONBOARD) #define FORCE_SOFT_SPI #endif //#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 #else // !MKS_MINI_12864 #define LCD_PINS_D4 EXP1_05_PIN #if IS_ULTIPANEL #define LCD_PINS_D5 EXP1_06_PIN #define LCD_PINS_D6 EXP1_07_PIN #define LCD_PINS_D7 EXP1_08_PIN #endif #define BOARD_ST7920_DELAY_1 96 #define BOARD_ST7920_DELAY_2 48 #define BOARD_ST7920_DELAY_3 600 #endif // !MKS_MINI_12864 #endif // HAS_WIRED_LCD #if HAS_TFT_LVGL_UI // Enable SPI DMA, this requires button pins, thus no buttons. Default is DISABLED. //#define USE_SPI_DMA_TC #endif #if ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI, HAS_WIRED_LCD) #define BEEPER_PIN EXP1_01_PIN #if DISABLED(USE_SPI_DMA_TC) #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN #define BTN_ENC EXP1_02_PIN #endif #endif
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h
C
agpl-3.0
12,741
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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 ALLOW_STM32DUINO #include "env_validate.h" #if HOTENDS > 2 || E_STEPPERS > 2 #error "MKS Robin Nano V3 supports up to 2 hotends / E steppers." #endif #define BOARD_INFO_NAME "MKS Robin PRO V2" // Avoid conflict with TIMER_TONE #define STEP_TIMER 10 // Use one of these or SDCard-based Emulation will be used //#define SRAM_EEPROM_EMULATION // Use BackSRAM-based EEPROM emulation //#define FLASH_EEPROM_EMULATION // Use Flash-based EEPROM emulation #define I2C_EEPROM #define MARLIN_EEPROM_SIZE 0x1000 // 4K #define HAS_OTG_USB_HOST_SUPPORT // USB Flash Drive support // // Release PB4 (Y_ENABLE_PIN) from JTAG NRST role // //#define DISABLE_DEBUG // // Note: MKS Robin board is using SPI2 interface. // //#define SPI_MODULE 2 // // Servos // #define SERVO0_PIN PA8 // Enable BLTOUCH // // Limit Switches // #define X_DIAG_PIN PA15 #define Y_DIAG_PIN PA12 #define Z_DIAG_PIN PA11 #define E0_DIAG_PIN PC4 #define E1_DIAG_PIN PE7 #define X_STOP_PIN PA15 #define Y_STOP_PIN PA12 #define Z_MIN_PIN PA11 #define Z_MAX_PIN PC4 #ifndef FIL_RUNOUT_PIN #define FIL_RUNOUT_PIN PA4 // MT_DET #endif // // Probe enable // #if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) #define PROBE_ENABLE_PIN SERVO0_PIN #endif // // Steppers // #define X_ENABLE_PIN PE4 #define X_STEP_PIN PE3 #define X_DIR_PIN PE2 #ifndef X_CS_PIN #define X_CS_PIN PD5 #endif #define Y_ENABLE_PIN PE1 #define Y_STEP_PIN PE0 #define Y_DIR_PIN PB9 #ifndef Y_CS_PIN #define Y_CS_PIN PD7 #endif #define Z_ENABLE_PIN PB8 #define Z_STEP_PIN PB5 #define Z_DIR_PIN PB4 #ifndef Z_CS_PIN #define Z_CS_PIN PD4 #endif #define E0_ENABLE_PIN PB3 #define E0_STEP_PIN PD6 #define E0_DIR_PIN PD3 #ifndef E0_CS_PIN #define E0_CS_PIN PD9 #endif #define E1_ENABLE_PIN PA3 #define E1_STEP_PIN PD15 #define E1_DIR_PIN PA1 #ifndef E1_CS_PIN #define E1_CS_PIN PD8 #endif // // SPI pins for TMC2130 stepper drivers // #ifndef TMC_SPI_MOSI #define TMC_SPI_MOSI PD14 #endif #ifndef TMC_SPI_MISO #define TMC_SPI_MISO PD1 #endif #ifndef TMC_SPI_SCK #define TMC_SPI_SCK PD0 #endif #if HAS_TMC_UART /** * TMC2208/TMC2209 stepper drivers * * Hardware serial communication ports. * If undefined software serial is used according to the pins below */ //#define X_HARDWARE_SERIAL Serial1 //#define X2_HARDWARE_SERIAL Serial1 //#define Y_HARDWARE_SERIAL Serial1 //#define Y2_HARDWARE_SERIAL Serial1 //#define Z_HARDWARE_SERIAL Serial1 //#define Z2_HARDWARE_SERIAL Serial1 //#define E0_HARDWARE_SERIAL Serial1 //#define E1_HARDWARE_SERIAL Serial1 //#define E2_HARDWARE_SERIAL Serial1 //#define E3_HARDWARE_SERIAL Serial1 //#define E4_HARDWARE_SERIAL Serial1 #define X_SERIAL_TX_PIN PD5 #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PD7 #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PD4 #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PD9 #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN PD8 #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE #define TMC_BAUD_RATE 19200 #endif #endif // HAS_TMC_UART // // Temperature Sensors // #define TEMP_0_PIN PC1 // TH1 #define TEMP_1_PIN PC2 // TH2 #define TEMP_BED_PIN PC0 // TB1 // // Heaters / Fans // #define HEATER_0_PIN PC3 // HEATER1 #define HEATER_1_PIN PB0 // HEATER2 #define HEATER_BED_PIN PA0 // HOT BED #define FAN0_PIN PB1 // FAN // // Thermocouples // //#define TEMP_0_CS_PIN PE5 // TC1 - CS1 //#define TEMP_0_CS_PIN PE6 // TC2 - CS2 // // Misc. Functions // //#define POWER_LOSS_PIN PA2 // PW_DET //#define PS_ON_PIN PA3 // PW_OFF // // Power Supply Control // #if ENABLED(MKS_PWC) #define SUICIDE_PIN PB2 #define KILL_PIN PA2 #define KILL_PIN_STATE LOW #else #define LED_PIN PB2 #endif #ifndef SDCARD_CONNECTION #define SDCARD_CONNECTION ONBOARD #endif //#define USE_NEW_SPI_API 1 // // Onboard SD card // NOT compatible with LCD // // Detect pin doesn't work when ONBOARD and NO_SD_HOST_DRIVE disabled #if SD_CONNECTION_IS(ONBOARD) #if USE_NEW_SPI_API #define SD_SPI MARLIN_SPI(HardwareSPI3, PC9) #else #define ENABLE_SPI3 #define SD_SS_PIN -1 #define SDSS PC9 #define SD_SCK_PIN PC10 #define SD_MISO_PIN PC11 #define SD_MOSI_PIN PC12 #endif #define SD_DETECT_PIN PD12 #endif /** ------ ------ * (BEEPER) PC5 | 1 2 | PE13 (BTN_ENC) (SPI1 MISO) PA6 | 1 2 | PA5 (SPI1 SCK) * (LCD_EN) PD13 | 3 4 | PC6 (LCD_RS) (BTN_EN1) PE8 | 3 4 | PE10 (SPI1 CS) * (LCD_D4) PE14 5 6 | PE15 (LCD_D5) (BTN_EN2) PE11 5 6 | PA7 (SPI1 MOSI) * (LCD_D6) PD11 | 7 8 | PD10 (LCD_D7) (SPI DET) PE12 | 7 8 | RESET * GND | 9 10 | 5V GND | 9 10 | 3.3V * ------ ------ * EXP1 EXP2 */ #define EXP1_01_PIN PC5 #define EXP1_02_PIN PE13 #define EXP1_03_PIN PD13 #define EXP1_04_PIN PC6 #define EXP1_05_PIN PE14 #define EXP1_06_PIN PE15 #define EXP1_07_PIN PD11 #define EXP1_08_PIN PD10 #define EXP2_01_PIN PA6 #define EXP2_02_PIN PA5 #define EXP2_03_PIN PE8 #define EXP2_04_PIN PE10 #define EXP2_05_PIN PE11 #define EXP2_06_PIN PA7 #define EXP2_07_PIN PE12 #define EXP2_08_PIN -1 // RESET // // LCD SD // /* #if SD_CONNECTION_IS(LCD) #define ENABLE_SPI1 #define SDSS 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 #endif */ #define SPI_FLASH #if ENABLED(SPI_FLASH) #define SPI_DEVICE 2 // Maple #define SPI_FLASH_SIZE 0x1000000 // 16MB #define SPI_FLASH_CS_PIN PB12 #define SPI_FLASH_SCK_PIN PB13 #define SPI_FLASH_MISO_PIN PB14 #define SPI_FLASH_MOSI_PIN PB15 #endif // // LCD / Controller // #if ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI) #ifndef TOUCH_CALIBRATION_X #define TOUCH_CALIBRATION_X -17253 #endif #ifndef TOUCH_CALIBRATION_Y #define TOUCH_CALIBRATION_Y 11579 #endif #ifndef TOUCH_OFFSET_X #define TOUCH_OFFSET_X 514 #endif #ifndef TOUCH_OFFSET_Y #define TOUCH_OFFSET_Y -24 #endif #ifndef TOUCH_ORIENTATION #define TOUCH_ORIENTATION TOUCH_LANDSCAPE #endif #define TFT_CS_PIN EXP1_07_PIN #define TFT_SCK_PIN EXP2_02_PIN #define TFT_MISO_PIN EXP2_01_PIN #define TFT_MOSI_PIN EXP2_06_PIN #define TFT_DC_PIN EXP1_08_PIN #define TFT_A0_PIN TFT_DC_PIN #define TFT_RESET_PIN EXP1_04_PIN #define LCD_BACKLIGHT_PIN EXP1_03_PIN #define TFT_BACKLIGHT_PIN LCD_BACKLIGHT_PIN #define TOUCH_BUTTONS_HW_SPI #define TOUCH_BUTTONS_HW_SPI_DEVICE 1 #ifndef TFT_WIDTH #define TFT_WIDTH 480 #endif #ifndef TFT_HEIGHT #define TFT_HEIGHT 320 #endif #define TOUCH_CS_PIN EXP1_05_PIN // SPI1_NSS #define TOUCH_SCK_PIN EXP2_02_PIN // SPI1_SCK #define TOUCH_MISO_PIN EXP2_01_PIN // SPI1_MISO #define TOUCH_MOSI_PIN EXP2_06_PIN // SPI1_MOSI #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN #define BEEPER_PIN EXP1_01_PIN #define BTN_ENC EXP1_02_PIN #define LCD_READ_ID 0xD3 #define LCD_USE_DMA_SPI //#define TFT_DRIVER ST7796 #define TFT_BUFFER_WORDS 14400 #elif HAS_WIRED_LCD #define BEEPER_PIN EXP1_01_PIN #define BTN_ENC EXP1_02_PIN #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_RS EXP1_04_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN #define LCD_BACKLIGHT_PIN -1 // MKS MINI12864 and MKS LCD12864B; If using MKS LCD12864A (Need to remove RPK2 resistor) #if ENABLED(MKS_MINI_12864) //#define LCD_BACKLIGHT_PIN -1 //#define LCD_RESET_PIN -1 #define DOGLCD_A0 EXP1_07_PIN #define DOGLCD_CS EXP1_06_PIN //#define DOGLCD_SCK EXP2_02_PIN //#define DOGLCD_MOSI EXP2_06_PIN // Required for MKS_MINI_12864 with this board //#define MKS_LCD12864B #else // !MKS_MINI_12864 #define LCD_PINS_D4 EXP1_05_PIN #if IS_ULTIPANEL #define LCD_PINS_D5 EXP1_06_PIN #define LCD_PINS_D6 EXP1_07_PIN #define LCD_PINS_D7 EXP1_08_PIN #endif #define BOARD_ST7920_DELAY_1 96 #define BOARD_ST7920_DELAY_2 48 #define BOARD_ST7920_DELAY_3 600 #endif // !MKS_MINI_12864 #endif // HAS_WIRED_LCD
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h
C
agpl-3.0
12,025
/** * 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+ // // Limit Switches // #ifdef X_STALL_SENSITIVITY #define X_STOP_PIN X_DIAG_PIN // X- #elif 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_PIN #define Z_MIN_PROBE_PIN E2_DIAG_PIN // defaults to 'Z+' connector #endif #endif // // Probe enable // #if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) #define PROBE_ENABLE_PIN SERVO0_PIN #endif // // 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 FAN0_PIN PA2 // Fan0 #define FAN1_PIN PA1 // Fan1 #define FAN2_PIN PA0 // Fan2 // // Default pins for TMC software SPI // This board only supports SW SPI for stepper drivers // #if HAS_TMC_SPI #define TMC_USE_SW_SPI #define TMC_SPI_MOSI PE14 #define TMC_SPI_MISO PE13 #define TMC_SPI_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 #ifndef TMC_BAUD_RATE #define TMC_BAUD_RATE 19200 #endif #endif // HAS_TMC_UART /** ------ ------ * (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 HAS_MEDIA #ifndef SDCARD_CONNECTION #if ENABLED(NO_LCD_SDCARD) #define SDCARD_CONNECTION ONBOARD #else #define SDCARD_CONNECTION LCD #endif #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 // // LCD / Controller // #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_EN 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_EN 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 ANY(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 BOARD_NEOPIXEL_PIN #define BOARD_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
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h
C
agpl-3.0
11,792
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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 "Opulo Lumen REV3" #define DEFAULT_MACHINE_NAME "Opulo Pick-and-Place" /** * 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 #ifndef TMC_BAUD_RATE #define TMC_BAUD_RATE 19200 #endif #endif // HAS_TMC_UART // // Heaters / Fans // #define FAN0_PIN PE2 #define FAN1_PIN PE3 #define FAN2_PIN PE4 #define FAN3_PIN PE5 #define FAN_SOFT_PWM_REQUIRED // // NeoPixel // #define BOARD_NEOPIXEL_PIN PC7 #define NEOPIXEL2_PIN PC8 // // SPI // #define MISO_PIN PB4 #define MOSI_PIN PB5 #define SCK_PIN PB3 #define TMC_SPI_MISO MISO_PIN #define TMC_SPI_MOSI MOSI_PIN #define TMC_SPI_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 INDEX_AUX1_PWM1 PA15 #define INDEX_AUX1_PWM2 PA5 #define INDEX_AUX1_A1 PC0 #define INDEX_AUX1_A2 PC1 #define INDEX_AUX2_PWM1 PA6 #define INDEX_AUX2_PWM2 PA7 #define INDEX_AUX2_A1 PC2 #define INDEX_AUX2_A2 PC3 #define INDEX_AUX3_PWM1 PB8 #define INDEX_AUX3_PWM2 PB9 #define INDEX_AUX3_A1 PA0 #define INDEX_AUX3_A2 PA1
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h
C
agpl-3.0
6,336
/** * 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 #ifndef TMC_BAUD_RATE #define TMC_BAUD_RATE 19200 #endif #endif // HAS_TMC_UART // // Heaters / Fans // #define FAN0_PIN PE2 #define FAN1_PIN PE3 #define FAN2_PIN PE4 #define FAN3_PIN PE5 #define FAN_SOFT_PWM_REQUIRED // // NeoPixel // #define BOARD_NEOPIXEL_PIN PC7 #define NEOPIXEL2_PIN PC8 // // SPI // #define MISO_PIN PB4 #define MOSI_PIN PB5 #define SCK_PIN PB3 #define TMC_SPI_MISO MISO_PIN #define TMC_SPI_MOSI MOSI_PIN #define TMC_SPI_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
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h
C
agpl-3.0
6,334
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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 /** * Pin assignments for the RUMBA32 * * https://aus3d.com.au/rumba32 * https://github.com/Aus3D/RUMBA32 */ #define BOARD_INFO_NAME "RUMBA32" #if NO_EEPROM_SELECTED #if MB(RUMBA32_V1_0) #define FLASH_EEPROM_EMULATION #define MARLIN_EEPROM_SIZE 0x1000 // 4K #elif MB(RUMBA32_V1_1) #define I2C_EEPROM #define MARLIN_EEPROM_SIZE 0x2000 // 8K (24LC64T-I/OT) #endif #endif #if ENABLED(FLASH_EEPROM_EMULATION) // Decrease delays and flash wear by spreading writes across the // 128 kB sector allocated for EEPROM emulation. #define FLASH_EEPROM_LEVELING #endif #include "pins_RUMBA32_common.h" #if MB(RUMBA32_V1_1) #define SERVO0_PIN PA15 #if HAS_TMC_UART // // TMC2208/TMC2209 stepper drivers - Software Serial is used according to below pins // #define X_SERIAL_TX_PIN PA14 #define X_SERIAL_RX_PIN PC14 #define Y_SERIAL_TX_PIN PA13 #define Y_SERIAL_RX_PIN PE4 #define Z_SERIAL_TX_PIN PB10 #define Z_SERIAL_RX_PIN PE0 #define E0_SERIAL_TX_PIN PD11 #define E0_SERIAL_RX_PIN PC13 #define E1_SERIAL_TX_PIN PB3 #define E1_SERIAL_RX_PIN PD5 #define E2_SERIAL_TX_PIN PB4 #define E2_SERIAL_RX_PIN PD1 #endif #endif
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_RUMBA32_AUS3D.h
C
agpl-3.0
2,324
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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 /** * No official schematics have been found. * But these differences where noted in https://github.com/bigtreetech/Rumba32/issues/1 */ #define BOARD_INFO_NAME "RUMBA32 (BTT)" #if NO_EEPROM_SELECTED #define I2C_EEPROM #define MARLIN_EEPROM_SIZE 0x1000 // 4K (24LC32AT-I/OT) #endif #if ENABLED(FLASH_EEPROM_EMULATION) // Decrease delays and flash wear by spreading writes across the // 128 kB sector allocated for EEPROM emulation. #define FLASH_EEPROM_LEVELING #endif #include "pins_RUMBA32_common.h" #define SERVO0_PIN PA15 // Pin is not broken out, is a test point only. #if HAS_TMC_UART // // TMC2208/TMC2209 Software Serial // #define X_SERIAL_TX_PIN PC14 // BTT Rumba32 only uses 1 pin for UART #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PE4 #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PE0 #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PC13 #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN PD5 #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN #define E2_SERIAL_TX_PIN PD1 #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN #endif
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_RUMBA32_BTT.h
C
agpl-3.0
2,207
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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 /** * Pin assignments for the MKS RUMBA32 * * https://github.com/makerbase-mks/MKS-RUMBA32 * * The MKS and Aus3D versions have the same pinout but the MKS version * has some added resistors and LEDs. The resistors needed for the * TMC2208/9 UART interface are among the additions. Also added were * connectors and resistors dedicated to the TMC2130 sensorless homing * interface. */ #define BOARD_INFO_NAME "MKS RUMBA32" #if NO_EEPROM_SELECTED #define FLASH_EEPROM_EMULATION #define MARLIN_EEPROM_SIZE 0x1000 // 4K #endif #if ENABLED(FLASH_EEPROM_EMULATION) // Decrease delays and flash wear by spreading writes across the // 128 kB sector allocated for EEPROM emulation. #define FLASH_EEPROM_LEVELING #endif #include "pins_RUMBA32_common.h" #if HAS_TMC_UART /** * TMC2208/TMC2209 stepper drivers * * Hardware serial communication ports. * If undefined software serial is used according to the pins below */ //#define X_HARDWARE_SERIAL Serial1 //#define X2_HARDWARE_SERIAL Serial1 //#define Y_HARDWARE_SERIAL Serial1 //#define Y2_HARDWARE_SERIAL Serial1 //#define Z_HARDWARE_SERIAL Serial1 //#define Z2_HARDWARE_SERIAL Serial1 //#define E0_HARDWARE_SERIAL Serial1 //#define E1_HARDWARE_SERIAL Serial1 //#define E2_HARDWARE_SERIAL Serial1 //#define E3_HARDWARE_SERIAL Serial1 //#define E4_HARDWARE_SERIAL Serial1 #define X_SERIAL_TX_PIN PA3 #define X_SERIAL_RX_PIN PC14 #define Y_SERIAL_TX_PIN PA4 #define Y_SERIAL_RX_PIN PE4 #define Z_SERIAL_TX_PIN PD13 #define Z_SERIAL_RX_PIN PE0 #define E0_SERIAL_TX_PIN PD14 #define E0_SERIAL_RX_PIN PC13 #define E1_SERIAL_TX_PIN PD15 #define E1_SERIAL_RX_PIN PD5 #define E2_SERIAL_TX_PIN PD12 #define E2_SERIAL_RX_PIN PD1 #endif
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_RUMBA32_MKS.h
C
agpl-3.0
2,867
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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 /** * Common pin assignments for all RUMBA32 boards */ #include "env_validate.h" #if HOTENDS > 3 || E_STEPPERS > 3 #error "RUMBA32 boards support up to 3 hotends / E steppers." #endif #define DEFAULT_MACHINE_NAME BOARD_INFO_NAME // Use soft PWM for fans - PWM is not working properly when paired with STM32 Arduino Core v1.7.0 // This can be removed when Core version is updated and PWM behaviour is fixed. #define FAN_SOFT_PWM_REQUIRED // // Configure Timers // TIM6 is used for TONE // TIM7 is used for SERVO // TIMER_SERIAL defaults to TIM7 and must be overridden in the platformio.h file if SERVO will also be used. // This will be difficult to solve from the Arduino IDE, without modifying the RUMBA32 variant // included with the STM32 framework. #define STEP_TIMER 10 #define TEMP_TIMER 14 // // Limit Switches // #define X_MIN_PIN PB12 #define X_MAX_PIN PB13 #define Y_MIN_PIN PB15 #define Y_MAX_PIN PD8 #define Z_MIN_PIN PD9 #define Z_MAX_PIN PD10 // // Steppers // #define X_STEP_PIN PA0 #define X_DIR_PIN PC15 #define X_ENABLE_PIN PC11 #define X_CS_PIN PC14 #define Y_STEP_PIN PE5 #define Y_DIR_PIN PE6 #define Y_ENABLE_PIN PE3 #define Y_CS_PIN PE4 #define Z_STEP_PIN PE1 #define Z_DIR_PIN PE2 #define Z_ENABLE_PIN PB7 #define Z_CS_PIN PE0 #define E0_STEP_PIN PB5 #define E0_DIR_PIN PB6 #define E0_ENABLE_PIN PC12 #define E0_CS_PIN PC13 #define E1_STEP_PIN PD6 #define E1_DIR_PIN PD7 #define E1_ENABLE_PIN PD4 #define E1_CS_PIN PD5 #define E2_STEP_PIN PD2 #define E2_DIR_PIN PD3 #define E2_ENABLE_PIN PD0 #define E2_CS_PIN PD1 #ifndef TMC_SPI_MOSI #define TMC_SPI_MOSI PA7 #endif #ifndef TMC_SPI_MISO #define TMC_SPI_MISO PA6 #endif #ifndef TMC_SPI_SCK #define TMC_SPI_SCK PA5 #endif // // Temperature Sensors // #define TEMP_0_PIN PC4 #define TEMP_1_PIN PC3 #define TEMP_2_PIN PC2 #define TEMP_3_PIN PC1 #define TEMP_BED_PIN PC0 // // Heaters / Fans // #define HEATER_0_PIN PC6 #define HEATER_1_PIN PC7 #define HEATER_2_PIN PC8 #define HEATER_BED_PIN PA1 #define FAN0_PIN PC9 #define FAN1_PIN PA8 // // SPI // #define SD_SCK_PIN PA5 #define SD_MISO_PIN PA6 #define SD_MOSI_PIN PA7 // // Misc. Functions // #define LED_PIN PB14 #define PS_ON_PIN PE11 #define KILL_PIN PC5 #define SDSS PA2 #define SD_DETECT_PIN PB0 #define BEEPER_PIN PE8 /** * ------ ------ * (BEEPER) ???? | 1 2 | PE7 (BTN_ENC) (MISO) ???? | 1 2 | ???? (SCK) * (LCD_EN) PE9 | 3 4 | PE10 (LCD_RS) (BTN_EN1) PB2 | 3 4 | ???? (SD_SS) * (LCD_D4) PE12 | 5 6 PE13 (LCD_D5) (BTN_EN2) PB1 | 5 6 ???? (MOSI) * (LCD_D6) PE14 | 7 8 | PE15 (LCD_D7) (SD_DETECT) ???? | 7 8 | RESET * GND | 9 10 | 5V GND | 9 10 | -- * ------ ------ * EXP1 EXP2 */ #define EXP1_01_PIN -1 #define EXP1_02_PIN PE7 // ENC #define EXP1_03_PIN PE9 #define EXP1_04_PIN PE10 #define EXP1_05_PIN PE12 #define EXP1_06_PIN PE13 // CS #define EXP1_07_PIN PE14 // A0 #define EXP1_08_PIN PE15 #define EXP2_01_PIN -1 #define EXP2_02_PIN -1 #define EXP2_03_PIN PB2 // EN1 #define EXP2_04_PIN -1 #define EXP2_05_PIN PB1 // EN2 #define EXP2_06_PIN -1 #define EXP2_07_PIN -1 #define EXP2_08_PIN -1 // // LCD / Controller // #if HAS_WIRED_LCD #define BTN_ENC EXP1_02_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_RS EXP1_04_PIN #define LCD_PINS_D4 EXP1_05_PIN #if ENABLED(MKS_MINI_12864) #define DOGLCD_CS EXP1_06_PIN #define DOGLCD_A0 EXP1_07_PIN #endif #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 // HAS_WIRED_LCD // Alter timing for graphical display #if IS_U8GLIB_ST7920 #define BOARD_ST7920_DELAY_1 96 #define BOARD_ST7920_DELAY_2 48 #define BOARD_ST7920_DELAY_3 640 #endif
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_RUMBA32_common.h
C
agpl-3.0
6,954
/** * Marlin 3D Printer Firmware * Copyright (c) 2021 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 ALLOW_STM32DUINO #include "env_validate.h" #if HAS_MULTI_HOTEND || E_STEPPERS > 1 #error "TH3D EZBoard only supports 1 hotend / E stepper." #endif #define BOARD_INFO_NAME "TH3D EZBoard V2" #define BOARD_WEBSITE_URL "th3dstudio.com" //#define V3_EZABL_ON_SERVO // As in TH3D Firmware Config #define DISABLE_JTAGSWD // Disabling J-tag and Debug via SWD // Onboard I2C EEPROM #if NO_EEPROM_SELECTED #define I2C_EEPROM #define MARLIN_EEPROM_SIZE 0x1000 // 4K #define I2C_SCL_PIN PB6 #define I2C_SDA_PIN PB7 #undef NO_EEPROM_SELECTED #endif // // NeoPixel // #define BOARD_NEOPIXEL_PIN PA8 // // Servos // #if ENABLED(V3_EZABL_ON_SERVO) #define SERVO0_PIN -1 #else #define SERVO0_PIN PA2 #endif // // Limit Switches // #if ANY(SENSORLESS_HOMING, SENSORLESS_PROBING) // Sensorless homing pins #if ENABLED(X_AXIS_SENSORLESS_HOMING) #define X_STOP_PIN PB4 #else #define X_STOP_PIN PC1 #endif #if ENABLED(Y_AXIS_SENSORLESS_HOMING) #define Y_STOP_PIN PB9 #else #define Y_STOP_PIN PC2 #endif //#define Z_STOP_PIN PC15 // Don't use sensorless homing on Z! #define E_STOP_PIN PB10 #else // Standard Endstop Pins #define X_STOP_PIN PC1 #define Y_STOP_PIN PC2 #endif #if ENABLED(V3_EZABL_ON_SERVO) #define Z_STOP_PIN PA2 #else #define Z_STOP_PIN PC3 #endif // // Filament Runout Sensor // #ifndef FIL_RUNOUT_PIN #define FIL_RUNOUT_PIN PC0 #endif // // Steppers // #define X_STEP_PIN PB3 #define X_DIR_PIN PD2 #define X_ENABLE_PIN PB5 #define Y_STEP_PIN PB8 #define Y_DIR_PIN PC13 #define Y_ENABLE_PIN PC12 #define Z_STEP_PIN PA3 #define Z_DIR_PIN PB1 #define Z_ENABLE_PIN PC14 #define E0_STEP_PIN PA15 #define E0_DIR_PIN PB11 #define E0_ENABLE_PIN PB2 #if HAS_TMC_UART // // Hardware Serial on UART4, Single Wire, 0-3 addresses // #define X_SERIAL_TX_PIN PC10 #define X_SERIAL_RX_PIN PC11 #define Y_SERIAL_TX_PIN PC10 #define Y_SERIAL_RX_PIN PC11 #define Z_SERIAL_TX_PIN PC10 #define Z_SERIAL_RX_PIN PC11 #define E0_SERIAL_TX_PIN PC10 #define E0_SERIAL_RX_PIN PC11 // Default TMC slave addresses #ifndef X_SLAVE_ADDRESS #define X_SLAVE_ADDRESS 0 #endif #ifndef Y_SLAVE_ADDRESS #define Y_SLAVE_ADDRESS 1 #endif #ifndef Z_SLAVE_ADDRESS #define Z_SLAVE_ADDRESS 2 #endif #ifndef E0_SLAVE_ADDRESS #define E0_SLAVE_ADDRESS 3 #endif static_assert(X_SLAVE_ADDRESS == 0, "X_SLAVE_ADDRESS must be 0 for BOARD_TH3D_EZBOARD_V2."); static_assert(Y_SLAVE_ADDRESS == 1, "Y_SLAVE_ADDRESS must be 1 for BOARD_TH3D_EZBOARD_V2."); static_assert(Z_SLAVE_ADDRESS == 2, "Z_SLAVE_ADDRESS must be 2 for BOARD_TH3D_EZBOARD_V2."); static_assert(E0_SLAVE_ADDRESS == 3, "E0_SLAVE_ADDRESS must be 3 for BOARD_TH3D_EZBOARD_V2."); // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE #define TMC_BAUD_RATE 19200 #endif #endif // HAS_TMC_UART // // Temp Sensors // 3.3V max when defined as an Analog Input! // #define TEMP_0_PIN PA1 // Analog Input PA1 #define TEMP_BED_PIN PA0 // Analog Input PA0 // // Heaters / Fans // #define HEATER_BED_PIN PC9 #define HEATER_0_PIN PC8 #ifndef FAN0_PIN #define FAN0_PIN PC6 #endif #define FAN1_PIN PC7 // // Auto fans // #define AUTO_FAN_PIN PC7 #ifndef E0_AUTO_FAN_PIN #define E0_AUTO_FAN_PIN AUTO_FAN_PIN #endif // // SD Card // #define SDCARD_CONNECTION ONBOARD //#define SOFTWARE_SPI #define CUSTOM_SPI_PINS #define SDSS PA4 #define SD_SCK_PIN PA5 #define SD_MISO_PIN PA6 #define SD_MOSI_PIN PA7 #define SD_SS_PIN SDSS //#define SD_DETECT_PIN -1 //#define ONBOARD_SD_CS_PIN SDSS // // LCD / Controller // /** * ------ * PA14 | 1 2 | PB0 * PC4 | 3 4 | -- * PC5 | 5 6 PB13 * PB12 | 7 8 | PB15 * GND | 9 10 | 5V * ------ * EXP1 * * LCD_PINS_D5, D6, and D7 are not present in the EXP1 connector, and will need to be * defined to use the REPRAP_DISCOUNT_SMART_CONTROLLER. * * A remote SD card is currently not supported because the pins routed to the EXP2 * connector are shared with the onboard SD card. */ #define EXP1_01_PIN PA14 #define EXP1_02_PIN PB0 #define EXP1_03_PIN PC4 //#define EXP1_04_PIN -1 #define EXP1_05_PIN PC5 #define EXP1_06_PIN PB13 #define EXP1_07_PIN PB12 #define EXP1_08_PIN PB15 #if ENABLED(CR10_STOCKDISPLAY) /** ------ * BEEPER | 1 2 | ENC * EN1 | 3 4 | RESET * EN2 | 5 6 LCD_D4 * LCD_RS | 7 8 | LCD_EN * GND | 9 10 | 5V * ------ */ #ifdef DISABLE_JTAGSWD #define BEEPER_PIN EXP1_01_PIN // Not connected in dev board #endif #define LCD_PINS_RS EXP1_07_PIN #define LCD_PINS_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN //#define KILL_PIN -1 #define BOARD_ST7920_DELAY_1 600 #define BOARD_ST7920_DELAY_2 750 #define BOARD_ST7920_DELAY_3 750 #elif ENABLED(MKS_MINI_12864) /** ------ * SCK | 1 2 | ENC * EN1 | 3 4 | -- * EN2 | 5 6 A0 * CS | 7 8 | MOSI * GND | 9 10 | 5V * ------ */ #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 LCD_CONTRAST_INIT 160 #define LCD_CONTRAST_MIN 120 #define LCD_CONTRAST_MAX 180 #define FORCE_SOFT_SPI #define LCD_BACKLIGHT_PIN -1 #elif HAS_WIRED_LCD #error "Only CR10_STOCKDISPLAY or MKS_MINI_12864 are supported with TH3D EZBoard V2." #endif #if ANY(CR10_STOCKDISPLAY, MKS_MINI_12864) #define BTN_EN1 EXP1_03_PIN #define BTN_EN2 EXP1_05_PIN #define BTN_ENC EXP1_02_PIN #endif
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h
C
agpl-3.0
8,234
/** * Marlin 3D Printer Firmware * Copyright (c) 2024 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/>. * */ /** * BOARD_TRONXY_CXY_446_V10 * * CXY-V6-191121 / CXY-446-V10-220413 */ #pragma once #include "env_validate.h" #if EXTRUDERS > 2 || E_STEPPERS > 2 || NUM_RUNOUT_SENSORS > 2 #error "TRONXY CXY 446 V10 only supports 2 Extruders / E steppers / Filament Runout sensors." #endif #define BOARD_INFO_NAME "BOARD_TRONXY_CXY_446_V10" #define DEFAULT_MACHINE_NAME "TRONXY CXY 446 V10" #define STEP_TIMER 6 #define TEMP_TIMER 14 // // EEPROM // #if NO_EEPROM_SELECTED #define I2C_EEPROM //#define FLASH_EEPROM_EMULATION #undef NO_EEPROM_SELECTED #endif #if ENABLED(FLASH_EEPROM_EMULATION) #define EEPROM_START_ADDRESS (0x8000000UL + (512 * 1024) - 2 * EEPROM_PAGE_SIZE) #define EEPROM_PAGE_SIZE (0x800U) // 2K, but will use 2x more (4K) #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE #else #define MARLIN_EEPROM_SIZE 0x800 // 2K (FT24C16A) #endif // // SPI Flash // #define SPI_FLASH // W25Q16 #if ENABLED(SPI_FLASH) #define SPI_FLASH_SIZE 0x1000000 // 16MB #define SPI_FLASH_CS_PIN PG15 #define SPI_FLASH_MOSI_PIN PB5 #define SPI_FLASH_MISO_PIN PB4 #define SPI_FLASH_SCK_PIN PB3 #endif // // SD Card / Flash Drive // #define HAS_OTG_USB_HOST_SUPPORT // USB Flash Drive Support // // SD Card // #define ONBOARD_SDIO #define SD_DETECT_PIN -1 #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 // // Limit Switches // #define X_STOP_PIN PC15 #define Y_STOP_PIN PC14 #if ENABLED(FIX_MOUNTED_PROBE) #define Z_STOP_PIN PE3 #else #define Z_STOP_PIN PC13 #endif // // Filament Sensors // #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define FIL_RUNOUT_PIN PE6 #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 // // Temperature Sensors // #define TEMP_0_PIN PC3 #define TEMP_1_PIN PC0 #define TEMP_BED_PIN PC2 // // Heaters // #define HEATER_0_PIN PG7 // Hotend #1 Heater #define HEATER_1_PIN PA15 // Hotend #2 Heater #define HEATER_BED_PIN PE2 // // Fans // #define FAN_SOFT_PWM_REQUIRED #define FAN0_PIN PG0 // Part Cooling Fan #1 #define FAN1_PIN PB6 // Part Cooling Fan #2 #define FAN2_PIN PG9 // Extruder/Hotend #1 Heatsink Fan #define FAN3_PIN PF10 // Extruder/Hotend #2 Heatsink Fan #define CONTROLLER_FAN_PIN PD7 // // Laser / Servos // #define SPINDLE_LASER_ENA_PIN PB11 // WiFi Module TXD (Pin5) #define SPINDLE_LASER_PWM_PIN PB10 // WiFi Module RXD (Pin4) // // NOTE: The PWM pin definition const PinMap PinMap_PWM[] in PeripheralPins.c must be augmented here. // See PWM_PIN(x) definition for details. // // // TFT with FSMC interface // #if HAS_FSMC_TFT #define TOUCH_CS_PIN PD11 #define TOUCH_SCK_PIN PB13 #define TOUCH_MISO_PIN PB14 #define TOUCH_MOSI_PIN PB15 #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 FSMC_CS_PIN PG12 #define FSMC_RS_PIN PG2 #define TFT_CS_PIN FSMC_CS_PIN #define TFT_RS_PIN FSMC_RS_PIN #if ENABLED(TFT_LVGL_UI) #define HAS_SPI_FLASH_FONT 1 #define HAS_GCODE_PREVIEW 1 #define HAS_GCODE_DEFAULT_VIEW_IN_FLASH 0 #define HAS_LANG_SELECT_SCREEN 1 #define HAS_BAK_VIEW_IN_FLASH 0 #define HAS_LOGO_IN_FLASH 0 #elif ANY(TFT_CLASSIC_UI, TFT_COLOR_UI) //#define TFT_DRIVER ILI9488 #define TFT_BUFFER_WORDS 14400 #endif // Touch Screen calibration #if ENABLED(TFT_TRONXY_X5SA) #ifndef TOUCH_CALIBRATION_X #define TOUCH_CALIBRATION_X -17181 #endif #ifndef TOUCH_CALIBRATION_Y #define TOUCH_CALIBRATION_Y 11434 #endif #ifndef TOUCH_OFFSET_X #define TOUCH_OFFSET_X 501 #endif #ifndef TOUCH_OFFSET_Y #define TOUCH_OFFSET_Y -9 #endif #ifndef TOUCH_ORIENTATION #define TOUCH_ORIENTATION TOUCH_LANDSCAPE #endif #endif #if ENABLED(MKS_ROBIN_TFT43) #ifndef TOUCH_CALIBRATION_X #define TOUCH_CALIBRATION_X 17184 #endif #ifndef TOUCH_CALIBRATION_Y #define TOUCH_CALIBRATION_Y 10604 #endif #ifndef TOUCH_OFFSET_X #define TOUCH_OFFSET_X -31 #endif #ifndef TOUCH_OFFSET_Y #define TOUCH_OFFSET_Y -29 #endif #ifndef TOUCH_ORIENTATION #define TOUCH_ORIENTATION TOUCH_LANDSCAPE #endif #endif #else #error "TRONXY CXY 446 V10 only supports TFT with FSMC interface." #endif // // Power Loss // #if ENABLED(PSU_CONTROL) #define PS_ON_PIN PG10 #define POWER_LOSS_PIN PE1 #endif // // Misc. Functions // //#define LED_PIN PG10 #define BEEPER_PIN PA8
2301_81045437/Marlin
Marlin/src/pins/stm32f4/pins_TRONXY_CXY_446_V10.h
C
agpl-3.0
7,709
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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 #if NOT_TARGET(STM32F767xx) #error "Oops! Select an STM32F767 environment" #endif #define BOARD_INFO_NAME "NUCLEO-F767ZI" #define DEFAULT_MACHINE_NAME "Prototype Board" #if NO_EEPROM_SELECTED #define FLASH_EEPROM_EMULATION // Use Flash-based EEPROM emulation #endif #if ENABLED(FLASH_EEPROM_EMULATION) // Decrease delays and flash wear by spreading writes across the // 128 kB sector allocated for EEPROM emulation. // Not yet supported on F7 hardware //#define FLASH_EEPROM_LEVELING #endif /** * Timer assignments * * TIM1 - * TIM2 - Hardware PWM (Fan/Heater Pins) * TIM3 - Hardware PWM (Servo Pins) * TIM4 - STEP_TIMER (Marlin) * TIM5 - * TIM6 - TIMER_TONE (variant.h) * TIM7 - TIMER_SERVO (variant.h) * TIM9 - TIMER_SERIAL (platformio.ini) * TIM10 - For some reason trips Watchdog when used for SW Serial * TIM11 - * TIM12 - * TIM13 - * TIM14 - TEMP_TIMER (Marlin) * */ #define STEP_TIMER 4 #define TEMP_TIMER 14 /** * These pin assignments are arbitrary and intending for testing purposes. * Assignments may not be ideal, and not every assignment has been tested. * Proceed at your own risk. * _CN7_ * (X_STEP) PC6 | · · | PB8 (X_EN) * (X_DIR) PB15 | · · | PB9 (X_CS) * (LCD_D4) PB13 | · · | AVDD * _CN8_ PB12 | · · | GND * -- | · · | PC8 (HEATER_0) PA15 | · · | PA5 (SCLK) * IOREF | · · | PC9 (BEEPER) PC7 | · · | PA6 (MISO) * RESET | · · | PC10 (SERVO1_PIN) PB5 | · · | PA7 (MOSI) * +3.3V | · · | PC11 (HEATER_BED) PB3 | · · | PD14 (SD_DETECT) * +5V | · · | PC12 (SDSS) PA4 | · · | PD15 (LCD_ENABLE) * GND | · · | PD2 (SERVO0_PIN) PB4 | · · | PF12 (LCD_RS) * GND | · · | PG2  ̄ ̄ ̄ * VIN | · · | PG3 *  ̄ ̄ ̄ _CN10 * AVDD | · · | PF13 (BTN_EN1) * _CN9_ AGND | · · | PE9 (BTN_EN2) * (TEMP_0) PA3 | · · | PD7 GND | · · | PE11 (BTN_ENC) * (TEMP_BED) PC0 | · · | PD6 PB1 | · · | PF14 * PC3 | · · | PD5 PC2 | · · | PE13 * PF3 | · · | PD4 PF4 | · · | PF15 * PF5 | · · | PD3 (E_STEP) PB6 | · · | PG14 (E_EN) * PF10 | · · | GND (E_DIR) PB2 | · · | PG9 (E_CS) * -- | · · | PE2 GND | · · | PE8 * PA7 | · · | PE4 PD13 | · · | PE7 * PF2 | · · | PE5 PD12 | · · | GND * (Y_STEP) PF1 | · · | PE6 (Y_EN) (Z_STEP) PD11 | · · | PE10 (Z_EN) * (Y_DIR) PF0 | · · | PE3 (Y_CS) (Z_DIR) PE2 | · · | PE12 (Z_CS) * GND | · · | PF8 GND | · · | PE14 * (Z_MAX) PD0 | · · | PF7 (X_MIN) PA0 | · · | PE15 * (Z_MIN) PD1 | · · | PF9 (X_MAX) PB0 | · · | PB10 (FAN) * (Y_MAX) PG0 | · · | PG1 (Y_MIN) PE0 | · · | PB11 (FAN1) *  ̄ ̄ ̄  ̄ ̄ ̄ ̄ */ #define X_MIN_PIN PF7 #define X_MAX_PIN PF9 #define Y_MIN_PIN PG1 #define Y_MAX_PIN PG0 #define Z_MIN_PIN PD1 #define Z_MAX_PIN PD0 // // Steppers // #define X_STEP_PIN PC6 #define X_DIR_PIN PB15 #define X_ENABLE_PIN PB8 #define X_CS_PIN PB9 #define Y_STEP_PIN PF1 #define Y_DIR_PIN PF0 #define Y_ENABLE_PIN PE6 #define Y_CS_PIN PE3 #define Z_STEP_PIN PD11 #define Z_DIR_PIN PE2 #define Z_ENABLE_PIN PE10 #define Z_CS_PIN PE12 #define E0_STEP_PIN PB6 #define E0_DIR_PIN PB2 #define E0_ENABLE_PIN PG14 #define E0_CS_PIN PG9 #if HAS_TMC_UART #define X_SERIAL_TX_PIN PB9 #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 PE12 #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PG9 #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #endif // // Temperature Sensors // #define TEMP_0_PIN PA3 #define TEMP_BED_PIN PC0 // // Heaters / Fans // #define HEATER_0_PIN PA15 // PWM Capable, TIM2_CH1 #define HEATER_BED_PIN PB3 // PWM Capable, TIM2_CH2 #ifndef FAN0_PIN #define FAN0_PIN PB10 // PWM Capable, TIM2_CH3 #endif #define FAN1_PIN PB11 // PWM Capable, TIM2_CH4 #ifndef E0_AUTO_FAN_PIN #define E0_AUTO_FAN_PIN FAN1_PIN #endif // // Servos // #define SERVO0_PIN PB4 // PWM Capable, TIM3_CH1 #define SERVO1_PIN PB5 // PWM Capable, TIM3_CH2 // SPI for external SD Card (Not entirely sure this will work) #define SD_SCK_PIN PA5 #define SD_MISO_PIN PA6 #define SD_MOSI_PIN PA7 #define SD_SS_PIN PA4 #define SDSS PA4 #define LED_PIN LED_BLUE // // LCD / Controller // #if IS_RRD_FG_SC #define BEEPER_PIN PC7 // LCD_BEEPER #define BTN_ENC PE11 // BTN_ENC #define SD_DETECT_PIN PD14 #define LCD_PINS_RS PF12 // LCD_RS #define LCD_PINS_EN PD15 // LCD_EN #define LCD_PINS_D4 PB13 // LCD_D4 #define BTN_EN1 PF13 // BTN_EN1 #define BTN_EN2 PE9 // BTN_EN2 #define BOARD_ST7920_DELAY_1 125 #define BOARD_ST7920_DELAY_2 63 #define BOARD_ST7920_DELAY_3 780 #endif
2301_81045437/Marlin
Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h
C
agpl-3.0
7,843
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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 #if NOT_TARGET(STM32F7xx) #error "Oops! Select an STM32F7 board in 'Tools > Board.'" #endif #define BOARD_INFO_NAME "RemRam v1" #define DEFAULT_MACHINE_NAME "RemRam" #if NO_EEPROM_SELECTED #define SRAM_EEPROM_EMULATION // Emulate the EEPROM using Backup SRAM #endif #if HAS_MULTI_HOTEND || E_STEPPERS > 1 #error "RemRam only supports 1 hotend / E stepper." #endif // // Limit Switches // #if DISABLED(SENSORLESS_HOMING) #define X_MIN_PIN 58 #define X_MAX_PIN 59 #define Y_MIN_PIN 60 #define Y_MAX_PIN 61 #define Z_MAX_PIN 63 #else #define X_STOP_PIN 36 #define Y_STOP_PIN 39 #define Z_MAX_PIN 42 #endif #define Z_MIN_PIN 62 // // Z Probe (when not Z_MIN_PIN) // #ifndef Z_MIN_PROBE_PIN #define Z_MIN_PROBE_PIN 26 // EXT_D1 #endif // // Steppers // #define X_STEP_PIN 22 #define X_DIR_PIN 35 #define X_ENABLE_PIN 34 #define X_CS_PIN 14 #define Y_STEP_PIN 23 #define Y_DIR_PIN 38 #define Y_ENABLE_PIN 37 #define Y_CS_PIN 15 #define Z_STEP_PIN 24 #define Z_DIR_PIN 41 #define Z_ENABLE_PIN 40 #define Z_CS_PIN 16 #define E0_STEP_PIN 25 #define E0_DIR_PIN 44 #define E0_ENABLE_PIN 43 #define E0_CS_PIN 10 // // Temperature Sensors // #define TEMP_0_PIN 64 // THERM_1 #define TEMP_1_PIN 65 // THERM_2 #define TEMP_BED_PIN 66 // THERM_3 // // Heaters / Fans // #define HEATER_0_PIN 33 #define HEATER_BED_PIN 31 #ifndef FAN0_PIN #define FAN0_PIN 30 // "FAN1" #endif #define FAN1_PIN 32 // "FAN2" #ifndef E0_AUTO_FAN_PIN #define E0_AUTO_FAN_PIN 32 #endif // // Servos // #define SERVO0_PIN 26 // PWM_EXT1 #define SERVO1_PIN 27 // PWM_EXT2 #define SDSS 57 // Onboard SD card reader //#define SDSS 9 // LCD SD card reader #define LED_PIN 21 // STATUS_LED // // LCD / Controller // #define SD_DETECT_PIN 56 // SD_CARD_DET #define BEEPER_PIN 46 // LCD_BEEPER #define LCD_PINS_RS 49 // LCD_RS #define LCD_PINS_EN 48 // LCD_EN #define LCD_PINS_D4 50 // LCD_D4 #define LCD_PINS_D5 51 // LCD_D5 #define LCD_PINS_D6 52 // LCD_D6 #define LCD_PINS_D7 53 // LCD_D7 #define BTN_EN1 54 // BTN_EN1 #define BTN_EN2 55 // BTN_EN2 #define BTN_ENC 47 // BTN_ENC // // Timers // #define STEP_TIMER 2
2301_81045437/Marlin
Marlin/src/pins/stm32f7/pins_REMRAM_V1.h
C
agpl-3.0
4,374
/** * Marlin 3D Printer Firmware * Copyright (c) 2023 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/>. * */ #ifndef ENV_VALIDATE_H #define ENV_VALIDATE_H #if NOT_TARGET(STM32G0xx) || NOT_TARGET(STM32G0B1xx) #error "Oops! Select an STM32G0 board in 'Tools > Board.'" #endif #endif
2301_81045437/Marlin
Marlin/src/pins/stm32g0/env_validate.h
C
agpl-3.0
1,038
/** * 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" /** 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 #define BOARD_WEBSITE_URL "github.com/bigtreetech/EBB/tree/master/EBB%20CAN%20V1.1%20(STM32G0B1)/EBB42%20CAN%20V1.1" // // EEPROM // #if ANY(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 (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 1UL) #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 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 #ifndef TMC_BAUD_RATE #define TMC_BAUD_RATE 19200 #endif // Default TMC slave addresses #ifndef E0_SLAVE_ADDRESS #define E0_SLAVE_ADDRESS 0b00 #endif static_assert(E0_SLAVE_ADDRESS == 0b00, "E0_SLAVE_ADDRESS must be 0b00 for BOARD_BTT_EBB42_V1_1."); #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" V1.1 #define HEATER_1_PIN PB13 // "HE" V1.2 #define FAN0_PIN PA0 // "FAN0" #define FAN1_PIN PA1 // "FAN1" // // Default NEOPIXEL_PIN // #ifndef BOARD_NEOPIXEL_PIN #define BOARD_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
2301_81045437/Marlin
Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h
C
agpl-3.0
4,447
/** * Marlin 3D Printer Firmware * Copyright (c) 2023 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" #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "BTT Manta E3 EZ V1.0" #endif #define USES_DIAG_JUMPERS // Ignore temp readings during development. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 // // EEPROM // #if ANY(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 (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL) #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE #endif // // Servos // #define SERVO0_PIN PA7 // BLTouch // // Probe enable // #if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) #define PROBE_ENABLE_PIN SERVO0_PIN #endif // // Trinamic StallGuard pins // #define X_DIAG_PIN PC4 // X-STOP #define Y_DIAG_PIN PB0 // Y-STOP #define Z_DIAG_PIN PC6 // Z-STOP #define E0_DIAG_PIN PC5 // E0-DET #define E1_DIAG_PIN PB1 // E1-DET // // Limit Switches // #define X_STOP_PIN X_DIAG_PIN // X-STOP #define Y_STOP_PIN Y_DIAG_PIN // Y-STOP #define Z_STOP_PIN Z_DIAG_PIN // Z-STOP // // Z Probe (when not Z_STOP_PIN) // #define Z_MIN_PROBE_PIN PA6 // BLTouch // // Filament Runout Sensor // #ifndef FIL_RUNOUT_PIN #define FIL_RUNOUT_PIN E0_DIAG_PIN // E0-DET #endif #ifndef FIL_RUNOUT2_PIN #define FIL_RUNOUT2_PIN E1_DIAG_PIN // E1-DET #endif // // Power Supply Control // #ifndef PS_ON_PIN #define PS_ON_PIN PA9 // PS-ON #endif // // Power Loss Detection // #ifndef POWER_LOSS_PIN #define POWER_LOSS_PIN PB9 // PWRDET #endif // // Steppers // #define X_STEP_PIN PA14 #define X_DIR_PIN PA10 #define X_ENABLE_PIN PA13 #ifndef X_CS_PIN #define X_CS_PIN PB8 #endif #define Y_STEP_PIN PC8 #define Y_DIR_PIN PA15 #define Y_ENABLE_PIN PC14 #ifndef Y_CS_PIN #define Y_CS_PIN PC9 #endif #define Z_STEP_PIN PD2 #define Z_DIR_PIN PD4 #define Z_ENABLE_PIN PD3 #ifndef Z_CS_PIN #define Z_CS_PIN PD0 #endif #define E0_STEP_PIN PD5 #define E0_DIR_PIN PD6 #define E0_ENABLE_PIN PB3 #ifndef E0_CS_PIN #define E0_CS_PIN PD1 #endif #define E1_STEP_PIN PB7 #define E1_DIR_PIN PB6 #define E1_ENABLE_PIN PB4 #ifndef E1_CS_PIN #define E1_CS_PIN PB5 #endif // // Default pins for TMC software SPI // #ifndef TMC_SPI_MOSI #define TMC_SPI_MOSI PC12 // Shared with SPI header, Pin 5 (SPI3) #endif #ifndef TMC_SPI_MISO #define TMC_SPI_MISO PC11 // Shared with SPI header, Pin 6 (SPI3) #endif #ifndef TMC_SPI_SCK #define TMC_SPI_SCK PC10 // Shared with SPI header, Pin 4 (SPI3) #endif #if HAS_TMC_UART #define X_SERIAL_TX_PIN PB8 // X_CS_PIN #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PC9 // Y_CS_PIN #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PD0 // Z_CS_PIN #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PD1 // E0_CS_PIN #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN PB5 // E1_CS_PIN #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE #define TMC_BAUD_RATE 19200 #endif #endif // HAS_TMC_UART // // Temperature Sensors // #define TEMP_0_PIN PA4 // Analog Input "TH0" #define TEMP_1_PIN PA5 // Analog Input "TH1" #define TEMP_BED_PIN PA3 // Analog Input "TB" // // Heaters / Fans // #define HEATER_0_PIN PB11 // "HE0" #define HEATER_1_PIN PB10 // "HE1" #define HEATER_BED_PIN PB2 // "HB" #define FAN0_PIN PA8 // "FAN0" #define FAN1_PIN PB15 // "FAN1" #define FAN2_PIN PB14 // "FAN2" // // Auto fans // #if HOTENDS == 2 #ifndef E0_AUTO_FAN_PIN #define E0_AUTO_FAN_PIN FAN1_PIN #endif #ifndef E1_AUTO_FAN_PIN #define E1_AUTO_FAN_PIN FAN2_PIN #endif #else #ifndef E0_AUTO_FAN_PIN #define E0_AUTO_FAN_PIN FAN1_PIN #endif #ifndef CONTROLLER_FAN_PIN #define CONTROLLER_FAN_PIN FAN2_PIN #endif #endif /** * Manta E3 EZ V1.0 * ------ * (BEEPER) PC1 | 1 2 | PC2 (BTN_ENC) * (BTN_EN1) PC3 | 3 4 | RESET * (BTN_EN2) PC0 5 6 | PA0 (LCD_D4) * (LCD_RS) PA2 | 7 8 | PA1 (LCD_EN) * GND | 9 10 | 5V * ------ * EXP1 */ #define EXP1_01_PIN PC1 #define EXP1_02_PIN PC2 #define EXP1_03_PIN PC3 #define EXP1_04_PIN -1 #define EXP1_05_PIN PC0 #define EXP1_06_PIN PA0 #define EXP1_07_PIN PA2 #define EXP1_08_PIN PA1 #define EXP1_09_PIN -1 #define EXP1_10_PIN -1 #if HAS_DWIN_E3V2 || IS_DWIN_MARLINUI /** * ------ ------ --- * (PC1) BEEP | 1 2 | | 1 2 | | 1 | (5V) * | 3 4 | RX | 3 4 | TX | 2 | (GND) * (PC0) ENT 5 6 | ENT 5 6 | BEEP | 3 | RX (PD8) * (PA2) B | 7 8 | A (PA1) B | 7 8 | A | 4 | TX (PD9) * GND | 9 10 | 5V GND | 9 10 | VCC | 5 | (RST) * ------ ------ --- * EXP1 DWIN TFT * * DWIN pins are labeled as printed on DWIN PCB. GND, VCC, A, B, ENT & BEEP can be connected in the same orientation as the * existing plug/DWIN to EXP1. DWIN TX/RX need to be connected to the Manta E3 EZ's TFT port, with DWIN TX->PD9, DWIN RX->PD8. * * Needs custom cable: * * Board Adapter Display * ------------------------------------------ * (EXP1-1) PC1 <-----------> BEEP (DWIN-6) * (EXP1-5) PC0 <-----------> ENT (DWIN-5) * (TFT-4) PD9 <-----------> RX (DWIN-3) * (TFT-3) PD8 <-----------> TX (DWIN-4) * (EXP1-7) PA2 <-----------> B (DWIN-7) * (EXP1-9) GND <-----------> GND (DWIN-9) * (EXP1-8) PA1 <-----------> A (DWIN-8) * (EXP1-10) 5V <-----------> VCC (DWIN-10) */ #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING #error "CAUTION! Ender-3 V2 display requires a custom cable with TX = PA0, RX = PC2. See 'pins_BTT_MANTA_E3_EZ_V1_0.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" #endif #define BEEPER_PIN EXP1_01_PIN #define BTN_EN1 EXP1_08_PIN #define BTN_EN2 EXP1_07_PIN #define BTN_ENC EXP1_05_PIN #elif HAS_WIRED_LCD #if ENABLED(CR10_STOCKDISPLAY) #define BEEPER_PIN EXP1_01_PIN #define BTN_EN1 EXP1_03_PIN #define BTN_EN2 EXP1_05_PIN #define BTN_ENC EXP1_02_PIN #define LCD_PINS_RS EXP1_07_PIN #define LCD_PINS_EN 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_MANTA_E3_EZ_V1_0.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" #endif #define LCD_PINS_RS EXP1_06_PIN #define LCD_PINS_EN 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 PA7 // Repurpose default SERVO0_PIN for ADC - CONNECTING TO 5V WILL DAMAGE THE BOARD! #elif ANY(MKS_MINI_12864, ENDER2_STOCKDISPLAY) #define BTN_EN1 EXP1_03_PIN #define BTN_EN2 EXP1_05_PIN #define BTN_ENC EXP1_02_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 #else #error "Only ZONESTAR_LCD, MKS_MINI_12864, ENDER2_STOCKDISPLAY, and CR10_STOCKDISPLAY are currently supported on the BTT_MANTA_E3_EZ_V1_0." #endif #endif // HAS_WIRED_LCD // // SD Support // #ifndef SDCARD_CONNECTION #define SDCARD_CONNECTION ONBOARD #endif #define SD_DETECT_PIN -1 #if SD_CONNECTION_IS(LCD) && (ALL(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) || IS_TFTGLCD_PANEL) #define SD_SS_PIN EXP1_05_PIN #elif SD_CONNECTION_IS(CUSTOM_CABLE) #error "SD CUSTOM_CABLE is not compatible with Manta E3 EZ." #endif #define ONBOARD_SPI_DEVICE 3 // SPI3 -> used only by HAL/STM32F1... #define ONBOARD_SD_CS_PIN PC13 // Chip select for "System" SD card #define ENABLE_SPI3 #define SDSS ONBOARD_SD_CS_PIN #define SD_SS_PIN ONBOARD_SD_CS_PIN #define SD_SCK_PIN PC10 #define SD_MISO_PIN PC11 #define SD_MOSI_PIN PC12 // // NeoPixel LED // #ifndef BOARD_NEOPIXEL_PIN #define BOARD_NEOPIXEL_PIN PC7 // RGB #endif
2301_81045437/Marlin
Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h
C
agpl-3.0
11,516
/** * Marlin 3D Printer Firmware * Copyright (c) 2023 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" //#define BOARD_CUSTOM_BUILD_FLAGS -DTONE_CHANNEL=4 -DTONE_TIMER=4 -DTIMER_TONE=4 #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "BTT Manta M4P V2.1" #endif #define USES_DIAG_JUMPERS // Ignore temp readings during development. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 // // EEPROM // #if ANY(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 (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL) #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE #endif // // Servos // #define SERVO0_PIN PA1 // SERVOS // // Probe enable // #if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) #define PROBE_ENABLE_PIN SERVO0_PIN #endif // // Limit Switches // #define X_STOP_PIN PC0 // X-STOP #define Y_STOP_PIN PC1 // Y-STOP #define Z_STOP_PIN PC2 // Z-STOP // // Z Probe must be this pin // #define Z_MIN_PROBE_PIN PC14 // PROBE // // Filament Runout Sensor // #ifndef FIL_RUNOUT_PIN #define FIL_RUNOUT_PIN PC15 // E0-STOP #endif // // Steppers // #define X_STEP_PIN PC6 #define X_DIR_PIN PA14 #define X_ENABLE_PIN PC7 #ifndef X_CS_PIN #define X_CS_PIN PB12 #endif #define Y_STEP_PIN PB10 #define Y_DIR_PIN PB2 #define Y_ENABLE_PIN PB11 #ifndef Y_CS_PIN #define Y_CS_PIN PC10 #endif #define Z_STEP_PIN PB0 #define Z_DIR_PIN PC5 #define Z_ENABLE_PIN PB1 #ifndef Z_CS_PIN #define Z_CS_PIN PC9 #endif #define E0_STEP_PIN PB3 #define E0_DIR_PIN PB4 #define E0_ENABLE_PIN PD5 #ifndef E0_CS_PIN #define E0_CS_PIN PA13 #endif // // Default pins for TMC software SPI // #ifndef TMC_SPI_MOSI #define TMC_SPI_MOSI PB15 #endif #ifndef TMC_SPI_MISO #define TMC_SPI_MISO PB14 #endif #ifndef TMC_SPI_SCK #define TMC_SPI_SCK PB13 #endif #if HAS_TMC_UART #define X_SERIAL_TX_PIN PB12 #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PC10 #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PC9 #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PA13 #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE #define TMC_BAUD_RATE 19200 #endif #endif // HAS_TMC_UART // // Temperature Sensors // #define TEMP_0_PIN PA0 // Analog Input "TH0" #define TEMP_BED_PIN PC4 // Analog Input "TB0" // // Heaters / Fans // #define HEATER_0_PIN PC8 // "HE" #define HEATER_BED_PIN PD8 // "HB" #define FAN0_PIN PD2 // "FAN0" #define FAN1_PIN PD3 // "FAN1" #define FAN2_PIN PD4 // "FAN2" /** * ------ ------ * (BEEPER) PD6 | 1 2 | PB8 (BTN_ENC) (MISO) PB14 | 1 2 | PB13 (SCK) * (LCD_EN) PB9 | 3 4 | PC3 (LCD_RS) (BTN_EN1) PC11 | 3 4 | PA8 (SD_SS) * (LCD_D4) PA15 | 5 6 PA10 (LCD_D5) (BTN_EN2) PC12 | 5 6 PB15 (MOSI) * (LCD_D6) PA9 | 7 8 | PB5 (LCD_D7) (SD_DETECT) PC13 | 7 8 | RESET * GND | 9 10 | 5V GND | 9 10 | -- * ------ ------ * EXP1 EXP2 */ #define EXP1_01_PIN PD6 #define EXP1_02_PIN PB8 #define EXP1_03_PIN PB9 #define EXP1_04_PIN PC3 #define EXP1_05_PIN PA15 #define EXP1_06_PIN PA10 #define EXP1_07_PIN PA9 #define EXP1_08_PIN PB5 #define EXP2_01_PIN PB14 #define EXP2_02_PIN PB13 #define EXP2_03_PIN PC11 #define EXP2_04_PIN PA8 #define EXP2_05_PIN PC12 #define EXP2_06_PIN PB15 #define EXP2_07_PIN PC13 #define EXP2_08_PIN -1 // // Onboard SD card // Must use soft SPI because Marlin's default hardware SPI is tied to LCD's EXP2 // #if SD_CONNECTION_IS(LCD) #define SDSS EXP2_04_PIN #define SD_SS_PIN SDSS #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(ONBOARD) #define SD_SCK_PIN PA5 #define SD_MISO_PIN PA6 #define SD_MOSI_PIN PA7 #define ONBOARD_SD_CS_PIN PA4 // Chip select for "System" SD card #define SD_SS_PIN ONBOARD_SD_CS_PIN #elif SD_CONNECTION_IS(CUSTOM_CABLE) #error "No custom SD drive cable defined for this board." #endif // // LCD / Controller // #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_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #elif ENABLED(MKS_MINI_12864) #define DOGLCD_A0 EXP1_07_PIN #define DOGLCD_CS EXP1_06_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN #else #define LCD_PINS_RS EXP1_04_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN #define LCD_PINS_EN 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 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 EXP1_05_PIN // Must be high or open for LCD to operate normally. #if ANY(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 #ifndef BOARD_ST7920_DELAY_1 #define BOARD_ST7920_DELAY_1 120 #endif #ifndef BOARD_ST7920_DELAY_2 #define BOARD_ST7920_DELAY_2 80 #endif #ifndef BOARD_ST7920_DELAY_3 #define BOARD_ST7920_DELAY_3 580 #endif #endif // // NeoPixel LED // #ifndef BOARD_NEOPIXEL_PIN #define BOARD_NEOPIXEL_PIN PD0 #endif #ifndef NEOPIXEL2_PIN #define NEOPIXEL2_PIN PD1 #endif
2301_81045437/Marlin
Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V2_1.h
C
agpl-3.0
9,579
/** * Marlin 3D Printer Firmware * Copyright (c) 2023 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" #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "BTT Manta M5P V1.0" #endif #define USES_DIAG_JUMPERS // Ignore temp readings during development. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 // // EEPROM // #if ANY(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 (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL) #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE #endif // // Servos // #define SERVO0_PIN PC15 // PROBE // // Probe enable // #if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) #define PROBE_ENABLE_PIN SERVO0_PIN #endif // // Trinamic StallGuard pins // #define X_DIAG_PIN PD3 // MIN1 #define Y_DIAG_PIN PD2 // MIN2 #define Z_DIAG_PIN PC3 // MIN3 #define E0_DIAG_PIN PC2 // MIN4 #define E1_DIAG_PIN -1 // // Limit Switches // #define X_STOP_PIN X_DIAG_PIN // MIN1 #define Y_STOP_PIN Y_DIAG_PIN // MIN1 #define Z_STOP_PIN Z_DIAG_PIN // MIN3 // // Z Probe (when not Z_STOP_PIN) // #ifndef Z_MIN_PROBE_PIN #define Z_MIN_PROBE_PIN PC13 // PROBE //#define Z_MIN_PROBE_PIN PC15 // IND-DET (with adjustable pullup set via jumper) #endif // // Filament Runout Sensor // #ifndef FIL_RUNOUT_PIN #define FIL_RUNOUT_PIN E0_DIAG_PIN // MIN4 #endif // // Steppers // #define X_STEP_PIN PC8 #define X_DIR_PIN PC9 #define X_ENABLE_PIN PA15 #ifndef X_CS_PIN #define X_CS_PIN PD9 #endif #define Y_STEP_PIN PA10 #define Y_DIR_PIN PA14 #define Y_ENABLE_PIN PA13 #ifndef Y_CS_PIN #define Y_CS_PIN PD8 #endif #define Z_STEP_PIN PC6 #define Z_DIR_PIN PC7 #define Z_ENABLE_PIN PA9 #ifndef Z_CS_PIN #define Z_CS_PIN PB10 #endif #define E0_STEP_PIN PB12 #define E0_DIR_PIN PB11 #define E0_ENABLE_PIN PA8 #ifndef E0_CS_PIN #define E0_CS_PIN PB2 #endif #define E1_STEP_PIN PB0 #define E1_DIR_PIN PB1 #define E1_ENABLE_PIN PC4 #ifndef E1_CS_PIN #define E1_CS_PIN PA6 #endif // // Default pins for TMC software SPI // #ifndef TMC_SPI_MOSI #define TMC_SPI_MOSI PB15 // Shared with SPI header, Pin 5 (SPI2) #endif #ifndef TMC_SPI_MISO #define TMC_SPI_MISO PB14 // Shared with SPI header, Pin 6 (SPI2) #endif #ifndef TMC_SPI_SCK #define TMC_SPI_SCK PB13 // Shared with SPI header, Pin 4 (SPI2) #endif #if HAS_TMC_UART #define X_SERIAL_TX_PIN PD9 // X_CS_PIN #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PD8 // Y_CS_PIN #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PB10 // Z_CS_PIN #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PB2 // E0_CS_PIN #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN PA6 // E1_CS_PIN #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE #define TMC_BAUD_RATE 19200 #endif #endif // HAS_TMC_UART // // Temperature Sensors // #define TEMP_0_PIN PA1 // Analog Input "TH0" #define TEMP_1_PIN PA2 // Analog Input "TH1" #define TEMP_BED_PIN PA0 // Analog Input "TB" // // Heaters / Fans // #define HEATER_0_PIN PC5 // "HE0" #define HEATER_1_PIN PA7 // "HE1" #define HEATER_BED_PIN PA5 // "HB" #define FAN0_PIN PA4 // "FAN0" #define FAN1_PIN PA3 // "FAN1" // // Auto fans // #ifndef E0_AUTO_FAN_PIN #define E0_AUTO_FAN_PIN FAN1_PIN #endif /** * ------ ------ * (BEEPER) PD5 | 1 2 | PD4 (BTN_ENC) (MISO) PB14 | 1 2 | PB13 (SCK) * (LCD_EN) PB3 | 3 4 | PD6 (LCD_RS) (BTN_EN1) PB8 | 3 4 | PB9 (SD_SS) * (LCD_D4) PB5 | 5 6 PB4 (LCD_D5) (BTN_EN2) PC10 | 5 6 PB15 (MOSI) * (LCD_D6) PB7 | 7 8 | PB6 (LCD_D7) (SD_DETECT) PC12 | 7 8 | PF2 * GND | 9 10 | 5V GND | 9 10 | -- * ------ ------ * EXP1 EXP2 */ #define EXP1_01_PIN PD5 #define EXP1_02_PIN PD4 #define EXP1_03_PIN PB3 #define EXP1_04_PIN PD6 #define EXP1_05_PIN PB5 #define EXP1_06_PIN PB4 #define EXP1_07_PIN PB7 #define EXP1_08_PIN PB6 #define EXP2_01_PIN PB14 #define EXP2_02_PIN PB13 #define EXP2_03_PIN PB8 #define EXP2_04_PIN PB9 #define EXP2_05_PIN PC10 #define EXP2_06_PIN PB15 #define EXP2_07_PIN PC12 #define EXP2_08_PIN -1 // // Onboard SD card // Must use soft SPI because Marlin's default hardware SPI is tied to LCD's EXP2 // #if SD_CONNECTION_IS(LCD) #define SDSS EXP2_04_PIN #define SD_SS_PIN SDSS #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(ONBOARD) #define SD_SCK_PIN PB13 #define SD_MISO_PIN PB14 #define SD_MOSI_PIN PB15 #define ONBOARD_SD_CS_PIN PC1 // Chip select for "System" SD card #define SD_SS_PIN ONBOARD_SD_CS_PIN #elif SD_CONNECTION_IS(CUSTOM_CABLE) #error "No custom SD drive cable defined for this board." #endif // // LCD / Controller // #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_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #elif ENABLED(MKS_MINI_12864) #define DOGLCD_A0 EXP1_07_PIN #define DOGLCD_CS EXP1_06_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN #else #define LCD_PINS_RS EXP1_04_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN #define LCD_PINS_EN 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 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 EXP1_05_PIN // Must be high or open for LCD to operate normally. #if ANY(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 #ifndef BOARD_ST7920_DELAY_1 #define BOARD_ST7920_DELAY_1 120 #endif #ifndef BOARD_ST7920_DELAY_2 #define BOARD_ST7920_DELAY_2 80 #endif #ifndef BOARD_ST7920_DELAY_3 #define BOARD_ST7920_DELAY_3 580 #endif #endif // // NeoPixel LED // #ifndef BOARD_NEOPIXEL_PIN #define BOARD_NEOPIXEL_PIN PC11 // RGB1 #endif #ifndef NEOPIXEL2_PIN #define NEOPIXEL2_PIN PC14 // RGB2 #endif
2301_81045437/Marlin
Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h
C
agpl-3.0
10,627
/** * Marlin 3D Printer Firmware * Copyright (c) 2023 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 common Manta M8P pins #include "pins_BTT_MANTA_M8P_common.h" #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "BTT Manta M8P V1.0" #endif // // Steppers // #define E1_STEP_PIN PA10 // M6 #define E1_DIR_PIN PD15 #define E1_ENABLE_PIN PA15 #ifndef E1_CS_PIN #define E1_CS_PIN PF8 #endif #define E2_STEP_PIN PD12 // M7 #define E2_DIR_PIN PD11 #define E2_ENABLE_PIN PD14 #ifndef E2_CS_PIN #define E2_CS_PIN PD13 #endif #define E3_STEP_PIN PD10 // M8 #define E3_DIR_PIN PD8 #define E3_ENABLE_PIN PD9 #ifndef E3_CS_PIN #define E3_CS_PIN PC7 #endif #if HAS_TMC_UART #define E1_SERIAL_TX_PIN PF8 #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN #define E2_SERIAL_TX_PIN PD13 #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN #define E3_SERIAL_TX_PIN PC7 #define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE #define TMC_BAUD_RATE 19200 #endif #endif // HAS_TMC_UART // // NeoPixel LED // #ifndef BOARD_NEOPIXEL_PIN #define BOARD_NEOPIXEL_PIN PC6 #endif #ifndef NEOPIXEL2_PIN #define NEOPIXEL2_PIN PA9 #endif
2301_81045437/Marlin
Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_V1_0.h
C
agpl-3.0
2,392
/** * Marlin 3D Printer Firmware * Copyright (c) 2023 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 common Manta M8P pins #include "pins_BTT_MANTA_M8P_common.h" #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "BTT Manta M8P V1.1" #endif // // Steppers // #define E1_STEP_PIN PA10 // M6 #define E1_DIR_PIN PA14 #define E1_ENABLE_PIN PA15 #ifndef E1_CS_PIN #define E1_CS_PIN PF8 #endif #define E2_STEP_PIN PD11 // M7 #define E2_DIR_PIN PD9 #define E2_ENABLE_PIN PD15 #ifndef E2_CS_PIN #define E2_CS_PIN PD14 #endif #define E3_STEP_PIN PD8 // M8 #define E3_DIR_PIN PC6 #define E3_ENABLE_PIN PC7 #ifndef E3_CS_PIN #define E3_CS_PIN PD10 #endif #if HAS_TMC_UART #define E1_SERIAL_TX_PIN PF8 #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN #define E2_SERIAL_TX_PIN PD14 #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN #define E3_SERIAL_TX_PIN PD10 #define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE #define TMC_BAUD_RATE 19200 #endif #endif // HAS_TMC_UART // // NeoPixel LED // #ifndef BOARD_NEOPIXEL_PIN #define BOARD_NEOPIXEL_PIN PA9 #endif #ifndef NEOPIXEL2_PIN #define NEOPIXEL2_PIN PB15 #endif
2301_81045437/Marlin
Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_V1_1.h
C
agpl-3.0
2,393
/** * Marlin 3D Printer Firmware * Copyright (c) 2023 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" //#define BOARD_CUSTOM_BUILD_FLAGS -DTONE_CHANNEL=4 -DTONE_TIMER=4 -DTIMER_TONE=4 #define USES_DIAG_JUMPERS // Ignore temp readings during development. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 // // EEPROM // #if ANY(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 (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL) #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE #endif // // Servos // #define SERVO0_PIN PB1 // PROBE // // Probe enable // #if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) #define PROBE_ENABLE_PIN SERVO0_PIN #endif // // Trinamic Stallguard pins // #define X_DIAG_PIN PF3 // MIN1 #define Y_DIAG_PIN PF4 // MIN2 #define Z_DIAG_PIN PF5 // MIN3 #define Z2_DIAG_PIN PC0 // MIN4 #define E0_DIAG_PIN PC1 // MIN5 #define E1_DIAG_PIN PC2 // MIN6 // // Z Probe (when not Z_MIN_PIN) // #ifndef Z_MIN_PROBE_PIN #define Z_MIN_PROBE_PIN PB2 // PROBE //#define Z_MIN_PROBE_PIN PF6 // IND-PROBE (with adjustable voltage & pullup set via jumpers) #endif // // Limit Switches // #ifdef X_STALL_SENSITIVITY #define X_STOP_PIN X_DIAG_PIN #if X_HOME_TO_MIN #define X_MAX_PIN E0_DIAG_PIN // MIN5 #else #define X_MIN_PIN E0_DIAG_PIN // MIN5 #endif #elif NEEDS_X_MINMAX #ifndef X_MIN_PIN #define X_MIN_PIN X_DIAG_PIN // MIN1 #endif #ifndef X_MAX_PIN #define X_MAX_PIN E0_DIAG_PIN // MIN5 #endif #else #define X_STOP_PIN X_DIAG_PIN // MIN1 #endif #ifdef Y_STALL_SENSITIVITY #define Y_STOP_PIN Y_DIAG_PIN #if Y_HOME_TO_MIN #define Y_MAX_PIN E1_DIAG_PIN // MIN6 #else #define Y_MIN_PIN E1_DIAG_PIN // MIN6 #endif #elif NEEDS_Y_MINMAX #ifndef Y_MIN_PIN #define Y_MIN_PIN Y_DIAG_PIN // MIN2 #endif #ifndef Y_MAX_PIN #define Y_MAX_PIN E1_DIAG_PIN // MIN6 #endif #else #define Y_STOP_PIN Y_DIAG_PIN // MIN2 #endif #define Z_STOP_PIN Z_DIAG_PIN // MIN3 // // Filament Runout Sensors // #define FIL_RUNOUT_PIN PC1 // MIN5 #define FIL_RUNOUT2_PIN PC2 // MIN6 #ifndef PS_ON_PIN #define PS_ON_PIN PC3 // PS-ON #endif // // Steppers // #define X_STEP_PIN PE2 // M1 #define X_DIR_PIN PB4 #define X_ENABLE_PIN PC11 #ifndef X_CS_PIN #define X_CS_PIN PC10 #endif #define Y_STEP_PIN PF12 // M2 #define Y_DIR_PIN PF11 #define Y_ENABLE_PIN PB3 #ifndef Y_CS_PIN #define Y_CS_PIN PF13 #endif #define Z_STEP_PIN PD7 // M3 #define Z_DIR_PIN PD6 #define Z_ENABLE_PIN PF10 #ifndef Z_CS_PIN #define Z_CS_PIN PF9 #endif #define Z2_STEP_PIN PD3 // M4 #define Z2_DIR_PIN PD2 #define Z2_ENABLE_PIN PD5 #ifndef Z2_CS_PIN #define Z2_CS_PIN PD4 #endif #define E0_STEP_PIN PC9 // M5 #define E0_DIR_PIN PC8 #define E0_ENABLE_PIN PD1 #ifndef E0_CS_PIN #define E0_CS_PIN PD0 #endif // // Default pins for TMC software SPI // #ifndef TMC_SPI_MOSI #define TMC_SPI_MOSI PA7 #endif #ifndef TMC_SPI_MISO #define TMC_SPI_MISO PA6 #endif #ifndef TMC_SPI_SCK #define TMC_SPI_SCK PA5 #endif #if HAS_TMC_UART #define X_SERIAL_TX_PIN PC10 #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PF13 #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PF9 #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define Z2_SERIAL_TX_PIN PD4 #define Z2_SERIAL_RX_PIN Z2_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PD0 #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE #define TMC_BAUD_RATE 19200 #endif #endif // HAS_TMC_UART // // Temperature Sensors // #define TEMP_BED_PIN PA0 // TB #define TEMP_0_PIN PA1 // TH0 #define TEMP_1_PIN PA2 // TH1 #define TEMP_2_PIN PA3 // TH2 #define TEMP_3_PIN PA4 // TH3 // // Heaters / Fans // #define HEATER_BED_PIN PB7 // BED-OUT #define HEATER_0_PIN PE3 // HE0 #define HEATER_1_PIN PB5 // HE1 #define HEATER_2_PIN PB6 // HE2 #define HEATER_3_PIN PE1 // HE3 #define FAN0_PIN PE6 // FAN0 #define FAN1_PIN PE0 // FAN1 #define FAN2_PIN PC12 // FAN2 #define FAN3_PIN PE5 // FAN3 #define FAN4_PIN PE4 // FAN4 #define FAN5_PIN PB8 // FAN5 #define FAN6_PIN PB9 // FAN6 // // SD Support // #ifndef SDCARD_CONNECTION #if HAS_WIRED_LCD && DISABLED(NO_LCD_SDCARD) #define SDCARD_CONNECTION LCD #else #define SDCARD_CONNECTION ONBOARD #endif #endif /** * ------ ------ * (BEEPER) PE9 | 1 2 | PE10 (BTN_ENC) (MISO) PB14 | 1 2 | PB13 (SCK) * (LCD_EN) PE11 | 3 4 | PE12 (LCD_RS) (BTN_EN1) PF7 | 3 4 | PB12 (SD_SS) * (LCD_D4) PE13 | 5 6 PE14 (LCD_D5) (BTN_EN2) PE7 | 5 6 PB11 (MOSI) * (LCD_D6) PE15 | 7 8 | PB10 (LCD_D7) (SD_DETECT) PE8 | 7 8 | RESET * GND | 9 10 | 5V GND | 9 10 | -- * ------ ------ * EXP1 EXP2 */ #define EXP1_01_PIN PE9 #define EXP1_02_PIN PE10 #define EXP1_03_PIN PE11 #define EXP1_04_PIN PE12 #define EXP1_05_PIN PE13 #define EXP1_06_PIN PE14 #define EXP1_07_PIN PE15 #define EXP1_08_PIN PB10 #define EXP2_01_PIN PB14 #define EXP2_02_PIN PB13 #define EXP2_03_PIN PF7 #define EXP2_04_PIN PB12 #define EXP2_05_PIN PE7 #define EXP2_06_PIN PB11 #define EXP2_07_PIN PE8 #define EXP2_08_PIN -1 // // Onboard SD card // Must use soft SPI because Marlin's default hardware SPI is tied to LCD's EXP2 // #if SD_CONNECTION_IS(LCD) #define SDSS EXP2_04_PIN #define SD_SS_PIN SDSS #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(ONBOARD) #define SD_DETECT_PIN PE8 #define SD_SCK_PIN PB13 #define SD_MISO_PIN PB14 #define SD_MOSI_PIN PB11 #define ONBOARD_SD_CS_PIN PB14 // Chip select for "System" SD card #define SD_SS_PIN ONBOARD_SD_CS_PIN #elif SD_CONNECTION_IS(CUSTOM_CABLE) #error "No custom SD drive cable defined for this board." #endif // // LCD / Controller // #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_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #elif ENABLED(MKS_MINI_12864) #define DOGLCD_A0 EXP1_07_PIN #define DOGLCD_CS EXP1_06_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN #else #define LCD_PINS_RS EXP1_04_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN #define LCD_PINS_EN 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 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 EXP1_05_PIN // Must be high or open for LCD to operate normally. #if ANY(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 #ifndef BOARD_ST7920_DELAY_1 #define BOARD_ST7920_DELAY_1 120 #endif #ifndef BOARD_ST7920_DELAY_2 #define BOARD_ST7920_DELAY_2 80 #endif #ifndef BOARD_ST7920_DELAY_3 #define BOARD_ST7920_DELAY_3 580 #endif #endif
2301_81045437/Marlin
Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h
C
agpl-3.0
11,989
/** * Marlin 3D Printer Firmware * Copyright (c) 2021 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" //#define BOARD_CUSTOM_BUILD_FLAGS -DTONE_CHANNEL=4 -DTONE_TIMER=4 -DTIMER_TONE=4 #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "BTT SKR Mini E3 V3.0" #endif #define USES_DIAG_JUMPERS // Ignore temp readings during development. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 #define LED_PIN PD8 // Onboard I2C EEPROM #if ANY(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 PB6 #define I2C_SDA_PIN PB7 #define MARLIN_EEPROM_SIZE 0x1000 // 4K #endif // // Servos // #define SERVO0_PIN PA1 // SERVOS // // Limit Switches // #define X_STOP_PIN PC0 // X-STOP #define Y_STOP_PIN PC1 // Y-STOP #define Z_STOP_PIN PC2 // Z-STOP // // Z Probe must be this pin // #define Z_MIN_PROBE_PIN PC14 // PROBE // // Probe enable // #if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) #define PROBE_ENABLE_PIN SERVO0_PIN #endif // // 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 PC12 // Power Loss Detection: PWR-DET #endif #ifndef PS_ON_PIN #define PS_ON_PIN PC13 // Power Supply Control #endif // // Steppers // #define X_ENABLE_PIN PB14 #define X_STEP_PIN PB13 #define X_DIR_PIN PB12 #define Y_ENABLE_PIN PB11 #define Y_STEP_PIN PB10 #define Y_DIR_PIN PB2 #define Z_ENABLE_PIN PB1 #define Z_STEP_PIN PB0 #define Z_DIR_PIN PC5 #define E0_ENABLE_PIN PD1 #define E0_STEP_PIN PB3 #define E0_DIR_PIN PB4 #if HAS_TMC_UART /** * TMC220x stepper drivers * Hardware serial communication ports */ #define X_HARDWARE_SERIAL MSerial4 #define Y_HARDWARE_SERIAL MSerial4 #define Z_HARDWARE_SERIAL MSerial4 #define E0_HARDWARE_SERIAL MSerial4 // 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 static_assert(X_SLAVE_ADDRESS == 0, "X_SLAVE_ADDRESS must be 0 for BOARD_BTT_SKR_MINI_E3_V3_0."); static_assert(Y_SLAVE_ADDRESS == 2, "Y_SLAVE_ADDRESS must be 2 for BOARD_BTT_SKR_MINI_E3_V3_0."); static_assert(Z_SLAVE_ADDRESS == 1, "Z_SLAVE_ADDRESS must be 1 for BOARD_BTT_SKR_MINI_E3_V3_0."); static_assert(E0_SLAVE_ADDRESS == 3, "E0_SLAVE_ADDRESS must be 3 for BOARD_BTT_SKR_MINI_E3_V3_0."); #endif // // Temperature Sensors // #define TEMP_0_PIN PA0 // Analog Input "TH0" #define TEMP_BED_PIN PC4 // Analog Input "TB0" // // Heaters / Fans // #define HEATER_0_PIN PC8 // "HE" #define HEATER_BED_PIN PC9 // "HB" #define FAN0_PIN PC6 // "FAN0" #define FAN1_PIN PC7 // "FAN1" #define FAN2_PIN PB15 // "FAN2" /** * SKR Mini E3 V3.0 * ------ * (BEEPER) PB5 | 1 2 | PA15 (BTN_ENC) * (BTN_EN1) PA9 | 3 4 | RESET * (BTN_EN2) PA10 5 6 | PB9 (LCD_D4) * (LCD_RS) PB8 | 7 8 | PD6 (LCD_EN) * GND | 9 10 | 5V * ------ * EXP1 */ #define EXP1_01_PIN PB5 #define EXP1_02_PIN PA15 #define EXP1_03_PIN PA9 #define EXP1_04_PIN -1 #define EXP1_05_PIN PA10 #define EXP1_06_PIN PB9 #define EXP1_07_PIN PB8 #define EXP1_08_PIN PD6 #define EXP1_09_PIN -1 #define EXP1_10_PIN -1 /** SPI Port * ------ * 5V | 1 2 | GND * CS | 3 4 | CLK * MOSI | 5 6 | MISO * 3V3 | 7 8 | GND * ------ * SPI1 */ #define SPI1_03_PIN PD9 #define SPI1_04_PIN PA5 #define SPI1_05_PIN PA7 #define SPI1_06_PIN PA6 #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. */ #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING #error "CAUTION! DWIN_CREALITY_LCD requires a custom cable, see diagram above this line. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" #endif #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(SKR_MINI_SCREEN_ADAPTER) /** https://github.com/VoronDesign/Voron-Hardware/tree/master/SKR-Mini_Screen_Adaptor/SRK%20Mini%20E3%20V3.0 * * SKR Mini E3 V3.0 SKR Mini Screen Adaptor * ------ ------ * 5V | 1 2 | GND MISO | 1 2 | SCK * CS | 3 4 | SCK (EN1) PA10 | 3 4 | -- * MOSI | 5 6 | MISO (EN2) PA9 5 6 | MOSI * 3V3 | 7 8 | GND -- | 7 8 | -- * ------ GND | 9 10 | RESET (Kill) * SPI ------ * EXP2 * * ------ ------ * PB5 | 1 2 | PA15 -- | 1 2 | PB5 (BTN_ENC) * PA9 | 3 4 | RESET (LCD CS) PB8 | 3 4 | PD6 (LCD_A0) * PA10 5 6 | PB9 (RESET) PB9 5 6 | PA15 (DIN) * PB8 | 7 8 | PD6 -- | 7 8 | -- * GND | 9 10 | 5V GND | 9 10 | 5V * ------ ------ * EXP1 EXP1 */ #if ENABLED(FYSETC_MINI_12864_2_1) #define BTN_ENC EXP1_01_PIN #define BTN_EN1 EXP1_03_PIN #define BTN_EN2 EXP1_05_PIN #define BEEPER_PIN -1 #define LCD_RESET_PIN EXP1_06_PIN #define DOGLCD_CS EXP1_07_PIN #define DOGLCD_A0 EXP1_08_PIN #define DOGLCD_SCK PA5 #define DOGLCD_MOSI PA7 #define FORCE_SOFT_SPI #define LCD_BACKLIGHT_PIN -1 #define NEOPIXEL_PIN EXP1_02_PIN #else #error "Only FYSETC_MINI_12864_2_1 / MKS_MINI_12864_V3 / BTT_MINI_12864 / BEEZ_MINI_12864 are currently supported on the BIGTREE_SKR_MINI_E3 with SKR_MINI_SCREEN_ADAPTER." #endif #else #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_EN 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_EN 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 ANY(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 | PB5 (SD_DET) 5V |10 9 | GND * RESET | 3 4 | PA9 (MOD_RESET) -- | 8 7 | (SD_DET) * PB9 5 6 | PA10 (SD_CS) (MOSI) | 6 5 | -- * PB7 | 7 8 | PB8 (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 5V * EXP1-9 ------------ EXP1-9 GND * SPI1-4 ------------ EXP1-6 MOSI * EXP1-7 ------------ n/c * SPI1-3 ------------ EXP1-2 SCK * EXP1-5 ------------ EXP1-4 SD_CS * EXP1-4 ------------ n/c * EXP1-3 ------------ EXP1-3 LCD_CS * SPI1-1 ------------ EXP1-1 MISO * EXP1-1 ------------ EXP1-7 SD_DET */ #define TFTGLCD_CS EXP1_03_PIN #endif #elif ENABLED(FYSETC_MINI_12864_2_1) #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING #error "CAUTION! FYSETC_MINI_12864_2_1 and clones require wiring modifications. See 'pins_BTT_SKR_MINI_E3_V3_0.h' for details. Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning." #endif /** * * Board Display * ------ ------ * (EN2) PB5 | 1 2 | PA15(BTN_ENC) 5V |10 9 | GND * (LCD_CS) PA9 | 3 4 | RST (RESET) -- | 8 7 | -- * (LCD_A0) PA10 5 6 | PB9 (EN1) (DIN) | 6 5 (RESET) LCD_RESET * (LCD_SCK)PB8 | 7 8 | PD6 (MOSI) (LCD_A0) | 4 3 | (LCD_CS) * GND | 9 10 | 5V (BTN_ENC) | 2 1 | -- * ------ ------ * EXP1 EXP1 * * ------ * -- |10 9 | -- * --- RESET_BUTTON (RESET) | 8 7 | -- * | 3 | (MOSI) | 6 5 (EN2) * | 2 | (DIN) -- | 4 3 | (EN1) * | 1 | (LCD_SCK)| 2 1 | -- * --- ------ * Neopixel EXP2 * * Needs custom cable. Connect EN2-EN2, LCD_CS-LCD_CS and so on. * Note: The RESET line is connected to 3 pins. * * Check the index/notch position twice!!! * On BTT boards pins from IDC10 connector are numbered in unusual order. */ #define BTN_ENC EXP1_02_PIN #define BTN_EN1 EXP1_06_PIN #define BTN_EN2 EXP1_01_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 FORCE_SOFT_SPI #define LCD_BACKLIGHT_PIN -1 #else #error "Only CR10_STOCKDISPLAY, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, MKS_MINI_12864, FYSETC_MINI_12864_2_1, and TFTGLCD_PANEL_(SPI|I2C) are currently supported on the BIGTREE_SKR_MINI_E3." #endif #endif // SKR_MINI_SCREEN_ADAPTER #endif // HAS_WIRED_LCD #if ALL(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) PB5 | 1 2 | PB6 (BEEPER) 5V |10 9 | GND * (MOD_RESET) PA9 | 3 4 | RESET (RESET) | 8 7 | (SD_DET) * (SD_CS) PA10 5 6 | PB9 (FREE) (MOSI) | 6 5 | (LCD_CS) * (LCD_CS) PB8 | 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 5V * EXP1-9 ------------ EXP1-9 GND * SPI1-4 ------------ EXP1-6 MOSI * EXP1-7 ------------ EXP1-5 LCD_CS * SPI1-3 ------------ EXP1-2 SCK * EXP1-5 ------------ EXP1-4 SD_CS * EXP1-4 ------------ EXP1-8 RESET * EXP1-3 ------------ EXP1-3 MOD_RST * SPI1-1 ------------ EXP1-1 MISO * EXP1-1 ------------ EXP1-7 SD_DET */ #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(ONBOARD) #define SD_DETECT_PIN PC3 #elif SD_CONNECTION_IS(LCD) && (ALL(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 // // NeoPixel // #ifndef BOARD_NEOPIXEL_PIN #define BOARD_NEOPIXEL_PIN PA8 // LED driving pin #endif // Pins for documentation and sanity checks only. // Changing these will not change the pin they are on. // Hardware UART pins #define UART1_TX_PIN PA9 // default usage LCD connector #define UART1_RX_PIN PA10 // default usage LCD connector #define UART2_TX_PIN PA2 // default usage TFT connector #define UART2_RX_PIN PA3 // default usage TFT connector #define UART4_TX_PIN PC10 // default usage TMC UART #define UART4_RX_PIN PC11 // default usage TMC UART
2301_81045437/Marlin
Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h
C
agpl-3.0
18,482
/** * Marlin 3D Printer Firmware * Copyright (c) 2023 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/>. * */ #ifndef ENV_VALIDATE_H #define ENV_VALIDATE_H #if NOT_TARGET(STM32H7) #error "Oops! Select an STM32H7 board in 'Tools > Board.'" #endif #endif
2301_81045437/Marlin
Marlin/src/pins/stm32h7/env_validate.h
C
agpl-3.0
1,009
/** * Marlin 3D Printer Firmware * Copyright (c) 2023 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" #define BOARD_INFO_NAME "BTT Kraken V1.0" #define BOARD_WEBSITE_URL "github.com/bigtreetech/BIGTREETECH-Kraken" #define USES_DIAG_JUMPERS // // EEPROM // #if ANY(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 (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL) #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE #endif // Avoid conflict with TIMER_TONE #define STEP_TIMER 8 // // Servos // #define SERVO0_PIN PE9 // PROBE #define SERVO1_PIN PE7 // MOTOR // // Trinamic Stallguard pins // #define X_DIAG_PIN PC15 // MIN1 #define Y_DIAG_PIN PF0 // MIN2 #define Z_DIAG_PIN PF1 // MIN3 #define E0_DIAG_PIN PF2 // MIN4 #define E1_DIAG_PIN PF3 // MIN5 #define E2_DIAG_PIN PF4 // MIN6 #define E3_DIAG_PIN PF10 // MIN7 #define E4_DIAG_PIN PC0 // MIN8 // // Limit Switches // #ifdef X_STALL_SENSITIVITY #define X_STOP_PIN X_DIAG_PIN #if X_HOME_TO_MIN #define X_MAX_PIN E0_DIAG_PIN // MIN4 #else #define X_MIN_PIN E0_DIAG_PIN // MIN4 #endif #elif NEEDS_X_MINMAX #ifndef X_MIN_PIN #define X_MIN_PIN X_DIAG_PIN // MIN1 #endif #ifndef X_MAX_PIN #define X_MAX_PIN E0_DIAG_PIN // MIN4 #endif #else #define X_STOP_PIN X_DIAG_PIN // MIN1 #endif #ifdef Y_STALL_SENSITIVITY #define Y_STOP_PIN Y_DIAG_PIN #if Y_HOME_TO_MIN #define Y_MAX_PIN E1_DIAG_PIN // MIN5 #else #define Y_MIN_PIN E1_DIAG_PIN // MIN5 #endif #elif NEEDS_Y_MINMAX #ifndef Y_MIN_PIN #define Y_MIN_PIN Y_DIAG_PIN // MIN2 #endif #ifndef Y_MAX_PIN #define Y_MAX_PIN E1_DIAG_PIN // MIN5 #endif #else #define Y_STOP_PIN Y_DIAG_PIN // MIN2 #endif #ifdef Z_STALL_SENSITIVITY #define Z_STOP_PIN Z_DIAG_PIN #if Z_HOME_TO_MIN #define Z_MAX_PIN E2_DIAG_PIN // MIN6 #else #define Z_MIN_PIN E2_DIAG_PIN // MIN6 #endif #elif NEEDS_Z_MINMAX #ifndef Z_MIN_PIN #define Z_MIN_PIN Z_DIAG_PIN // MIN3 #endif #ifndef Z_MAX_PIN #define Z_MAX_PIN E2_DIAG_PIN // MIN6 #endif #else #define Z_STOP_PIN Z_DIAG_PIN // MIN3 #endif // // Z Probe (when not Z_MIN_PIN) // #ifndef Z_MIN_PROBE_PIN #define Z_MIN_PROBE_PIN PG1 // PROBE (BLTouch, MicroProbe, etc.) //#define Z_MIN_PROBE_PIN PD11 // IND-DET (Inductive probe) #endif // // Probe enable // #if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) #define PROBE_ENABLE_PIN SERVO0_PIN #endif // // Filament Runout Sensor // #define FIL_RUNOUT_PIN E0_DIAG_PIN // MIN4 #define FIL_RUNOUT2_PIN E1_DIAG_PIN // MIN5 #define FIL_RUNOUT3_PIN E2_DIAG_PIN // MIN6 #define FIL_RUNOUT4_PIN E3_DIAG_PIN // MIN7 #define FIL_RUNOUT5_PIN E4_DIAG_PIN // MIN8 // // Steppers // #define X_STEP_PIN PC14 // S1 (Motor 1) #define X_DIR_PIN PC13 #define X_ENABLE_PIN PE6 #ifndef X_CS_PIN #define X_CS_PIN PD6 #endif #define Y_STEP_PIN PE5 // S2 (Motor 2) #define Y_DIR_PIN PE4 #define Y_ENABLE_PIN PE3 #ifndef Y_CS_PIN #define Y_CS_PIN PD5 #endif #define Z_STEP_PIN PE2 // S3 (Motor 3) #define Z_DIR_PIN PE1 #define Z_ENABLE_PIN PE0 #ifndef Z_CS_PIN #define Z_CS_PIN PD4 #endif #define E0_STEP_PIN PB9 // S4 (Motor 4) #define E0_DIR_PIN PB8 #define E0_ENABLE_PIN PB7 #ifndef E0_CS_PIN #define E0_CS_PIN PD3 #endif #define E1_STEP_PIN PG9 // S5 (Motor 5) #define E1_DIR_PIN PG10 #define E1_ENABLE_PIN PG13 #ifndef E1_CS_PIN #define E1_CS_PIN PD2 #endif #define E2_STEP_PIN PG11 // S6 (Motor 6) #define E2_DIR_PIN PD7 #define E2_ENABLE_PIN PG12 #ifndef E2_CS_PIN #define E2_CS_PIN PA15 #endif #define E3_STEP_PIN PB4 // S7 (Motor 7) #define E3_DIR_PIN PB3 #define E3_ENABLE_PIN PB5 #ifndef E3_CS_PIN #define E3_CS_PIN PA9 #endif #define E4_STEP_PIN PG15 // S8 (Motor 8) #define E4_DIR_PIN PB6 #define E4_ENABLE_PIN PG14 #ifndef E4_CS_PIN #define E4_CS_PIN PA10 #endif // // Integrated TMC2160 driver defaults // #if (HAS_X_AXIS && !AXIS_DRIVER_TYPE_X(TMC2160)) \ || (HAS_Y_AXIS && !AXIS_DRIVER_TYPE_Y(TMC2160)) \ || (NUM_Z_STEPPERS >= 1 && !AXIS_DRIVER_TYPE_Z(TMC2160)) \ || (NUM_Z_STEPPERS >= 2 && !AXIS_DRIVER_TYPE_Z2(TMC2160)) \ || (NUM_Z_STEPPERS >= 3 && !AXIS_DRIVER_TYPE_Z3(TMC2160)) \ || (NUM_Z_STEPPERS >= 4 && !AXIS_DRIVER_TYPE_Z4(TMC2160)) \ || (EXTRUDERS >= 1 && !AXIS_DRIVER_TYPE_E0(TMC2160)) \ || (EXTRUDERS >= 2 && !AXIS_DRIVER_TYPE_E1(TMC2160)) \ || (EXTRUDERS >= 3 && !AXIS_DRIVER_TYPE_E2(TMC2160)) \ || (EXTRUDERS >= 4 && !AXIS_DRIVER_TYPE_E3(TMC2160)) \ || (EXTRUDERS >= 5 && !AXIS_DRIVER_TYPE_E4(TMC2160)) #error "All DRIVER TYPEs must be TMC2160 for BOARD_BTT_KRAKEN_V1_0." #endif // RSENSE defaults #if HAS_X_AXIS static_assert(X_RSENSE == 0.022, "X_RSENSE (S1 / Motor 1) must be 0.022 for BOARD_BTT_KRAKEN_V1_0."); #endif #if HAS_Y_AXIS static_assert(Y_RSENSE == 0.022, "Y_RSENSE (S2 / Motor 2) must be 0.022 for BOARD_BTT_KRAKEN_V1_0."); #endif #if NUM_Z_STEPPERS >= 1 static_assert(Z_RSENSE == 0.022, "Z_RSENSE (S3 / Motor 3) must be 0.022 for BOARD_BTT_KRAKEN_V1_0."); #endif #if NUM_Z_STEPPERS >= 2 static_assert(Z2_RSENSE == 0.075, "Z2_RSENSE (S5 / Motor 5) must be 0.075 for BOARD_BTT_KRAKEN_V1_0."); #endif #if NUM_Z_STEPPERS >= 3 static_assert(Z3_RSENSE == 0.075, "Z3_RSENSE (S6 / Motor 6) must be 0.075 for BOARD_BTT_KRAKEN_V1_0."); #endif #if NUM_Z_STEPPERS >= 4 static_assert(Z4_RSENSE == 0.075, "Z4_RSENSE (S7 / Motor 7) must be 0.075 for BOARD_BTT_KRAKEN_V1_0."); #endif #if EXTRUDERS >= 1 static_assert(E0_RSENSE == 0.022, "E0_RSENSE (S4 / Motor 4) must be 0.022 for BOARD_BTT_KRAKEN_V1_0."); #endif #if EXTRUDERS >= 2 static_assert(E1_RSENSE == 0.075, "E1_RSENSE (S5 / Motor 5) must be 0.075 for BOARD_BTT_KRAKEN_V1_0."); #endif #if EXTRUDERS >= 3 static_assert(E2_RSENSE == 0.075, "E2_RSENSE (S6 / Motor 6) must be 0.075 for BOARD_BTT_KRAKEN_V1_0."); #endif #if EXTRUDERS >= 4 static_assert(E3_RSENSE == 0.075, "E3_RSENSE (S7 / Motor 7) must be 0.075 for BOARD_BTT_KRAKEN_V1_0."); #endif #if EXTRUDERS >= 5 static_assert(E4_RSENSE == 0.075, "E4_RSENSE (S8 / Motor 8) must be 0.075 for BOARD_BTT_KRAKEN_V1_0."); #endif // // Temperature Sensors // #define TEMP_0_PIN PB1 // TH0 #define TEMP_1_PIN PC5 // TH1 #define TEMP_2_PIN PC4 // TH2 #define TEMP_3_PIN PA7 // TH3 #define TEMP_BED_PIN PB0 // THB #if TEMP_SENSOR_0_IS_MAX31865 #define TEMP_0_CS_PIN PC9 // 31865 (1) #define TEMP_0_SCK_PIN PC10 #define TEMP_0_MISO_PIN PC11 #define TEMP_0_MOSI_PIN PC12 #define SOFTWARE_SPI // MAX31865 and LCD SD share a set of SPIs, Set SD to software SPI #define FORCE_SOFT_SPI #endif #if TEMP_SENSOR_1_IS_MAX31865 #define TEMP_1_CS_PIN PA8 // 31865 (2) #define TEMP_1_SCK_PIN PC10 #define TEMP_1_MISO_PIN PC11 #define TEMP_1_MOSI_PIN PC12 #endif // // Heaters / Fans // #define HEATER_BED_PIN PF5 // BED-OUT #define HEATER_0_PIN PF6 // HE0 #define HEATER_1_PIN PF7 // HE1 #define HEATER_2_PIN PF9 // HE2 #define HEATER_3_PIN PF8 // HE3 #define FAN0_PIN PA0 // FAN0 (3 wire) #define FAN1_PIN PA1 // FAN1 (3 wire) #define FAN2_PIN PA2 // FAN2 (3 wire) #define FAN3_PIN PA3 // FAN3 (3 wire) #define FAN4_PIN PA4 // FAN4 (3 wire) #define FAN5_PIN PA5 // FAN5 (3 wire) #define FAN6_PIN PA6 // FAN6 (4 wire) #define FAN7_PIN PE8 // FAN7 (4 wire) #ifndef E0_FAN_TACHO_PIN //#define E0_FAN_TACHO_PIN PC1 // FAN6 #endif #ifndef E1_FAN_TACHO_PIN //#define E1_FAN_TACHO_PIN PG0 // FAN7 #endif // // Power Supply Control // #ifndef PS_ON_PIN #define PS_ON_PIN PD10 // PS-ON #endif // // Misc. Functions // #define LED_PIN PA14 #ifndef FILWIDTH_PIN #define FILWIDTH_PIN PC2 #endif #ifndef FILWIDTH2_PIN #define FILWIDTH2_PIN PC3 #endif // // SD Support // #ifndef SDCARD_CONNECTION #if HAS_WIRED_LCD && DISABLED(NO_LCD_SDCARD) #define SDCARD_CONNECTION LCD #else #define SDCARD_CONNECTION ONBOARD #endif #endif // // Default pins for TMC software SPI // This board only supports SW SPI for stepper drivers // #if HAS_TMC_SPI #define TMC_USE_SW_SPI #ifndef TMC_SPI_MOSI #define TMC_SPI_MOSI PC8 #endif #ifndef TMC_SPI_MISO #define TMC_SPI_MISO PC7 #endif #ifndef TMC_SPI_SCK #define TMC_SPI_SCK PC6 #endif #endif /** ------ ------ * (BEEPER) PG5 | 1 2 | PG4 (BTN_ENC) (MISO) PE13 | 1 2 | PE12 (SCK) * (LCD_EN) PG3 | 3 4 | PG2 (LCD_RS) (BTN_EN1) PG8 | 3 4 | PE11 (SD_SS) * (LCD_D4) PD15 5 6 | PD14 (LCD_D5) (BTN_EN2) PG7 5 6 | PE14 (MOSI) * (LCD_D6) PD13 | 7 8 | PD12 (LCD_D7) (SD_DETECT) PG6 | 7 8 | RESET * GND | 9 10 | 5V GND | 9 10 | -- * ------ ------ * EXP1 EXP2 */ #define EXP1_01_PIN PG5 #define EXP1_02_PIN PG4 #define EXP1_03_PIN PG3 #define EXP1_04_PIN PG2 #define EXP1_05_PIN PD15 #define EXP1_06_PIN PD14 #define EXP1_07_PIN PD13 #define EXP1_08_PIN PD12 #define EXP2_01_PIN PE13 #define EXP2_02_PIN PE12 #define EXP2_03_PIN PG8 #define EXP2_04_PIN PE11 #define EXP2_05_PIN PG7 #define EXP2_06_PIN PE14 #define EXP2_07_PIN PG6 #define EXP2_08_PIN -1 // // Onboard SD card // Must use soft SPI because Marlin's default hardware SPI is tied to LCD's EXP2 // #if SD_CONNECTION_IS(ONBOARD) #ifndef SD_DETECT_STATE #define SD_DETECT_STATE HIGH #elif SD_DETECT_STATE == LOW #error "BOARD_BTT_KRAKEN_V1_0 onboard SD requires SD_DETECT_STATE set to HIGH." #endif #define SDSS PB12 #define SD_SS_PIN SDSS #define SD_SCK_PIN PB13 #define SD_MISO_PIN PB14 #define SD_MOSI_PIN PB15 #define SD_DETECT_PIN PE15 #define SOFTWARE_SPI #elif SD_CONNECTION_IS(LCD) #define SDSS EXP2_04_PIN #define SD_SS_PIN SDSS #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 #define SOFTWARE_SPI #elif SD_CONNECTION_IS(CUSTOM_CABLE) #error "CUSTOM_CABLE is not a supported SDCARD_CONNECTION for BOARD_BTT_KRAKEN_V1_0." #endif #if ENABLED(BTT_MOTOR_EXPANSION) /** * ------ ------ * M3DIAG | 1 2 | M3RX M3STP | 1 2 | M3DIR * M2DIAG | 3 4 | M2RX M2STP | 3 4 | M2DIR * M1DIAG 5 6 | M1RX M1DIR 5 6 | M1STP * M3EN | 7 8 | M2EN M1EN | 7 8 | -- * GND | 9 10 | -- GND | 9 10 | -- * ------ ------ * EXP1 EXP2 */ // M1 on Driver Expansion Module #define E4_STEP_PIN EXP2_06_PIN #define E4_DIR_PIN EXP2_05_PIN #define E4_ENABLE_PIN EXP2_07_PIN #define E4_DIAG_PIN EXP1_05_PIN #define E4_CS_PIN EXP1_06_PIN #if HAS_TMC_UART #define E4_SERIAL_TX_PIN EXP1_06_PIN #define E4_SERIAL_RX_PIN E4_SERIAL_TX_PIN #endif // M2 on Driver Expansion Module #define E5_STEP_PIN EXP2_03_PIN #define E5_DIR_PIN EXP2_04_PIN #define E5_ENABLE_PIN EXP1_08_PIN #define E5_DIAG_PIN EXP1_03_PIN #define E5_CS_PIN EXP1_04_PIN #if HAS_TMC_UART #define E5_SERIAL_TX_PIN EXP1_04_PIN #define E5_SERIAL_RX_PIN E5_SERIAL_TX_PIN #endif // M3 on Driver Expansion Module #define E6_STEP_PIN EXP2_01_PIN #define E6_DIR_PIN EXP2_02_PIN #define E6_ENABLE_PIN EXP1_07_PIN #define E6_DIAG_PIN EXP1_01_PIN #define E6_CS_PIN EXP1_02_PIN #if HAS_TMC_UART #define E6_SERIAL_TX_PIN EXP1_02_PIN #define E6_SERIAL_RX_PIN E6_SERIAL_TX_PIN #endif #endif // BTT_MOTOR_EXPANSION // // LCD / Controller // #if IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) #define TFTGLCD_CS EXP2_03_PIN #endif #elif HAS_DWIN_E3V2 || IS_DWIN_MARLINUI /** * ------ ------ --- * | 1 2 | | 1 2 | 1 | * | 3 4 | RX | 3 4 | TX | 2 | RX * ENT 5 6 | BEEP ENT 5 6 | BEEP | 3 | TX * B | 7 8 | A B | 7 8 | A | 4 | * GND | 9 10 | VCC GND | 9 10 | VCC 5 | * ------ ------ --- * EXP1 DWIN TFT * * DWIN pins are labeled as printed on DWIN PCB. GND, VCC, A, B, ENT & BEEP can be connected in the same * orientation as the existing plug/DWIN to EXP1. TX/RX need to be connected to the TFT port, with TX->RX, RX->TX. */ #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING #error "CAUTION! Ender-3 V2 display requires a custom cable. See 'pins_BTT_OCTOPUS_V1_common.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" #endif #define BEEPER_PIN EXP1_06_PIN #define BTN_EN1 EXP1_08_PIN #define BTN_EN2 EXP1_07_PIN #define BTN_ENC EXP1_05_PIN #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_EN 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_EN 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 FORCE_SOFT_SPI #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. #if ANY(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 #if HAS_SPI_TFT // Config for Classic UI (emulated DOGM) and Color UI #define TFT_SCK_PIN EXP2_02_PIN #define TFT_MISO_PIN EXP2_01_PIN #define TFT_MOSI_PIN EXP2_06_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN #ifndef TFT_WIDTH #define TFT_WIDTH 480 #endif #ifndef TFT_HEIGHT #define TFT_HEIGHT 320 #endif #if ENABLED(BTT_TFT35_SPI_V1_0) /** * ------ ------ * BEEPER | 1 2 | LCD-BTN MISO | 1 2 | CLK * T_MOSI | 3 4 | T_CS LCD-ENCA | 3 4 | TFTCS * T_CLK | 5 6 T_MISO LCD-ENCB | 5 6 MOSI * PENIRQ | 7 8 | F_CS RS | 7 8 | RESET * GND | 9 10 | VCC GND | 9 10 | NC * ------ ------ * EXP1 EXP2 * * 480x320, 3.5", SPI Display with Rotary Encoder. * Stock Display for the BIQU B1 SE Series. * Schematic: https://github.com/bigtreetech/TFT35-SPI/blob/master/v1/Hardware/BTT%20TFT35-SPI%20V1-SCH.pdf */ #define TFT_CS_PIN EXP2_04_PIN #define TFT_DC_PIN EXP2_07_PIN #define TFT_A0_PIN TFT_DC_PIN #define TOUCH_CS_PIN EXP1_04_PIN #define TOUCH_SCK_PIN EXP1_05_PIN #define TOUCH_MISO_PIN EXP1_06_PIN #define TOUCH_MOSI_PIN EXP1_03_PIN #define TOUCH_INT_PIN EXP1_07_PIN #ifndef TOUCH_CALIBRATION_X #define TOUCH_CALIBRATION_X 17540 #endif #ifndef TOUCH_CALIBRATION_Y #define TOUCH_CALIBRATION_Y -11388 #endif #ifndef TOUCH_OFFSET_X #define TOUCH_OFFSET_X -21 #endif #ifndef TOUCH_OFFSET_Y #define TOUCH_OFFSET_Y 337 #endif #ifndef TOUCH_ORIENTATION #define TOUCH_ORIENTATION TOUCH_LANDSCAPE #endif #elif ENABLED(MKS_TS35_V2_0) /** ------ ------ * BEEPER | 1 2 | BTN_ENC SPI1_MISO | 1 2 | SPI1_SCK * TFT_BKL / LCD_EN | 3 4 | TFT_RESET / LCD_RS BTN_EN1 | 3 4 | SPI1_CS * TOUCH_CS / LCD_D4 | 5 6 TOUCH_INT / LCD_D5 BTN_EN2 | 5 6 SPI1_MOSI * SPI1_CS / LCD_D6 | 7 8 | SPI1_RS / LCD_D7 SPI1_RS | 7 8 | RESET * GND | 9 10 | VCC GND | 9 10 | VCC * ------ ------ * EXP1 EXP2 */ #define TFT_CS_PIN EXP1_07_PIN // SPI1_CS #define TFT_DC_PIN EXP1_08_PIN // SPI1_RS #define TFT_A0_PIN TFT_DC_PIN #define TFT_RESET_PIN EXP1_04_PIN #define LCD_BACKLIGHT_PIN EXP1_03_PIN #define TFT_BACKLIGHT_PIN LCD_BACKLIGHT_PIN #define TOUCH_BUTTONS_HW_SPI #define TOUCH_BUTTONS_HW_SPI_DEVICE 1 #define TOUCH_CS_PIN EXP1_05_PIN // SPI1_NSS #define TOUCH_SCK_PIN EXP2_02_PIN // SPI1_SCK #define TOUCH_MISO_PIN EXP2_01_PIN // SPI1_MISO #define TOUCH_MOSI_PIN EXP2_06_PIN // SPI1_MOSI #define LCD_READ_ID 0xD3 #define LCD_USE_DMA_SPI #define TFT_BUFFER_WORDS 14400 #ifndef TOUCH_CALIBRATION_X #define TOUCH_CALIBRATION_X -17253 #endif #ifndef TOUCH_CALIBRATION_Y #define TOUCH_CALIBRATION_Y 11579 #endif #ifndef TOUCH_OFFSET_X #define TOUCH_OFFSET_X 514 #endif #ifndef TOUCH_OFFSET_Y #define TOUCH_OFFSET_Y -24 #endif #ifndef TOUCH_ORIENTATION #define TOUCH_ORIENTATION TOUCH_LANDSCAPE #endif #endif #endif // // NeoPixel LED // #if DISABLED(FYSETC_MINI_12864_2_1) && !defined(NEOPIXEL_PIN) #define NEOPIXEL_PIN PF12 // RGB1 #endif #ifndef NEOPIXEL2_PIN #define NEOPIXEL2_PIN PF11 // RGB2 #endif
2301_81045437/Marlin
Marlin/src/pins/stm32h7/pins_BTT_KRAKEN_V1_0.h
C
agpl-3.0
23,222
/** * Marlin 3D Printer Firmware * Copyright (c) 2023 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" #define BOARD_INFO_NAME "BTT Manta M8P V2.0" #define BOARD_WEBSITE_URL "github.com/bigtreetech/Manta-M8P/tree/master/V2.0" #define USES_DIAG_JUMPERS // // EEPROM // #if NO_EEPROM_SELECTED #undef NO_EEPROM_SELECTED #ifndef FLASH_EEPROM_EMULATION #define FLASH_EEPROM_EMULATION // Use Flash-based EEPROM emulation #endif #define EEPROM_PAGE_SIZE (0x800UL) // 2K #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL) #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE #endif // Avoid conflict with TIMER_TONE #define STEP_TIMER 8 // // Servos // #define SERVO0_PIN PD12 // PROBE // // Trinamic Stallguard pins // #define X_DIAG_PIN PF4 // M1-STOP #define Y_DIAG_PIN PF3 // M2-STOP #define Z_DIAG_PIN PF2 // M3-STOP #define E0_DIAG_PIN PF1 // M4-STOP #define E1_DIAG_PIN PF0 // M5-STOP #define E2_DIAG_PIN PC15 // M6-STOP #define E3_DIAG_PIN -1 // No DIAG or STOP pin for M7 #define E4_DIAG_PIN -1 // No DIAG or STOP pin for M8 // // Limit Switches // #ifdef X_STALL_SENSITIVITY #define X_STOP_PIN X_DIAG_PIN // M1-STOP #if X_HOME_TO_MIN #define X_MAX_PIN E0_DIAG_PIN // M4-STOP #else #define X_MIN_PIN E0_DIAG_PIN // M4-STOP #endif #elif NEEDS_X_MINMAX #ifndef X_MIN_PIN #define X_MIN_PIN X_DIAG_PIN // M1-STOP #endif #ifndef X_MAX_PIN #define X_MAX_PIN E0_DIAG_PIN // M4-STOP #endif #else #define X_STOP_PIN X_DIAG_PIN // M1-STOP #endif #ifdef Y_STALL_SENSITIVITY #define Y_STOP_PIN Y_DIAG_PIN // M2-STOP #if Y_HOME_TO_MIN #define Y_MAX_PIN E1_DIAG_PIN // M5-STOP #else #define Y_MIN_PIN E1_DIAG_PIN // M5-STOP #endif #elif NEEDS_Y_MINMAX #ifndef Y_MIN_PIN #define Y_MIN_PIN Y_DIAG_PIN // M2-STOP #endif #ifndef Y_MAX_PIN #define Y_MAX_PIN E1_DIAG_PIN // M5-STOP #endif #else #define Y_STOP_PIN Y_DIAG_PIN // M2-STOP #endif #ifdef Z_STALL_SENSITIVITY #define Z_STOP_PIN Z_DIAG_PIN // M3-STOP #if Z_HOME_TO_MIN #define Z_MAX_PIN E2_DIAG_PIN // M6-STOP #else #define Z_MIN_PIN E2_DIAG_PIN // M6-STOP #endif #elif NEEDS_Z_MINMAX #ifndef Z_MIN_PIN #define Z_MIN_PIN Z_DIAG_PIN // M3-STOP #endif #ifndef Z_MAX_PIN #define Z_MAX_PIN E2_DIAG_PIN // M6-STOP #endif #else #define Z_STOP_PIN Z_DIAG_PIN // M3-STOP #endif // // Z Probe (when not Z_MIN_PIN) // #ifndef Z_MIN_PROBE_PIN #define Z_MIN_PROBE_PIN PD13 // PROBE //#define Z_MIN_PROBE_PIN PD8 // "FAN IND" - Shared inductive probe / fan connector #endif // // Probe enable // #if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) #define PROBE_ENABLE_PIN SERVO0_PIN #endif // // Filament Runout Sensor // #define FIL_RUNOUT_PIN E0_DIAG_PIN // M4-STOP #define FIL_RUNOUT2_PIN E1_DIAG_PIN // M5-STOP #define FIL_RUNOUT3_PIN E2_DIAG_PIN // M6-STOP // // Steppers // #define X_STEP_PIN PE6 // MOTOR 1 #define X_DIR_PIN PE5 #define X_ENABLE_PIN PC14 #ifndef X_CS_PIN #define X_CS_PIN PC13 #endif #define Y_STEP_PIN PE2 // MOTOR 2 #define Y_DIR_PIN PE1 #define Y_ENABLE_PIN PE4 #ifndef Y_CS_PIN #define Y_CS_PIN PE3 #endif #define Z_STEP_PIN PB8 // MOTOR 3 #define Z_DIR_PIN PB7 #define Z_ENABLE_PIN PE0 #ifndef Z_CS_PIN #define Z_CS_PIN PB9 #endif #define E0_STEP_PIN PB4 // MOTOR 4 #define E0_DIR_PIN PB3 #define E0_ENABLE_PIN PB6 #ifndef E0_CS_PIN #define E0_CS_PIN PB5 #endif #define E1_STEP_PIN PG13 // MOTOR 5 #define E1_DIR_PIN PG12 #define E1_ENABLE_PIN PG15 #ifndef E1_CS_PIN #define E1_CS_PIN PG14 #endif #define E2_STEP_PIN PG9 // MOTOR 6 #define E2_DIR_PIN PD7 #define E2_ENABLE_PIN PG11 #ifndef E2_CS_PIN #define E2_CS_PIN PG10 #endif #define E3_STEP_PIN PD4 // MOTOR 7 #define E3_DIR_PIN PD3 #define E3_ENABLE_PIN PD6 #ifndef E3_CS_PIN #define E3_CS_PIN PD5 #endif #define E4_STEP_PIN PC7 // MOTOR 8 #define E4_DIR_PIN PC8 #define E4_ENABLE_PIN PD2 #ifndef E4_CS_PIN #define E4_CS_PIN PC6 #endif // // Temperature Sensors // #define TEMP_0_PIN PB0 // TH0 #define TEMP_1_PIN PC5 // TH1 #define TEMP_2_PIN PC4 // TH2 #define TEMP_3_PIN PA7 // TH3 #define TEMP_BED_PIN PB1 // TB // // Heaters / Fans // #define HEATER_BED_PIN PF5 // BED-OUT #define HEATER_0_PIN PA0 // HE0 #define HEATER_1_PIN PA1 // HE1 #define HEATER_2_PIN PA3 // HE2 #define HEATER_3_PIN PA5 // HE3 #define FAN0_PIN PF7 // FAN0 (2 wire) #if ENABLED(FOURWIRES_FANS) // Only FAN5 and FAN6 have tachometer pins, so swap them with FAN1 and FAN2 #define FAN1_PIN PA6 // FAN5 (4 wire) #define FAN2_PIN PA2 // FAN6 (4 wire) #define FAN5_PIN PF9 // FAN1 (2 wire) #define FAN6_PIN PF6 // FAN2 (2 wire) #else #define FAN1_PIN PF9 // FAN1 (2 wire) #define FAN2_PIN PF6 // FAN2 (2 wire) #define FAN5_PIN PA6 // FAN5 (4 wire) #define FAN6_PIN PA2 // FAN6 (4 wire) #endif #define FAN3_PIN PF8 // FAN3 (2 wire) #define FAN4_PIN PA4 // FAN4 (2 wire) #define FAN7_PIN PE9 // MOTOR (3 wire) //#define FAN8_PIN PB11 // "FAN IND" (3 wire) - Shared inductive probe / fan connector #if ENABLED(FOURWIRES_FANS) #ifndef E0_FAN_TACHO_PIN #define E0_FAN_TACHO_PIN PC2 // FAN5 (4 wire) #endif #ifndef E1_FAN_TACHO_PIN #define E1_FAN_TACHO_PIN PC1 // FAN6 (4 wire) #endif #endif #ifndef CONTROLLER_FAN_PIN #define CONTROLLER_FAN_PIN FAN7_PIN // MOTOR (3 wire) #endif // // Power Supply Control // #ifndef PS_ON_PIN #define PS_ON_PIN PD14 // PS-ON #endif // // Misc. Functions // #define I2C_SDA_PIN PC9 // I2C #define I2C_SCL_PIN PA8 // I2C #ifndef FILWIDTH_PIN #define FILWIDTH_PIN PC0 // FWS #endif #ifndef FILWIDTH2_PIN #define FILWIDTH2_PIN PF10 // FWS #endif // // SD Support // #ifndef SDCARD_CONNECTION #if HAS_WIRED_LCD && DISABLED(NO_LCD_SDCARD) #define SDCARD_CONNECTION LCD #else #define SDCARD_CONNECTION ONBOARD #endif #endif // // Default pins for TMC software SPI // #if HAS_TMC_SPI #define TMC_USE_SW_SPI #ifndef TMC_SPI_MOSI #define TMC_SPI_MOSI PG6 #endif #ifndef TMC_SPI_MISO #define TMC_SPI_MISO PG7 #endif #ifndef TMC_SPI_SCK #define TMC_SPI_SCK PG8 #endif #endif #if HAS_TMC_UART /** * TMC2208/TMC2209 stepper drivers * * Hardware serial communication ports. * If undefined software serial is used according to the pins below */ //#define X_HARDWARE_SERIAL Serial1 //#define X2_HARDWARE_SERIAL Serial1 //#define Y_HARDWARE_SERIAL Serial1 //#define Y2_HARDWARE_SERIAL Serial1 //#define Z_HARDWARE_SERIAL Serial1 //#define Z2_HARDWARE_SERIAL Serial1 //#define E0_HARDWARE_SERIAL Serial1 //#define E1_HARDWARE_SERIAL Serial1 //#define E2_HARDWARE_SERIAL Serial1 //#define E3_HARDWARE_SERIAL Serial1 //#define E4_HARDWARE_SERIAL Serial1 #define X_SERIAL_TX_PIN PC13 #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 PB9 #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define Z2_SERIAL_TX_PIN PB5 #define Z2_SERIAL_RX_PIN Z2_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PG14 #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN PG10 #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN #define E2_SERIAL_TX_PIN PD5 #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN #define E3_SERIAL_TX_PIN PC6 #define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE #define TMC_BAUD_RATE 19200 #endif #endif // HAS_TMC_UART /** * 18-pin FPC Connector * ---- * (MISO) PE13 | 1 | * (SCK) PE12 | 2 | * (BTN_EN1) PE15 | 3 | * (SD_SS) PE11 | 4 | * (BTN_EN2) PE10 | 5 | * (MOSI) PE14 | 6 | * (SD_DETECT) PE8 | 7 | * RESET | 8 | * (BEEPER) PE7 | 9 | * (BTN_ENC) PG1 | 10 | * (LCD_EN) PG0 | 11 | * (LCD_RS) PF15 | 12 | * (LCD_D4) PF14 | 13 | * (LCD_D5) PF13 | 14 | * (LCD_D6) PF12 | 15 | * (LCD_D7) PF11 | 16 | * GND | 17 | * 5V | 18 | * ---- * LCD */ #define EXP1_01_PIN PE7 #define EXP1_02_PIN PG1 #define EXP1_03_PIN PG0 #define EXP1_04_PIN PF15 #define EXP1_05_PIN PF14 #define EXP1_06_PIN PF13 #define EXP1_07_PIN PF12 #define EXP1_08_PIN PF11 #define EXP2_01_PIN PE13 #define EXP2_02_PIN PE12 #define EXP2_03_PIN PE15 #define EXP2_04_PIN PE11 #define EXP2_05_PIN PE10 #define EXP2_06_PIN PE14 #define EXP2_07_PIN PE8 #define EXP2_08_PIN -1 // // Onboard SD card // Must use soft SPI because Marlin's default hardware SPI is tied to LCD's EXP2 // #if SD_CONNECTION_IS(ONBOARD) #ifndef SD_DETECT_STATE #define SD_DETECT_STATE HIGH #elif SD_DETECT_STATE == LOW #error "BOARD_BTT_MANTA_M8P_V2_0 onboard SD requires SD_DETECT_STATE set to HIGH." #endif #define SDSS PB12 #define SD_SS_PIN SDSS #define SD_SCK_PIN PB13 #define SD_MISO_PIN PB14 #define SD_MOSI_PIN PB15 #define SD_DETECT_PIN -1 #define SOFTWARE_SPI #elif SD_CONNECTION_IS(LCD) #define SDSS EXP2_04_PIN #define SD_SS_PIN SDSS #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 #define SOFTWARE_SPI #elif SD_CONNECTION_IS(CUSTOM_CABLE) #error "CUSTOM_CABLE is not a supported SDCARD_CONNECTION for BOARD_BTT_MANTA_M8P_V2_0." #endif // // LCD / Controller // #if ENABLED(BTT_MINI_12864) // BTT Mini 12864 V2.0 connected via 18-pin FPC cable #define BEEPER_PIN EXP1_01_PIN #define BTN_ENC EXP1_02_PIN #define LCD_PINS_RS EXP1_04_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN #define LCD_PINS_D5 EXP1_06_PIN #define LCD_PINS_D6 EXP1_07_PIN #define LCD_PINS_D7 EXP1_08_PIN #define DOGLCD_CS EXP1_03_PIN #define DOGLCD_A0 EXP1_04_PIN #define DOGLCD_SCK EXP2_02_PIN #define DOGLCD_MOSI EXP2_06_PIN #define SOFTWARE_SPI #define FORCE_SOFT_SPI // Use this if Hardware SPI causes display problems. // Results in LCD Software SPI mode 3, SD Software SPI mode 0. //#define LCD_BACKLIGHT_PIN -1 #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. #define NEOPIXEL_PIN EXP1_06_PIN #elif HAS_WIRED_LCD #error "Only BTT_MINI_12864 (BTT Mini 12864 V2.0 with FPC cable) is currently supported on BOARD_BTT_MANTA_M8P_V2_0." #endif // // NeoPixel LED // The BTT_MINI_12864 uses one of the EXP pins for NeoPixels // #if DISABLED(BTT_MINI_12864) && !defined(NEOPIXEL_PIN) #define NEOPIXEL_PIN PD15 // RGB #elif ENABLED(BTT_MINI_12864) && !defined(NEOPIXEL2_PIN) // Allow dedicated RGB (NeoPixel) pin to be used for a NeoPixel strip #define NEOPIXEL2_PIN PD15 // RGB #endif
2301_81045437/Marlin
Marlin/src/pins/stm32h7/pins_BTT_MANTA_M8P_V2_0.h
C
agpl-3.0
15,084
/** * Marlin 3D Printer Firmware * Copyright (c) 2023 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" #define BOARD_INFO_NAME "OCTOPUS MAX EZ V1.0" #define USES_DIAG_JUMPERS // Onboard I2C EEPROM #if ANY(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 PB10 #define I2C_SDA_PIN PB11 #define MARLIN_EEPROM_SIZE 0x1000 // 4KB #endif // Avoid conflict with TIMER_TONE #define STEP_TIMER 8 // // Servos // #define SERVO0_PIN PB14 // // Trinamic Stallguard pins // #define X_DIAG_PIN PF0 // M1-STOP #define Y_DIAG_PIN PF2 // M2-STOP #define Z_DIAG_PIN PF4 // M3-STOP #define Z2_DIAG_PIN PF3 // M4-DET #define E0_DIAG_PIN PF1 // M5-DET #define E1_DIAG_PIN PC15 // M6-DET #define E2_DIAG_PIN PF12 // PWRDET // // Limit Switches // #ifdef X_STALL_SENSITIVITY #define X_STOP_PIN X_DIAG_PIN #if X_HOME_TO_MIN #define X_MAX_PIN E0_DIAG_PIN // M4-DET #else #define X_MIN_PIN E0_DIAG_PIN // M4-DET #endif #elif NEEDS_X_MINMAX #ifndef X_MIN_PIN #define X_MIN_PIN X_DIAG_PIN // X-STOP #endif #ifndef X_MAX_PIN #define X_MAX_PIN E0_DIAG_PIN // M4-DET #endif #else #define X_STOP_PIN X_DIAG_PIN // X-STOP #endif #ifdef Y_STALL_SENSITIVITY #define Y_STOP_PIN Y_DIAG_PIN #if Y_HOME_TO_MIN #define Y_MAX_PIN E1_DIAG_PIN // M5-DET #else #define Y_MIN_PIN E1_DIAG_PIN // M5-DET #endif #elif NEEDS_Y_MINMAX #ifndef Y_MIN_PIN #define Y_MIN_PIN Y_DIAG_PIN // Y-STOP #endif #ifndef Y_MAX_PIN #define Y_MAX_PIN E1_DIAG_PIN // M5-DET #endif #else #define Y_STOP_PIN Y_DIAG_PIN // Y-STOP #endif #ifdef Z_STALL_SENSITIVITY #define Z_STOP_PIN Z_DIAG_PIN #if Z_HOME_TO_MIN #define Z_MAX_PIN E2_DIAG_PIN // PWRDET #else #define Z_MIN_PIN E2_DIAG_PIN // PWRDET #endif #elif NEEDS_Z_MINMAX #ifndef Z_MIN_PIN #define Z_MIN_PIN Z_DIAG_PIN // Z-STOP #endif #ifndef Z_MAX_PIN #define Z_MAX_PIN E2_DIAG_PIN // PWRDET #endif #else #define Z_STOP_PIN Z_DIAG_PIN // Z-STOP #endif // // Z Probe (when not Z_MIN_PIN) // #ifndef Z_MIN_PROBE_PIN #define Z_MIN_PROBE_PIN PB15 #endif // // Probe enable // #if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) #define PROBE_ENABLE_PIN SERVO0_PIN #endif // // Filament Runout Sensor // #define FIL_RUNOUT_PIN PF1 // M5-DET #define FIL_RUNOUT2_PIN PC15 // M6-DET // // Steppers // #define X_STEP_PIN PC13 // MOTOR 1 #define X_DIR_PIN PC14 #define X_ENABLE_PIN PE6 #ifndef X_CS_PIN #define X_CS_PIN PG14 #endif #define Y_STEP_PIN PE4 // MOTOR 2 #define Y_DIR_PIN PE5 #define Y_ENABLE_PIN PE3 #ifndef Y_CS_PIN #define Y_CS_PIN PG13 #endif #define Z_STEP_PIN PE1 // MOTOR 3 #define Z_DIR_PIN PE0 #define Z_ENABLE_PIN PE2 #ifndef Z_CS_PIN #define Z_CS_PIN PG12 #endif #define Z2_STEP_PIN PB8 // MOTOR 4 #define Z2_DIR_PIN PB9 #define Z2_ENABLE_PIN PB7 #ifndef Z2_CS_PIN #define Z2_CS_PIN PG11 #endif #define E0_STEP_PIN PB5 // MOTOR 5 #define E0_DIR_PIN PB4 #define E0_ENABLE_PIN PB6 #ifndef E0_CS_PIN #define E0_CS_PIN PG10 #endif #define E1_STEP_PIN PG15 // MOTOR 6 #define E1_DIR_PIN PB3 #define E1_ENABLE_PIN PD5 #ifndef E1_CS_PIN #define E1_CS_PIN PG9 #endif #define E2_STEP_PIN PD3 // MOTOR 7 #define E2_DIR_PIN PD2 #define E2_ENABLE_PIN PD4 #ifndef E2_CS_PIN #define E2_CS_PIN PD7 #endif #define E3_STEP_PIN PA10 // MOTOR 8 #define E3_DIR_PIN PA9 #define E3_ENABLE_PIN PA15 #ifndef E3_CS_PIN #define E3_CS_PIN PD6 #endif #define E4_STEP_PIN PA8 // MOTOR 9 #define E4_DIR_PIN PC7 #define E4_ENABLE_PIN PC9 #ifndef E4_CS_PIN #define E4_CS_PIN PG8 #endif #define E5_STEP_PIN PG6 // MOTOR 10 #define E5_DIR_PIN PC6 #define E5_ENABLE_PIN PC8 #ifndef E5_CS_PIN #define E5_CS_PIN PG7 #endif // // Temperature Sensors // #define TEMP_BED_PIN PB1 // TB #define TEMP_0_PIN PB0 // TH0 #define TEMP_1_PIN PC5 // TH1 #define TEMP_2_PIN PC4 // TH2 #define TEMP_3_PIN PA7 // TH3 // // Heaters / Fans // #define HEATER_BED_PIN PF5 // Hotbed #define HEATER_0_PIN PF6 // Heater0 #define HEATER_1_PIN PA0 // Heater1 #define HEATER_2_PIN PF9 // Heater2 #define HEATER_3_PIN PF7 // Heater3 #define FAN0_PIN PA6 // Fan0 #define FAN1_PIN PA5 // Fan1 #define FAN2_PIN PA4 // Fan2 #define FAN3_PIN PA3 // Fan3 #define FAN4_PIN PA1 // 4 wire Fan4 #define FAN5_PIN PF8 // 4 wire Fan5 #define FAN6_PIN PA2 // 4 wire Fan6 // // Power Supply Control // #ifndef PS_ON_PIN #define PS_ON_PIN PF13 // PS-ON #endif // // Power Loss Detection // #ifndef POWER_LOSS_PIN #define POWER_LOSS_PIN PF12 // PWRDET #endif // // Misc. Functions // #define LED_PIN PA14 #ifndef FILWIDTH_PIN #define FILWIDTH_PIN PC0 #endif #ifndef FILWIDTH2_PIN #define FILWIDTH2_PIN PF10 #endif // // SD Support // #ifndef SDCARD_CONNECTION #if HAS_WIRED_LCD && DISABLED(NO_LCD_SDCARD) #define SDCARD_CONNECTION LCD #else #define SDCARD_CONNECTION ONBOARD #endif #endif // // Default pins for TMC software SPI // #ifndef TMC_SPI_MOSI #define TMC_SPI_MOSI PE14 #endif #ifndef TMC_SPI_MISO #define TMC_SPI_MISO PE13 #endif #ifndef TMC_SPI_SCK #define TMC_SPI_SCK PE12 #endif #if HAS_TMC_UART /** * TMC2208/TMC2209 stepper drivers * * Hardware serial communication ports. * If undefined software serial is used according to the pins below */ //#define X_HARDWARE_SERIAL Serial1 //#define X2_HARDWARE_SERIAL Serial1 //#define Y_HARDWARE_SERIAL Serial1 //#define Y2_HARDWARE_SERIAL Serial1 //#define Z_HARDWARE_SERIAL Serial1 //#define Z2_HARDWARE_SERIAL Serial1 //#define E0_HARDWARE_SERIAL Serial1 //#define E1_HARDWARE_SERIAL Serial1 //#define E2_HARDWARE_SERIAL Serial1 //#define E3_HARDWARE_SERIAL Serial1 //#define E4_HARDWARE_SERIAL Serial1 #define X_SERIAL_TX_PIN PG14 #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PG13 #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PG12 #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define Z2_SERIAL_TX_PIN PG11 #define Z2_SERIAL_RX_PIN Z2_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PG10 #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN PG9 #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN #define E2_SERIAL_TX_PIN PD7 #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN #define E3_SERIAL_TX_PIN PD6 #define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN #define E4_SERIAL_TX_PIN PG8 #define E4_SERIAL_RX_PIN E3_SERIAL_TX_PIN #define E5_SERIAL_TX_PIN PG7 #define E5_SERIAL_RX_PIN E3_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE #define TMC_BAUD_RATE 19200 #endif #endif // HAS_TMC_UART /** * 18-pin FPC Connector * ---- * (MISO) PE13 | 1 | * (SCK) PE12 | 2 | * (BTN_EN1) PG5 | 3 | * (SD_SS) PE11 | 4 | * (BTN_EN2) PG4 | 5 | * (MOSI) PE14 | 6 | * (SD_DETECT) PG3 | 7 | * RESET | 8 | * (BEEPER) PG2 | 9 | * (BTN_ENC) PD15 | 10 | * (LCD_EN) PD14 | 11 | * (LCD_RS) PD13 | 12 | * (LCD_D4) PD12 | 13 | * (LCD_D5) PD11 | 14 | * (LCD_D6) PD10 | 15 | * (LCD_D7) PE15 | 16 | * GND | 17 | * 5V | 18 | * ---- * LCD */ #define EXP1_01_PIN PG2 #define EXP1_02_PIN PD15 #define EXP1_03_PIN PD14 #define EXP1_04_PIN PD13 #define EXP1_05_PIN PD12 #define EXP1_06_PIN PD11 #define EXP1_07_PIN PD10 #define EXP1_08_PIN PE15 #define EXP2_01_PIN PE13 #define EXP2_02_PIN PE12 #define EXP2_03_PIN PG5 #define EXP2_04_PIN PE11 #define EXP2_05_PIN PG4 #define EXP2_06_PIN PE14 #define EXP2_07_PIN PG3 #define EXP2_08_PIN -1 // // Onboard SD card // Must use soft SPI because Marlin's default hardware SPI is tied to LCD's EXP2 // #if SD_CONNECTION_IS(ONBOARD) #ifndef SD_DETECT_STATE #define SD_DETECT_STATE HIGH #elif SD_DETECT_STATE == LOW #error "BOARD_BTT_OCTOPUS_MAX_EZ onboard SD requires SD_DETECT_STATE set to HIGH." #endif #define SDSS PB12 #define SD_SS_PIN SDSS #define SD_SCK_PIN PE12 #define SD_MISO_PIN PE13 #define SD_MOSI_PIN PE14 #define SD_DETECT_PIN PB13 #define SOFTWARE_SPI #elif SD_CONNECTION_IS(LCD) #define SDSS EXP2_04_PIN #define SD_SS_PIN SDSS #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 #define SOFTWARE_SPI #elif SD_CONNECTION_IS(CUSTOM_CABLE) #error "CUSTOM_CABLE is not a supported SDCARD_CONNECTION for this board" #endif // // LCD / Controller // #if ENABLED(BTT_MINI_12864) // BTT Mini 12864 V2.0 connected via 18-pin FPC cable #define BEEPER_PIN EXP1_01_PIN #define BTN_ENC EXP1_02_PIN #define LCD_PINS_RS EXP1_04_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN #define LCD_PINS_EN EXP1_03_PIN #define LCD_PINS_D4 EXP1_05_PIN #define LCD_PINS_D5 EXP1_06_PIN #define LCD_PINS_D6 EXP1_07_PIN #define LCD_PINS_D7 EXP1_08_PIN #define DOGLCD_CS EXP1_03_PIN #define DOGLCD_A0 EXP1_04_PIN #define DOGLCD_SCK EXP2_02_PIN #define DOGLCD_MOSI EXP2_06_PIN #define SOFTWARE_SPI #define FORCE_SOFT_SPI // Use this if Hardware SPI causes display problems. // Results in LCD Software SPI mode 3, SD Software SPI mode 0. //#define LCD_BACKLIGHT_PIN -1 #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. #define NEOPIXEL_PIN EXP1_06_PIN #elif HAS_WIRED_LCD #error "Only BTT_MINI_12864 (BTT Mini 12864 V2.0 with FPC cable) is currently supported on the BIGTREE_OCTOPUS_MAX_EZ." #endif // // NeoPixel LED // #ifndef BOARD_NEOPIXEL_PIN #define BOARD_NEOPIXEL_PIN PE10 #endif #ifndef NEOPIXEL2_PIN #define NEOPIXEL2_PIN PE9 #endif // // WiFi // #if ENABLED(WIFISUPPORT) /** * -------- * GND | 9 8 | 3.3V * (ESP-CS) PG1 | 10 7 | PB15 (ESP-MOSI) * 3.3V | 11 6 | PB14 (ESP-MISO) * (ESP-IO0) PG0 | 12 5 | PB13 (ESP-CLK) * (ESP-IO4) PF15 | 13 4 | -- * -- | 14 3 | 3.3V (ESP-EN) * (ESP-RX) PE7 | 15 2 | -- * (ESP-TX) PE8 | 16 1 | PB2 (ESP-RST) * -------- * WIFI */ #define ESP_WIFI_MODULE_COM 7 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this #define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2 #define ESP_WIFI_MODULE_RESET_PIN PB2 #define ESP_WIFI_MODULE_GPIO0_PIN PG0 #define ESP_WIFI_MODULE_GPIO4_PIN PF15 #endif
2301_81045437/Marlin
Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h
C
agpl-3.0
14,952
/** * Marlin 3D Printer Firmware * Copyright (c) 2023 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_INFO_NAME "OCTOPUS PRO V1.0.1" #include "pins_BTT_OCTOPUS_PRO_V1_common.h" // // Steppers // #define Z2_ENABLE_PIN PA0 // // Heaters / Fans // #define HEATER_0_PIN PA2 // Heater0 #define HEATER_2_PIN PB10 // Heater2 // // NeoPixel LED // #ifndef NEOPIXEL_PIN #define NEOPIXEL_PIN PB0 #endif
2301_81045437/Marlin
Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_PRO_V1_0_1.h
C
agpl-3.0
1,279
/** * Marlin 3D Printer Firmware * Copyright (c) 2023 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_INFO_NAME "BTT OCTOPUS PRO V1.1" #include "pins_BTT_OCTOPUS_PRO_V1_common.h" // // Steppers // #define Z2_ENABLE_PIN PA2 // // Heaters / Fans // #define HEATER_0_PIN PA0 // Heater0 #define HEATER_2_PIN PB0 // Heater2 // // NeoPixel LED // #ifndef NEOPIXEL_PIN #define NEOPIXEL_PIN PB10 #endif
2301_81045437/Marlin
Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_PRO_V1_1.h
C
agpl-3.0
1,284
/** * Marlin 3D Printer Firmware * Copyright (c) 2023 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" #define HAS_OTG_USB_HOST_SUPPORT // USB Flash Drive support #define USES_DIAG_JUMPERS // Onboard I2C EEPROM #if ANY(NO_EEPROM_SELECTED, I2C_EEPROM) #undef NO_EEPROM_SELECTED #define I2C_EEPROM #define MARLIN_EEPROM_SIZE 0x1000 // 4K (AT24C32) #define SOFT_I2C_EEPROM // Force the use of Software I2C #define I2C_SCL_PIN PB8 #define I2C_SDA_PIN PB9 #endif // Avoid conflict with TIMER_TONE #define STEP_TIMER 8 // // Servos // #define SERVO0_PIN PB6 // // Trinamic Stallguard pins // #define X_DIAG_PIN PG6 // X-STOP #define Y_DIAG_PIN PG9 // Y-STOP #define Z_DIAG_PIN PG10 // Z-STOP #define Z2_DIAG_PIN PG11 // Z2-STOP #define E0_DIAG_PIN PG12 // E0DET #define E1_DIAG_PIN PG13 // E1DET #define E2_DIAG_PIN PG14 // E2DET #define E3_DIAG_PIN PG15 // E3DET // // Limit Switches // #ifdef X_STALL_SENSITIVITY #define X_STOP_PIN X_DIAG_PIN #if X_HOME_TO_MIN #define X_MAX_PIN E0_DIAG_PIN // E0DET #else #define X_MIN_PIN E0_DIAG_PIN // E0DET #endif #elif NEEDS_X_MINMAX #ifndef X_MIN_PIN #define X_MIN_PIN X_DIAG_PIN // X-STOP #endif #ifndef X_MAX_PIN #define X_MAX_PIN E0_DIAG_PIN // E0DET #endif #else #define X_STOP_PIN X_DIAG_PIN // X-STOP #endif #ifdef Y_STALL_SENSITIVITY #define Y_STOP_PIN Y_DIAG_PIN #if Y_HOME_TO_MIN #define Y_MAX_PIN E1_DIAG_PIN // E1DET #else #define Y_MIN_PIN E1_DIAG_PIN // E1DET #endif #elif NEEDS_Y_MINMAX #ifndef Y_MIN_PIN #define Y_MIN_PIN Y_DIAG_PIN // Y-STOP #endif #ifndef Y_MAX_PIN #define Y_MAX_PIN E1_DIAG_PIN // E1DET #endif #else #define Y_STOP_PIN Y_DIAG_PIN // Y-STOP #endif #ifdef Z_STALL_SENSITIVITY #define Z_STOP_PIN Z_DIAG_PIN #if Z_HOME_TO_MIN #define Z_MAX_PIN E2_DIAG_PIN // PWRDET #else #define Z_MIN_PIN E2_DIAG_PIN // PWRDET #endif #elif NEEDS_Z_MINMAX #ifndef Z_MIN_PIN #define Z_MIN_PIN Z_DIAG_PIN // Z-STOP #endif #ifndef Z_MAX_PIN #define Z_MAX_PIN E2_DIAG_PIN // PWRDET #endif #else #define Z_STOP_PIN Z_DIAG_PIN // Z-STOP #endif // // Z Probe (when not Z_MIN_PIN) // #ifndef Z_MIN_PROBE_PIN #if DISABLED(BLTOUCH) #define Z_MIN_PROBE_PIN PC5 // Probe (Proximity switch) port #else #define Z_MIN_PROBE_PIN PB7 #endif #endif // // Probe enable // #if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) #define PROBE_ENABLE_PIN SERVO0_PIN #endif // // Filament Runout Sensor // #define FIL_RUNOUT_PIN PG12 // E0DET #define FIL_RUNOUT2_PIN PG13 // E1DET #define FIL_RUNOUT3_PIN PG14 // E2DET #define FIL_RUNOUT4_PIN PG15 // E3DET // // Power Supply Control // #ifndef PS_ON_PIN #define PS_ON_PIN PE11 // PS-ON #endif // // Power Loss Detection // #ifndef POWER_LOSS_PIN #define POWER_LOSS_PIN PC0 // PWRDET #endif // // Misc. Functions // #define LED_PIN PA13 // // Steppers // #define X_STEP_PIN PF13 // MOTOR 0 #define X_DIR_PIN PF12 #define X_ENABLE_PIN PF14 #ifndef X_CS_PIN #define X_CS_PIN PC4 #endif #define Y_STEP_PIN PG0 // MOTOR 1 #define Y_DIR_PIN PG1 #define Y_ENABLE_PIN PF15 #ifndef Y_CS_PIN #define Y_CS_PIN PD11 #endif #define Z_STEP_PIN PF11 // MOTOR 2 #define Z_DIR_PIN PG3 #define Z_ENABLE_PIN PG5 #ifndef Z_CS_PIN #define Z_CS_PIN PC6 #endif #define Z2_STEP_PIN PG4 // MOTOR 3 #define Z2_DIR_PIN PC1 #ifndef Z2_CS_PIN #define Z2_CS_PIN PC7 #endif #define E0_STEP_PIN PF9 // MOTOR 4 #define E0_DIR_PIN PF10 #define E0_ENABLE_PIN PG2 #ifndef E0_CS_PIN #define E0_CS_PIN PF2 #endif #define E1_STEP_PIN PC13 // MOTOR 5 #define E1_DIR_PIN PF0 #define E1_ENABLE_PIN PF1 #ifndef E1_CS_PIN #define E1_CS_PIN PE4 #endif #define E2_STEP_PIN PE2 // MOTOR 6 #define E2_DIR_PIN PE3 #define E2_ENABLE_PIN PD4 #ifndef E2_CS_PIN #define E2_CS_PIN PE1 #endif #define E3_STEP_PIN PE6 // MOTOR 7 #define E3_DIR_PIN PA14 #define E3_ENABLE_PIN PE0 #ifndef E3_CS_PIN #define E3_CS_PIN PD3 #endif // // Temperature Sensors // #define TEMP_BED_PIN PF3 // TB #define TEMP_0_PIN PF4 // TH0 #define TEMP_1_PIN PF5 // TH1 #define TEMP_2_PIN PF6 // TH2 #define TEMP_3_PIN PF7 // TH3 #if TEMP_SENSOR_0_IS_MAX31865 #define TEMP_0_CS_PIN PF8 // Max31865 CS #define TEMP_0_SCK_PIN PA5 #define TEMP_0_MISO_PIN PA6 #define TEMP_0_MOSI_PIN PA7 #define SOFTWARE_SPI // Max31865 and LCD SD share a set of SPIs, Set SD to softwareSPI for Max31865 #define FORCE_SOFT_SPI #endif // // Heaters / Fans // #define HEATER_BED_PIN PA1 // Hotbed #define HEATER_1_PIN PA3 // Heater1 #define HEATER_3_PIN PB11 // Heater3 #define FAN0_PIN PA8 // Fan0 #define FAN1_PIN PE5 // Fan1 #define FAN2_PIN PD12 // Fan2 #define FAN3_PIN PD13 // Fan3 #define FAN4_PIN PD14 // Fan4 #define FAN5_PIN PD15 // Fan5 // // SD Support // #ifndef SDCARD_CONNECTION #if HAS_WIRED_LCD && DISABLED(NO_LCD_SDCARD) #define SDCARD_CONNECTION LCD #else #define SDCARD_CONNECTION ONBOARD #endif #endif // // SPI pins for TMC2130 stepper drivers // #ifndef TMC_SPI_MOSI #define TMC_SPI_MOSI PA7 #endif #ifndef TMC_SPI_MISO #define TMC_SPI_MISO PA6 #endif #ifndef TMC_SPI_SCK #define TMC_SPI_SCK PA5 #endif #if HAS_TMC_UART /** * TMC2208/TMC2209 stepper drivers * * Hardware serial communication ports. * If undefined software serial is used according to the pins below */ //#define X_HARDWARE_SERIAL Serial1 //#define X2_HARDWARE_SERIAL Serial1 //#define Y_HARDWARE_SERIAL Serial1 //#define Y2_HARDWARE_SERIAL Serial1 //#define Z_HARDWARE_SERIAL Serial1 //#define Z2_HARDWARE_SERIAL Serial1 //#define E0_HARDWARE_SERIAL Serial1 //#define E1_HARDWARE_SERIAL Serial1 //#define E2_HARDWARE_SERIAL Serial1 //#define E3_HARDWARE_SERIAL Serial1 //#define E4_HARDWARE_SERIAL Serial1 #define X_SERIAL_TX_PIN PC4 #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PD11 #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PC6 #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define Z2_SERIAL_TX_PIN PC7 #define Z2_SERIAL_RX_PIN Z2_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PF2 #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN PE4 #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN #define E2_SERIAL_TX_PIN PE1 #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN #define E3_SERIAL_TX_PIN PD3 #define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE #define TMC_BAUD_RATE 19200 #endif #endif // HAS_TMC_UART /** ------ ------ * (BEEPER) PE8 | 1 2 | PE7 (BTN_ENC) (MISO) PA6 | 1 2 | PA5 (SCK) * (LCD_EN) PE9 | 3 4 | PE10 (LCD_RS) (BTN_EN1) PB2 | 3 4 | PA4 (SD_SS) * (LCD_D4) PE12 5 6 | PE13 (LCD_D5) (BTN_EN2) PB1 5 6 | PA7 (MOSI) * (LCD_D6) PE14 | 7 8 | PE15 (LCD_D7) (SD_DETECT) PC15 | 7 8 | RESET * GND | 9 10 | 5V GND | 9 10 | -- * ------ ------ * EXP1 EXP2 */ #define EXP1_01_PIN PE8 #define EXP1_02_PIN PE7 #define EXP1_03_PIN PE9 #define EXP1_04_PIN PE10 #define EXP1_05_PIN PE12 #define EXP1_06_PIN PE13 #define EXP1_07_PIN PE14 #define EXP1_08_PIN PE15 #define EXP2_01_PIN PA6 #define EXP2_02_PIN PA5 #define EXP2_03_PIN PB1 #define EXP2_04_PIN PA4 #define EXP2_05_PIN PB2 #define EXP2_06_PIN PA7 #define EXP2_07_PIN PC15 #define EXP2_08_PIN -1 // // Onboard SD card // Must use soft SPI because Marlin's default hardware SPI is tied to LCD's EXP2 // #if SD_CONNECTION_IS(ONBOARD) #define ONBOARD_SDIO // Use SDIO for onboard SD #ifndef SD_DETECT_STATE #define SD_DETECT_STATE HIGH #elif SD_DETECT_STATE == LOW #error "BOARD_BTT_OCTOPUS_V1_1 onboard SD requires SD_DETECT_STATE set to HIGH." #endif #define SD_DETECT_PIN PC14 #elif SD_CONNECTION_IS(LCD) #define SDSS PA4 #define SD_SS_PIN SDSS #define SD_SCK_PIN PA5 #define SD_MISO_PIN PA6 #define SD_MOSI_PIN PA7 #define SD_DETECT_PIN PC15 #elif SD_CONNECTION_IS(CUSTOM_CABLE) #error "CUSTOM_CABLE is not a supported SDCARD_CONNECTION for this board" #endif #if ENABLED(BTT_MOTOR_EXPANSION) /** * ------ ------ * M3DIAG | 1 2 | M3RX M3STP | 1 2 | M3DIR * M2DIAG | 3 4 | M2RX M2STP | 3 4 | M2DIR * M1DIAG 5 6 | M1RX M1DIR 5 6 | M1STP * M3EN | 7 8 | M2EN M1EN | 7 8 | -- * GND | 9 10 | -- GND | 9 10 | -- * ------ ------ * EXP1 EXP2 */ // M1 on Driver Expansion Module #define E4_STEP_PIN EXP2_06_PIN #define E4_DIR_PIN EXP2_05_PIN #define E4_ENABLE_PIN EXP2_07_PIN #define E4_DIAG_PIN EXP1_05_PIN #define E4_CS_PIN EXP1_06_PIN #if HAS_TMC_UART #define E4_SERIAL_TX_PIN EXP1_06_PIN #define E4_SERIAL_RX_PIN E4_SERIAL_TX_PIN #endif // M2 on Driver Expansion Module #define E5_STEP_PIN EXP2_03_PIN #define E5_DIR_PIN EXP2_04_PIN #define E5_ENABLE_PIN EXP1_08_PIN #define E5_DIAG_PIN EXP1_03_PIN #define E5_CS_PIN EXP1_04_PIN #if HAS_TMC_UART #define E5_SERIAL_TX_PIN EXP1_04_PIN #define E5_SERIAL_RX_PIN E5_SERIAL_TX_PIN #endif // M3 on Driver Expansion Module #define E6_STEP_PIN EXP2_01_PIN #define E6_DIR_PIN EXP2_02_PIN #define E6_ENABLE_PIN EXP1_07_PIN #define E6_DIAG_PIN EXP1_01_PIN #define E6_CS_PIN EXP1_02_PIN #if HAS_TMC_UART #define E6_SERIAL_TX_PIN EXP1_02_PIN #define E6_SERIAL_RX_PIN E6_SERIAL_TX_PIN #endif #endif // BTT_MOTOR_EXPANSION // // LCD / Controller // #if IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) #define TFTGLCD_CS EXP2_03_PIN #endif #elif HAS_DWIN_E3V2 || IS_DWIN_MARLINUI /** * ------ ------ --- * | 1 2 | | 1 2 | 1 | * | 3 4 | RX | 3 4 | TX | 2 | RX * ENT 5 6 | BEEP ENT 5 6 | BEEP | 3 | TX * B | 7 8 | A B | 7 8 | A | 4 | * GND | 9 10 | VCC GND | 9 10 | VCC 5 | * ------ ------ --- * EXP1 DWIN TFT * * DWIN pins are labeled as printed on DWIN PCB. GND, VCC, A, B, ENT & BEEP can be connected in the same * orientation as the existing plug/DWIN to EXP1. TX/RX need to be connected to the TFT port, with TX->RX, RX->TX. */ #ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING #error "CAUTION! Ender-3 V2 display requires a custom cable. See 'pins_BTT_OCTOPUS_V1_common.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)" #endif #define BEEPER_PIN EXP1_06_PIN #define BTN_EN1 EXP1_08_PIN #define BTN_EN2 EXP1_07_PIN #define BTN_ENC EXP1_05_PIN #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_EN 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_EN 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 ANY(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 #if HAS_SPI_TFT #define TFT_CS_PIN EXP2_04_PIN #define TFT_A0_PIN EXP2_07_PIN #define TFT_SCK_PIN EXP2_02_PIN #define TFT_MISO_PIN EXP2_01_PIN #define TFT_MOSI_PIN EXP2_06_PIN #define TOUCH_INT_PIN EXP1_07_PIN #define TOUCH_MISO_PIN EXP1_06_PIN #define TOUCH_MOSI_PIN EXP1_03_PIN #define TOUCH_SCK_PIN EXP1_05_PIN #define TOUCH_CS_PIN EXP1_04_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN #define BTN_ENC EXP1_02_PIN #endif #if ENABLED(WIFISUPPORT) // // WIFI // /** * ------- * GND | 9 | | 8 | 3.3V * (ESP-CS) PB12 | 10 | | 7 | PB15 (ESP-MOSI) * 3.3V | 11 | | 6 | PB14 (ESP-MISO) * (ESP-IO0) PD7 | 12 | | 5 | PB13 (ESP-CLK) * (ESP-IO4) PD10 | 13 | | 4 | -- * -- | 14 | | 3 | PE15 (ESP-EN) * (ESP-RX) PD8 | 15 | | 2 | -- * (ESP-TX) PD9 | 16 | | 1 | PE14 (ESP-RST) * ------- * WIFI */ #define ESP_WIFI_MODULE_COM 3 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this #define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2 #define ESP_WIFI_MODULE_RESET_PIN PG7 #define ESP_WIFI_MODULE_ENABLE_PIN PG8 #define ESP_WIFI_MODULE_GPIO0_PIN PD7 #define ESP_WIFI_MODULE_GPIO4_PIN PD10 #endif
2301_81045437/Marlin
Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_PRO_V1_common.h
C
agpl-3.0
18,584
/** * 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_INFO_NAME "BTT SKR SE BX V2.0" #define SAFE_POWER_PIN PI11 #include "pins_BTT_SKR_SE_BX_common.h"
2301_81045437/Marlin
Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX_V2.h
C
agpl-3.0
1,016
/** * 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_INFO_NAME "BTT SKR SE BX V3.0" #include "pins_BTT_SKR_SE_BX_common.h"
2301_81045437/Marlin
Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX_V3.h
C
agpl-3.0
966
/** * Marlin 3D Printer Firmware * Copyright (c) 2021 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" #define BOARD_WEBSITE_URL "github.com/bigtreetech/BIQU-BX" #define DEFAULT_MACHINE_NAME "BIQU BX" #define USES_DIAG_JUMPERS // Onboard I2C EEPROM #define I2C_EEPROM #define MARLIN_EEPROM_SIZE 0x1000 // 4K (24C32) #define HAS_OTG_USB_HOST_SUPPORT // USB Flash Drive support //#define SWD_DEBUG // Use pins PA13 and PA14 on STM32H7 for the SWD debugger // // Trinamic Stallguard pins // #define X_DIAG_PIN PB11 // X- #define Y_DIAG_PIN PB12 // Y- #define Z_DIAG_PIN PD12 // Z- #define E0_DIAG_PIN PD13 // X+ #define E1_DIAG_PIN PB13 // Y+ // // Limit Switches // #define X_MIN_PIN X_DIAG_PIN // X- #define X_MAX_PIN E0_DIAG_PIN // X+ #define Y_MIN_PIN Y_DIAG_PIN // Y- #define Y_MAX_PIN E1_DIAG_PIN // Y+ #define Z_MIN_PIN Z_DIAG_PIN // Z- #define Z_MAX_PIN PD11 // Z+ #define FIL_RUNOUT_PIN E0_DIAG_PIN // X+ #define FIL_RUNOUT2_PIN E1_DIAG_PIN // Y+ #ifndef SWD_DEBUG #define LED_PIN PA13 #define BEEPER_PIN PA14 #endif #define POWER_MONITOR_PIN PB0 #define RPI_POWER_PIN PE5 #define SERVO0_PIN PA2 // PROBE // // Z Probe (when not Z_MIN_PIN) // #ifndef Z_MIN_PROBE_PIN #define Z_MIN_PROBE_PIN PH2 // PROBE #endif // // Probe enable // #if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) #define PROBE_ENABLE_PIN SERVO0_PIN #endif // // Steppers // #define X_STEP_PIN PG13 // X #define X_DIR_PIN PG12 #define X_ENABLE_PIN PG14 #define X_CS_PIN PG10 #define Y_STEP_PIN PB3 // Y #define Y_DIR_PIN PD3 #define Y_ENABLE_PIN PB4 #define Y_CS_PIN PD4 #ifdef BX_SWAP_ZM_E1M #define Z_STEP_PIN PA8 // E1 #define Z_DIR_PIN PC9 #define Z_ENABLE_PIN PD2 #define Z_CS_PIN PC8 #else #define Z_STEP_PIN PD7 // Z1 #define Z_DIR_PIN PD6 #define Z_ENABLE_PIN PG9 #define Z_CS_PIN PD5 #endif #define E0_STEP_PIN PC14 // E0 #define E0_DIR_PIN PC13 #define E0_ENABLE_PIN PC15 #define E0_CS_PIN PI8 #ifdef BX_SWAP_ZM_E1M #define E1_STEP_PIN PD7 // Z1 #define E1_DIR_PIN PD6 #define E1_ENABLE_PIN PG9 #define E1_CS_PIN PD5 #else #define E1_STEP_PIN PA8 // E1 #define E1_DIR_PIN PC9 #define E1_ENABLE_PIN PD2 #define E1_CS_PIN PC8 #endif // // SPI pins for TMC2130 stepper drivers // #ifndef TMC_SPI_MOSI #define TMC_SPI_MOSI PC6 #endif #ifndef TMC_SPI_MISO #define TMC_SPI_MISO PG3 #endif #ifndef TMC_SPI_SCK #define TMC_SPI_SCK PC7 #endif #if HAS_TMC_UART /** * TMC2208/TMC2209 stepper drivers * * Hardware serial communication ports. * If undefined software serial is used according to the pins below */ //#define X_HARDWARE_SERIAL Serial //#define X2_HARDWARE_SERIAL Serial1 //#define Y_HARDWARE_SERIAL Serial1 //#define Y2_HARDWARE_SERIAL Serial1 //#define Z_HARDWARE_SERIAL Serial1 //#define Z2_HARDWARE_SERIAL Serial1 //#define E0_HARDWARE_SERIAL Serial1 //#define E1_HARDWARE_SERIAL Serial1 //#define E2_HARDWARE_SERIAL Serial1 //#define E3_HARDWARE_SERIAL Serial1 //#define E4_HARDWARE_SERIAL Serial1 //#define E5_HARDWARE_SERIAL Serial1 //#define E6_HARDWARE_SERIAL Serial1 //#define E7_HARDWARE_SERIAL Serial1 #define X_SERIAL_TX_PIN PG10 #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PD4 #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #ifdef BX_SWAP_ZM_E1M #define Z_SERIAL_TX_PIN PC8 #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #else #define Z_SERIAL_TX_PIN PD5 #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #endif #define E0_SERIAL_TX_PIN PI8 #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #ifdef BX_SWAP_ZM_E1M #define E1_SERIAL_TX_PIN PD5 #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN #else #define E1_SERIAL_TX_PIN PC8 #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN #endif // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE #define TMC_BAUD_RATE 19200 #endif #endif // HAS_TMC_UART // // Temperature Sensors // #define TEMP_0_PIN PH4 // TH0 #define TEMP_1_PIN PA3 // TH1 #define TEMP_BED_PIN PH5 // TB // // Heaters / Fans // #define HEATER_0_PIN PC4 // HE0 #define HEATER_1_PIN PC5 // HE1 #define HEATER_BED_PIN PA4 // BED #define FAN0_PIN PA5 // FAN0 #define FAN1_PIN PA6 // FAN1 #define FAN2_PIN PA7 // FAN2 / DCOT #define BOARD_NEOPIXEL_PIN PH3 // RGB #define NEOPIXEL2_PIN PB1 #if HAS_LTDC_TFT // LTDC_LCD Timing #define LTDC_LCD_CLK 50 // LTDC clock frequency = 50Mhz #define LTDC_LCD_HSYNC 30 // Horizontal synchronization #define LTDC_LCD_HBP 114 // Horizontal back porch #define LTDC_LCD_HFP 16 // Horizontal front porch #define LTDC_LCD_VSYNC 3 // Vertical synchronization #define LTDC_LCD_VBP 32 // Vertical back porch #define LTDC_LCD_VFP 10 // Vertical front porch #define TFT_BACKLIGHT_PIN PB5 #define LCD_DE_PIN PF10 #define LCD_CLK_PIN PG7 #define LCD_VSYNC_PIN PI9 #define LCD_HSYNC_PIN PI10 #define LCD_R7_PIN PG6 // R5 #define LCD_R6_PIN PH12 #define LCD_R5_PIN PH11 #define LCD_R4_PIN PH10 #define LCD_R3_PIN PH9 #define LCD_G7_PIN PI2 // G6 #define LCD_G6_PIN PI1 #define LCD_G5_PIN PI0 #define LCD_G4_PIN PH15 #define LCD_G3_PIN PH14 #define LCD_G2_PIN PH13 #define LCD_B7_PIN PI7 // B5 #define LCD_B6_PIN PI6 #define LCD_B5_PIN PI5 #define LCD_B4_PIN PI4 #define LCD_B3_PIN PG11 // GT911 Capacitive Touch Sensor #if ENABLED(TFT_TOUCH_DEVICE_GT911) #define GT911_RST_PIN PE4 #define GT911_INT_PIN PE3 #define GT911_SW_I2C_SCL_PIN PE2 #define GT911_SW_I2C_SDA_PIN PE6 #endif #endif #if IS_NEWPANEL #define BTN_EN1 PH6 #define BTN_EN2 PH7 #define BTN_ENC PH8 #endif // // SD card // #ifndef SDCARD_CONNECTION #define SDCARD_CONNECTION ONBOARD #endif #define SOFTWARE_SPI #define SDSS PA15 #define SD_SS_PIN SDSS #define SD_SCK_PIN PC10 #define SD_MISO_PIN PC11 #define SD_MOSI_PIN PC12 #define SD_DETECT_PIN PI3 #if ENABLED(WIFISUPPORT) // // WIFI // /** * ----- * (ESP-RX4) PA1 | 1 8 | GND * (ESP-EN) -- | 2 7 | -- (ESP-IO2) * (ESP-RST) -- | 3 6 | -- (ESP-IO0) * 3.3V | 4 5 | PA0 (ESP-TX4) * ----- * WIFI-ESP01 */ #define ESP_WIFI_MODULE_COM 4 // Must also set either SERIAL_PORT / SERIAL_PORT_2 / SERIAL_PORT_3 to this #define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT / SERIAL_PORT_2 / SERIAL_PORT_3 #define ESP_WIFI_MODULE_RESET_PIN -1 #define ESP_WIFI_MODULE_ENABLE_PIN -1 #define ESP_WIFI_MODULE_GPIO0_PIN -1 #define ESP_WIFI_MODULE_GPIO2_PIN -1 #endif
2301_81045437/Marlin
Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX_common.h
C
agpl-3.0
10,014
/** * 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_INFO_NAME "BTT SKR V3" #include "pins_BTT_SKR_V3_0_common.h"
2301_81045437/Marlin
Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0.h
C
agpl-3.0
952
/** * 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_INFO_NAME "BTT SKR V3 EZ" #include "pins_BTT_SKR_V3_0_common.h"
2301_81045437/Marlin
Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_EZ.h
C
agpl-3.0
955
/** * 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" // // https://github.com/bigtreetech/SKR-3 // // If you have the BigTreeTech driver expansion module, enable BTT_MOTOR_EXPANSION // https://github.com/bigtreetech/BTT-Expansion-module/tree/master/BTT%20EXP-MOT //#define BTT_MOTOR_EXPANSION #if ALL(HAS_WIRED_LCD, BTT_MOTOR_EXPANSION) #if ANY(CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY) #define EXP_MOT_USE_EXP2_ONLY 1 #else #error "You can't use both an LCD and a Motor Expansion Module on EXP1/EXP2 at the same time." #endif #endif #define USES_DIAG_JUMPERS // Onboard I2C EEPROM #if ANY(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 PA14 #define I2C_SDA_PIN PA13 #define MARLIN_EEPROM_SIZE 0x1000 // 4K #endif // // Servos // #define SERVO0_PIN PE5 // // Trinamic Stallguard pins // #define X_DIAG_PIN PC1 // X-STOP #define Y_DIAG_PIN PC3 // Y-STOP #define Z_DIAG_PIN PC0 // Z-STOP #define E0_DIAG_PIN PC2 // E0DET #define E1_DIAG_PIN PA0 // E1DET // // Limit Switches // #ifdef X_STALL_SENSITIVITY #define X_STOP_PIN X_DIAG_PIN #if X_HOME_TO_MIN #define X_MAX_PIN PC2 // E0DET #else #define X_MIN_PIN PC2 // E0DET #endif #elif ENABLED(X_DUAL_ENDSTOPS) #ifndef X_MIN_PIN #define X_MIN_PIN PC1 // X-STOP #endif #ifndef X_MAX_PIN #define X_MAX_PIN PC2 // E0DET #endif #else #define X_STOP_PIN PC1 // X-STOP #endif #ifdef Y_STALL_SENSITIVITY #define Y_STOP_PIN Y_DIAG_PIN #if Y_HOME_TO_MIN #define Y_MAX_PIN PA0 // E1DET #else #define Y_MIN_PIN PA0 // E1DET #endif #elif ENABLED(Y_DUAL_ENDSTOPS) #ifndef Y_MIN_PIN #define Y_MIN_PIN PC3 // Y-STOP #endif #ifndef Y_MAX_PIN #define Y_MAX_PIN PA0 // E1DET #endif #else #define Y_STOP_PIN PC3 // Y-STOP #endif #ifdef Z_STALL_SENSITIVITY #define Z_STOP_PIN Z_DIAG_PIN #if Z_HOME_TO_MIN #define Z_MAX_PIN PC15 // PWRDET #else #define Z_MIN_PIN PC15 // PWRDET #endif #elif ENABLED(Z_MULTI_ENDSTOPS) #ifndef Z_MIN_PIN #define Z_MIN_PIN PC0 // Z-STOP #endif #ifndef Z_MAX_PIN #define Z_MAX_PIN PC15 // PWRDET #endif #else #ifndef Z_STOP_PIN #define Z_STOP_PIN PC0 // Z-STOP #endif #endif #define ONBOARD_ENDSTOPPULLUPS // Board has built-in pullups // // Z Probe (when not Z_MIN_PIN) // #ifndef Z_MIN_PROBE_PIN #define Z_MIN_PROBE_PIN PC13 #endif // // Probe enable // #if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN) #define PROBE_ENABLE_PIN SERVO0_PIN #endif // // Filament Runout Sensor // #define FIL_RUNOUT_PIN PC2 // E0DET #define FIL_RUNOUT2_PIN PA0 // E1DET // // Power Supply Control // #ifndef PS_ON_PIN #define PS_ON_PIN PE4 // PS-ON #endif // // Power Loss Detection // #ifndef POWER_LOSS_PIN #define POWER_LOSS_PIN PC15 // PWRDET #endif // // Steppers // #define X_STEP_PIN PD4 #define X_DIR_PIN PD3 #define X_ENABLE_PIN PD6 #ifndef X_CS_PIN #define X_CS_PIN PD5 #endif #define Y_STEP_PIN PA15 #define Y_DIR_PIN PA8 #define Y_ENABLE_PIN PD1 #ifndef Y_CS_PIN #define Y_CS_PIN PD0 #endif #define Z_STEP_PIN PE2 #define Z_DIR_PIN PE3 #define Z_ENABLE_PIN PE0 #ifndef Z_CS_PIN #define Z_CS_PIN PE1 #endif #ifndef E0_STEP_PIN #define E0_STEP_PIN PD15 #endif #ifndef E0_DIR_PIN #define E0_DIR_PIN PD14 #endif #ifndef E0_ENABLE_PIN #define E0_ENABLE_PIN PC7 #endif #ifndef E0_CS_PIN #define E0_CS_PIN PC6 #endif #ifndef E1_STEP_PIN #define E1_STEP_PIN PD11 #endif #ifndef E1_DIR_PIN #define E1_DIR_PIN PD10 #endif #ifndef E1_ENABLE_PIN #define E1_ENABLE_PIN PD13 #endif #ifndef E1_CS_PIN #define E1_CS_PIN PD12 #endif // // Temperature Sensors // #ifndef TEMP_0_PIN #define TEMP_0_PIN PA2 // TH0 #endif #ifndef TEMP_1_PIN #define TEMP_1_PIN PA3 // TH1 #endif #ifndef TEMP_BED_PIN #define TEMP_BED_PIN PA1 // TB #endif #if HOTENDS == 1 && DISABLED(HEATERS_PARALLEL) #if TEMP_SENSOR_PROBE #define TEMP_PROBE_PIN TEMP_1_PIN #elif TEMP_SENSOR_CHAMBER #define TEMP_CHAMBER_PIN TEMP_1_PIN #endif #endif // // Heaters / Fans // #ifndef HEATER_0_PIN #define HEATER_0_PIN PB3 // Heater0 #endif #ifndef HEATER_1_PIN #define HEATER_1_PIN PB4 // Heater1 #endif #ifndef HEATER_BED_PIN #define HEATER_BED_PIN PD7 // Hotbed #endif #ifndef FAN0_PIN #define FAN0_PIN PB7 // Fan0 #endif #if HAS_CUTTER #ifndef SPINDLE_LASER_PWM_PIN #define SPINDLE_LASER_PWM_PIN PB5 #endif #ifndef SPINDLE_LASER_ENA_PIN #define SPINDLE_LASER_ENA_PIN PB6 #endif #else #ifndef FAN1_PIN #define FAN1_PIN PB6 // Fan1 #endif #ifndef FAN2_PIN #define FAN2_PIN PB5 // Fan2 #endif #endif // SPINDLE_FEATURE || LASER_FEATURE // // SPI pins for TMC2130 stepper drivers // #ifndef TMC_SPI_MOSI #define TMC_SPI_MOSI PE13 #endif #ifndef TMC_SPI_MISO #define TMC_SPI_MISO PE15 #endif #ifndef TMC_SPI_SCK #define TMC_SPI_SCK PE14 #endif #if HAS_TMC_UART /** * TMC2208/TMC2209 stepper drivers * * Hardware serial communication ports. * If undefined software serial is used according to the pins below */ //#define X_HARDWARE_SERIAL Serial1 //#define X2_HARDWARE_SERIAL Serial1 //#define Y_HARDWARE_SERIAL Serial1 //#define Y2_HARDWARE_SERIAL Serial1 //#define Z_HARDWARE_SERIAL Serial1 //#define Z2_HARDWARE_SERIAL Serial1 //#define E0_HARDWARE_SERIAL Serial1 //#define E1_HARDWARE_SERIAL Serial1 //#define E2_HARDWARE_SERIAL Serial1 //#define E3_HARDWARE_SERIAL Serial1 //#define E4_HARDWARE_SERIAL Serial1 // // Software serial // #define X_SERIAL_TX_PIN PD5 #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PD0 #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PE1 #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PC6 #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN PD12 #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE #define TMC_BAUD_RATE 19200 #endif #endif // HAS_TMC_UART // // SD Connection // #ifndef SDCARD_CONNECTION #define SDCARD_CONNECTION ONBOARD #endif /** * ------ ------ * (BEEPER) PC5 | 1 2 | PB0 (BTN_ENC) (MISO) PA6 | 1 2 | PA5 (SCK) * (LCD_EN) PB1 | 3 4 | PE8 (LCD_RS) (BTN_EN1) PE7 | 3 4 | PA4 (SD_SS) * (LCD_D4) PE9 | 5 6 PE10 (LCD_D5) (BTN_EN2) PB2 | 5 6 PA7 (MOSI) * (LCD_D6) PE11 | 7 8 | PE12 (LCD_D7) (SD_DETECT) PC4 | 7 8 | RESET * GND | 9 10 | 5V GND | 9 10 | -- * ------ ------ * EXP1 EXP2 */ #define EXP1_01_PIN PC5 #define EXP1_02_PIN PB0 #define EXP1_03_PIN PB1 #define EXP1_04_PIN PE8 #define EXP1_05_PIN PE9 #define EXP1_06_PIN PE10 #define EXP1_07_PIN PE11 #define EXP1_08_PIN PE12 #define EXP2_01_PIN PA6 #define EXP2_02_PIN PA5 #define EXP2_03_PIN PE7 #define EXP2_04_PIN PA4 #define EXP2_05_PIN PB2 #define EXP2_06_PIN PA7 #define EXP2_07_PIN PC4 #define EXP2_08_PIN -1 // // Onboard SD card // Must use soft SPI because Marlin's default hardware SPI is tied to LCD's EXP2 // #if SD_CONNECTION_IS(LCD) #define SDSS EXP2_04_PIN #define SD_SS_PIN SDSS #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(ONBOARD) #define ONBOARD_SDIO #define SDIO_CLOCK 24000000 // 24MHz #elif SD_CONNECTION_IS(CUSTOM_CABLE) #error "No custom SD drive cable defined for this board." #endif #if ENABLED(BTT_MOTOR_EXPANSION) /** ------ ------ * M3DIAG | 1 2 | M3RX M3STP | 1 2 | M3DIR * M2DIAG | 3 4 | M2RX M2STP | 3 4 | M2DIR * M1DIAG 5 6 | M1RX M1DIR 5 6 | M1STP * M3EN | 7 8 | M2EN M1EN | 7 8 | -- * GND | 9 10 | -- GND | 9 10 | -- * ------ ------ * EXP1 EXP2 * * NB In EXP_MOT_USE_EXP2_ONLY mode EXP1 is not used and M2EN and M3EN need to be jumpered to M1EN */ // M1 on Driver Expansion Module #define E2_STEP_PIN EXP2_06_PIN #define E2_DIR_PIN EXP2_05_PIN #define E2_ENABLE_PIN EXP2_07_PIN #if !EXP_MOT_USE_EXP2_ONLY #define E2_DIAG_PIN EXP1_05_PIN #define E2_CS_PIN EXP1_06_PIN #if HAS_TMC_UART #define E2_SERIAL_TX_PIN EXP1_06_PIN #define E2_SERIAL_RX_PIN EXP1_06_PIN #endif #endif // M2 on Driver Expansion Module #define E3_STEP_PIN EXP2_03_PIN #define E3_DIR_PIN EXP2_04_PIN #if !EXP_MOT_USE_EXP2_ONLY #define E3_ENABLE_PIN EXP1_08_PIN #define E3_DIAG_PIN EXP1_03_PIN #define E3_CS_PIN EXP1_04_PIN #if HAS_TMC_UART #define E3_SERIAL_TX_PIN EXP1_04_PIN #define E3_SERIAL_RX_PIN EXP1_04_PIN #endif #else #define E3_ENABLE_PIN EXP2_07_PIN #endif // M3 on Driver Expansion Module #define E4_STEP_PIN EXP2_01_PIN #define E4_DIR_PIN EXP2_02_PIN #if !EXP_MOT_USE_EXP2_ONLY #define E4_ENABLE_PIN EXP1_07_PIN #define E4_DIAG_PIN EXP1_01_PIN #define E4_CS_PIN EXP1_02_PIN #if HAS_TMC_UART #define E4_SERIAL_TX_PIN EXP1_02_PIN #define E4_SERIAL_RX_PIN EXP1_02_PIN #endif #else #define E4_ENABLE_PIN EXP2_07_PIN #endif #endif // BTT_MOTOR_EXPANSION // // LCD / Controller // #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_EN EXP1_08_PIN #define LCD_PINS_D4 EXP1_06_PIN #elif ENABLED(MKS_MINI_12864) #define DOGLCD_A0 EXP1_07_PIN #define DOGLCD_CS EXP1_06_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN #elif HAS_SPI_TFT // Config for Classic UI (emulated DOGM) and Color UI #define TFT_SCK_PIN EXP2_02_PIN #define TFT_MISO_PIN EXP2_01_PIN #define TFT_MOSI_PIN EXP2_06_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN #ifndef TFT_WIDTH #define TFT_WIDTH 480 #endif #ifndef TFT_HEIGHT #define TFT_HEIGHT 320 #endif #if ENABLED(BTT_TFT35_SPI_V1_0) /** * ------ ------ * BEEPER | 1 2 | LCD-BTN MISO | 1 2 | CLK * T_MOSI | 3 4 | T_CS LCD-ENCA | 3 4 | TFTCS * T_CLK | 5 6 T_MISO LCD-ENCB | 5 6 MOSI * PENIRQ | 7 8 | F_CS RS | 7 8 | RESET * GND | 9 10 | VCC GND | 9 10 | NC * ------ ------ * EXP1 EXP2 * * 480x320, 3.5", SPI Display with Rotary Encoder. * Stock Display for the BIQU B1 SE Series. * Schematic: https://github.com/bigtreetech/TFT35-SPI/blob/master/v1/Hardware/BTT%20TFT35-SPI%20V1-SCH.pdf */ #define TFT_CS_PIN EXP2_04_PIN #define TFT_DC_PIN EXP2_07_PIN #define TFT_A0_PIN TFT_DC_PIN #define TOUCH_CS_PIN EXP1_04_PIN #define TOUCH_SCK_PIN EXP1_05_PIN #define TOUCH_MISO_PIN EXP1_06_PIN #define TOUCH_MOSI_PIN EXP1_03_PIN #define TOUCH_INT_PIN EXP1_07_PIN #ifndef TOUCH_CALIBRATION_X #define TOUCH_CALIBRATION_X 17540 #endif #ifndef TOUCH_CALIBRATION_Y #define TOUCH_CALIBRATION_Y -11388 #endif #ifndef TOUCH_OFFSET_X #define TOUCH_OFFSET_X -21 #endif #ifndef TOUCH_OFFSET_Y #define TOUCH_OFFSET_Y 337 #endif #ifndef TOUCH_ORIENTATION #define TOUCH_ORIENTATION TOUCH_LANDSCAPE #endif #elif ENABLED(MKS_TS35_V2_0) /** ------ ------ * BEEPER | 1 2 | BTN_ENC SPI1_MISO | 1 2 | SPI1_SCK * TFT_BKL / LCD_EN | 3 4 | TFT_RESET / LCD_RS BTN_EN1 | 3 4 | SPI1_CS * TOUCH_CS / LCD_D4 | 5 6 TOUCH_INT / LCD_D5 BTN_EN2 | 5 6 SPI1_MOSI * SPI1_CS / LCD_D6 | 7 8 | SPI1_RS / LCD_D7 SPI1_RS | 7 8 | RESET * GND | 9 10 | VCC GND | 9 10 | VCC * ------ ------ * EXP1 EXP2 */ #define TFT_CS_PIN EXP1_07_PIN // SPI1_CS #define TFT_DC_PIN EXP1_08_PIN // SPI1_RS #define TFT_A0_PIN TFT_DC_PIN #define TFT_RESET_PIN EXP1_04_PIN #define LCD_BACKLIGHT_PIN EXP1_03_PIN #define TFT_BACKLIGHT_PIN LCD_BACKLIGHT_PIN #define TOUCH_BUTTONS_HW_SPI #define TOUCH_BUTTONS_HW_SPI_DEVICE 1 #define TOUCH_CS_PIN EXP1_05_PIN // SPI1_NSS #define TOUCH_SCK_PIN EXP2_02_PIN // SPI1_SCK #define TOUCH_MISO_PIN EXP2_01_PIN // SPI1_MISO #define TOUCH_MOSI_PIN EXP2_06_PIN // SPI1_MOSI #define LCD_READ_ID 0xD3 #define LCD_USE_DMA_SPI #define TFT_BUFFER_WORDS 14400 #ifndef TOUCH_CALIBRATION_X #define TOUCH_CALIBRATION_X -17253 #endif #ifndef TOUCH_CALIBRATION_Y #define TOUCH_CALIBRATION_Y 11579 #endif #ifndef TOUCH_OFFSET_X #define TOUCH_OFFSET_X 514 #endif #ifndef TOUCH_OFFSET_Y #define TOUCH_OFFSET_Y -24 #endif #ifndef TOUCH_ORIENTATION #define TOUCH_ORIENTATION TOUCH_LANDSCAPE #endif #endif #else #define LCD_PINS_RS EXP1_04_PIN #define BTN_EN1 EXP2_03_PIN #define BTN_EN2 EXP2_05_PIN #define LCD_PINS_EN 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 ANY(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 #ifndef BOARD_ST7920_DELAY_1 #define BOARD_ST7920_DELAY_1 120 #endif #ifndef BOARD_ST7920_DELAY_2 #define BOARD_ST7920_DELAY_2 80 #endif #ifndef BOARD_ST7920_DELAY_3 #define BOARD_ST7920_DELAY_3 580 #endif #endif // // NeoPixel LED // #ifndef BOARD_NEOPIXEL_PIN #define BOARD_NEOPIXEL_PIN PE6 #endif #if ENABLED(WIFISUPPORT) // // WIFI // /** * ------- * GND | 9 | | 8 | 3.3V * (ESP-CS) PB12 | 10 | | 7 | PB15 (ESP-MOSI) * 3.3V | 11 | | 6 | PB14 (ESP-MISO) * (ESP-IO0) PB10 | 12 | | 5 | PB13 (ESP-CLK) * (ESP-IO4) PB11 | 13 | | 4 | -- * -- | 14 | | 3 | 3.3V (ESP-EN) * (ESP-RX) PD8 | 15 | | 2 | -- * (ESP-TX) PD9 | 16 | | 1 | PC14 (ESP-RST) * ------- * WIFI */ #define ESP_WIFI_MODULE_COM 3 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this #define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2 #define ESP_WIFI_MODULE_RESET_PIN PC14 #define ESP_WIFI_MODULE_GPIO0_PIN PB10 #define ESP_WIFI_MODULE_GPIO4_PIN PB11 #endif
2301_81045437/Marlin
Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h
C
agpl-3.0
20,449
/** * Marlin 3D Printer Firmware * Copyright (c) 2021 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/>. * */ #ifndef ENV_VALIDATE_H #define ENV_VALIDATE_H #if NOT_TARGET(__AVR_AT90USB1286__) && (DISABLED(ALLOW_AT90USB1286P) || NOT_TARGET(__AVR_AT90USB1286P__)) #error "Oops! Select 'Teensy++ 2.0' or 'Printrboard' in 'Tools > Board.'" #endif #undef ALLOW_AT90USB1286P #endif
2301_81045437/Marlin
Marlin/src/pins/teensy2/env_validate.h
C
agpl-3.0
1,133
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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 /** * Rev B 2 JUN 2017 * * Converted to Arduino pin numbering */ /** * There are two Arduino IDE extensions that are compatible with this board * and with the mainstream Marlin software. * * Teensyduino - https://www.pjrc.com/teensy/teensyduino.html * Select Teensy++ 2.0 in Arduino IDE from the 'Tools > Board' menu * * Installation instructions are at the above URL. Don't bother loading the * libraries - they are not used with the Marlin software. * * Printrboard - https://github.com/scwimbush/Printrboard-HID-Arduino-IDE-Support * * Installation: * * 1. Go to the above URL, click on the "Clone or Download" button and then * click on "Download ZIP" button. * 2. Unzip the file, find the "printrboard" directory and then copy it to the * hardware directory in Arduino. The Arduino hardware directory will probably * be located in a path similar to this: C:\Program Files (x86)\Arduino\hardware. * 3. Restart Arduino. * 4. Select "Printrboard" from the 'Tools > Board' menu. * * Teensyduino is the most popular option. Printrboard is used if your board doesn't have * the Teensyduino bootloader on it. */ /** * To burn the bootloader that comes with Printrboard: * * 1. Connect your programmer to the board. * 2. In the Arduino IDE select "Printrboard" and then select the programmer. * 3. In the Arduino IDE click on "burn bootloader". Don't worry about the "verify failed at 1F000" error message. * 4. The programmer is no longer needed. Remove it. */ /** * 5DPrint D8 Driver board pin assignments * Schematic: https://bitbucket.org/makible/5dprint-d8-controller-board/src/master/5DPD8_v1.0_OS_schematics.PDF * * https://bitbucket.org/makible/5dprint-d8-controller-board */ #include "env_validate.h" #define DEFAULT_MACHINE_NAME "Makibox" #define BOARD_INFO_NAME "5DPrint D8" // // Servos // #define SERVO0_PIN 41 #define SERVO1_PIN 42 #define SERVO2_PIN 43 #define SERVO3_PIN 44 // // Limit Switches // #define X_STOP_PIN 37 // E5 #define Y_STOP_PIN 36 // E4 #define Z_STOP_PIN 19 // E7 // // Steppers // #define X_STEP_PIN 28 // A0 #define X_DIR_PIN 29 // A1 #define X_ENABLE_PIN 17 // C7 #define Y_STEP_PIN 30 // A2 #define Y_DIR_PIN 31 // A3 #define Y_ENABLE_PIN 13 // C3 #define Z_STEP_PIN 32 // A4 #define Z_DIR_PIN 33 // A5 #define Z_ENABLE_PIN 12 // C2 #define E0_STEP_PIN 34 // A6 #define E0_DIR_PIN 35 // A7 #define E0_ENABLE_PIN 11 // C1 // // Digital Microstepping // #define X_MS1_PIN 25 // B5 #define X_MS2_PIN 26 // B6 #define Y_MS1_PIN 9 // E1 #define Y_MS2_PIN 8 // E0 #define Z_MS1_PIN 7 // D7 #define Z_MS2_PIN 6 // D6 #define E0_MS1_PIN 5 // D5 #define E0_MS2_PIN 4 // D4 // // Temperature Sensors // #define TEMP_0_PIN 1 // F1 Analog Input #define TEMP_BED_PIN 0 // F0 Analog Input // // Heaters / Fans // #define HEATER_0_PIN 15 // C5 #define HEATER_BED_PIN 14 // C4 #ifndef FAN0_PIN #define FAN0_PIN 16 // C6 PWM3A #endif // // Misc. Functions // #define SDSS 20 // B0 //DIGIPOTS slave addresses #ifndef DIGIPOT_I2C_ADDRESS_A #define DIGIPOT_I2C_ADDRESS_A 0x2C // unshifted slave address for DIGIPOT 0x2C (0x58 <- 0x2C << 1) #endif
2301_81045437/Marlin
Marlin/src/pins/teensy2/pins_5DPRINT.h
C
agpl-3.0
5,028
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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 /** * Brainwave 1.0 pin assignments (AT90USB646) * https://www.reprap.org/wiki/Brainwave * * Requires hardware bundle for Arduino: * https://github.com/unrepentantgeek/brainwave-arduino * * Schematic: https://github.com/unrepentantgeek/Brainwave/blob/master/brainwave/brainwave.sch */ /** * Rev B 16 JAN 2017 * * Added pointer to a currently available Arduino IDE extension that will * allow this board to use the latest Marlin software */ /** * Rev C 2 JUN 2017 * * Converted to Arduino pin numbering */ /** * Marlin_AT90USB - https://github.com/Bob-the-Kuhn/Marlin_AT90USB * This is the only known IDE extension that is compatible with the pin definitions * in this file, Adrduino 1.6.12 and the latest mainstream Marlin software. * * "Marlin_AT90USB" makes PWM0A available rather than the usual PWM1C. These PWMs share * the same physical pin. Marlin uses TIMER1 to generate interrupts and sets it up such * that PWM1A, PWM1B & PWM1C can't be used. * * Installation: * * 1. In the Arduino IDE, under Files -> Preferences paste the following URL * https://rawgit.com/Bob-the-Kuhn/Marlin_AT90USB/master/package_MARLIN_AT90USB_index.json * 2. Under Tools > Board -> Boards manager, scroll to the bottom, click on MARLIN_AT90USB * and then click on "Install" * 3. Select "AT90USB646_TEENSYPP" from the 'Tools > Board' menu. */ /** * To burn the bootloader that comes with Marlin_AT90USB: * * 1. Connect your programmer to the board. * 2. In Arduino IDE select "AT90USB646_TEENSYPP" and then select the programmer. * 3. In Arduino IDE click on "burn bootloader". Don't worry about the "verify failed at 1F000" error message. * 4. The programmer is no longer needed. Remove it. */ #if NOT_TARGET(__AVR_AT90USB646__) #error "Oops! Select 'Brainwave' in 'Tools > Board.'" #endif #define BOARD_INFO_NAME "Brainwave" // // Limit Switches // #define X_STOP_PIN 35 // A7 #define Y_STOP_PIN 34 // A6 #define Z_STOP_PIN 33 // A5 // // Steppers // #define X_STEP_PIN 3 // D3 #define X_DIR_PIN 5 // D5 #define X_ENABLE_PIN 4 // D4 #define X_ATT_PIN 2 // D2 #define Y_STEP_PIN 7 // D7 #define Y_DIR_PIN 9 // E1 #define Y_ENABLE_PIN 8 // E0 #define Y_ATT_PIN 6 // D6 #define Z_STEP_PIN 11 // C1 #define Z_DIR_PIN 13 // C3 #define Z_ENABLE_PIN 12 // C2 #define Z_ATT_PIN 10 // C0 #define E0_STEP_PIN 15 // C5 #define E0_DIR_PIN 17 // C7 #define E0_ENABLE_PIN 16 // C6 #define E0_ATT_PIN 14 // C4 // // Temperature Sensors // #define TEMP_0_PIN 7 // F7 Analog Input #define TEMP_BED_PIN 6 // F6 Analog Input // // Heaters / Fans // #define HEATER_0_PIN 32 // A4 Extruder #define HEATER_BED_PIN 18 // E6 Bed #ifndef FAN0_PIN #define FAN0_PIN 31 // A3 Fan #endif // // Misc. Functions // #define LED_PIN 19 // E7
2301_81045437/Marlin
Marlin/src/pins/teensy2/pins_BRAINWAVE.h
C
agpl-3.0
4,390
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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 /** * Brainwave Pro pin assignments (AT90USB1286) * * Requires hardware bundle for Arduino: * https://github.com/unrepentantgeek/brainwave-arduino * * Not to be confused with the regular Brainwave controller (https://www.reprap.org/wiki/Brainwave) */ /** * Rev B 16 JAN 2017 * * Added pointers to currently available Arduino IDE extensions that will * allow this board to use the latest Marlin software * * * Rev C 2 JUN 2017 * * Converted to Arduino pin numbering */ /** * There are two Arduino IDE extensions that are compatible with this board * and with the mainstream Marlin software. * * Teensyduino - https://www.pjrc.com/teensy/teensyduino.html * Select Teensy++ 2.0 in Arduino IDE from the 'Tools > Board' menu * * Installation instructions are at the above URL. Don't bother loading the * libraries - they are not used with the Marlin software. * * Printrboard - https://github.com/scwimbush/Printrboard-HID-Arduino-IDE-Support * * Installation: * * 1. Go to the above URL, click on the "Clone or Download" button and then * click on "Download ZIP" button. * 2. Unzip the file, find the "printrboard" directory and then copy it to the * hardware directory in Arduino. The Arduino hardware directory will probably * be located in a path similar to this: C:\Program Files (x86)\Arduino\hardware. * 3. Restart Arduino. * 4. Select "Printrboard" from the 'Tools > Board' menu. * * Teensyduino is the most popular option. Printrboard is used if your board doesn't have * the Teensyduino bootloader on it. */ /** * To burn the bootloader that comes with Printrboard: * * 1. Connect your programmer to the board. * 2. In the Arduino IDE select "Printrboard" and then select the programmer. * 3. In the Arduino IDE click on "burn bootloader". Don't worry about the "verify failed at 1F000" error message. * 4. The programmer is no longer needed. Remove it. */ #include "env_validate.h" #define BOARD_INFO_NAME "Brainwave Pro" // // Limit Switches // #define X_STOP_PIN 45 // F7 #define Y_STOP_PIN 12 // C2 #define Z_STOP_PIN 36 // E4 // // Z Probe (when not Z_MIN_PIN) // #ifndef Z_MIN_PROBE_PIN #define Z_MIN_PROBE_PIN 11 // C1 #endif // // Steppers // #define X_STEP_PIN 9 // E1 #define X_DIR_PIN 8 // E0 #define X_ENABLE_PIN 23 // B3 #define Y_STEP_PIN 7 // D7 #define Y_DIR_PIN 6 // D6 #define Y_ENABLE_PIN 20 // B0 #define Z_STEP_PIN 5 // D5 #define Z_DIR_PIN 4 // D4 #define Z_ENABLE_PIN 37 // E5 #define E0_STEP_PIN 47 // E3 #define E0_DIR_PIN 46 // E2 #define E0_ENABLE_PIN 25 // B5 // // Temperature Sensors // #define TEMP_0_PIN 2 // F2 Analog Input #define TEMP_1_PIN 1 // F1 Analog Input #define TEMP_BED_PIN 0 // F0 Analog Input // // Heaters / Fans // #define HEATER_0_PIN 27 // B7 #define HEATER_BED_PIN 26 // B6 Bed #ifndef FAN0_PIN #define FAN0_PIN 16 // C6 Fan, PWM3A #endif // // Misc. Functions // #define SDSS 20 // B0 #define SD_DETECT_PIN 24 // B4 #define LED_PIN 13 // C3
2301_81045437/Marlin
Marlin/src/pins/teensy2/pins_BRAINWAVE_PRO.h
C
agpl-3.0
4,625
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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 /** * Rev B 2 JUN 2017 * * Converted to Arduino pin numbering * * Schematic (RevA): https://raw.githubusercontent.com/lwalkera/printrboard/revA/Printrboard.sch * Schematic (RevB): https://raw.githubusercontent.com/lwalkera/printrboard/revB/Printrboard.sch * Schematic (RevC): https://raw.githubusercontent.com/lwalkera/printrboard/revC/Printrboard.sch * Schematic (RevD): https://raw.githubusercontent.com/lwalkera/printrboard/RevD/Printrboard.sch */ /** * There are two Arduino IDE extensions that are compatible with this board * and with the mainstream Marlin software. * * Teensyduino - https://www.pjrc.com/teensy/teensyduino.html * Select Teensy++ 2.0 in Arduino IDE from the 'Tools > Board' menu * * Installation instructions are at the above URL. Don't bother loading the * libraries - they are not used with the Marlin software. * * Printrboard - https://github.com/scwimbush/Printrboard-HID-Arduino-IDE-Support * * Installation: * * 1. Go to the above URL, click on the "Clone or Download" button and then * click on "Download ZIP" button. * 2. Unzip the file, find the "printrboard" directory and then copy it to the * hardware directory in Arduino. The Arduino hardware directory will probably * be located in a path similar to this: C:\Program Files (x86)\Arduino\hardware. * 3. Restart Arduino. * 4. Select "Printrboard" from the 'Tools > Board' menu. * * Teensyduino is the most popular option. Printrboard is used if your board doesn't have * the Teensyduino bootloader on it. */ /** * To burn the bootloader that comes with Printrboard: * * 1. Connect your programmer to the board. * 2. In the Arduino IDE select "Printrboard" and then select the programmer. * 3. In the Arduino IDE click on "burn bootloader". Don't worry about the "verify failed at 1F000" error message. * 4. The programmer is no longer needed. Remove it. */ #include "env_validate.h" #define BOARD_INFO_NAME "Printrboard" // Disable JTAG pins so they can be used for the Extrudrboard #define DISABLE_JTAG // // Limit Switches // #define X_STOP_PIN 47 // E3 #define Y_STOP_PIN 20 // B0 SS #define Z_STOP_PIN 36 // E4 // // Steppers // #define X_STEP_PIN 28 // A0 #define X_DIR_PIN 29 // A1 #define X_ENABLE_PIN 19 // E7 #define Y_STEP_PIN 30 // A2 #define Y_DIR_PIN 31 // A3 #define Y_ENABLE_PIN 18 // E6 #define Z_STEP_PIN 32 // A4 #define Z_DIR_PIN 33 // A5 #define Z_ENABLE_PIN 17 // C7 #define E0_STEP_PIN 34 // A6 #define E0_DIR_PIN 35 // A7 #define E0_ENABLE_PIN 13 // C3 // // Temperature Sensors // #define TEMP_0_PIN 1 // Analog Input #define TEMP_BED_PIN 0 // Analog Input // // Heaters / Fans // #define HEATER_0_PIN 15 // C5 PWM3B - Extruder #define HEATER_1_PIN 44 // F6 #define HEATER_2_PIN 45 // F7 #define HEATER_BED_PIN 14 // C4 PWM3C #ifndef FAN0_PIN #define FAN0_PIN 16 // C6 PWM3A #endif // // Misc. Functions // #define FILWIDTH_PIN 2 // Analog Input // // LCD / Controller // #if HAS_WIRED_LCD && IS_NEWPANEL #define LCD_PINS_RS 9 // E1 JP11-11 #define LCD_PINS_EN 8 // E0 JP11-10 #define LCD_PINS_D4 7 // D7 JP11-8 #define LCD_PINS_D5 6 // D6 JP11-7 #define LCD_PINS_D6 5 // D5 JP11-6 #define LCD_PINS_D7 4 // D4 JP11-5 #if ANY(VIKI2, miniVIKI) #define BEEPER_PIN 8 // E0 JP11-10 #define DOGLCD_A0 40 // F2 JP2-2 #define DOGLCD_CS 41 // F3 JP2-4 #define BTN_EN1 2 // D2 TX1 JP2-5 #define BTN_EN2 3 // D3 RX1 JP2-7 #define BTN_ENC 45 // F7 TDI JP2-12 #define SDSS 43 // F5 TMS JP2-8 #define STAT_LED_RED_PIN 12 // C2 JP11-14 #define STAT_LED_BLUE_PIN 10 // C0 JP11-12 #define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 #elif ENABLED(LCD_I2C_PANELOLU2) #define BTN_EN1 3 // D3 RX1 JP2-7 #define BTN_EN2 2 // D2 TX1 JP2-5 #define BTN_ENC 41 // F3 JP2-4 #define SDSS 38 // F0 B-THERM connector - use SD card on Panelolu2 #else #define BTN_EN1 10 // C0 JP11-12 #define BTN_EN2 11 // C1 JP11-13 #define BTN_ENC 12 // C2 JP11-14 #endif #endif // HAS_WIRED_LCD && IS_NEWPANEL #ifndef SDSS #define SDSS 26 // B6 SDCS #endif
2301_81045437/Marlin
Marlin/src/pins/teensy2/pins_PRINTRBOARD.h
C
agpl-3.0
6,397
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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 /** * Rev B 2 JUN 2017 * * Converted to Arduino pin numbering * * Schematic (RevF): https://github.com/lwalkera/printrboard/raw/revF/Printrboard.sch * Schematic (RevF2): https://raw.githubusercontent.com/lwalkera/printrboard/revF2/Printrboard.sch * Schematic (RevF3): https://raw.githubusercontent.com/lwalkera/printrboard/revF3/Printrboard.sch * Schematic (RevF4): https://raw.githubusercontent.com/lwalkera/printrboard/revF4/Printrboard.sch * Schematic (RevF5): https://raw.githubusercontent.com/lwalkera/printrboard/revF5/Printrboard.sch * Schematic (RevF6): https://raw.githubusercontent.com/lwalkera/printrboard/revF6/Printrboard.sch */ /** * There are two Arduino IDE extensions that are compatible with this board * and with the mainstream Marlin software. * * Teensyduino - https://www.pjrc.com/teensy/teensyduino.html * Installation - https://www.pjrc.com/teensy/td_download.html * * Select Teensy++ 2.0 in Arduino IDE from the 'Tools > Board' menu * * Note: With Teensyduino extension, the Arduino IDE will report 130048 bytes of program storage space available, * but there is actually only 122880 bytes due to the larger DFU bootloader shipped by default on all Printrboard RevF. * * Printrboard - https://github.com/scwimbush/Printrboard-HID-Arduino-IDE-Support * * Installation: * * 1. Go to the above URL, click on the "Clone or Download" button and then * click on "Download ZIP" button. * 2. Unzip the file, find the "printrboard" directory and then copy it to the * hardware directory in Arduino. The Arduino hardware directory will probably * be located in a path similar to this: C:\Program Files (x86)\Arduino\hardware. * 3. Restart Arduino. * 4. Select "Printrboard" from the 'Tools > Board' menu. * * Teensyduino is the most popular and easiest option. */ /** * To burn the bootloader that comes with Printrboard HID extension: * * 1. Connect your programmer to the board. * 2. In the Arduino IDE select "Printrboard" and then select the programmer. * 3. In the Arduino IDE click on "burn bootloader". Don't worry about the "verify failed at 1F000" error message. * 4. The programmer is no longer needed. Remove it. */ #include "env_validate.h" #if !defined(__MARLIN_DEPS__) && !defined(USBCON) #error "USBCON should be defined by the platform for this board." #endif #define BOARD_INFO_NAME "Printrboard Rev.F" // Disable JTAG pins so EXP1 pins work correctly // (Its pins are used for the Extrudrboard and filament sensor, for example). #define DISABLE_JTAG /** * Note that REV F6 of the Printrboard stole the A HOTEND pin and * reassigned it to a second fan for the extruder heater. It's * recommended that you swap the A and B outputs on the Extrudrboard * so EXTRUDERS=2 will still work on F6, using B for E1/HEATER_1/TEMP_1. * See https://printrbot.zendesk.com/hc/en-us/articles/115003072346 * * If you have REV F6 you probably also want to set E0_AUTO_FAN_PIN * to PRINTRBOARD_F6_HEATER_FAN_PIN (44). * * Define NO_EXTRUDRBOARD if you don't have an EXTRUDRBOARD and wish to * reassign different functions to EXP1. * * Define NO_EXTRUDRBOARD_OUTPUT_SWAP if you have a REV F5 or lower and * want to use EXTRUDRBOARD A for E1 and EXTRUDRBOARD B for E2. */ //#define NO_EXTRUDRBOARD //#define NO_EXTRUDRBOARD_OUTPUT_SWAP // // Limit Switches // #define X_STOP_PIN 47 // E3 #define Y_STOP_PIN 24 // B4 PWM2A #define Z_STOP_PIN 36 // E4 // // Steppers // #define X_STEP_PIN 28 // A0 #define X_DIR_PIN 29 // A1 #define X_ENABLE_PIN 19 // E7 #define Y_STEP_PIN 30 // A2 #define Y_DIR_PIN 31 // A3 #define Y_ENABLE_PIN 18 // E6 #define Z_STEP_PIN 32 // A4 #define Z_DIR_PIN 33 // A5 #define Z_ENABLE_PIN 17 // C7 #define E0_STEP_PIN 34 // A6 #define E0_DIR_PIN 35 // A7 #define E0_ENABLE_PIN 13 // C3 #if DISABLED(NO_EXTRUDRBOARD) #if DISABLED(NO_EXTRUDRBOARD_OUTPUT_SWAP) #define E1_STEP_PIN 25 // B5 #define E1_DIR_PIN 37 // E5 #define E1_ENABLE_PIN 42 // F4 #define E2_STEP_PIN 2 // D2 #define E2_DIR_PIN 3 // D3 #define E2_ENABLE_PIN 43 // F5 #else #define E1_STEP_PIN 2 // D2 #define E1_DIR_PIN 3 // D3 #define E1_ENABLE_PIN 43 // F5 #define E2_STEP_PIN 25 // B5 #define E2_DIR_PIN 37 // E5 #define E2_ENABLE_PIN 42 // F4 #endif #endif // NO_EXTRUDRBOARD // Enable control of stepper motor currents with the I2C based MCP4728 DAC used on Printrboard REVF #define HAS_MOTOR_CURRENT_DAC 1 // Set default drive strength percents if not already defined - X, Y, Z, E axis #ifndef DAC_MOTOR_CURRENT_DEFAULT #define DAC_MOTOR_CURRENT_DEFAULT { 70, 70, 50, 70 } #endif // Number of channels available for DAC #define DAC_STEPPER_ORDER { 3, 2, 1, 0 } #define DAC_STEPPER_SENSE 0.11 #define DAC_STEPPER_ADDRESS 0 #define DAC_STEPPER_MAX 3520 #define DAC_STEPPER_VREF 1 // internal Vref, gain 1x = 2.048V #define DAC_STEPPER_GAIN 0 #define DAC_OR_ADDRESS 0x00 // // Temperature Sensors // #define TEMP_0_PIN 1 // Analog Input (Extruder) #define TEMP_BED_PIN 0 // Analog Input (Bed) #if DISABLED(NO_EXTRUDRBOARD) #if DISABLED(NO_EXTRUDRBOARD_OUTPUT_SWAP) #define TEMP_1_PIN 2 // Analog Input (Extrudrboard A THERM) #define TEMP_2_PIN 3 // Analog Input (Extrudrboard B THERM) #else #define TEMP_1_PIN 3 // Analog Input (Extrudrboard B THERM) #define TEMP_2_PIN 2 // Analog Input (Extrudrboard A THERM) #endif #endif // // Heaters / Fans // #define HEATER_0_PIN 15 // C5 PWM3B - Extruder #define HEATER_BED_PIN 14 // C4 PWM3C #if DISABLED(NO_EXTRUDRBOARD) #if DISABLED(NO_EXTRUDRBOARD_OUTPUT_SWAP) #define HEATER_1_PIN 44 // F6 - Extrudrboard A HOTEND #define HEATER_2_PIN 45 // F7 - Extrudrboard B HOTEND #else #define HEATER_1_PIN 45 // F7 - Extrudrboard B HOTEND #define HEATER_2_PIN 44 // F6 - Extrudrboard A HOTEND #endif #endif #ifndef FAN0_PIN #define FAN0_PIN 16 // C6 PWM3A #endif // // LCD / Controller // //#define USE_INTERNAL_SD #if HAS_WIRED_LCD #define LCD_PINS_RS 9 // E1 JP11-11 #define LCD_PINS_EN 8 // E0 JP11-10 #define LCD_PINS_D4 7 // D7 JP11-8 #define LCD_PINS_D5 6 // D6 JP11-7 #define LCD_PINS_D6 5 // D5 JP11-6 #define LCD_PINS_D7 4 // D4 JP11-5 #if ANY(VIKI2, miniVIKI) #define BEEPER_PIN 8 // E0 JP11-10 #define DOGLCD_A0 40 // F2 JP2-2 #define DOGLCD_CS 41 // F3 JP2-4 #define BTN_EN1 2 // D2 TX1 JP2-5 #define BTN_EN2 3 // D3 RX1 JP2-7 #define BTN_ENC 45 // F7 TDI JP2-12 #define SDSS 3 // F5 TMS JP2-8 #define STAT_LED_RED_PIN 12 // C2 JP11-14 #define STAT_LED_BLUE_PIN 10 // C0 JP11-12 #define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270 #elif ENABLED(MINIPANEL) #if DISABLED(USE_INTERNAL_SD) // PIN FASTIO PIN# ATUSB90 PIN# Teensy2.0++ PIN# Printrboard RevF Conn. MKSLCD12864 PIN# #define SDSS 11 // 36 C1 EXP2-13 EXP2-07 #define SD_DETECT_PIN 9 // 34 E1 EXP2-11 EXP2-04 #endif // PIN FASTIO PIN# ATUSB90 PIN# Teensy2.0++ PIN# Printrboard RevF Conn. MKSLCD12864 PIN# #define DOGLCD_A0 4 // 29 D4 EXP2-05 EXP1-04 #define DOGLCD_CS 5 // 30 D5 EXP2-06 EXP1-05 #define BTN_ENC 6 // 31 D6 EXP2-07 EXP1-09 #define BEEPER_PIN 7 // 32 D7 EXP2-08 EXP1-10 #define KILL_PIN 8 // 33 E0 EXP2-10 EXP2-03 #define BTN_EN1 10 // 35 C0 EXP2-12 EXP2-06 #define BTN_EN2 12 // 37 C2 EXP2-14 EXP2-08 //#define LCD_BACKLIGHT_PIN 43 // 56 F5 EXP1-12 Not Implemented //#define SCK 21 // 11 B1 ICSP-04 EXP2-09 //#define MOSI 22 // 12 B2 ICSP-03 EXP2-05 //#define MISO 23 // 13 B3 ICSP-06 EXP2-05 // Alter timing for graphical display #define BOARD_ST7920_DELAY_1 313 #define BOARD_ST7920_DELAY_2 313 #define BOARD_ST7920_DELAY_3 313 #else #define BTN_EN1 10 // C0 JP11-12 #define BTN_EN2 11 // C1 JP11-13 #define BTN_ENC 12 // C2 JP11-14 #endif #endif // // Misc. Functions // // PIN FASTIO PIN# ATUSB90 PIN# Teensy2.0++ PIN# Printrboard RevF Conn. #ifndef SDSS #define SDSS 20 // 10 B0 #endif /** * This is EXP1-2, which is also the TEMP_A_PIN for the Extrudrboard. * If using w/ Extrudrboard, cut off pin 2 on the Extrudrboard male * connector to ensure this is disconnected from the A THERM pullups. * You probably want to set EXTRUDERS=2 and swap the Extrudrboard outputs, * which will let you use Channel B on the Extrudrboard as E1. */ #ifndef FILWIDTH_PIN #define FILWIDTH_PIN 2 // Analog Input #endif
2301_81045437/Marlin
Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h
C
agpl-3.0
12,126
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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 /** * Rev B 2 JUN 2017 * * Converted to Arduino pin numbering * * Schematic: https://reprap.org/mediawiki/images/3/3c/SAV_MK-I.pdf */ /** * There are two Arduino IDE extensions that are compatible with this board * and with the mainstream Marlin software. * * Teensyduino - https://www.pjrc.com/teensy/teensyduino.html * Select Teensy++ 2.0 in Arduino IDE from the 'Tools > Board' menu * * Installation instructions are at the above URL. Don't bother loading the * libraries - they are not used with the Marlin software. * * Printrboard - https://github.com/scwimbush/Printrboard-HID-Arduino-IDE-Support * * Installation: * * 1. Go to the above URL, click on the "Clone or Download" button and then * click on "Download ZIP" button. * 2. Unzip the file, find the "printrboard" directory and then copy it to the * hardware directory in Arduino. The Arduino hardware directory will probably * be located in a path similar to this: C:\Program Files (x86)\Arduino\hardware. * 3. Restart Arduino. * 4. Select "Printrboard" from the 'Tools > Board' menu. * * Teensyduino is the most popular option. Printrboard is used if your board doesn't have * the Teensyduino bootloader on it. */ /** * To burn the bootloader that comes with Printrboard: * * 1. Connect your programmer to the board. * 2. In the Arduino IDE select "Printrboard" and then select the programmer. * 3. In the Arduino IDE click on "burn bootloader". Don't worry about the "verify failed at 1F000" error message. * 4. The programmer is no longer needed. Remove it. */ #include "env_validate.h" #define BOARD_INFO_NAME "SAV MkI" #define DEFAULT_MACHINE_NAME BOARD_INFO_NAME #define DEFAULT_SOURCE_CODE_URL "tinyurl.com/onru38b" // // Servos // #define SERVO0_PIN 39 // F1 In teensy's pin definition for pinMode (in servo.cpp) // // Limit Switches // #define X_STOP_PIN 25 // B5 #define Y_STOP_PIN 26 // B6 //#define Z_STOP_PIN 27 // B7 #define Z_STOP_PIN 36 // E4 For inductive sensor. //#define E_STOP_PIN 36 // E4 // // Steppers // #define X_STEP_PIN 28 // A0 #define X_DIR_PIN 29 // A1 #define X_ENABLE_PIN 19 // E7 #define Y_STEP_PIN 30 // A2 #define Y_DIR_PIN 31 // A3 #define Y_ENABLE_PIN 18 // E6 #define Z_STEP_PIN 32 // A4 #define Z_DIR_PIN 33 // A5 #define Z_ENABLE_PIN 17 // C7 #define E0_STEP_PIN 34 // A6 #define E0_DIR_PIN 35 // A7 #define E0_ENABLE_PIN 13 // C3 // // Temperature Sensors // #define TEMP_0_PIN 7 // F7 Analog Input (Extruder) #define TEMP_BED_PIN 6 // F6 Analog Input (Bed) // // Heaters / Fans // #define HEATER_0_PIN 15 // C5 PWM3B - Extruder #define HEATER_BED_PIN 14 // C4 PWM3C - Bed #ifndef FAN0_PIN #define FAN0_PIN 16 // C6 PWM3A #endif // // Misc. Functions // #define SDSS 20 // B0 // Extension header pin mapping // ---------------------------- // SCL (I2C)-D0 A0 (An), IO // SDA (I2C)-D1 A1 (An), IO // RX1-D2 A2 (An), IO // TX1-D3 A3 (An), IO // PWM-D24 A4 (An), IO // 5V GND // 12V GND #define EXT_AUX_SCL_D0 0 // D0 PWM0B #define EXT_AUX_SDA_D1 1 // D1 #define EXT_AUX_RX1_D2 2 // D2 #define EXT_AUX_TX1_D3 3 // D3 #define EXT_AUX_PWM_D24 24 // B4 PWM2A #define EXT_AUX_A0 0 // F0 Analog Input #define EXT_AUX_A0_IO 38 // F0 Digital IO #define EXT_AUX_A1 1 // F1 Analog Input #define EXT_AUX_A1_IO 39 // F1 Digital IO #define EXT_AUX_A2 2 // F2 Analog Input #define EXT_AUX_A2_IO 40 // F2 Digital IO #define EXT_AUX_A3 3 // F3 Analog Input #define EXT_AUX_A3_IO 41 // F3 Digital IO #define EXT_AUX_A4 4 // F4 Analog Input #define EXT_AUX_A4_IO 42 // F4 Digital IO // // LCD / Controller // #define BEEPER_PIN -1 #define LCD_PINS_RS -1 #define LCD_PINS_EN -1 #if ENABLED(SAV_3DLCD) // For LCD SHIFT register LCD #define SR_DATA_PIN EXT_AUX_SDA_D1 #define SR_CLK_PIN EXT_AUX_SCL_D0 #endif #if ANY(SAV_3DLCD, SAV_3DGLCD) #define BTN_EN1 EXT_AUX_A1_IO #define BTN_EN2 EXT_AUX_A0_IO #define BTN_ENC EXT_AUX_PWM_D24 #define KILL_PIN EXT_AUX_A2_IO #define HOME_PIN EXT_AUX_A4_IO #else // Use the expansion header for spindle control // // M3/M4/M5 - Spindle/Laser Control // #define SPINDLE_LASER_PWM_PIN 24 // B4 PWM2A #define SPINDLE_LASER_ENA_PIN 39 // F1 Pin should have a pullup! #define SPINDLE_DIR_PIN 40 // F2 #define CASE_LIGHT_PIN 0 // D0 PWM0B #endif
2301_81045437/Marlin
Marlin/src/pins/teensy2/pins_SAV_MKI.h
C
agpl-3.0
6,619
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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 /** * Rev B 2 JUN 2017 * * Converted to Arduino pin numbering */ /** * There are two Arduino IDE extensions that are compatible with this board * and with the mainstream Marlin software. * * Teensyduino - https://www.pjrc.com/teensy/teensyduino.html * Select Teensy++ 2.0 in Arduino IDE from the 'Tools > Board' menu * * Installation instructions are at the above URL. Don't bother loading the * libraries - they are not used with the Marlin software. * * Printrboard - https://github.com/scwimbush/Printrboard-HID-Arduino-IDE-Support * * Installation: * * 1. Go to the above URL, click on the "Clone or Download" button and then * click on "Download ZIP" button. * 2. Unzip the file, find the "printrboard" directory and then copy it to the * hardware directory in Arduino. The Arduino hardware directory will probably * be located in a path similar to this: C:\Program Files (x86)\Arduino\hardware. * 3. Restart Arduino. * 4. Select "Printrboard" from the 'Tools > Board' menu. * * Teensyduino is the most popular option. Printrboard is used if your board doesn't have * the Teensyduino bootloader on it. */ /** * To burn the bootloader that comes with Printrboard: * * 1. Connect your programmer to the board. * 2. In the Arduino IDE select "Printrboard" and then select the programmer. * 3. In the Arduino IDE click on "burn bootloader". Don't worry about the "verify failed at 1F000" error message. * 4. The programmer is no longer needed. Remove it. */ /** * Teensy++ 2.0 Breadboard pin assignments (AT90USB1286) * Requires the Teensyduino software with Teensy++ 2.0 selected in Arduino IDE! * https://www.pjrc.com/teensy/teensyduino.html * See https://reprap.org/wiki/Printrboard for more info * * CLI build: HARDWARE_MOTHERBOARD=84 make * * DaveX plan for Teensylu/printrboard-type pinouts for a TeensyBreadboard: * (ref teensylu & sprinter) * * USB * GND GND |-----#####-----| +5V ATX +5SB * ATX PS_ON PWM 27 |b7 ##### b6| 26 PWM* Stepper Enable * PWM 0 |d0 b5| 25 PWM* * PWM 1 |d1 b4| 24 PWM * X_MIN 2 |d2 b3| 23 MISO_PIN * Y_MIN 3 |d3 b2| 22 MOSI_PIN * Z_MIN 4 |d4 * * b1| 21 SCK_PIN * 5 |d5 e e b0| 20 SDSS * LED 6 |d6 5 4 e7| 19 * 7 |d7 e6| 18 * LCD RS 8 |e0 | GND * LCD EN 9 |e1 a4 a0 R| AREF * LCD D4 10 |c0 a5 a1 f0| 38 A0 ENC_1 * LCD D5 11 |c1 a6 a2 f1| 39 A1 ENC_2 * LCD D6 12 |c2 a7 a3 f2| 40 A2 ENC_CLK * LCD D6 13 |c3 f3| 41 A3 * Bed Heat PWM 14 |c4 V G R f4| 42 A4 * Extruder Heat PWM 15 |c5 c n S f5| 43 A5 * Fan PWM 16 |c6 c d T f6| 44 A6 Bed TC * 17 |c7 * * * f7| 45 A7 Extruder TC * 4.7k * +5 * ----------------- * * Interior E4: 36, INT4 * Interior E5: 37, INT5 * Interior PA0-7: 28-35 -- Printrboard and Teensylu use these pins for step & direction: * T++ PA Signal Marlin * * Z STEP 32 a4 a0 28 X STEP * Z DIR 33 a5 a1 29 X DIR * E STEP 34 a6 a2 30 Y STEP * E DIR 35 a7 a3 31 Y DIR */ #include "env_validate.h" // https://reprap.org/wiki/Teensy_Breadboard #define BOARD_INFO_NAME "Teensy++2.0" // // Limit Switches // #define X_STOP_PIN 2 // D2 #define Y_STOP_PIN 3 // D3 #define Z_STOP_PIN 4 // D4 // // Steppers // #define X_STEP_PIN 28 // A0 Marlin #define X_DIR_PIN 29 // A1 Marlin #define X_ENABLE_PIN 26 // B6 #define Y_STEP_PIN 30 // A2 Marlin #define Y_DIR_PIN 31 // A3 #define Y_ENABLE_PIN 26 // B6 Shared w/x #define Z_STEP_PIN 32 // A4 #define Z_DIR_PIN 33 // A5 #define Z_ENABLE_PIN 26 // B6 Shared w/x #define E0_STEP_PIN 34 // A6 #define E0_DIR_PIN 35 // A7 #define E0_ENABLE_PIN 26 // B6 Shared w/x // // Temperature Sensors // #define TEMP_0_PIN 7 // F7 Analog Input (Extruder) #define TEMP_BED_PIN 6 // F6 Analog Input (Bed) // // Heaters / Fans // #define HEATER_0_PIN 15 // C5 PWM3B Extruder #define HEATER_BED_PIN 14 // C4 PWM3C #ifndef FAN0_PIN #define FAN0_PIN 16 // C6 PWM3A Fan #endif // // Misc. Functions // #define SDSS 20 // B0 #define LED_PIN 6 // D6 #define PS_ON_PIN 27 // B7 #ifndef CASE_LIGHT_PIN #define CASE_LIGHT_PIN 1 // D1 PWM2B MUST BE HARDWARE PWM #endif // // LCD / Controller // #if IS_ULTIPANEL #define LCD_PINS_RS 8 // E0 #define LCD_PINS_EN 9 // E1 #define LCD_PINS_D4 10 // C0 #define LCD_PINS_D5 11 // C1 #define LCD_PINS_D6 12 // C2 #define LCD_PINS_D7 13 // C3 #define BTN_EN1 38 // F0 #define BTN_EN2 39 // F1 #define BTN_ENC 40 // F2 #endif // // M3/M4/M5 - Spindle/Laser Control // #if HAS_CUTTER #define SPINDLE_LASER_PWM_PIN 0 // D0 PWM0B MUST BE HARDWARE PWM #define SPINDLE_LASER_ENA_PIN 5 // D5 Pin should have a pullup! #define SPINDLE_DIR_PIN 7 // D7 #endif
2301_81045437/Marlin
Marlin/src/pins/teensy2/pins_TEENSY2.h
C
agpl-3.0
7,180
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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 /** * Rev C 2 JUN 2017 * * Converted to Arduino pin numbering * * Schematic (1.0): https://raw.githubusercontent.com/StephS/Teensylu/master/working/Teensylu-1.0.sch * (*) Other versions are discouraged by creator. */ /** * There are two Arduino IDE extensions that are compatible with this board * and with the mainstream Marlin software. All have been used with Arduino 1.6.12 * * Teensyduino - https://www.pjrc.com/teensy/teensyduino.html * Select Teensy++ 2.0 in Arduino IDE from the 'Tools > Board' menu * * Installation instructions are at the above URL. Don't bother loading the * libraries - they are not used with the Marlin software. * * Printrboard - https://github.com/scwimbush/Printrboard-HID-Arduino-IDE-Support * This is basically Teensyduino but with a bootloader that can handle image sizes * larger than 64K. * * Installation: * * 1. Go to the above URL, click on the "Clone or Download" button and then * click on "Download ZIP" button. * 2. Unzip the file, find the "printrboard" directory and then copy it to the * hardware directory in Arduino. The Arduino hardware directory will probably * be located in a path similar to this: C:\Program Files (x86)\Arduino\hardware. * 3. Restart Arduino. * 4. Select "Printrboard" from the 'Tools > Board' menu. * * Teensyduino is the most popular option. Printrboard is used if your board doesn't have * the Teensyduino bootloader on it. */ /** * To burn the bootloader that comes with Printrboard: * * 1. Connect your programmer to the board. * 2. In the Arduino IDE select "Printrboard" and then select the programmer. * 3. In the Arduino IDE click on "burn bootloader". Don't worry about the "verify failed at 1F000" error message. * 4. The programmer is no longer needed. Remove it. */ /** * SILKSCREEN ERROR * * The silkscreen for the endstops do NOT match the schematic. The silkscreen SHOULD * read (from left to right) X-STOP, Y-STOP, Z-STOP & E-STOP. The silkscreen actually * reads E-STOP, X-STOP, Y-STOP & Z-STOP. * * The pin assignments in this file match the silkscreen. */ #define ALLOW_AT90USB1286P #include "env_validate.h" #if NOT_TARGET(__AVR_AT90USB1286__, __AVR_AT90USB1286P__) #error "Oops! Select 'Teensy++ 2.0' or 'Printrboard' in 'Tools > Board.'" #endif #define BOARD_INFO_NAME "Teensylu" // // Limit Switch definitions that match the SCHEMATIC // //#define X_STOP_PIN 25 // B5 //#define Y_STOP_PIN 26 // B6 //#define Z_STOP_PIN 27 // B7 //#define E_STOP_PIN 36 // E4 // // Limit Switch definitions that match the SILKSCREEN // #define X_STOP_PIN 26 // B6 #define Y_STOP_PIN 27 // B7 #define Z_STOP_PIN 36 // E4 //#define E_STOP_PIN 25 // B5 // // Steppers // #define X_STEP_PIN 28 // A0 #define X_DIR_PIN 29 // A1 #define X_ENABLE_PIN 19 // E7 #define Y_STEP_PIN 30 // A2 #define Y_DIR_PIN 31 // A3 #define Y_ENABLE_PIN 18 // E6 #define Z_STEP_PIN 32 // A4 #define Z_DIR_PIN 33 // A5 #define Z_ENABLE_PIN 17 // C7 #define E0_STEP_PIN 34 // A6 #define E0_DIR_PIN 35 // A7 #define E0_ENABLE_PIN 13 // C3 // // Temperature Sensors // #define TEMP_0_PIN 7 // Analog Input (Extruder) #define TEMP_BED_PIN 6 // Analog Input (Bed) // // Heaters / Fans // #define HEATER_0_PIN 15 // C5 PWM3B - Extruder #define HEATER_BED_PIN 14 // C4 PWM3C #ifndef FAN0_PIN #define FAN0_PIN 16 // C6 PWM3A #endif // // Misc. Functions // #define SDSS 20 // B0 JP31-6 #ifndef CASE_LIGHT_PIN #define CASE_LIGHT_PIN 0 // D0 IO-14 PWM0B #endif // // LCD / Controller // #if HAS_WIRED_LCD && IS_NEWPANEL #define BEEPER_PIN -1 #if ENABLED(LCD_I2C_PANELOLU2) #define BTN_EN1 3 // D3 IO-8 #define BTN_EN2 2 // D2 IO-10 #define BTN_ENC 41 // F3 IO-7 #define SDSS 38 // F0 IO-13 use SD card on Panelolu2 #endif #define SD_DETECT_PIN -1 #endif // HAS_WIRED_LCD && IS_NEWPANEL // // M3/M4/M5 - Spindle/Laser Control // #if HAS_CUTTER #define SPINDLE_LASER_PWM_PIN 24 // B4 IO-3 PWM2A - MUST BE HARDWARE PWM #define SPINDLE_LASER_ENA_PIN 39 // F1 IO-11 - Pin should have a pullup! #define SPINDLE_DIR_PIN 40 // F2 IO-9 #endif
2301_81045437/Marlin
Marlin/src/pins/teensy2/pins_TEENSYLU.h
C
agpl-3.0
6,033
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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 /** * Teensy 3.1 (MK20DX256) and Teensy 3.2 (MK20DX256) Breadboard pin assignments * Requires the Teensyduino software with Teensy 3.1 or Teensy 3.2 selected in Arduino IDE! * https://www.pjrc.com/teensy/teensyduino.html */ #if NOT_TARGET(IS_TEENSY_31_32) #error "Oops! Select 'Teensy 3.1' or 'Teensy 3.2' in 'Tools > Board.'" #endif #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "Teensy3.2" #endif // // Limit Switches // #define X_STOP_PIN 3 #define Y_STOP_PIN 4 #define Z_STOP_PIN 5 // // Steppers // #define X_STEP_PIN 5 #define X_DIR_PIN 6 #define X_ENABLE_PIN 2 #define Y_STEP_PIN 7 #define Y_DIR_PIN 8 #define Y_ENABLE_PIN 2 #define Z_STEP_PIN 9 #define Z_DIR_PIN 10 #define Z_ENABLE_PIN 2 #define E0_STEP_PIN 11 #define E0_DIR_PIN 12 #define E0_ENABLE_PIN 2 //#define E1_STEP_PIN 33 //#define E1_DIR_PIN 34 //#define E1_ENABLE_PIN 35 // // Heaters / Fans // #define HEATER_0_PIN 20 //#define HEATER_1_PIN 36 #define HEATER_BED_PIN 21 #ifndef FAN0_PIN #define FAN0_PIN 22 #endif // // Temperature Sensors // #define TEMP_0_PIN 14 // Analog Input - Extruder 2 => A2 //#define TEMP_1_PIN 0 // Analog Input #define TEMP_BED_PIN 15 // Analog Input - Bed #ifndef FILWIDTH_PIN #define FILWIDTH_PIN 6 // Analog Input #endif // // Misc. Functions // #define LED_PIN 13 //#define SOL1_PIN 28 //#define SDSS 16 // 8 // // LCD / Controller // /* #if HAS_WIRED_LCD #define LCD_PINS_RS 40 #define LCD_PINS_EN 41 #define LCD_PINS_D4 42 #define LCD_PINS_D5 43 #define LCD_PINS_D6 44 #define LCD_PINS_D7 45 #define BTN_EN1 46 #define BTN_EN2 47 #define BTN_ENC 48 #endif */
2301_81045437/Marlin
Marlin/src/pins/teensy3/pins_TEENSY31_32.h
C
agpl-3.0
3,489
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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 /**************************************************************************************** * Teensy 3.5 (MK64FX512) and Teensy 3.6 (MK66FX1M0) Breadboard pin assignments * Requires the Teensyduino software with Teensy 3.5 or Teensy 3.6 selected in Arduino IDE! * https://www.pjrc.com/teensy/teensyduino.html ****************************************************************************************/ #if NOT_TARGET(IS_TEENSY_35_36) #error "Oops! Select 'Teensy 3.5' or 'Teensy 3.6' in 'Tools > Board.'" #endif #if IS_TEENSY35 #define BOARD_INFO_NAME "Teensy3.5" #elif IS_TEENSY36 #define BOARD_INFO_NAME "Teensy3.6" #endif /** * Plan for Teensy 3.5 and Teensy 3.6: * USB * GND |-----#####-----| VIN 5V * X_STEP_PIN MOSI1 RX1 0 | ##### | Analog GND * X_DIR_PIN MISO1 TX1 1 | | 3.3V * Y_STEP_PIN PWM 2 | *NC AREF* | 23 A9 PWM * Y_DIR_PIN SCL2 CAN0TX PWM 3 | *A26 A10* | 22 A8 PWM * Z_STEP_PIN SDA2 CAN0RX PWM 4 | *A25 A11* | 21 A7 PWM CS0 MOSI1 RX1 * Z_DIR_PIN MISO1 TX1 PWM 5 | *GND * * 57 | 20 A6 PWM CS0 SCK1 FILWIDTH_PIN * X_ENABLE_PIN PWM 6 | *GND * * 56 | 19 A5 SCL0 E0_STEP_PIN * Y_ENABLE_PIN SCL0 MOSI0 RX3 PWM 7 | * * 55 | 18 A4 SDA0 E0_DIR_PIN * Z_ENABLE_PIN SDA0 MISO0 TX3 PWM 8 | * * 54 | 17 A3 SDA0 E0_ENABLE_PIN * CS0 RX2 PWM 9 | | 16 A2 SCL0 TEMP_0_PIN * CS0 TX2 PWM 10 | | 15 A1 CS0 TEMP_BED_PIN * X_STOP_PIN MOSI0 11 | | 14 A0 PWM CS0 TEMP_1_PIN * Y_STOP_PIN MISO0 12 | | 13 LED SCK0 LED_PIN * 3.3V | | GND * Z_STOP_PIN 24 | 40 * * 53 | A22 DAC1 * AUX2 25 | 41 * * 52 | A21 DAC0 * AUX2 FAN0_PIN SCL2 TX1 26 | 42 * * 51 | 39 A20 MISO0 SDSS * AUX2 Z-PROBE PWR SCK0 RX1 27 | * * * * * | 38 A19 PWM SDA1 * AUX2 SOL1_PIN MOSI0 28 | 43 * * 50 | 37 A18 PWM SCL1 * D10 CONTROLLER_FAN_PIN CAN0TX PWM 29 | 44 * * 49 | 36 A17 PWM * D9 HEATER_0_PIN CAN0RX PWM 30 | 45 * * 48 | 35 A16 PWM E1_ENABLE_PIN * D8 HEATER_BED_PIN CS1 RX4 A12 31 | 46 * * 47 | 34 A15 PWM SDA0 RX5 E1_DIR_PIN * SCK1 TX4 A13 32 |__GND_*_*_3.3V_| 33 A14 PWM SCL0 TX5 E1_STEP_PIN * * Interior pins: * LCD_PINS_RS 40 * * 53 SCK2 * LCD_PINS_EN 41 * * 52 MOSI2 * LCD_PINS_D4 42 * * 51 MISO2 * LCD_PINS_D5 CS2 43 * * 50 A24 * LCD_PINS_D6 MOSI2 44 * * 49 A23 * LCD_PINS_D7 MISO2 45 * * 48 TX6 SDA0 BTN_ENC * BTN_EN1 SCK2 46 * * 47 RX6 SCL0 BTN_EN2 * GND * * 3.3V */ // // Limit Switches // #define X_STOP_PIN 24 #define Y_STOP_PIN 26 #define Z_STOP_PIN 28 // // Steppers // #define X_STEP_PIN 22 #define X_DIR_PIN 21 #define X_ENABLE_PIN 39 #define Y_STEP_PIN 19 #define Y_DIR_PIN 18 #define Y_ENABLE_PIN 20 #define Z_STEP_PIN 38 #define Z_DIR_PIN 37 #define Z_ENABLE_PIN 17 #define E0_STEP_PIN 31 #define E0_DIR_PIN 30 #define E0_ENABLE_PIN 32 #define E1_STEP_PIN 33 #define E1_DIR_PIN 34 #define E1_ENABLE_PIN 35 #define HEATER_0_PIN 30 #define HEATER_1_PIN 36 #define HEATER_BED_PIN 31 #ifndef FAN0_PIN #define FAN0_PIN 2 #endif #define TEMP_0_PIN 2 // Extruder / Analog pin numbering: 2 => A2 #define TEMP_1_PIN 0 #define TEMP_BED_PIN 1 // Bed / Analog pin numbering // // Misc. Functions // #define LED_PIN 13 #define PS_ON_PIN 1 #define FILWIDTH_PIN 6 #define SOL1_PIN 28 // // SD Card // #define SDSS 39 // 8 #if HAS_WIRED_LCD #define LCD_PINS_RS 40 #define LCD_PINS_EN 41 #define LCD_PINS_D4 42 #define LCD_PINS_D5 43 #define LCD_PINS_D6 44 #define LCD_PINS_D7 45 #endif #if IS_NEWPANEL #define BTN_EN1 46 #define BTN_EN2 47 #define BTN_ENC 48 #endif #if IS_RRW_KEYPAD #define SHIFT_OUT_PIN 40 #define SHIFT_CLK_PIN 44 #define SHIFT_LD_PIN 42 #endif
2301_81045437/Marlin
Marlin/src/pins/teensy3/pins_TEENSY35_36.h
C
agpl-3.0
6,858
/** * Marlin 3D Printer Firmware * Copyright (c) 2023 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 #if NOT_TARGET(IS_TEENSY41) #error "Oops! Select 'Teensy 4.1' in 'Tools > Board.'" #endif
2301_81045437/Marlin
Marlin/src/pins/teensy4/env_validate.h
C
agpl-3.0
968
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 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 /**************************************************************************************** * Teensy 4.1 (IMXRT1062) Breadboard pin assignments * Requires the Teensyduino software with Teensy 4.1 selected in Arduino IDE! * https://www.pjrc.com/teensy/teensyduino.html ****************************************************************************************/ #include "env_validate.h" #define BOARD_INFO_NAME "Teensy4.1" /** * Plan for Teensy 4.0 and Teensy 4.1: * USB * GND |-----#####-----| VIN (3.65 TO 5.5V) * RX1 CS1 RX1 PWM 0 | ##### | GND * TX1 MISO1 TX1 PWM 1 | | 3.3V * STPX PWM 2 | | 23 A9 PWM * DIRX PWM 3 | | 22 A8 PWM LIMZ * STPY PWM 4 | | 21 A7 RX5 LIMY * DIRY PWM 5 | | 20 A6 TX5 LIMX * STPZ PWM 6 | | 19 A5 PWM SCL0 COOL * DIRZ RX2 PWM 7 | | 18 A4 PWM SDA0 MIST * STPA TX2 PWM 8 | | 17 A3 RX4 SDA1 CYST * DIRA PWM 9 | | 16 A2 TX4 SCL1 EHOLD * STEN PWM 10 | | 15 A1 PWM RX3 PRB * SPDI MOSI0 PWM 11 | | 14 A0 PWM TX3 PANIC * SPEN MISO0 PWM 12 | | 13 LED PWM SCK0 SPWM * 3.3V | | GND * SCL PWM 24 | | 41 A17 KPSTR * SDA PWM 25 | | 40 A16 STENY * STPB MOSI1 26 | | 39 A15 MISO1 STENZ * DIRB SCK1 27 | * * * * * | 38 A14 STENA * LIMB RX7 PWM 28 | | 37 PWM STENB * DOOR TX7 PWM 29 | | 36 PWM ST0 * ST1 30 | | 35 TX8 ST3 * AUX0 31 | SDCARD | 34 RX8 ST2 * AUX1 32 |_______________| 33 PWM AUX2 */ #ifndef SDCARD_CONNECTION #define SDCARD_CONNECTION ONBOARD #endif // // Servos // #define SERVO0_PIN 24 #define SERVO1_PIN 25 // // Limit Switches // #define X_STOP_PIN 20 #define Y_STOP_PIN 21 #define Z_STOP_PIN 22 // // Steppers // #define X_STEP_PIN 2 #define X_DIR_PIN 3 #define X_ENABLE_PIN 10 //#define X_CS_PIN 30 #define Y_STEP_PIN 4 #define Y_DIR_PIN 5 #define Y_ENABLE_PIN 40 //#define Y_CS_PIN 31 #define Z_STEP_PIN 6 #define Z_DIR_PIN 7 #define Z_ENABLE_PIN 39 //#define Z_CS_PIN 32 #define E0_STEP_PIN 8 #define E0_DIR_PIN 9 #define E0_ENABLE_PIN 38 #define E1_STEP_PIN 26 #define E1_DIR_PIN 27 #define E1_ENABLE_PIN 37 // // Heaters / Fans // #define HEATER_0_PIN 31 #define HEATER_1_PIN 32 #define HEATER_BED_PIN 33 // // Temperature Sensors // #define TEMP_0_PIN 5 // Extruder / Analog pin numbering: 2 => A2 #define TEMP_1_PIN 4 #define TEMP_BED_PIN 15 // Bed / Analog pin numbering // // Misc. Functions // #define LED_PIN 13 #define SOL0_PIN 17
2301_81045437/Marlin
Marlin/src/pins/teensy4/pins_T41U5XBB.h
C
agpl-3.0
5,008