diff --git a/Marlin/src/pins/gd32f1/pins_SOVOL_V131.h b/Marlin/src/pins/gd32f1/pins_SOVOL_V131.h index e92c24b86cdb2..f7dbc3fc2d313 100644 --- a/Marlin/src/pins/gd32f1/pins_SOVOL_V131.h +++ b/Marlin/src/pins/gd32f1/pins_SOVOL_V131.h @@ -62,6 +62,28 @@ #define E0_SERIAL_TX_PIN PC14 #define E0_SERIAL_RX_PIN PC14 + // Default TMC slave addresses + #ifdef X_SLAVE_ADDRESS + static_assert(X_SLAVE_ADDRESS == 3, "X_SLAVE_ADDRESS must be 3 for BOARD_SOVOL_V131."); + #else + #define X_SLAVE_ADDRESS 3 + #endif + #ifdef Y_SLAVE_ADDRESS + static_assert(Y_SLAVE_ADDRESS == 3, "Y_SLAVE_ADDRESS must be 3 for BOARD_SOVOL_V131."); + #else + #define Y_SLAVE_ADDRESS 3 + #endif + #ifdef Z_SLAVE_ADDRESS + static_assert(Z_SLAVE_ADDRESS == 3, "Z_SLAVE_ADDRESS must be 3 for BOARD_SOVOL_V131."); + #else + #define Z_SLAVE_ADDRESS 3 + #endif + #ifdef E0_SLAVE_ADDRESS + static_assert(E0_SLAVE_ADDRESS == 3, "E0_SLAVE_ADDRESS must be 3 for BOARD_SOVOL_V131."); + #else + #define E0_SLAVE_ADDRESS 3 + #endif + // Reduce baud rate to improve software serial reliability #ifndef TMC_BAUD_RATE #define TMC_BAUD_RATE 19200 diff --git a/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h b/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h index 87f83a5c96bcc..b9cd02b6c8f05 100644 --- a/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h +++ b/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h @@ -569,33 +569,40 @@ #if HAS_TMC_UART /** - * Address for the UART Configuration of the TMC2209. Override in Configuration files. - * To test TMC2209 Steppers enable TMC_DEBUG in Configuration_adv.h and test the M122 command with voltage on the steppers. + * TMC2208/TMC2209 stepper drivers + * It seems to work perfectly fine on Software Serial, if an advanced user wants to test, you could use the SAMD51 Serial1 and Serial 2. Be careful with the Sercom configurations. */ - #ifndef X_SLAVE_ADDRESS + //#define X_HARDWARE_SERIAL Serial1 + //#define Y_HARDWARE_SERIAL Serial1 + //#define Z_HARDWARE_SERIAL Serial1 + //#define E0_HARDWARE_SERIAL Serial1 + + // Default TMC slave addresses + #ifdef X_SLAVE_ADDRESS + static_assert(X_SLAVE_ADDRESS == 0b00, "X_SLAVE_ADDRESS must be 0b00 for BOARD_BRICOLEMON_LITE_V1_0."); + #else #define X_SLAVE_ADDRESS 0b00 #endif - #ifndef Y_SLAVE_ADDRESS + #ifdef Y_SLAVE_ADDRESS + static_assert(Y_SLAVE_ADDRESS == 0b01, "Y_SLAVE_ADDRESS must be 0b01 for BOARD_BRICOLEMON_LITE_V1_0."); + #else #define Y_SLAVE_ADDRESS 0b01 #endif - #ifndef Z_SLAVE_ADDRESS + #ifdef Z_SLAVE_ADDRESS + static_assert(Z_SLAVE_ADDRESS == 0b10, "Z_SLAVE_ADDRESS must be 0b10 for BOARD_BRICOLEMON_LITE_V1_0."); + #else #define Z_SLAVE_ADDRESS 0b10 #endif - #ifndef E0_SLAVE_ADDRESS + #ifdef E0_SLAVE_ADDRESS + static_assert(E0_SLAVE_ADDRESS == 0b11, "E0_SLAVE_ADDRESS must be 0b11 for BOARD_BRICOLEMON_LITE_V1_0."); + #else #define E0_SLAVE_ADDRESS 0b11 #endif - /** - * TMC2208/TMC2209 stepper drivers - * It seems to work perfectly fine on Software Serial, if an advanced user wants to test, you could use the SAMD51 Serial1 and Serial 2. Be careful with the Sercom configurations. - */ - //#define X_HARDWARE_SERIAL Serial1 - //#define Y_HARDWARE_SERIAL Serial1 - //#define Z_HARDWARE_SERIAL Serial1 - //#define E0_HARDWARE_SERIAL Serial1 - - // 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 + // Reduce baud rate to improve software serial reliability + #ifndef TMC_BAUD_RATE + #define TMC_BAUD_RATE 19200 // 250000 + #endif // // Software serial diff --git a/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h b/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h index d55669ac90c62..9007d50422eb8 100644 --- a/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h +++ b/Marlin/src/pins/samd/pins_BRICOLEMON_V1_0.h @@ -620,40 +620,49 @@ #endif #if HAS_TMC_UART - /** - * Address for the UART Configuration of the TMC2209. Override in Configuration files. - * To test TMC2209 Steppers enable TMC_DEBUG in Configuration_adv.h and test the M122 command with voltage on the steppers. + * TMC2208/TMC2209 stepper drivers + * It seems to work perfectly fine on Software Serial, if an advanced user wants to test, you could use the SAMD51 Serial1 and Serial 2. Be careful with the Sercom configurations. + * Steppers 1,2,3,4 (X,Y,Z,E0) are on the Serial1, Sercom (RX = 0, TX = 1), extra stepper 5 (E1 or any axis you want) is on Serial2, Sercom (RX = 17, TX = 16) */ - #ifndef X_SLAVE_ADDRESS + + //#define X_HARDWARE_SERIAL Serial1 + //#define Y_HARDWARE_SERIAL Serial1 + //#define Z_HARDWARE_SERIAL Serial1 + //#define E0_HARDWARE_SERIAL Serial1 + //#define E1_HARDWARE_SERIAL Serial2 + + // Default TMC slave addresses + #ifdef X_SLAVE_ADDRESS + static_assert(X_SLAVE_ADDRESS == 0b00, "X_SLAVE_ADDRESS must be 0b00 for BOARD_BRICOLEMON_V1_0."); + #else #define X_SLAVE_ADDRESS 0b00 #endif - #ifndef Y_SLAVE_ADDRESS + #ifdef Y_SLAVE_ADDRESS + static_assert(Y_SLAVE_ADDRESS == 0b01, "Y_SLAVE_ADDRESS must be 0b01 for BOARD_BRICOLEMON_V1_0."); + #else #define Y_SLAVE_ADDRESS 0b01 #endif - #ifndef Z_SLAVE_ADDRESS + #ifdef Z_SLAVE_ADDRESS + static_assert(Z_SLAVE_ADDRESS == 0b10, "Z_SLAVE_ADDRESS must be 0b10 for BOARD_BRICOLEMON_V1_0."); + #else #define Z_SLAVE_ADDRESS 0b10 #endif - #ifndef E0_SLAVE_ADDRESS + #ifdef E0_SLAVE_ADDRESS + static_assert(E0_SLAVE_ADDRESS == 0b11, "E0_SLAVE_ADDRESS must be 0b11 for BOARD_BRICOLEMON_V1_0."); + #else #define E0_SLAVE_ADDRESS 0b11 #endif - #ifndef E1_SLAVE_ADDRESS + #ifdef E1_SLAVE_ADDRESS + static_assert(E1_SLAVE_ADDRESS == 0b00, "E0_SLAVE_ADDRESS must be 0b00 for BOARD_BRICOLEMON_V1_0."); + #else #define E1_SLAVE_ADDRESS 0b00 #endif - /** - * TMC2208/TMC2209 stepper drivers - * It seems to work perfectly fine on Software Serial, if an advanced user wants to test, you could use the SAMD51 Serial1 and Serial 2. Be careful with the Sercom configurations. - * Steppers 1,2,3,4 (X,Y,Z,E0) are on the Serial1, Sercom (RX = 0, TX = 1), extra stepper 5 (E1 or any axis you want) is on Serial2, Sercom (RX = 17, TX = 16) - */ - - //#define X_HARDWARE_SERIAL Serial1 - //#define Y_HARDWARE_SERIAL Serial1 - //#define Z_HARDWARE_SERIAL Serial1 - //#define E0_HARDWARE_SERIAL Serial1 - //#define E1_HARDWARE_SERIAL Serial2 - - #define TMC_BAUD_RATE 250000 + // Reduce baud rate to improve software serial reliability + #ifndef TMC_BAUD_RATE + #define TMC_BAUD_RATE 19200 // 250000 + #endif // // Software serial diff --git a/Marlin/src/pins/samd/pins_MINITRONICS20.h b/Marlin/src/pins/samd/pins_MINITRONICS20.h index 2a450698d12a3..0a027f25daf53 100644 --- a/Marlin/src/pins/samd/pins_MINITRONICS20.h +++ b/Marlin/src/pins/samd/pins_MINITRONICS20.h @@ -497,40 +497,49 @@ #define SD_DETECT_PIN 22 #if HAS_TMC_UART - /** - * TMC2209 UART Address. Override in Configuration files. - * To test TMC2209 Steppers enable TMC_DEBUG and test M122 with voltage on the steppers. + * TMC2208/TMC2209 stepper drivers + * Seems to work fine with Software Serial. If you want to test, use SAMD51 Serial1 and Serial2. Be careful with the Sercom configurations. + * Steppers 1,2,3,4 (X,Y,Z,E0) are on Serial1, Sercom (RX=0, TX=1), extra stepper 5 (E1 or any axis you want) is on Serial2, Sercom (RX=17, TX=16) */ - #ifndef X_SLAVE_ADDRESS + + //#define X_HARDWARE_SERIAL Serial1 + //#define Y_HARDWARE_SERIAL Serial1 + //#define Z_HARDWARE_SERIAL Serial1 + //#define E0_HARDWARE_SERIAL Serial1 + //#define E1_HARDWARE_SERIAL Serial2 + + // Default TMC slave addresses + #ifdef X_SLAVE_ADDRESS + static_assert(X_SLAVE_ADDRESS == 0b00, "X_SLAVE_ADDRESS must be 0b00 for BOARD_ERYONE_ERY32_MINI."); + #else #define X_SLAVE_ADDRESS 0b00 #endif - #ifndef Y_SLAVE_ADDRESS + #ifdef Y_SLAVE_ADDRESS + static_assert(Y_SLAVE_ADDRESS == 0b01, "Y_SLAVE_ADDRESS must be 0b01 for BOARD_ERYONE_ERY32_MINI."); + #else #define Y_SLAVE_ADDRESS 0b01 #endif - #ifndef Z_SLAVE_ADDRESS + #ifdef Z_SLAVE_ADDRESS + static_assert(Z_SLAVE_ADDRESS == 0b10, "Z_SLAVE_ADDRESS must be 0b10 for BOARD_ERYONE_ERY32_MINI."); + #else #define Z_SLAVE_ADDRESS 0b10 #endif - #ifndef E0_SLAVE_ADDRESS + #ifdef E0_SLAVE_ADDRESS + static_assert(E0_SLAVE_ADDRESS == 0b11, "E0_SLAVE_ADDRESS must be 0b11 for BOARD_ERYONE_ERY32_MINI."); + #else #define E0_SLAVE_ADDRESS 0b11 #endif - #ifndef E1_SLAVE_ADDRESS + #ifdef E1_SLAVE_ADDRESS + static_assert(E1_SLAVE_ADDRESS == 0b00, "E0_SLAVE_ADDRESS must be 0b00 for BOARD_ERYONE_ERY32_MINI."); + #else #define E1_SLAVE_ADDRESS 0b00 #endif - /** - * TMC2208/TMC2209 stepper drivers - * Seems to work fine with Software Serial. If you want to test, use SAMD51 Serial1 and Serial2. Be careful with the Sercom configurations. - * Steppers 1,2,3,4 (X,Y,Z,E0) are on Serial1, Sercom (RX=0, TX=1), extra stepper 5 (E1 or any axis you want) is on Serial2, Sercom (RX=17, TX=16) - */ - - //#define X_HARDWARE_SERIAL Serial1 - //#define Y_HARDWARE_SERIAL Serial1 - //#define Z_HARDWARE_SERIAL Serial1 - //#define E0_HARDWARE_SERIAL Serial1 - //#define E1_HARDWARE_SERIAL Serial2 - - #define TMC_BAUD_RATE 250000 + // Reduce baud rate to improve software serial reliability + #ifndef TMC_BAUD_RATE + #define TMC_BAUD_RATE 19200 // 250000 + #endif // // Software serial diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h index b6a3c4141facb..5655d209bcd3c 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h @@ -25,8 +25,9 @@ * BigTreeTech SKR CR-6 (STM32F103RET6) board pin assignments */ -#define DEFAULT_MACHINE_NAME "Creality3D" +#define DEFAULT_MACHINE_NAME "Creality CR-6 SE" #define BOARD_INFO_NAME "BTT SKR CR-6" +#define BOARD_WEBSITE_URL "github.com/bigtreetech/BIGTREETECH-SKR-CR6" #include "env_validate.h" @@ -144,17 +145,25 @@ #define E0_HARDWARE_SERIAL MSerial4 // Default TMC slave addresses - #ifndef X_SLAVE_ADDRESS - #define X_SLAVE_ADDRESS 0 + #ifdef X_SLAVE_ADDRESS + static_assert(X_SLAVE_ADDRESS == 0, "X_SLAVE_ADDRESS must be 0 for BOARD_BTT_SKR_CR6."); + #else + #define X_SLAVE_ADDRESS 0 #endif - #ifndef Y_SLAVE_ADDRESS - #define Y_SLAVE_ADDRESS 1 + #ifdef Y_SLAVE_ADDRESS + static_assert(Y_SLAVE_ADDRESS == 1, "Y_SLAVE_ADDRESS must be 1 for BOARD_BTT_SKR_CR6."); + #else + #define Y_SLAVE_ADDRESS 1 #endif - #ifndef Z_SLAVE_ADDRESS - #define Z_SLAVE_ADDRESS 2 + #ifdef Z_SLAVE_ADDRESS + static_assert(Z_SLAVE_ADDRESS == 2, "Z_SLAVE_ADDRESS must be 2 for BOARD_BTT_SKR_CR6."); + #else + #define Z_SLAVE_ADDRESS 2 #endif - #ifndef E0_SLAVE_ADDRESS - #define E0_SLAVE_ADDRESS 3 + #ifdef E0_SLAVE_ADDRESS + static_assert(E0_SLAVE_ADDRESS == 3, "E0_SLAVE_ADDRESS must be 3 for BOARD_BTT_SKR_CR6."); + #else + #define E0_SLAVE_ADDRESS 3 #endif #endif diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V1_0.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V1_0.h index a09da02e15844..d9f69b695f13d 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V1_0.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V1_0.h @@ -24,6 +24,7 @@ #include "pins_BTT_SKR_MINI_E3_common.h" #define BOARD_INFO_NAME "BTT SKR Mini E3 V1.0" +#define BOARD_WEBSITE_URL "github.com/bigtreetech/BIGTREETECH-SKR-mini-E3/tree/master/hardware/BIGTREETECH-SKR-mini-E3%20V1.0" /** * TMC220x stepper drivers @@ -36,16 +37,24 @@ #define E0_HARDWARE_SERIAL MSerial4 // Default TMC slave addresses - #ifndef X_SLAVE_ADDRESS - #define X_SLAVE_ADDRESS 0 + #ifdef X_SLAVE_ADDRESS + static_assert(X_SLAVE_ADDRESS == 0, "X_SLAVE_ADDRESS must be 0 for BOARD_BTT_SKR_MINI_E3_V1_0."); + #else + #define X_SLAVE_ADDRESS 0 #endif - #ifndef Y_SLAVE_ADDRESS - #define Y_SLAVE_ADDRESS 2 + #ifdef Y_SLAVE_ADDRESS + static_assert(Y_SLAVE_ADDRESS == 2, "Y_SLAVE_ADDRESS must be 2 for BOARD_BTT_SKR_MINI_E3_V1_0."); + #else + #define Y_SLAVE_ADDRESS 2 #endif - #ifndef Z_SLAVE_ADDRESS - #define Z_SLAVE_ADDRESS 1 + #ifdef Z_SLAVE_ADDRESS + static_assert(Z_SLAVE_ADDRESS == 1, "Z_SLAVE_ADDRESS must be 1 for BOARD_BTT_SKR_MINI_E3_V1_0."); + #else + #define Z_SLAVE_ADDRESS 1 #endif - #ifndef E0_SLAVE_ADDRESS - #define E0_SLAVE_ADDRESS 3 + #ifdef E0_SLAVE_ADDRESS + static_assert(E0_SLAVE_ADDRESS == 3, "E0_SLAVE_ADDRESS must be 3 for BOARD_BTT_SKR_MINI_E3_V1_0."); + #else + #define E0_SLAVE_ADDRESS 3 #endif #endif diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h index c182f2febe75c..d746696a24a3d 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h @@ -94,17 +94,25 @@ #define E0_HARDWARE_SERIAL MSerial4 // Default TMC slave addresses - #ifndef X_SLAVE_ADDRESS - #define X_SLAVE_ADDRESS 0 + #ifdef X_SLAVE_ADDRESS + static_assert(X_SLAVE_ADDRESS == 0, "X_SLAVE_ADDRESS must be 0 for BOARD_SKR_MINI_E3_V2_0."); + #else + #define X_SLAVE_ADDRESS 0 #endif - #ifndef Y_SLAVE_ADDRESS - #define Y_SLAVE_ADDRESS 2 + #ifdef Y_SLAVE_ADDRESS + static_assert(Y_SLAVE_ADDRESS == 2, "Y_SLAVE_ADDRESS must be 2 for BOARD_SKR_MINI_E3_V2_0."); + #else + #define Y_SLAVE_ADDRESS 2 #endif - #ifndef Z_SLAVE_ADDRESS - #define Z_SLAVE_ADDRESS 1 + #ifdef Z_SLAVE_ADDRESS + static_assert(Z_SLAVE_ADDRESS == 1, "Z_SLAVE_ADDRESS must be 1 for BOARD_SKR_MINI_E3_V2_0."); + #else + #define Z_SLAVE_ADDRESS 1 #endif - #ifndef E0_SLAVE_ADDRESS - #define E0_SLAVE_ADDRESS 3 + #ifdef E0_SLAVE_ADDRESS + static_assert(E0_SLAVE_ADDRESS == 3, "E0_SLAVE_ADDRESS must be 3 for BOARD_SKR_MINI_E3_V2_0."); + #else + #define E0_SLAVE_ADDRESS 3 #endif #endif diff --git a/Marlin/src/pins/stm32f1/pins_ERYONE_ERY32_MINI.h b/Marlin/src/pins/stm32f1/pins_ERYONE_ERY32_MINI.h index b18bd09de8943..77b78dc9f0fcd 100644 --- a/Marlin/src/pins/stm32f1/pins_ERYONE_ERY32_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_ERYONE_ERY32_MINI.h @@ -135,16 +135,26 @@ #define Y_HARDWARE_SERIAL MSerial4 #define Z_HARDWARE_SERIAL MSerial4 #define E0_HARDWARE_SERIAL MSerial4 - #ifndef X_SLAVE_ADDRESS + + // Default TMC slave addresses + #ifdef X_SLAVE_ADDRESS + static_assert(X_SLAVE_ADDRESS == 2, "X_SLAVE_ADDRESS must be 2 for BOARD_ERYONE_ERY32_MINI."); + #else #define X_SLAVE_ADDRESS 2 #endif - #ifndef Y_SLAVE_ADDRESS + #ifdef Y_SLAVE_ADDRESS + static_assert(Y_SLAVE_ADDRESS == 3, "Y_SLAVE_ADDRESS must be 3 for BOARD_ERYONE_ERY32_MINI."); + #else #define Y_SLAVE_ADDRESS 3 #endif - #ifndef Z_SLAVE_ADDRESS + #ifdef Z_SLAVE_ADDRESS + static_assert(Z_SLAVE_ADDRESS == 1, "Z_SLAVE_ADDRESS must be 1 for BOARD_ERYONE_ERY32_MINI."); + #else #define Z_SLAVE_ADDRESS 1 #endif - #ifndef E0_SLAVE_ADDRESS + #ifdef E0_SLAVE_ADDRESS + static_assert(E0_SLAVE_ADDRESS == 0, "E0_SLAVE_ADDRESS must be 0 for BOARD_ERYONE_ERY32_MINI."); + #else #define E0_SLAVE_ADDRESS 0 #endif #endif diff --git a/Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h b/Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h index 93ef7b75d4e7c..5fefc44658333 100644 --- a/Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h +++ b/Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h @@ -24,13 +24,13 @@ #include "env_validate.h" #define BOARD_INFO_NAME "FYSETC AIO II" -#define BOARD_WEBSITE_URL "fysetc.com" +#define BOARD_WEBSITE_URL "github.com/FYSETC/FYSETC-AIO_II" #define BOARD_NO_NATIVE_USB #define RESET_STEPPERS_ON_MEDIA_INSERT #define DISABLE_JTAG -#define pins_v2_20190128 // new pins define +#define PINS_V2_20190128 // new pins define // Ignore temp readings during development. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 @@ -55,7 +55,7 @@ // // Filament runout // -#ifdef pins_v2_20190128 +#ifdef PINS_V2_20190128 #define FIL_RUNOUT_PIN PB15 #else #define FIL_RUNOUT_PIN PB5 @@ -69,7 +69,7 @@ #define X_ENABLE_PIN PA8 #define Y_STEP_PIN PB2 -#ifdef pins_v2_20190128 +#ifdef PINS_V2_20190128 #define Y_DIR_PIN PB3 #else #define Y_DIR_PIN PB0 @@ -96,21 +96,27 @@ #define E0_HARDWARE_SERIAL MSerial2 // Default TMC slave addresses - #ifndef X_SLAVE_ADDRESS - #define X_SLAVE_ADDRESS 0 + #ifdef X_SLAVE_ADDRESS + static_assert(X_SLAVE_ADDRESS == 0, "X_SLAVE_ADDRESS must be 0 for BOARD_FYSETC_AIO_II."); + #else + #define X_SLAVE_ADDRESS 0 #endif - #ifndef Y_SLAVE_ADDRESS - #define Y_SLAVE_ADDRESS 1 + #ifdef Y_SLAVE_ADDRESS + static_assert(Y_SLAVE_ADDRESS == 1, "Y_SLAVE_ADDRESS must be 1 for BOARD_FYSETC_AIO_II."); + #else + #define Y_SLAVE_ADDRESS 1 #endif - #ifndef Z_SLAVE_ADDRESS - #define Z_SLAVE_ADDRESS 2 + #ifdef Z_SLAVE_ADDRESS + static_assert(Z_SLAVE_ADDRESS == 2, "Z_SLAVE_ADDRESS must be 2 for BOARD_FYSETC_AIO_II."); + #else + #define Z_SLAVE_ADDRESS 2 #endif - #ifndef E0_SLAVE_ADDRESS - #define E0_SLAVE_ADDRESS 3 + #ifdef E0_SLAVE_ADDRESS + static_assert(E0_SLAVE_ADDRESS == 3, "E0_SLAVE_ADDRESS must be 3 for BOARD_FYSETC_AIO_II."); + #else + #define E0_SLAVE_ADDRESS 3 #endif - // The 4xTMC2209 module doesn't have a serial multiplexer and - // needs to set *_SLAVE_ADDRESS in Configuration_adv.h for X,Y,Z,E0 #if HAS_DRIVER(TMC2208) #define TMC_SERIAL_MULTIPLEXER #define SERIAL_MUL_PIN1 PB13 @@ -162,7 +168,7 @@ #if HAS_MARLINUI_U8GLIB #define DOGLCD_A0 PA15 - #ifdef pins_v2_20190128 + #ifdef PINS_V2_20190128 #define DOGLCD_CS PB5 #else #define DOGLCD_CS PB7 @@ -183,7 +189,7 @@ #define BTN_ENC PC12 #endif - #ifdef pins_v2_20190128 + #ifdef PINS_V2_20190128 #define LCD_RESET_PIN PB4 #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN PB0 diff --git a/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h b/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h index 49b6f25a47e6e..cc3a3d23267b3 100644 --- a/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h +++ b/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h @@ -23,10 +23,8 @@ #include "env_validate.h" -#define DEFAULT_MACHINE_NAME "3D Printer" - #define BOARD_INFO_NAME "FYSETC Cheetah" -#define BOARD_WEBSITE_URL "fysetc.com" +#define BOARD_WEBSITE_URL "github.com/FYSETC/FYSETC-Cheetah" // Ignore temp readings during development. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 @@ -85,17 +83,25 @@ #define E0_HARDWARE_SERIAL MSerial2 // Default TMC slave addresses - #ifndef X_SLAVE_ADDRESS - #define X_SLAVE_ADDRESS 0 + #ifdef X_SLAVE_ADDRESS + static_assert(X_SLAVE_ADDRESS == 0, "X_SLAVE_ADDRESS must be 0 for BOARD_FYSETC_CHEETAH."); + #else + #define X_SLAVE_ADDRESS 0 #endif - #ifndef Y_SLAVE_ADDRESS - #define Y_SLAVE_ADDRESS 1 + #ifdef Y_SLAVE_ADDRESS + static_assert(Y_SLAVE_ADDRESS == 1, "Y_SLAVE_ADDRESS must be 1 for BOARD_FYSETC_CHEETAH."); + #else + #define Y_SLAVE_ADDRESS 1 #endif - #ifndef Z_SLAVE_ADDRESS - #define Z_SLAVE_ADDRESS 2 + #ifdef Z_SLAVE_ADDRESS + static_assert(Z_SLAVE_ADDRESS == 2, "Z_SLAVE_ADDRESS must be 2 for BOARD_FYSETC_CHEETAH."); + #else + #define Z_SLAVE_ADDRESS 2 #endif - #ifndef E0_SLAVE_ADDRESS - #define E0_SLAVE_ADDRESS 3 + #ifdef E0_SLAVE_ADDRESS + static_assert(E0_SLAVE_ADDRESS == 3, "E0_SLAVE_ADDRESS must be 3 for BOARD_FYSETC_CHEETAH."); + #else + #define E0_SLAVE_ADDRESS 3 #endif #endif diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h index b1ea4bca4c293..bddf88d6e7ad4 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h @@ -128,16 +128,24 @@ #define E0_HARDWARE_SERIAL MSerial6 // Default TMC slave addresses - #ifndef X_SLAVE_ADDRESS + #ifdef X_SLAVE_ADDRESS + static_assert(X_SLAVE_ADDRESS == 0, "X_SLAVE_ADDRESS must be 0 for BOARD_BTT_SKR_MINI_E3_V3_0_1."); + #else #define X_SLAVE_ADDRESS 0 #endif - #ifndef Y_SLAVE_ADDRESS + #ifdef Y_SLAVE_ADDRESS + static_assert(Y_SLAVE_ADDRESS == 2, "Y_SLAVE_ADDRESS must be 2 for BOARD_BTT_SKR_MINI_E3_V3_0_1."); + #else #define Y_SLAVE_ADDRESS 2 #endif - #ifndef Z_SLAVE_ADDRESS + #ifdef Z_SLAVE_ADDRESS + static_assert(Z_SLAVE_ADDRESS == 1, "Z_SLAVE_ADDRESS must be 1 for BOARD_BTT_SKR_MINI_E3_V3_0_1."); + #else #define Z_SLAVE_ADDRESS 1 #endif - #ifndef E0_SLAVE_ADDRESS + #ifdef E0_SLAVE_ADDRESS + static_assert(E0_SLAVE_ADDRESS == 3, "E0_SLAVE_ADDRESS must be 3 for BOARD_BTT_SKR_MINI_E3_V3_0_1."); + #else #define E0_SLAVE_ADDRESS 3 #endif #endif diff --git a/Marlin/src/pins/stm32f4/pins_CREALITY_CR4NTXXC10.h b/Marlin/src/pins/stm32f4/pins_CREALITY_CR4NTXXC10.h index e1cd5945a6e2e..1e82241099162 100644 --- a/Marlin/src/pins/stm32f4/pins_CREALITY_CR4NTXXC10.h +++ b/Marlin/src/pins/stm32f4/pins_CREALITY_CR4NTXXC10.h @@ -153,17 +153,26 @@ #define Z_HARDWARE_SERIAL X_HARDWARE_SERIAL #define E0_HARDWARE_SERIAL X_HARDWARE_SERIAL - #ifndef X_SLAVE_ADDRESS - #define X_SLAVE_ADDRESS 0 + // Default TMC slave addresses + #ifdef X_SLAVE_ADDRESS + static_assert(X_SLAVE_ADDRESS == 0, "X_SLAVE_ADDRESS must be 0 for BOARD_CREALITY_CR4NTXXC10."); + #else + #define X_SLAVE_ADDRESS 0 #endif - #ifndef Y_SLAVE_ADDRESS - #define Y_SLAVE_ADDRESS 1 + #ifdef Y_SLAVE_ADDRESS + static_assert(Y_SLAVE_ADDRESS == 1, "Y_SLAVE_ADDRESS must be 1 for BOARD_CREALITY_CR4NTXXC10."); + #else + #define Y_SLAVE_ADDRESS 1 #endif - #ifndef Z_SLAVE_ADDRESS - #define Z_SLAVE_ADDRESS 2 + #ifdef Z_SLAVE_ADDRESS + static_assert(Z_SLAVE_ADDRESS == 2, "Z_SLAVE_ADDRESS must be 2 for BOARD_CREALITY_CR4NTXXC10."); + #else + #define Z_SLAVE_ADDRESS 2 #endif - #ifndef E0_SLAVE_ADDRESS - #define E0_SLAVE_ADDRESS 3 + #ifdef E0_SLAVE_ADDRESS + static_assert(E0_SLAVE_ADDRESS == 3, "E0_SLAVE_ADDRESS must be 3 for BOARD_CREALITY_CR4NTXXC10."); + #else + #define E0_SLAVE_ADDRESS 3 #endif // Software serial diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h b/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h index 16973b344fb3a..0107b36a7c15f 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h @@ -23,10 +23,8 @@ #include "env_validate.h" -#define DEFAULT_MACHINE_NAME "3D Printer" - #define BOARD_INFO_NAME "FYSETC Cheetah V2.0" -#define BOARD_WEBSITE_URL "fysetc.com" +#define BOARD_WEBSITE_URL "github.com/FYSETC/FYSETC-Cheetah-v2" // USB Flash Drive support //#define HAS_OTG_USB_HOST_SUPPORT @@ -93,17 +91,25 @@ #define E0_HARDWARE_SERIAL Serial2 // Default TMC slave addresses - #ifndef X_SLAVE_ADDRESS - #define X_SLAVE_ADDRESS 0 + #ifdef X_SLAVE_ADDRESS + static_assert(X_SLAVE_ADDRESS == 0, "X_SLAVE_ADDRESS must be 0 for BOARD_FYSETC_CHEETAH_V20."); + #else + #define X_SLAVE_ADDRESS 0 #endif - #ifndef Y_SLAVE_ADDRESS - #define Y_SLAVE_ADDRESS 2 + #ifdef Y_SLAVE_ADDRESS + static_assert(Y_SLAVE_ADDRESS == 2, "Y_SLAVE_ADDRESS must be 2 for BOARD_FYSETC_CHEETAH_V20."); + #else + #define Y_SLAVE_ADDRESS 2 #endif - #ifndef Z_SLAVE_ADDRESS - #define Z_SLAVE_ADDRESS 1 + #ifdef Z_SLAVE_ADDRESS + static_assert(Z_SLAVE_ADDRESS == 1, "Z_SLAVE_ADDRESS must be 1 for BOARD_FYSETC_CHEETAH_V20."); + #else + #define Z_SLAVE_ADDRESS 1 #endif - #ifndef E0_SLAVE_ADDRESS - #define E0_SLAVE_ADDRESS 3 + #ifdef E0_SLAVE_ADDRESS + static_assert(E0_SLAVE_ADDRESS == 3, "E0_SLAVE_ADDRESS must be 3 for BOARD_FYSETC_CHEETAH_V20."); + #else + #define E0_SLAVE_ADDRESS 3 #endif #endif diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V30.h b/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V30.h index 70a9bf9de20dd..b2e42e9cdfaaf 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V30.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V30.h @@ -24,7 +24,7 @@ #include "env_validate.h" #define BOARD_INFO_NAME "FYSETC Cheetah V3.0" -#define BOARD_WEBSITE_URL "fysetc.com" +#define BOARD_WEBSITE_URL "github.com/FYSETC/Cheetah_V3.0" // USB Flash Drive support //#define HAS_OTG_USB_HOST_SUPPORT @@ -41,12 +41,12 @@ // // 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 -//#elif !defined(Z_MIN_PROBE_PIN) -// #define Z_MIN_PROBE_PIN PA0 -//#endif +#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 @@ -55,17 +55,10 @@ #define Y_STOP_PIN PA3 #define Z_STOP_PIN PC4 -#if 1 -#define TEST_IO1 PA0 // PROBE -#define TEST_IO2 PA1 // FIL-D -//#define TEST_IO3 PA9 -//#define TEST_IO4 PA10 -#endif - // // Filament runout // -//#define FIL_RUNOUT_PIN PA1 +#define FIL_RUNOUT_PIN PA1 // FIL-D // // Steppers @@ -87,66 +80,65 @@ #define E0_ENABLE_PIN PD2 #if HAS_TMC_UART - #if 1 - #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 + /** + * 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 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 + #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 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 - #else - #define X_HARDWARE_SERIAL Serial2 - #define Y_HARDWARE_SERIAL Serial2 - #define Z_HARDWARE_SERIAL Serial2 - #define E0_HARDWARE_SERIAL Serial2 + #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 + #ifdef X_SLAVE_ADDRESS + static_assert(X_SLAVE_ADDRESS == 0, "X_SLAVE_ADDRESS must be 0 for BOARD_FYSETC_CHEETAH_V30."); + #else + #define X_SLAVE_ADDRESS 0 #endif - #ifndef Y_SLAVE_ADDRESS - #define Y_SLAVE_ADDRESS 2 + #ifdef Y_SLAVE_ADDRESS + static_assert(Y_SLAVE_ADDRESS == 2, "Y_SLAVE_ADDRESS must be 2 for BOARD_FYSETC_CHEETAH_V30."); + #else + #define Y_SLAVE_ADDRESS 2 #endif - #ifndef Z_SLAVE_ADDRESS - #define Z_SLAVE_ADDRESS 1 + #ifdef Z_SLAVE_ADDRESS + static_assert(Z_SLAVE_ADDRESS == 1, "Z_SLAVE_ADDRESS must be 1 for BOARD_FYSETC_CHEETAH_V30."); + #else + #define Z_SLAVE_ADDRESS 1 #endif - #ifndef E0_SLAVE_ADDRESS - #define E0_SLAVE_ADDRESS 3 + #ifdef E0_SLAVE_ADDRESS + static_assert(E0_SLAVE_ADDRESS == 3, "E0_SLAVE_ADDRESS must be 3 for BOARD_FYSETC_CHEETAH_V30."); + #else + #define E0_SLAVE_ADDRESS 3 #endif - #endif #endif // diff --git a/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h b/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h index 9151e5e07ffb7..439d824cdbe93 100644 --- a/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h +++ b/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_V2.h @@ -133,17 +133,25 @@ #define E0_SERIAL_RX_PIN PC11 // Default TMC slave addresses - #ifndef X_SLAVE_ADDRESS - #define X_SLAVE_ADDRESS 0 + #ifdef X_SLAVE_ADDRESS + static_assert(X_SLAVE_ADDRESS == 0, "X_SLAVE_ADDRESS must be 0 for BOARD_TH3D_EZBOARD_V2."); + #else + #define X_SLAVE_ADDRESS 0 #endif - #ifndef Y_SLAVE_ADDRESS - #define Y_SLAVE_ADDRESS 1 + #ifdef Y_SLAVE_ADDRESS + static_assert(Y_SLAVE_ADDRESS == 1, "Y_SLAVE_ADDRESS must be 1 for BOARD_TH3D_EZBOARD_V2."); + #else + #define Y_SLAVE_ADDRESS 1 #endif - #ifndef Z_SLAVE_ADDRESS - #define Z_SLAVE_ADDRESS 2 + #ifdef Z_SLAVE_ADDRESS + static_assert(Z_SLAVE_ADDRESS == 2, "Z_SLAVE_ADDRESS must be 2 for BOARD_TH3D_EZBOARD_V2."); + #else + #define Z_SLAVE_ADDRESS 2 #endif - #ifndef E0_SLAVE_ADDRESS - #define E0_SLAVE_ADDRESS 3 + #ifdef E0_SLAVE_ADDRESS + static_assert(E0_SLAVE_ADDRESS == 3, "E0_SLAVE_ADDRESS must be 3 for BOARD_TH3D_EZBOARD_V2."); + #else + #define E0_SLAVE_ADDRESS 3 #endif // Reduce baud rate to improve software serial reliability diff --git a/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h b/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h index 103a148911037..3913646770e9c 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h @@ -34,6 +34,7 @@ #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 @@ -104,7 +105,9 @@ #endif // Default TMC slave addresses - #ifndef E0_SLAVE_ADDRESS + #ifdef E0_SLAVE_ADDRESS + static_assert(E0_SLAVE_ADDRESS == 0b00, "E0_SLAVE_ADDRESS must be 0b00 for BOARD_BTT_EBB42_V1_1."); + #else #define E0_SLAVE_ADDRESS 0b00 #endif #endif diff --git a/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h b/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h index df91933d719b0..58a8ae0bba7a4 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h @@ -118,17 +118,25 @@ #define E0_HARDWARE_SERIAL MSerial4 // Default TMC slave addresses - #ifndef X_SLAVE_ADDRESS - #define X_SLAVE_ADDRESS 0 + #ifdef X_SLAVE_ADDRESS + static_assert(X_SLAVE_ADDRESS == 0, "X_SLAVE_ADDRESS must be 0 for BOARD_BTT_SKR_MINI_E3_V3_0."); + #else + #define X_SLAVE_ADDRESS 0 #endif - #ifndef Y_SLAVE_ADDRESS - #define Y_SLAVE_ADDRESS 2 + #ifdef Y_SLAVE_ADDRESS + static_assert(Y_SLAVE_ADDRESS == 2, "Y_SLAVE_ADDRESS must be 2 for BOARD_BTT_SKR_MINI_E3_V3_0."); + #else + #define Y_SLAVE_ADDRESS 2 #endif - #ifndef Z_SLAVE_ADDRESS - #define Z_SLAVE_ADDRESS 1 + #ifdef Z_SLAVE_ADDRESS + static_assert(Z_SLAVE_ADDRESS == 1, "Z_SLAVE_ADDRESS must be 1 for BOARD_BTT_SKR_MINI_E3_V3_0."); + #else + #define Z_SLAVE_ADDRESS 1 #endif - #ifndef E0_SLAVE_ADDRESS - #define E0_SLAVE_ADDRESS 3 + #ifdef E0_SLAVE_ADDRESS + static_assert(E0_SLAVE_ADDRESS == 3, "E0_SLAVE_ADDRESS must be 3 for BOARD_BTT_SKR_MINI_E3_V3_0."); + #else + #define E0_SLAVE_ADDRESS 3 #endif #endif