From 12e4a8d427df13721c1a465e77e2289f3ffec674 Mon Sep 17 00:00:00 2001 From: Bob-the-Kuhn Date: Tue, 4 Feb 2020 13:53:14 -0600 Subject: [PATCH 1/4] add MKS RUMBA32, rename RUMBA32 to AUS3D_RUMBA32 --- Marlin/src/core/boards.h | 3 +- Marlin/src/pins/pins.h | 6 +- .../{pins_RUMBA32.h => pins_AUS3D_RUMBA32.h} | 19 +- Marlin/src/pins/stm32/pins_MKS_RUMBA32.h | 222 ++++++++++++++++++ 4 files changed, 246 insertions(+), 4 deletions(-) rename Marlin/src/pins/stm32/{pins_RUMBA32.h => pins_AUS3D_RUMBA32.h} (85%) create mode 100644 Marlin/src/pins/stm32/pins_MKS_RUMBA32.h diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h index df79e2e2e15d..da2a1671afae 100644 --- a/Marlin/src/core/boards.h +++ b/Marlin/src/core/boards.h @@ -309,7 +309,7 @@ #define BOARD_BEAST 4200 // STM32F4xxVxT6 Libmaple-based STM32F4 controller #define BOARD_GENERIC_STM32F4 4201 // STM32 STM32GENERIC-based STM32F4 controller #define BOARD_ARMED 4202 // Arm'ed STM32F4-based controller -#define BOARD_RUMBA32 4203 // RUMBA32 STM32F4-based controller +#define BOARD_AUS3D_RUMBA32 4203 // RUMBA32 STM32F446VET6 based controller from Aus3D #define BOARD_BLACK_STM32F407VE 4204 // BLACK_STM32F407VE #define BOARD_BLACK_STM32F407ZE 4205 // BLACK_STM32F407ZE #define BOARD_STEVAL_3DP001V1 4206 // STEVAL-3DP001V1 3D PRINTER BOARD @@ -322,6 +322,7 @@ #define BOARD_FYSETC_S6 4213 // FYSETC S6 board #define BOARD_FLYF407ZG 4214 // FLYF407ZG board (STM32F407ZG) #define BOARD_MKS_ROBIN2 4215 // MKS_ROBIN2 (STM32F407ZE) +#define BOARD_MKS_RUMBA32 4216 // RUMBA32 STM32F446VET6 based controller from Makerbase // // ARM Cortex M7 diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 1515440e71ee..09e73ffe3369 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -526,8 +526,10 @@ #include "stm32/pins_GENERIC_STM32F4.h" // STM32F4 env:STM32F4 #elif MB(ARMED) #include "stm32/pins_ARMED.h" // STM32F4 env:ARMED -#elif MB(RUMBA32) - #include "stm32/pins_RUMBA32.h" // STM32F4 env:rumba32_f446ve env:mks_rumba32 +#elif MB(AUS3D_RUMBA32) + #include "stm32/pins_AUS3D_RUMBA32.h" // STM32F4 env:rumba32_f446ve +#elif MB(MKS_RUMBA32) + #include "stm32/pins_MKS_RUMBA32.h" // STM32F4 env:mks_rumba32 #elif MB(BLACK_STM32F407VE) #include "stm32/pins_BLACK_STM32F407VE.h" // STM32F4 env:STM32F407VE_black #elif MB(STEVAL_3DP001V1) diff --git a/Marlin/src/pins/stm32/pins_RUMBA32.h b/Marlin/src/pins/stm32/pins_AUS3D_RUMBA32.h similarity index 85% rename from Marlin/src/pins/stm32/pins_RUMBA32.h rename to Marlin/src/pins/stm32/pins_AUS3D_RUMBA32.h index dcdbd1b40a4b..9460fd9c2a1f 100644 --- a/Marlin/src/pins/stm32/pins_RUMBA32.h +++ b/Marlin/src/pins/stm32/pins_AUS3D_RUMBA32.h @@ -19,6 +19,20 @@ * along with this program. If not, see . * */ + + /** + * This file is for the Aus3D version of the RUMBA32 board. + * + * https://aus3d.com.au/rumba32 + * https://github.com/Aus3D/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. + */ + #pragma once #ifndef STM32F4 @@ -28,10 +42,13 @@ #endif #define RUMBA32_V1_0 -#define BOARD_INFO_NAME "RUMBA32" +#define BOARD_INFO_NAME "Aus3D RUMBA32" #define DEFAULT_MACHINE_NAME BOARD_INFO_NAME //#define I2C_EEPROM +#ifdef E2END + #undef E2END +#endif #define E2END 0xFFF // 4KB // diff --git a/Marlin/src/pins/stm32/pins_MKS_RUMBA32.h b/Marlin/src/pins/stm32/pins_MKS_RUMBA32.h new file mode 100644 index 000000000000..a36a379bfc89 --- /dev/null +++ b/Marlin/src/pins/stm32/pins_MKS_RUMBA32.h @@ -0,0 +1,222 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2019 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 . + * + */ + + /** + * This file is for the MKS version of the RUMBA32 board. + * + * 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. + */ + +#pragma once + +#ifndef STM32F4 + #error "Oops! Select an STM32F4 board in 'Tools > Board.'" +#elif HOTENDS > 3 || E_STEPPERS > 3 + #error "RUMBA32 supports up to 3 hotends / E-steppers." +#endif + +#define RUMBA32_V1_0 +#define BOARD_INFO_NAME "MKS RUMBA32" +#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME + +//#define I2C_EEPROM +#ifdef E2END + #undef E2END +#endif +#define E2END 0xFFF // 4KB + +#define ENABLE_SPI1 + +// +// 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 + +// +// 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 FAN_PIN PC9 +#define FAN1_PIN PA8 + +// +// I2C +// +#define SCK_PIN PA5 +#define MISO_PIN PA6 +#define MOSI_PIN PA7 + +// +// Software SPI pins for TMC2130 stepper drivers +// +#if ENABLED(TMC_USE_SW_SPI) + #ifndef TMC_SW_MOSI + #define TMC_SW_MOSI PA7 + #endif + #ifndef TMC_SW_MISO + #define TMC_SW_MISO PA6 + #endif + #ifndef TMC_SW_SCK + #define TMC_SW_SCK PA5 + #endif +#endif + +#if HAS_TMC220x + /** + * 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 + + // + // Software serial + // + #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 + +// +// Misc. Functions +// +#define LED_PIN PB14 +#define BTN_PIN PC10 +#define PS_ON_PIN PE11 +#define KILL_PIN PC5 + +#define SDSS PA2 +#define SD_DETECT_PIN PB0 +#define BEEPER_PIN PE8 + +// +// LCD / Controller +// +#if HAS_SPI_LCD + #define LCD_PINS_RS PE10 + #define LCD_PINS_ENABLE PE9 + #define LCD_PINS_D4 PE12 + #define BTN_EN1 PB2 + #define BTN_EN2 PB1 + #define BTN_ENC PE7 + + #if ENABLED(MKS_MINI_12864) + #define DOGLCD_CS PE13 + #define DOGLCD_A0 PE14 + #endif + + #if ENABLED(ULTIPANEL) + #define LCD_PINS_D5 PE13 + #define LCD_PINS_D6 PE14 + #define LCD_PINS_D7 PE15 + #endif + + // Alter timing for graphical display + #if HAS_GRAPHICAL_LCD + #define BOARD_ST7920_DELAY_1 DELAY_NS(96) + #define BOARD_ST7920_DELAY_2 DELAY_NS(48) + #define BOARD_ST7920_DELAY_3 DELAY_NS(600) + #endif + +#endif \ No newline at end of file From 0b5bcd1c12287aa1f42150eafe6027fc35fdc320 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 4 Feb 2020 23:59:13 -0600 Subject: [PATCH 2/4] Combine common pins, rejigger some names --- Marlin/src/core/boards.h | 28 +-- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h | 2 +- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h | 2 +- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h | 2 +- .../{pins_BTT_SKR.h => pins_BTT_SKR_common.h} | 0 Marlin/src/pins/pins.h | 8 +- Marlin/src/pins/stm32/pins_MKS_RUMBA32.h | 222 ------------------ Marlin/src/pins/stm32/pins_RUMBA32_AUS3D.h | 42 ++++ Marlin/src/pins/stm32/pins_RUMBA32_MKS.h | 109 +++++++++ ..._AUS3D_RUMBA32.h => pins_RUMBA32_common.h} | 54 ++--- platformio.ini | 4 +- 11 files changed, 199 insertions(+), 274 deletions(-) rename Marlin/src/pins/lpc1768/{pins_BTT_SKR.h => pins_BTT_SKR_common.h} (100%) delete mode 100644 Marlin/src/pins/stm32/pins_MKS_RUMBA32.h create mode 100644 Marlin/src/pins/stm32/pins_RUMBA32_AUS3D.h create mode 100644 Marlin/src/pins/stm32/pins_RUMBA32_MKS.h rename Marlin/src/pins/stm32/{pins_AUS3D_RUMBA32.h => pins_RUMBA32_common.h} (74%) diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h index da2a1671afae..de5728585f08 100644 --- a/Marlin/src/core/boards.h +++ b/Marlin/src/core/boards.h @@ -309,20 +309,20 @@ #define BOARD_BEAST 4200 // STM32F4xxVxT6 Libmaple-based STM32F4 controller #define BOARD_GENERIC_STM32F4 4201 // STM32 STM32GENERIC-based STM32F4 controller #define BOARD_ARMED 4202 // Arm'ed STM32F4-based controller -#define BOARD_AUS3D_RUMBA32 4203 // RUMBA32 STM32F446VET6 based controller from Aus3D -#define BOARD_BLACK_STM32F407VE 4204 // BLACK_STM32F407VE -#define BOARD_BLACK_STM32F407ZE 4205 // BLACK_STM32F407ZE -#define BOARD_STEVAL_3DP001V1 4206 // STEVAL-3DP001V1 3D PRINTER BOARD -#define BOARD_BTT_SKR_PRO_V1_1 4207 // BigTreeTech SKR Pro v1.1 (STM32F407ZG) -#define BOARD_BTT_BTT002_V1_0 4208 // BigTreeTech BTT002 v1.0 (STM32F407VE) -#define BOARD_BTT_GTR_V1_0 4209 // BigTreeTech GTR v1.0 (STM32F407IGT) -#define BOARD_LERDGE_K 4210 // Lerdge K (STM32F407ZG) -#define BOARD_LERDGE_X 4211 // Lerdge X (STM32F407VE) -#define BOARD_VAKE403D 4212 // VAkE 403D (STM32F446VET6) -#define BOARD_FYSETC_S6 4213 // FYSETC S6 board -#define BOARD_FLYF407ZG 4214 // FLYF407ZG board (STM32F407ZG) -#define BOARD_MKS_ROBIN2 4215 // MKS_ROBIN2 (STM32F407ZE) -#define BOARD_MKS_RUMBA32 4216 // RUMBA32 STM32F446VET6 based controller from Makerbase +#define BOARD_RUMBA32_AUS3D 4203 // RUMBA32 STM32F446VET6 based controller from Aus3D +#define BOARD_RUMBA32_MKS 4204 // RUMBA32 STM32F446VET6 based controller from Makerbase +#define BOARD_BLACK_STM32F407VE 4205 // BLACK_STM32F407VE +#define BOARD_BLACK_STM32F407ZE 4206 // BLACK_STM32F407ZE +#define BOARD_STEVAL_3DP001V1 4207 // STEVAL-3DP001V1 3D PRINTER BOARD +#define BOARD_BTT_SKR_PRO_V1_1 4208 // BigTreeTech SKR Pro v1.1 (STM32F407ZG) +#define BOARD_BTT_BTT002_V1_0 4209 // BigTreeTech BTT002 v1.0 (STM32F407VE) +#define BOARD_BTT_GTR_V1_0 4210 // BigTreeTech GTR v1.0 (STM32F407IGT) +#define BOARD_LERDGE_K 4211 // Lerdge K (STM32F407ZG) +#define BOARD_LERDGE_X 4212 // Lerdge X (STM32F407VE) +#define BOARD_VAKE403D 4213 // VAkE 403D (STM32F446VET6) +#define BOARD_FYSETC_S6 4214 // FYSETC S6 board +#define BOARD_FLYF407ZG 4215 // FLYF407ZG board (STM32F407ZG) +#define BOARD_MKS_ROBIN2 4216 // MKS_ROBIN2 (STM32F407ZE) // // ARM Cortex M7 diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h index 816dbb9dc4dc..15b63494094b 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h @@ -230,4 +230,4 @@ #endif // Include common SKR pins -#include "pins_BTT_SKR.h" +#include "pins_BTT_SKR_common.h" diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h index a3cdf1586cf1..d7af23242723 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h @@ -369,4 +369,4 @@ */ // Include common SKR pins -#include "pins_BTT_SKR.h" +#include "pins_BTT_SKR_common.h" diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h index 01a8bd7e38eb..2bb57c09fd4e 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h @@ -153,7 +153,7 @@ // // Include common SKR pins // -#include "pins_BTT_SKR.h" +#include "pins_BTT_SKR_common.h" // // Software SPI pins for TMC2130 stepper drivers diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h similarity index 100% rename from Marlin/src/pins/lpc1768/pins_BTT_SKR.h rename to Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 09e73ffe3369..b93a7c283e49 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -526,10 +526,10 @@ #include "stm32/pins_GENERIC_STM32F4.h" // STM32F4 env:STM32F4 #elif MB(ARMED) #include "stm32/pins_ARMED.h" // STM32F4 env:ARMED -#elif MB(AUS3D_RUMBA32) - #include "stm32/pins_AUS3D_RUMBA32.h" // STM32F4 env:rumba32_f446ve -#elif MB(MKS_RUMBA32) - #include "stm32/pins_MKS_RUMBA32.h" // STM32F4 env:mks_rumba32 +#elif MB(RUMBA32_AUS3D) + #include "stm32/pins_RUMBA32_AUS3D.h" // STM32F4 env:rumba32_f446ve +#elif MB(RUMBA32_MKS) + #include "stm32/pins_RUMBA32_MKS.h" // STM32F4 env:rumba32_mks #elif MB(BLACK_STM32F407VE) #include "stm32/pins_BLACK_STM32F407VE.h" // STM32F4 env:STM32F407VE_black #elif MB(STEVAL_3DP001V1) diff --git a/Marlin/src/pins/stm32/pins_MKS_RUMBA32.h b/Marlin/src/pins/stm32/pins_MKS_RUMBA32.h deleted file mode 100644 index a36a379bfc89..000000000000 --- a/Marlin/src/pins/stm32/pins_MKS_RUMBA32.h +++ /dev/null @@ -1,222 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (c) 2019 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 . - * - */ - - /** - * This file is for the MKS version of the RUMBA32 board. - * - * 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. - */ - -#pragma once - -#ifndef STM32F4 - #error "Oops! Select an STM32F4 board in 'Tools > Board.'" -#elif HOTENDS > 3 || E_STEPPERS > 3 - #error "RUMBA32 supports up to 3 hotends / E-steppers." -#endif - -#define RUMBA32_V1_0 -#define BOARD_INFO_NAME "MKS RUMBA32" -#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME - -//#define I2C_EEPROM -#ifdef E2END - #undef E2END -#endif -#define E2END 0xFFF // 4KB - -#define ENABLE_SPI1 - -// -// 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 - -// -// 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 FAN_PIN PC9 -#define FAN1_PIN PA8 - -// -// I2C -// -#define SCK_PIN PA5 -#define MISO_PIN PA6 -#define MOSI_PIN PA7 - -// -// Software SPI pins for TMC2130 stepper drivers -// -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PA7 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PA6 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PA5 - #endif -#endif - -#if HAS_TMC220x - /** - * 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 - - // - // Software serial - // - #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 - -// -// Misc. Functions -// -#define LED_PIN PB14 -#define BTN_PIN PC10 -#define PS_ON_PIN PE11 -#define KILL_PIN PC5 - -#define SDSS PA2 -#define SD_DETECT_PIN PB0 -#define BEEPER_PIN PE8 - -// -// LCD / Controller -// -#if HAS_SPI_LCD - #define LCD_PINS_RS PE10 - #define LCD_PINS_ENABLE PE9 - #define LCD_PINS_D4 PE12 - #define BTN_EN1 PB2 - #define BTN_EN2 PB1 - #define BTN_ENC PE7 - - #if ENABLED(MKS_MINI_12864) - #define DOGLCD_CS PE13 - #define DOGLCD_A0 PE14 - #endif - - #if ENABLED(ULTIPANEL) - #define LCD_PINS_D5 PE13 - #define LCD_PINS_D6 PE14 - #define LCD_PINS_D7 PE15 - #endif - - // Alter timing for graphical display - #if HAS_GRAPHICAL_LCD - #define BOARD_ST7920_DELAY_1 DELAY_NS(96) - #define BOARD_ST7920_DELAY_2 DELAY_NS(48) - #define BOARD_ST7920_DELAY_3 DELAY_NS(600) - #endif - -#endif \ No newline at end of file diff --git a/Marlin/src/pins/stm32/pins_RUMBA32_AUS3D.h b/Marlin/src/pins/stm32/pins_RUMBA32_AUS3D.h new file mode 100644 index 000000000000..cff34a2d860b --- /dev/null +++ b/Marlin/src/pins/stm32/pins_RUMBA32_AUS3D.h @@ -0,0 +1,42 @@ +/** + * 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 . + * + */ +#pragma once + +/** + * Pin assignments for the MKS RUMBA32 + * + * https://aus3d.com.au/rumba32 + * https://github.com/Aus3D/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 "Aus3D RUMBA32" + +#define RUMBA32_V1_0 +//#define I2C_EEPROM + +#include "pins_RUMBA32_common.h" diff --git a/Marlin/src/pins/stm32/pins_RUMBA32_MKS.h b/Marlin/src/pins/stm32/pins_RUMBA32_MKS.h new file mode 100644 index 000000000000..8e2bb3b8afbd --- /dev/null +++ b/Marlin/src/pins/stm32/pins_RUMBA32_MKS.h @@ -0,0 +1,109 @@ +/** + * 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 . + * + */ +#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" + +#define RUMBA32_V1_0 +#define ENABLE_SPI1 +//#define I2C_EEPROM + +#include "pins_RUMBA32_common.h" + +// +// Software SPI pins for TMC2130 stepper drivers +// +#if ENABLED(TMC_USE_SW_SPI) + #ifndef TMC_SW_MOSI + #define TMC_SW_MOSI PA7 + #endif + #ifndef TMC_SW_MISO + #define TMC_SW_MISO PA6 + #endif + #ifndef TMC_SW_SCK + #define TMC_SW_SCK PA5 + #endif +#endif + +#if HAS_TMC220x + /** + * 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 + + // + // Software serial + // + #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 + +// +// LCD / Controller +// + +// Alter timing for graphical display +#if HAS_GRAPHICAL_LCD + #define BOARD_ST7920_DELAY_1 DELAY_NS(96) + #define BOARD_ST7920_DELAY_2 DELAY_NS(48) + #define BOARD_ST7920_DELAY_3 DELAY_NS(600) +#endif diff --git a/Marlin/src/pins/stm32/pins_AUS3D_RUMBA32.h b/Marlin/src/pins/stm32/pins_RUMBA32_common.h similarity index 74% rename from Marlin/src/pins/stm32/pins_AUS3D_RUMBA32.h rename to Marlin/src/pins/stm32/pins_RUMBA32_common.h index 9460fd9c2a1f..c2d6a32de0f6 100644 --- a/Marlin/src/pins/stm32/pins_AUS3D_RUMBA32.h +++ b/Marlin/src/pins/stm32/pins_RUMBA32_common.h @@ -19,30 +19,13 @@ * along with this program. If not, see . * */ - - /** - * This file is for the Aus3D version of the RUMBA32 board. - * - * https://aus3d.com.au/rumba32 - * https://github.com/Aus3D/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. - */ - #pragma once -#ifndef STM32F4 - #error "Oops! Select an STM32F4 board in 'Tools > Board.'" -#elif HOTENDS > 3 || E_STEPPERS > 3 - #error "RUMBA32 supports up to 3 hotends / E-steppers." -#endif +/** + * Common pin assignments for all RUMBA32 boards + */ #define RUMBA32_V1_0 -#define BOARD_INFO_NAME "Aus3D RUMBA32" #define DEFAULT_MACHINE_NAME BOARD_INFO_NAME //#define I2C_EEPROM @@ -136,12 +119,25 @@ // // LCD / Controller // -#define LCD_PINS_RS PE10 -#define LCD_PINS_ENABLE PE9 -#define LCD_PINS_D4 PE12 -#define LCD_PINS_D5 PE13 -#define LCD_PINS_D6 PE14 -#define LCD_PINS_D7 PE15 -#define BTN_EN1 PB1 -#define BTN_EN2 PB2 -#define BTN_ENC PE7 +#if HAS_SPI_LCD + + #define BTN_EN1 PB2 + #define BTN_EN2 PB1 + #define BTN_ENC PE7 + + #define LCD_PINS_RS PE10 + #define LCD_PINS_ENABLE PE9 + #define LCD_PINS_D4 PE12 + + #if ENABLED(MKS_MINI_12864) + #define DOGLCD_CS PE13 + #define DOGLCD_A0 PE14 + #endif + + #if ENABLED(ULTIPANEL) + #define LCD_PINS_D5 PE13 + #define LCD_PINS_D6 PE14 + #define LCD_PINS_D7 PE15 + #endif + +#endif diff --git a/platformio.ini b/platformio.ini index df3dcb0f667b..2e57e7d773fa 100644 --- a/platformio.ini +++ b/platformio.ini @@ -822,9 +822,9 @@ monitor_speed = 500000 upload_protocol = dfu # -# MKS RUMBA32(add TMC2208/2209 UART interface and AUX-1) +# MKS RUMBA32 (adds TMC2208/2209 UART interface and AUX-1) # -[env:mks_rumba32] +[env:rumba32_mks] platform = ststm32 board = rumba32_f446ve build_flags = ${common.build_flags} From d392e79f4a6da9c2935a04d59516a4554bd04743 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 5 Feb 2020 07:38:16 -0600 Subject: [PATCH 3/4] Board rename sanity check --- Marlin/src/pins/pins.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index b93a7c283e49..d9317c92ce8f 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -607,6 +607,7 @@ #define BOARD_BIGTREE_SKR_MINI_V1_1 -1015 #define BOARD_BIGTREE_SKR_MINI_E3 -1016 #define BOARD_BIGTREE_SKR_E3_DIP -1017 + #define BOARD_RUMBA32 -1018 #if MB(MKS_13) #error "BOARD_MKS_13 has been renamed BOARD_MKS_GEN_13. Please update your configuration." @@ -646,6 +647,8 @@ #error "BOARD_ESP32 has been renamed BOARD_ESPRESSIF_ESP32. Please update your configuration." #elif MB(STEVAL) #error "BOARD_STEVAL has been renamed BOARD_STEVAL_3DP001V1. Please update your configuration." + #elif MB(RUMBA32) + #error "BOARD_RUMBA32 is now BOARD_RUMBA32_MKS or BOARD_RUMBA32_AUS3D. Please update your configuration." #else #error "Unknown MOTHERBOARD value set in Configuration.h" #endif @@ -668,6 +671,7 @@ #undef BOARD_BIGTREE_SKR_PRO_V1_1 #undef BOARD_BIGTREE_SKR_MINI_V1_1 #undef BOARD_BIGTREE_SKR_E3_DIP + #undef BOARD_RUMBA32 #endif From cdc6319df5319ff82528dd0dd934785dc3911eaa Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 5 Feb 2020 20:26:27 -0600 Subject: [PATCH 4/4] Update pins_RUMBA32_common.h --- Marlin/src/pins/stm32/pins_RUMBA32_common.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Marlin/src/pins/stm32/pins_RUMBA32_common.h b/Marlin/src/pins/stm32/pins_RUMBA32_common.h index c2d6a32de0f6..0fb469112d41 100644 --- a/Marlin/src/pins/stm32/pins_RUMBA32_common.h +++ b/Marlin/src/pins/stm32/pins_RUMBA32_common.h @@ -25,6 +25,12 @@ * Common pin assignments for all RUMBA32 boards */ +#ifndef STM32F4 + #error "Oops! Select an STM32F4 board in 'Tools > Board.'" +#elif HOTENDS > 3 || E_STEPPERS > 3 + #error "RUMBA32 boards support up to 3 hotends / E-steppers." +#endif + #define RUMBA32_V1_0 #define DEFAULT_MACHINE_NAME BOARD_INFO_NAME