diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 3e23bb8944..9b4c58be6f 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -2979,28 +2979,28 @@ * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here. * The default pins can be found in your board's pins file. */ - //#define X_CS_PIN -1 - //#define Y_CS_PIN -1 - //#define Z_CS_PIN -1 - //#define X2_CS_PIN -1 - //#define Y2_CS_PIN -1 - //#define Z2_CS_PIN -1 - //#define Z3_CS_PIN -1 - //#define Z4_CS_PIN -1 - //#define I_CS_PIN -1 - //#define J_CS_PIN -1 - //#define K_CS_PIN -1 - //#define U_CS_PIN -1 - //#define V_CS_PIN -1 - //#define W_CS_PIN -1 - //#define E0_CS_PIN -1 - //#define E1_CS_PIN -1 - //#define E2_CS_PIN -1 - //#define E3_CS_PIN -1 - //#define E4_CS_PIN -1 - //#define E5_CS_PIN -1 - //#define E6_CS_PIN -1 - //#define E7_CS_PIN -1 + //#define X_CS_PIN -1 + //#define Y_CS_PIN -1 + //#define Z_CS_PIN -1 + //#define X2_CS_PIN -1 + //#define Y2_CS_PIN -1 + //#define Z2_CS_PIN -1 + //#define Z3_CS_PIN -1 + //#define Z4_CS_PIN -1 + //#define I_CS_PIN -1 + //#define J_CS_PIN -1 + //#define K_CS_PIN -1 + //#define U_CS_PIN -1 + //#define V_CS_PIN -1 + //#define W_CS_PIN -1 + //#define E0_CS_PIN -1 + //#define E1_CS_PIN -1 + //#define E2_CS_PIN -1 + //#define E3_CS_PIN -1 + //#define E4_CS_PIN -1 + //#define E5_CS_PIN -1 + //#define E6_CS_PIN -1 + //#define E7_CS_PIN -1 /** * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160). @@ -3008,9 +3008,9 @@ * but you can override or define them here. */ //#define TMC_USE_SW_SPI - //#define TMC_SW_MOSI -1 - //#define TMC_SW_MISO -1 - //#define TMC_SW_SCK -1 + //#define TMC_SPI_MOSI -1 + //#define TMC_SPI_MISO -1 + //#define TMC_SPI_SCK -1 // @section tmc/serial diff --git a/Marlin/src/HAL/DUE/inc/SanityCheck.h b/Marlin/src/HAL/DUE/inc/SanityCheck.h index 1f5acc360c..996404a7d0 100644 --- a/Marlin/src/HAL/DUE/inc/SanityCheck.h +++ b/Marlin/src/HAL/DUE/inc/SanityCheck.h @@ -64,7 +64,7 @@ * Usually the hardware SPI pins are only available to the LCD. This makes the DUE hard SPI used at the same time * as the TMC2130 soft SPI the most common setup. */ -#define _IS_HW_SPI(P) (defined(TMC_SW_##P) && (TMC_SW_##P == SD_MOSI_PIN || TMC_SW_##P == SD_MISO_PIN || TMC_SW_##P == SD_SCK_PIN)) +#define _IS_HW_SPI(P) (defined(TMC_SPI_##P) && (TMC_SPI_##P == SD_MOSI_PIN || TMC_SPI_##P == SD_MISO_PIN || TMC_SPI_##P == SD_SCK_PIN)) #if ENABLED(SDSUPPORT) && HAS_DRIVER(TMC2130) #if ENABLED(TMC_USE_SW_SPI) diff --git a/Marlin/src/HAL/LPC1768/inc/SanityCheck.h b/Marlin/src/HAL/LPC1768/inc/SanityCheck.h index 8265d58a6e..b9a3360668 100644 --- a/Marlin/src/HAL/LPC1768/inc/SanityCheck.h +++ b/Marlin/src/HAL/LPC1768/inc/SanityCheck.h @@ -95,7 +95,7 @@ static_assert(DISABLED(BAUD_RATE_GCODE), "BAUD_RATE_GCODE is not yet supported o #if USING_HW_SERIAL0 #define IS_TX0(P) (P == P0_02) #define IS_RX0(P) (P == P0_03) - #if IS_TX0(TMC_SW_MISO) || IS_RX0(TMC_SW_MOSI) + #if IS_TX0(TMC_SPI_MISO) || IS_RX0(TMC_SPI_MOSI) #error "Serial port pins (0) conflict with Trinamic SPI pins!" #elif HAS_PRUSA_MMU1 && (IS_TX0(E_MUX1_PIN) || IS_RX0(E_MUX0_PIN)) #error "Serial port pins (0) conflict with Multi-Material-Unit multiplexer pins!" @@ -111,7 +111,7 @@ static_assert(DISABLED(BAUD_RATE_GCODE), "BAUD_RATE_GCODE is not yet supported o #define IS_RX1(P) (P == P0_16) #define _IS_TX1_1 IS_TX1 #define _IS_RX1_1 IS_RX1 - #if IS_TX1(TMC_SW_SCK) + #if IS_TX1(TMC_SPI_SCK) #error "Serial port pins (1) conflict with other pins!" #elif HAS_ROTARY_ENCODER #if IS_TX1(BTN_EN2) || IS_RX1(BTN_EN1) diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 58f04a39b6..1377c8e73f 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -2212,6 +2212,14 @@ #undef TMC_UART_IS #undef ANY_SERIAL_IS +#if defined(__AVR_ARCH__) && defined(TMC_SPI_MISO) && defined(TMC_SPI_MOSI) && defined(TMC_SPI_SCK) + // Check that the pins are the solitary supported SPI hardware pins of the (AVR) platform. + // Otherwise we are forced to enable software SPI. + #if TMC_SPI_MISO != MISO || TMC_SPI_MOSI != MOSI || TMC_SPI_SCK != SCK + #define TMC_USE_SW_SPI + #endif +#endif + // Clean up unused ESP_WIFI pins #ifdef ESP_WIFI_MODULE_COM #if !SERIAL_IN_USE(ESP_WIFI_MODULE_COM) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 5218cf792b..feb01e533a 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -658,6 +658,8 @@ #error "EXTRA_LIN_ADVANCE_K is now ADVANCE_K_EXTRA." #elif defined(POLAR_SEGMENTS_PER_SECOND) || defined(DELTA_SEGMENTS_PER_SECOND) || defined(SCARA_SEGMENTS_PER_SECOND) || defined(TPARA_SEGMENTS_PER_SECOND) #error "(POLAR|DELTA|SCARA|TPARA)_SEGMENTS_PER_SECOND is now DEFAULT_SEGMENTS_PER_SECOND." +#elif defined(TMC_SW_MOSI) || defined(TMC_SW_MISO) || defined(TMC_SW_SCK) + #error "TMC_SW_(MOSI|MISO|SCK) is now TMC_SPI_(MOSI|MISO|SCK)." #elif ANY(DGUS_LCD_UI_ORIGIN, DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY, DGUS_LCD_UI_MKS, DGUS_LCD_UI_RELOADED) && !defined(DGUS_LCD_UI) #error "DGUS_LCD_UI_[TYPE] is now set using DGUS_LCD_UI TYPE." #elif defined(DELTA_PRINTABLE_RADIUS) diff --git a/Marlin/src/module/stepper/trinamic.cpp b/Marlin/src/module/stepper/trinamic.cpp index 7d87e5953f..02ae9cb1e4 100644 --- a/Marlin/src/module/stepper/trinamic.cpp +++ b/Marlin/src/module/stepper/trinamic.cpp @@ -46,7 +46,7 @@ enum StealthIndex : uint8_t { // AI = Axis Enum Index // SWHW = SW/SH UART selection #if ENABLED(TMC_USE_SW_SPI) - #define __TMC_SPI_DEFINE(IC, ST, L, AI) TMCMarlin stepper##ST(ST##_CS_PIN, float(ST##_RSENSE), TMC_SW_MOSI, TMC_SW_MISO, TMC_SW_SCK, ST##_CHAIN_POS) + #define __TMC_SPI_DEFINE(IC, ST, L, AI) TMCMarlin stepper##ST(ST##_CS_PIN, float(ST##_RSENSE), TMC_SPI_MOSI, TMC_SPI_MISO, TMC_SPI_SCK, ST##_CHAIN_POS) #else #define __TMC_SPI_DEFINE(IC, ST, L, AI) TMCMarlin stepper##ST(ST##_CS_PIN, float(ST##_RSENSE), ST##_CHAIN_POS) #endif diff --git a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h index 3616b7a27c..3e8814c3ee 100644 --- a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h +++ b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h @@ -247,18 +247,16 @@ #endif /** - * Default pins for TMC software SPI + * Default pins for TMC SPI */ -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI 66 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO 44 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK 64 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI 66 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO 44 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK 64 #endif #if HAS_TMC_UART diff --git a/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h b/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h index 10a610ff95..0c96cb42b5 100644 --- a/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h +++ b/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h @@ -77,18 +77,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// Default pins for TMC software SPI // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI P0_18 // ETH - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO P0_17 // ETH - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK P0_15 // ETH - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI P0_18 // ETH +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO P0_17 // ETH +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK P0_15 // ETH #endif // 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 d11224315b..1a8c44771a 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h @@ -56,7 +56,6 @@ #define E0_DIR_PIN P2_13 #define E0_ENABLE_PIN P2_12 - /** ------ ------ * 1.30 | 1 2 | 2.11 0.17 | 1 2 | 0.15 * 0.18 | 3 4 | 0.16 3.26 | 3 4 | 1.23 @@ -165,12 +164,12 @@ // When using any TMC SPI-based drivers, software SPI is used // because pins may be shared with the display or SD card. #define TMC_USE_SW_SPI - #define TMC_SW_MOSI EXP2_06_PIN - #define TMC_SW_MISO EXP2_01_PIN + #define TMC_SPI_MOSI EXP2_06_PIN + #define TMC_SPI_MISO EXP2_01_PIN // To minimize pin usage use the same clock pin as the display/SD card reader. (May generate LCD noise.) - #define TMC_SW_SCK EXP2_02_PIN + #define TMC_SPI_SCK EXP2_02_PIN // If pin 2_06 is unused, it can be used for the clock to avoid the LCD noise. - //#define TMC_SW_SCK P2_06 + //#define TMC_SPI_SCK P2_06 #if ENABLED(SOFTWARE_DRIVER_ENABLE) 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 03994187c8..6372623a30 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h @@ -137,18 +137,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// Default pins for TMC software SPI // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI P4_28 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO P0_05 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK P0_04 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI P4_28 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO P0_05 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK P0_04 #endif #if HAS_TMC_UART @@ -289,7 +287,7 @@ #define DOGLCD_A0 EXP1_06_PIN #define DOGLCD_SCK EXP1_04_PIN #define DOGLCD_MOSI EXP1_01_PIN - #define LCD_BACKLIGHT_PIN -1 + #define LCD_BACKLIGHT_PIN -1 #elif ENABLED(CR10_STOCKDISPLAY) 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 a574a9fe8d..e632d8afa6 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h @@ -194,18 +194,16 @@ #define TEMP_BED_PIN P0_25_A2 // A2 (T2) - (69) - TEMP_BED_PIN // -// Software SPI pins for TMC2130 stepper drivers +// Default pins for TMC software SPI // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI P1_17 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO P0_05 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK P0_04 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI P1_17 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO P0_05 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK P0_04 #endif #if HAS_TMC_UART diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h index cf12a98aef..c5c5bd3e23 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h @@ -300,16 +300,14 @@ // Hardware SPI is on EXP2. See if you can make it work: // https://github.com/makerbase-mks/MKS-SBASE/issues/25 #define TMC_USE_SW_SPI - #if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI P0_03 // AUX1 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO P0_02 // AUX1 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK P0_26 // TH4 - #endif + #ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI P0_03 // AUX1 + #endif + #ifndef TMC_SPI_MISO + #define TMC_SPI_MISO P0_02 // AUX1 + #endif + #ifndef TMC_SPI_SCK + #define TMC_SPI_SCK P0_26 // TH4 #endif #endif diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h index 4e9f98c852..1f038b4aa0 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h @@ -132,18 +132,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// Default pins for TMC software SPI // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI P4_28 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO P0_05 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK P0_04 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI P4_28 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO P0_05 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK P0_04 #endif #if HAS_TMC_UART diff --git a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h index 9a210e1607..b6ce9c5c05 100644 --- a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h +++ b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h @@ -97,18 +97,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// Default pins for TMC software SPI // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI P1_00 // ETH - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO P1_08 // ETH - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK P1_09 // ETH - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI P1_00 // ETH +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO P1_08 // ETH +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK P1_09 // ETH #endif #if HAS_TMC_UART @@ -119,7 +117,6 @@ * If undefined software serial is used according to the pins below */ - // P2_08 E1-Step // P2_13 E1-Dir diff --git a/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h b/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h index 237dfaec36..e0a3b03109 100644 --- a/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h +++ b/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h @@ -70,16 +70,14 @@ // // Default pins for TMC software SPI // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI P1_16 // Ethernet Expansion - Pin 5 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO P1_17 // Ethernet Expansion - Pin 6 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK P1_08 // Ethernet Expansion - Pin 7 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI P1_16 // Ethernet Expansion - Pin 5 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO P1_17 // Ethernet Expansion - Pin 6 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK P1_08 // Ethernet Expansion - Pin 7 #endif // diff --git a/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h b/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h index ea2e0b7082..122c7462d2 100644 --- a/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h +++ b/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h @@ -87,16 +87,14 @@ // // Default pins for TMC software SPI // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI P1_16 // Ethernet Expansion - Pin 5 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO P1_17 // Ethernet Expansion - Pin 6 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK P1_08 // Ethernet Expansion - Pin 7 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI P1_16 // Ethernet Expansion - Pin 5 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO P1_17 // Ethernet Expansion - Pin 6 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK P1_08 // Ethernet Expansion - Pin 7 #endif // diff --git a/Marlin/src/pins/lpc1769/pins_FLY_CDY.h b/Marlin/src/pins/lpc1769/pins_FLY_CDY.h index ec0b14af90..1c0c21466e 100644 --- a/Marlin/src/pins/lpc1769/pins_FLY_CDY.h +++ b/Marlin/src/pins/lpc1769/pins_FLY_CDY.h @@ -92,18 +92,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// Default pins for TMC software SPI // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI P0_20 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO P0_19 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK P0_21 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI P0_20 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO P0_19 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK P0_21 #endif #if HAS_TMC_UART diff --git a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h index 2f25d8b5fd..5c1b1f5638 100644 --- a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h +++ b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h @@ -146,18 +146,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// Default pins for TMC software SPI // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI P1_16 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO P0_05 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK P0_04 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI P1_16 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO P0_05 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK P0_04 #endif #if HAS_TMC_UART @@ -342,7 +340,7 @@ #define TFT_CS_PIN EXP1_07_PIN #define TFT_DC_PIN EXP1_08_PIN - #define TFT_A0_PIN TFT_DC_PIN + #define TFT_A0_PIN TFT_DC_PIN #define TFT_MISO_PIN EXP2_01_PIN #define TFT_BACKLIGHT_PIN EXP1_03_PIN #define TFT_RESET_PIN EXP1_04_PIN diff --git a/Marlin/src/pins/mega/pins_GT2560_V3_A20.h b/Marlin/src/pins/mega/pins_GT2560_V3_A20.h index 986dd1cb04..c96431141c 100644 --- a/Marlin/src/pins/mega/pins_GT2560_V3_A20.h +++ b/Marlin/src/pins/mega/pins_GT2560_V3_A20.h @@ -30,7 +30,7 @@ #define LCD_PINS_D4 21 #define LCD_PINS_D7 6 -#define SPEAKER // The speaker can produce tones +#define SPEAKER // The speaker can produce tones #if IS_NEWPANEL #define BTN_EN1 16 diff --git a/Marlin/src/pins/mega/pins_GT2560_V4_A20.h b/Marlin/src/pins/mega/pins_GT2560_V4_A20.h index 83a612e67c..c87c11e175 100644 --- a/Marlin/src/pins/mega/pins_GT2560_V4_A20.h +++ b/Marlin/src/pins/mega/pins_GT2560_V4_A20.h @@ -32,7 +32,7 @@ #define LCD_PINS_D4 21 #define LCD_PINS_D7 6 -#define SPEAKER // The speaker can produce tones +#define SPEAKER // The speaker can produce tones #if IS_NEWPANEL #define BTN_EN1 16 diff --git a/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h b/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h index cff3a11af1..0ef1c1d8ae 100644 --- a/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h +++ b/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h @@ -158,9 +158,9 @@ // Heaters / Fans (24V) // -#define HEATER_0_PIN MOSFET_1_PIN // EX1 -#define HEATER_1_PIN MOSFET_3_PIN // EX2 -#define HEATER_BED_PIN MOSFET_5_PIN // HBP +#define HEATER_0_PIN MOSFET_1_PIN // EX1 +#define HEATER_1_PIN MOSFET_3_PIN // EX2 +#define HEATER_BED_PIN MOSFET_5_PIN // HBP // EX1 FAN (Automatic Fans are disabled by default in Configuration_adv.h - comment that out for auto fans) #ifndef E0_AUTO_FAN_PIN diff --git a/Marlin/src/pins/mega/pins_PROTONEER_CNC_SHIELD_V3.h b/Marlin/src/pins/mega/pins_PROTONEER_CNC_SHIELD_V3.h index f2e4d3da02..88d549c8cb 100644 --- a/Marlin/src/pins/mega/pins_PROTONEER_CNC_SHIELD_V3.h +++ b/Marlin/src/pins/mega/pins_PROTONEER_CNC_SHIELD_V3.h @@ -51,16 +51,16 @@ #define Y_STEP_PIN 3 #define Y_DIR_PIN 6 -#define Y_ENABLE_PIN X_ENABLE_PIN +#define Y_ENABLE_PIN X_ENABLE_PIN #define Z_STEP_PIN 4 #define Z_DIR_PIN 7 -#define Z_ENABLE_PIN X_ENABLE_PIN +#define Z_ENABLE_PIN X_ENABLE_PIN // Designated with letter "A" on BOARD #define E0_STEP_PIN 12 #define E0_DIR_PIN 13 -#define E0_ENABLE_PIN X_ENABLE_PIN +#define E0_ENABLE_PIN X_ENABLE_PIN // // Temperature sensors - These could be any analog output not hidden by board diff --git a/Marlin/src/pins/mega/pins_SILVER_GATE.h b/Marlin/src/pins/mega/pins_SILVER_GATE.h index c2ca5b3103..4568ed04e2 100644 --- a/Marlin/src/pins/mega/pins_SILVER_GATE.h +++ b/Marlin/src/pins/mega/pins_SILVER_GATE.h @@ -73,7 +73,7 @@ #define TEMP_BED_PIN 6 #if HAS_WIRED_LCD - #if IS_U8GLIB_ST7920 // SPI GLCD 12864 ST7920 + #if IS_U8GLIB_ST7920 // SPI GLCD 12864 ST7920 #define LCD_PINS_RS 30 #define LCD_PINS_ENABLE 20 #define LCD_PINS_D4 25 diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 6269eecb0b..62ddba06f5 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -530,7 +530,7 @@ #elif MB(MKS_ROBIN_E3D) #include "stm32f1/pins_MKS_ROBIN_E3D.h" // STM32F1 env:mks_robin_e3 #elif MB(MKS_ROBIN_E3D_V1_1) - #include "stm32f1/pins_MKS_ROBIN_E3D_V1_1.h" // STM32F1 env:mks_robin_e3 + #include "stm32f1/pins_MKS_ROBIN_E3D_V1_1.h" // STM32F1 env:mks_robin_e3 env:mks_robin_e3_maple #elif MB(MKS_ROBIN_E3P) #include "stm32f1/pins_MKS_ROBIN_E3P.h" // STM32F1 env:mks_robin_e3p env:mks_robin_e3p_maple #elif MB(BTT_EBB42_V1_1) diff --git a/Marlin/src/pins/pinsDebug_list.h b/Marlin/src/pins/pinsDebug_list.h index 39e07c739a..27f20b92f7 100644 --- a/Marlin/src/pins/pinsDebug_list.h +++ b/Marlin/src/pins/pinsDebug_list.h @@ -489,18 +489,27 @@ REPORT_NAME_DIGITAL(__LINE__, EXP3_10_PIN) #endif -#if _EXISTS(TMC_SW_MISO) - REPORT_NAME_DIGITAL(__LINE__, TMC_SW_MISO) +#if _EXISTS(TMC_SPI_MISO) + REPORT_NAME_DIGITAL(__LINE__, TMC_SPI_MISO) #endif -#if _EXISTS(TMC_SW_MOSI) - REPORT_NAME_DIGITAL(__LINE__, TMC_SW_MOSI) +#if _EXISTS(TMC_SPI_MOSI) + REPORT_NAME_DIGITAL(__LINE__, TMC_SPI_MOSI) #endif -#if _EXISTS(TMC_SW_SCK) - REPORT_NAME_DIGITAL(__LINE__, TMC_SW_SCK) +#if _EXISTS(TMC_SPI_SCK) + REPORT_NAME_DIGITAL(__LINE__, TMC_SPI_SCK) #endif #if _EXISTS(TFTGLCD_CS) REPORT_NAME_DIGITAL(__LINE__, TFTGLCD_CS) #endif +#if _EXISTS(TFTGLCD_SCK) + REPORT_NAME_DIGITAL(__LINE__, TFTGLCD_SCK) +#endif +#if _EXISTS(TFTGLCD_MISO) + REPORT_NAME_DIGITAL(__LINE__, TFTGLCD_MISO) +#endif +#if _EXISTS(TFTGLCD_MOSI) + REPORT_NAME_DIGITAL(__LINE__, TFTGLCD_MOSI) +#endif // // E Multiplexing diff --git a/Marlin/src/pins/ramps/pins_3DRAG.h b/Marlin/src/pins/ramps/pins_3DRAG.h index 1e9d53a6cb..0f90dd5a34 100644 --- a/Marlin/src/pins/ramps/pins_3DRAG.h +++ b/Marlin/src/pins/ramps/pins_3DRAG.h @@ -113,7 +113,7 @@ #define SPINDLE_LASER_PWM_PIN 46 // Hardware PWM #define SPINDLE_LASER_ENA_PIN 62 // Pullup! #define SPINDLE_DIR_PIN 48 - #elif !BOTH(HAS_WIRED_LCD, IS_NEWPANEL) // Use expansion header if no LCD in use + #elif !BOTH(HAS_WIRED_LCD, IS_NEWPANEL) // Use expansion header if no LCD in use #define SPINDLE_LASER_ENA_PIN 16 // Pullup or pulldown! #define SPINDLE_DIR_PIN 17 #if !NUM_SERVOS // Use servo connector if possible diff --git a/Marlin/src/pins/ramps/pins_MKS_GEN_L.h b/Marlin/src/pins/ramps/pins_MKS_GEN_L.h index ca1f133816..dd7f8e5f86 100644 --- a/Marlin/src/pins/ramps/pins_MKS_GEN_L.h +++ b/Marlin/src/pins/ramps/pins_MKS_GEN_L.h @@ -35,12 +35,12 @@ // Heaters / Fans // // Power outputs EFBF or EFBE -#define MOSFET_D_PIN 7 +#define MOSFET_D_PIN 7 // Hotend, Hotend, Bed + Fan on D9 #if FET_ORDER_EEB - #define MOSFET_B_PIN 7 - #define FAN_PIN 9 + #define MOSFET_B_PIN 7 + #define FAN_PIN 9 #endif // @@ -49,11 +49,11 @@ // #ifndef X_CS_PIN - #define X_CS_PIN 59 + #define X_CS_PIN 59 #endif #ifndef Y_CS_PIN - #define Y_CS_PIN 63 + #define Y_CS_PIN 63 #endif #include "pins_RAMPS.h" diff --git a/Marlin/src/pins/ramps/pins_RAMPS.h b/Marlin/src/pins/ramps/pins_RAMPS.h index 4e4ca60583..43780d8d27 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS.h +++ b/Marlin/src/pins/ramps/pins_RAMPS.h @@ -319,16 +319,14 @@ // // TMC software SPI // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI 66 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO 44 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK 64 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI 66 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO 44 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK 64 #endif #if HAS_TMC_UART @@ -877,7 +875,7 @@ #define BEEPER_PIN EXP2_05_PIN - #if ENABLED(PANEL_ONE) // Buttons connect directly to AUX-2 + #if ENABLED(PANEL_ONE) // Buttons connect directly to AUX-2 #define BTN_EN1 AUX2_03_PIN #define BTN_EN2 AUX2_04_PIN #define BTN_ENC AUX3_02_PIN diff --git a/Marlin/src/pins/ramps/pins_RAMPS_S_12.h b/Marlin/src/pins/ramps/pins_RAMPS_S_12.h index f41573b527..8d6a1d337e 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS_S_12.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_S_12.h @@ -218,16 +218,14 @@ // // TMC software SPI // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI 51 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO 50 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK 53 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI 51 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO 50 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK 53 #endif // diff --git a/Marlin/src/pins/ramps/pins_TRIGORILLA_13.h b/Marlin/src/pins/ramps/pins_TRIGORILLA_13.h index 71dfb8c704..6e51a8e974 100644 --- a/Marlin/src/pins/ramps/pins_TRIGORILLA_13.h +++ b/Marlin/src/pins/ramps/pins_TRIGORILLA_13.h @@ -27,17 +27,17 @@ #define BOARD_INFO_NAME "Anycubic RAMPS 1.3" -#define MOSFET_B_PIN 44 +#define MOSFET_B_PIN 44 -#define E1_STEP_PIN -1 -#define E1_DIR_PIN -1 -#define E1_ENABLE_PIN -1 -#define E1_CS_PIN -1 +#define E1_STEP_PIN -1 +#define E1_DIR_PIN -1 +#define E1_ENABLE_PIN -1 +#define E1_CS_PIN -1 -#define FAN2_PIN 9 +#define FAN2_PIN 9 #ifndef E0_AUTO_FAN_PIN - #define E0_AUTO_FAN_PIN 9 + #define E0_AUTO_FAN_PIN 9 #endif #include "pins_RAMPS_13.h" // ... RAMPS diff --git a/Marlin/src/pins/ramps/pins_TT_OSCAR.h b/Marlin/src/pins/ramps/pins_TT_OSCAR.h index f81cc6039a..ecc708b395 100644 --- a/Marlin/src/pins/ramps/pins_TT_OSCAR.h +++ b/Marlin/src/pins/ramps/pins_TT_OSCAR.h @@ -150,16 +150,14 @@ // // Default pins for TMC software SPI // -//#if ENABLED(TMC_USE_SW_SPI) -// #ifndef TMC_SW_MOSI -// #define TMC_SW_MOSI 66 -// #endif -// #ifndef TMC_SW_MISO -// #define TMC_SW_MISO 44 -// #endif -// #ifndef TMC_SW_SCK -// #define TMC_SW_SCK 64 -// #endif +//#ifndef TMC_SPI_MOSI +// #define TMC_SPI_MOSI 66 +//#endif +//#ifndef TMC_SPI_MISO +// #define TMC_SPI_MISO 44 +//#endif +//#ifndef TMC_SPI_SCK +// #define TMC_SPI_SCK 64 //#endif // diff --git a/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h b/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h index b68e3edb45..ad7b859a0c 100644 --- a/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h +++ b/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h @@ -182,16 +182,14 @@ // // TMC software SPI // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI 66 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO 44 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK 64 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI 66 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO 44 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK 64 #endif #if HAS_TMC_UART diff --git a/Marlin/src/pins/sam/pins_ARCHIM2.h b/Marlin/src/pins/sam/pins_ARCHIM2.h index 310dd8e2ac..503b29f15b 100644 --- a/Marlin/src/pins/sam/pins_ARCHIM2.h +++ b/Marlin/src/pins/sam/pins_ARCHIM2.h @@ -145,19 +145,17 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers. +// SPI pins for TMC2130 stepper drivers. // Required for the Archim2 board. // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI 28 // PD3 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO 26 // PD1 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK 27 // PD2 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI 28 // PD3 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO 26 // PD1 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK 27 // PD2 #endif // 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 a3f98e388a..2a84d964ea 100644 --- a/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h +++ b/Marlin/src/pins/samd/pins_BRICOLEMON_LITE_V1_0.h @@ -284,7 +284,6 @@ //#define DOGLCD_SCK 23 //#define DOGLCD_A0 LCD_PINS_DC - #else // Definitions for any standard Display #define LCD_PINS_RS EXP1_04_PIN diff --git a/Marlin/src/pins/samd/pins_MINITRONICS20.h b/Marlin/src/pins/samd/pins_MINITRONICS20.h index 02d806b3ec..da1919cd2b 100644 --- a/Marlin/src/pins/samd/pins_MINITRONICS20.h +++ b/Marlin/src/pins/samd/pins_MINITRONICS20.h @@ -212,9 +212,9 @@ #if ENABLED(CR10_STOCKDISPLAY) // TO TEST - //#define LCD_PINS_RS EXP3_04_PIN - //#define LCD_PINS_ENABLE EXP3_03_PIN - //#define LCD_PINS_D4 EXP3_05_PIN + //#define LCD_PINS_RS EXP3_04_PIN + //#define LCD_PINS_ENABLE EXP3_03_PIN + //#define LCD_PINS_D4 EXP3_05_PIN #if !IS_NEWPANEL // TO TEST @@ -278,7 +278,7 @@ #if IS_RRD_SC - //#define BEEPER_PIN EXP1_01_PIN + //#define BEEPER_PIN EXP1_01_PIN #if ENABLED(CR10_STOCKDISPLAY) // TO TEST @@ -297,7 +297,7 @@ #ifndef SD_DETECT_PIN #define SD_DETECT_PIN EXP2_07_PIN #endif - //#define KILL_PIN EXP2_10_PIN + //#define KILL_PIN EXP2_10_PIN #if ENABLED(BQ_LCD_SMART_CONTROLLER) //#define LCD_BACKLIGHT_PIN EXP1_08_PIN // TO TEST diff --git a/Marlin/src/pins/samd/pins_RAMPS_144.h b/Marlin/src/pins/samd/pins_RAMPS_144.h index 7adb2404c1..e5091e5cdc 100644 --- a/Marlin/src/pins/samd/pins_RAMPS_144.h +++ b/Marlin/src/pins/samd/pins_RAMPS_144.h @@ -164,18 +164,16 @@ #endif // -// TMC software SPI +// TMC SPI // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI 58 // Mega/Due:66 - AGCM4:58 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO 44 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK 56 // Mega/Due:64 - AGCM4:56 - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI 58 // Mega/Due:66 - AGCM4:58 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO 44 +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK 56 // Mega/Due:64 - AGCM4:56 #endif #if HAS_TMC_UART diff --git a/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h b/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h index 3b6297ba4d..6444e2e040 100644 --- a/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h +++ b/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h @@ -153,7 +153,7 @@ #define KILL_PIN 10 #define BEEPER_PIN 27 - #elif IS_U8GLIB_ST7920 // SPI GLCD 12864 ST7920 ( like [www.digole.com] ) For Melzi V2.0 + #elif IS_U8GLIB_ST7920 // SPI GLCD 12864 ST7920 ( like [www.digole.com] ) For Melzi V2.0 #if IS_MELZI #define LCD_PINS_RS 30 // CS chip select /SS chip slave select diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h index 075258991d..5007de25da 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h @@ -94,18 +94,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// SPI pins for TMC2130 stepper drivers // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PB5 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PB4 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PB3 - #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 diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h index c544e1353c..0df70d7292 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h @@ -68,30 +68,29 @@ #define E0_DIR_PIN PB0 #define E0_ENABLE_PIN PC4 -#if ENABLED(TMC_USE_SW_SPI) // Shared with EXP2 - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PB3 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PB4 - #endif - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PB5 - #endif +// Shared with EXP2 +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK PB3 +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO PB4 +#endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI PB5 #endif #if HAS_TMC_UART // Shared with EXP1 - #define X_SERIAL_TX_PIN PC10 - #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN + #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 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 Z_SERIAL_TX_PIN PC12 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #define E0_SERIAL_TX_PIN PC14 - #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN + #define E0_SERIAL_TX_PIN PC14 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 @@ -287,4 +286,4 @@ #define ONBOARD_SPI_DEVICE 1 // SPI1 #define ONBOARD_SD_CS_PIN PA4 // Chip select for "System" SD card -#define SDSS SD_SS_PIN +#define SDSS SD_SS_PIN diff --git a/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h b/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h index c73544bf43..ec4535982e 100644 --- a/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h +++ b/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h @@ -134,7 +134,7 @@ #define EXP1_01_PIN PB5 #define EXP1_02_PIN PB6 #define EXP1_03_PIN PA2 -#define EXP1_04_PIN -1 // RESET +#define EXP1_04_PIN -1 // RESET #define EXP1_05_PIN PA3 #define EXP1_06_PIN PB8 #define EXP1_07_PIN PB7 diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V25S1.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V25S1.h index a0152a5221..b6316c01c6 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V25S1.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V25S1.h @@ -49,8 +49,8 @@ #endif #if ENABLED(IIC_BL24CXX_EEPROM) - #define IIC_EEPROM_SDA PA11 - #define IIC_EEPROM_SCL PA12 + #define IIC_EEPROM_SDA PA11 + #define IIC_EEPROM_SCL PA12 #define MARLIN_EEPROM_SIZE 0x800 // 2K (24C16) #elif EITHER(SDCARD_EEPROM_EMULATION, FLASH_EEPROM_EMULATION) #define MARLIN_EEPROM_SIZE 0x800 // 2K diff --git a/Marlin/src/pins/stm32f1/pins_FLY_MINI.h b/Marlin/src/pins/stm32f1/pins_FLY_MINI.h index f39850f755..c139b4943c 100644 --- a/Marlin/src/pins/stm32f1/pins_FLY_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_FLY_MINI.h @@ -83,16 +83,14 @@ #define E0_CS_PIN PC2 #endif -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI EXP2_06_PIN - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO EXP2_01_PIN - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK EXP2_02_PIN - #endif +#ifndef TMC_SPI_MOSI + #define TMC_SPI_MOSI EXP2_06_PIN +#endif +#ifndef TMC_SPI_MISO + #define TMC_SPI_MISO EXP2_01_PIN +#endif +#ifndef TMC_SPI_SCK + #define TMC_SPI_SCK EXP2_02_PIN #endif #if HAS_TMC_UART @@ -131,23 +129,23 @@ * ------ ------ * EXP1 EXP2 */ -#define EXP1_01_PIN PC14 -#define EXP1_02_PIN PC13 -#define EXP1_03_PIN PB9 -#define EXP1_04_PIN PB8 -#define EXP1_05_PIN PB7 -#define EXP1_06_PIN PB6 -#define EXP1_07_PIN PB5 -#define EXP1_08_PIN PB4 +#define EXP1_01_PIN PC14 +#define EXP1_02_PIN PC13 +#define EXP1_03_PIN PB9 +#define EXP1_04_PIN PB8 +#define EXP1_05_PIN PB7 +#define EXP1_06_PIN PB6 +#define EXP1_07_PIN PB5 +#define EXP1_08_PIN PB4 -#define EXP2_01_PIN PB14 -#define EXP2_02_PIN PB13 -#define EXP2_03_PIN PB3 -#define EXP2_04_PIN PB12 -#define EXP2_05_PIN PD2 -#define EXP2_06_PIN PB15 -#define EXP2_07_PIN PB11 -#define EXP2_08_PIN -1 // RESET +#define EXP2_01_PIN PB14 +#define EXP2_02_PIN PB13 +#define EXP2_03_PIN PB3 +#define EXP2_04_PIN PB12 +#define EXP2_05_PIN PD2 +#define EXP2_06_PIN PB15 +#define EXP2_07_PIN PB11 +#define EXP2_08_PIN -1 // RESET // // LCD / Controller diff --git a/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h b/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h index f157c8e455..9ed3c11560 100644 --- a/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h @@ -64,9 +64,9 @@ // Limit Switches // #define X_MIN_PIN PD6 -#define X_MAX_PIN PG15 // To double check +#define X_MAX_PIN PG15 // To double check #define Y_MIN_PIN PG9 -#define Y_MAX_PIN PG14 // To double check +#define Y_MAX_PIN PG14 // To double check #define Z_MIN_PIN PG10 #define Z_MAX_PIN PG13 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D.h index 77c2b79215..6d88897332 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D.h @@ -50,18 +50,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// SPI pins for TMC2130 stepper drivers // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PB15 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PB14 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PB13 - #endif +#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 #include "pins_MKS_ROBIN_E3_common.h" diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D_V1_1.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D_V1_1.h index 2ad68a0140..89fda7ab67 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D_V1_1.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D_V1_1.h @@ -50,18 +50,17 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// SPI pins for TMC2130 stepper drivers +// Software and hardware actually, they are connected to SPI2 bus. // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PB15 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PB14 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PB13 - #endif +#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 #include "pins_MKS_ROBIN_E3_V1_1_common.h" // ... MKS_ROBIN_E3_common diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h index 89525d93ef..7994089619 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h @@ -112,18 +112,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// SPI pins for TMC2130 stepper drivers // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PD14 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PD1 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PD0 - #endif +#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 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h index 642c97bb11..74780562b6 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h @@ -165,13 +165,13 @@ #define EXP2_05_PIN PB0 #define EXP2_06_PIN PB15 #define EXP2_07_PIN PC10 -#define EXP2_08_PIN -1 // RESET +#define EXP2_08_PIN -1 // RESET // "Ender-3 EXP1" #define EXP3_01_PIN PC1 #define EXP3_02_PIN PC3 #define EXP3_03_PIN PB11 -#define EXP3_04_PIN -1 // RESET +#define EXP3_04_PIN -1 // RESET #define EXP3_05_PIN PB0 #define EXP3_06_PIN PA6 #define EXP3_07_PIN PA5 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h index 8dba943136..bfa6f45120 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h @@ -122,18 +122,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// SPI pins for TMC2130 stepper drivers // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PD14 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PD1 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PD0 - #endif +#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 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h index 048570102b..7373d0d7b5 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h @@ -105,18 +105,16 @@ #define E2_CS_PIN PG9 #endif // -// Software SPI pins for TMC2130 stepper drivers +// SPI pins for TMC2130 stepper drivers // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PB15 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PB14 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PB13 - #endif +#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 diff --git a/Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h b/Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h index ed602d8d01..56200d5096 100644 --- a/Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h +++ b/Marlin/src/pins/stm32f1/pins_PANDA_PI_V29.h @@ -88,18 +88,16 @@ #define E0_DIR_PIN PB14 // -// Software SPI pins for TMC2130 stepper drivers +// SPI pins for TMC2130 stepper drivers // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PB5 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PB4 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PB3 - #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 diff --git a/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h b/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h index 2147dd9b4f..d31885e73d 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h @@ -108,18 +108,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// SPI pins for TMC2130 stepper drivers // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PB15 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PB14 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PB13 - #endif +#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 diff --git a/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h b/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h index fe03ec8983..fe0e1e52f3 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h @@ -202,18 +202,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// SPI pins for TMC2130 stepper drivers // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PG15 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PB6 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PB3 - #endif +#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 @@ -304,9 +302,9 @@ //#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 +#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 diff --git a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h index a25c2339f2..a3bffbce01 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h @@ -260,18 +260,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// 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 +#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 diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h index 78a137b35d..c535edfc1e 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h @@ -172,18 +172,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// SPI pins for TMC2130 stepper drivers // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PC12 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PC11 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PC10 - #endif +#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 @@ -487,7 +485,7 @@ #define DOGLCD_A0 EXP1_06_PIN #define DOGLCD_SCK EXP1_04_PIN #define DOGLCD_MOSI EXP1_02_PIN - #define LCD_BACKLIGHT_PIN -1 + #define LCD_BACKLIGHT_PIN -1 #else diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h index 7ac9156f40..76d06380b4 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h @@ -272,18 +272,16 @@ #endif // SPINDLE_FEATURE || LASER_FEATURE // -// Software SPI pins for TMC2130 stepper drivers +// SPI pins for TMC2130 stepper drivers // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PE14 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PA14 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PE15 - #endif +#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 diff --git a/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h b/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h index 8d5e094122..8d31130d89 100644 --- a/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h +++ b/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h @@ -235,18 +235,16 @@ #endif // -// Trinamic Software SPI +// Trinamic SPI // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_SCK - #define TMC_SW_SCK EXP2_02_PIN - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO EXP2_01_PIN - #endif - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI EXP2_06_PIN - #endif +#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 // diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h b/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h index 031caa1ce1..e650f2840e 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h @@ -43,14 +43,14 @@ #define FLASH_ADDRESS_START 0x8004000 #endif -#define SERVO0_PIN PB1 // BL-TOUCH/PWM +#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 +#define X_STOP_PIN PB4 // X-MIN +#define Y_STOP_PIN PC8 // Y-MIN +#define Z_STOP_PIN PA0 // Z-MIN // // Z Probe @@ -59,7 +59,7 @@ #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 + #define Z_MIN_PROBE_PIN PB1 // BL-TOUCH/PWM repurposed #endif // diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_S6_V2_0.h b/Marlin/src/pins/stm32f4/pins_FYSETC_S6_V2_0.h index a9ce1383d8..a6035c2c6f 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_S6_V2_0.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_S6_V2_0.h @@ -53,19 +53,17 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// SPI pins for TMC2130 stepper drivers // #define TMC_USE_SW_SPI -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PE14 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PE13 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PE12 - #endif +#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" diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h b/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h index 009bfb248d..368f464f86 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h @@ -101,19 +101,17 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// SPI pins for TMC2130 stepper drivers // #define TMC_USE_SW_SPI -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PE14 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PE13 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PE12 - #endif +#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 diff --git a/Marlin/src/pins/stm32f4/pins_LERDGE_K.h b/Marlin/src/pins/stm32f4/pins_LERDGE_K.h index 6c6f8d25ea..0ea7255c17 100644 --- a/Marlin/src/pins/stm32f4/pins_LERDGE_K.h +++ b/Marlin/src/pins/stm32f4/pins_LERDGE_K.h @@ -154,10 +154,10 @@ #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 + //#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 #define TMC_BAUD_RATE 19200 #endif diff --git a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_V1.h b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_V1.h index 50fe790dc3..7d6ea8e039 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_V1.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_V1.h @@ -39,7 +39,7 @@ // // Misc. Functions // -#define PW_DET PC5 // Y+ +#define PW_DET PC5 // Y+ #define PW_OFF PB12 // Z+ #define MT_DET_1_PIN PW_DET #define MT_DET_2_PIN PW_OFF diff --git a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h index 1896cd5441..c8a5b428dc 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8_common.h @@ -126,22 +126,23 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// 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 ENABLED(TMC_USE_SW_SPI) - #if !defined(TMC_SW_MOSI) || TMC_SW_MOSI == -1 - #define TMC_SW_MOSI PE14 - #endif - #if !defined(TMC_SW_MISO) || TMC_SW_MISO == -1 - #define TMC_SW_MISO PE13 - #endif - #if !defined(TMC_SW_SCK) || TMC_SW_SCK == -1 - #define TMC_SW_SCK PE12 - #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 diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h index 32d8a47488..96e19c987f 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h @@ -51,22 +51,23 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// 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 ENABLED(TMC_USE_SW_SPI) - #if !defined(TMC_SW_MOSI) || TMC_SW_MOSI == -1 - #define TMC_SW_MOSI PD14 - #endif - #if !defined(TMC_SW_MISO) || TMC_SW_MISO == -1 - #define TMC_SW_MISO PD1 - #endif - #if !defined(TMC_SW_SCK) || TMC_SW_SCK == -1 - #define TMC_SW_SCK PD0 - #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" diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h index 14b3d66168..daafe8dee4 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h @@ -113,18 +113,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// SPI pins for TMC2130 stepper drivers // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PD14 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PD1 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PD0 - #endif +#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 @@ -238,23 +236,23 @@ * ------ ------ * 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 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 +#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 diff --git a/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h b/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h index 3f0d4e5ee9..ac0b7679c3 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_SKIPR_V1_0.h @@ -191,14 +191,14 @@ #define FAN2_PIN PA0 // Fan2 // -// Software SPI pins for TMC2130 stepper drivers -// This board doesn't support hardware SPI there +// 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_SW_MOSI PE14 - #define TMC_SW_MISO PE13 - #define TMC_SW_SCK PE12 + #define TMC_SPI_MOSI PE14 + #define TMC_SPI_MISO PE13 + #define TMC_SPI_SCK PE12 #endif // diff --git a/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h b/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h index 06bf09402c..cf4720a20c 100644 --- a/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h +++ b/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV3.h @@ -171,9 +171,9 @@ #define MOSI_PIN PB5 #define SCK_PIN PB3 -#define TMC_SW_MISO MISO_PIN -#define TMC_SW_MOSI MOSI_PIN -#define TMC_SW_SCK SCK_PIN +#define TMC_SPI_MISO MISO_PIN +#define TMC_SPI_MOSI MOSI_PIN +#define TMC_SPI_SCK SCK_PIN // // I2C diff --git a/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h b/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h index d16d7b200b..c8da0af894 100644 --- a/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h +++ b/Marlin/src/pins/stm32f4/pins_OPULO_LUMEN_REV4.h @@ -168,9 +168,9 @@ #define MOSI_PIN PB5 #define SCK_PIN PB3 -#define TMC_SW_MISO MISO_PIN -#define TMC_SW_MOSI MOSI_PIN -#define TMC_SW_SCK SCK_PIN +#define TMC_SPI_MISO MISO_PIN +#define TMC_SPI_MOSI MOSI_PIN +#define TMC_SPI_SCK SCK_PIN // // I2C diff --git a/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h b/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h index 12871becbb..264bb91af4 100644 --- a/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h +++ b/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h @@ -91,16 +91,14 @@ #define E2_ENABLE_PIN PD0 #define E2_CS_PIN PD1 -#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 +#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 // 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 3de67ea8d5..138397fa11 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h @@ -81,15 +81,15 @@ // Steppers // #define X_ENABLE_PIN -1 -#define X_STEP_PIN PA10 // Unused. Assigned so Marlin will compile +#define X_STEP_PIN PA10 // Unused. Assigned so Marlin will compile #define X_DIR_PIN -1 #define Y_ENABLE_PIN -1 -#define Y_STEP_PIN PA10 // Unused. Assigned so Marlin will compile +#define Y_STEP_PIN PA10 // Unused. Assigned so Marlin will compile #define Y_DIR_PIN -1 #define Z_ENABLE_PIN -1 -#define Z_STEP_PIN PA10 // Unused. Assigned so Marlin will compile +#define Z_STEP_PIN PA10 // Unused. Assigned so Marlin will compile #define Z_DIR_PIN -1 #define E0_ENABLE_PIN PD2 diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h index 54c2c4c77b..84bf758777 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h @@ -143,18 +143,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// Default pins for TMC software SPI // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PC12 // Shared with SPI header, Pin 5 (SPI3) - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PC11 // Shared with SPI header, Pin 6 (SPI3) - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PC10 // Shared with SPI header, Pin 4 (SPI3) - #endif +#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 diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V1_0.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V1_0.h index 876475f883..7096cfbfbd 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V1_0.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V1_0.h @@ -57,7 +57,7 @@ // #if ENABLED(PROBE_ENABLE_DISABLE) #ifndef PROBE_ENABLE_PIN - #define PROBE_ENABLE_PIN SERVO0_PIN + #define PROBE_ENABLE_PIN SERVO0_PIN #endif #endif @@ -112,18 +112,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// Default pins for TMC software SPI // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PB15 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PB14 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PB13 - #endif +#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 diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h index f4ce5a16d3..59c2b0f97c 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h @@ -79,8 +79,8 @@ // 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) + #define Z_MIN_PROBE_PIN PC13 // PROBE + //#define Z_MIN_PROBE_PIN PC15 // IND-DET (with adjustable pullup set via jumper) #endif // @@ -129,18 +129,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// Default pins for TMC software SPI // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PB15 // Shared with SPI header, Pin 5 (SPI2) - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PB14 // Shared with SPI header, Pin 6 (SPI2) - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PB13 // Shared with SPI header, Pin 4 (SPI2) - #endif +#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 diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h index 6516538c44..631b50d0f2 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h @@ -179,18 +179,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// Default pins for TMC software SPI // -#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 +#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 diff --git a/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h index 80ea354982..9ddd46d6cd 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_OCTOPUS_MAX_EZ.h @@ -273,18 +273,16 @@ #endif // -// Software SPI pins for TMC2130 stepper drivers +// Default pins for TMC software SPI // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PE14 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PE13 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PE12 - #endif +#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 diff --git a/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX_common.h b/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX_common.h index d06e27d9c0..245567c27c 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX_common.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX_common.h @@ -91,18 +91,16 @@ #define E1_CS_PIN PC8 // -// Software SPI pins for TMC2130 stepper drivers +// SPI pins for TMC2130 stepper drivers // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PC6 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PG3 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PC7 - #endif +#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 diff --git a/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h b/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h index 809a1f3f8c..c05ae971cf 100644 --- a/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h +++ b/Marlin/src/pins/stm32h7/pins_BTT_SKR_V3_0_common.h @@ -260,18 +260,16 @@ #endif // SPINDLE_FEATURE || LASER_FEATURE // -// Software SPI pins for TMC2130 stepper drivers +// SPI pins for TMC2130 stepper drivers // -#if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PE13 - #endif - #ifndef TMC_SW_MISO - #define TMC_SW_MISO PE15 - #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PE14 - #endif +#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