Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BigTreeTech SKR E3 Turbo support #19500

Merged
18 changes: 18 additions & 0 deletions Marlin/src/MarlinCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -888,6 +888,24 @@ void stop() {
*/
void setup() {

// TMC Low Power Standby pins need to be set as early as possible or they won't be usable
TERN_(HAS_X_TMC_STDBY,SET_INPUT_PULLDOWN(X_STDBY_PIN));
TERN_(HAS_X2_TMC_STDBY,SET_INPUT_PULLDOWN(X2_STDBY_PIN));
TERN_(HAS_Y_TMC_STDBY,SET_INPUT_PULLDOWN(Y_STDBY_PIN));
TERN_(HAS_Y2_TMC_STDBY,SET_INPUT_PULLDOWN(Y2_STDBY_PIN));
TERN_(HAS_Z_TMC_STDBY,SET_INPUT_PULLDOWN(Z_STDBY_PIN));
TERN_(HAS_Z2_TMC_STDBY,SET_INPUT_PULLDOWN(Z2_STDBY_PIN));
TERN_(HAS_Z3_TMC_STDBY,SET_INPUT_PULLDOWN(Z3_STDBY_PIN));
TERN_(HAS_Z4_TMC_STDBY,SET_INPUT_PULLDOWN(Z4_STDBY_PIN));
TERN_(HAS_E0_TMC_STDBY,SET_INPUT_PULLDOWN(E0_STDBY_PIN));
TERN_(HAS_E1_TMC_STDBY,SET_INPUT_PULLDOWN(E1_STDBY_PIN));
TERN_(HAS_E2_TMC_STDBY,SET_INPUT_PULLDOWN(E2_STDBY_PIN));
TERN_(HAS_E3_TMC_STDBY,SET_INPUT_PULLDOWN(E3_STDBY_PIN));
TERN_(HAS_E4_TMC_STDBY,SET_INPUT_PULLDOWN(E4_STDBY_PIN));
TERN_(HAS_E5_TMC_STDBY,SET_INPUT_PULLDOWN(E5_STDBY_PIN));
TERN_(HAS_E6_TMC_STDBY,SET_INPUT_PULLDOWN(E6_STDBY_PIN));
TERN_(HAS_E7_TMC_STDBY,SET_INPUT_PULLDOWN(E7_STDBY_PIN));

thinkyhead marked this conversation as resolved.
Show resolved Hide resolved
#if ENABLED(MARLIN_DEV_MODE)
auto log_current_ms = [&](PGM_P const msg) {
SERIAL_ECHO_START();
Expand Down
1 change: 1 addition & 0 deletions Marlin/src/core/boards.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@
#define BOARD_BTT_SKR_V1_1 2012 // BigTreeTech SKR v1.1 (Power outputs: Hotend0, Hotend1, Fan, Bed)
#define BOARD_BTT_SKR_V1_3 2013 // BigTreeTech SKR v1.3 (Power outputs: Hotend0, Hotend1, Fan, Bed)
#define BOARD_BTT_SKR_V1_4 2014 // BigTreeTech SKR v1.4 (Power outputs: Hotend0, Hotend1, Fan, Bed)
#define BOARD_BTT_SKR_E3_TURBO 2015 // BigTreeTech SKR E3 Turbo (Power outputs: Hotend0, Hotend1, Fan, Bed)

//
// LPC1769 ARM Cortex M3
Expand Down
48 changes: 48 additions & 0 deletions Marlin/src/inc/Conditionals_post.h
Original file line number Diff line number Diff line change
Expand Up @@ -1336,6 +1336,9 @@
#if PIN_EXISTS(X_MS1)
#define HAS_X_MS_PINS 1
#endif
#if PIN_EXISTS(X_STDBY)
#define HAS_X_TMC_STDBY 1
#endif

#if PIN_EXISTS(X2_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(X2))
#define HAS_X2_ENABLE 1
Expand All @@ -1349,6 +1352,9 @@
#if PIN_EXISTS(X2_MS1)
#define HAS_X2_MS_PINS 1
#endif
#if PIN_EXISTS(X2_STDBY)
#define HAS_X2_TMC_STDBY 1
#endif

#if PIN_EXISTS(Y_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Y))
#define HAS_Y_ENABLE 1
Expand All @@ -1362,6 +1368,9 @@
#if PIN_EXISTS(Y_MS1)
#define HAS_Y_MS_PINS 1
#endif
#if PIN_EXISTS(Y_STDBY)
#define HAS_Y_TMC_STDBY 1
#endif

#if PIN_EXISTS(Y2_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Y2))
#define HAS_Y2_ENABLE 1
Expand All @@ -1375,6 +1384,9 @@
#if PIN_EXISTS(Y2_MS1)
#define HAS_Y2_MS_PINS 1
#endif
#if PIN_EXISTS(Y2_STDBY)
#define HAS_Y2_TMC_STDBY 1
#endif

#if PIN_EXISTS(Z_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z))
#define HAS_Z_ENABLE 1
Expand All @@ -1388,6 +1400,9 @@
#if PIN_EXISTS(Z_MS1)
#define HAS_Z_MS_PINS 1
#endif
#if PIN_EXISTS(Z_STDBY)
#define HAS_Z_TMC_STDBY 1
#endif

#if PIN_EXISTS(Z2_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z2))
#define HAS_Z2_ENABLE 1
Expand All @@ -1401,6 +1416,9 @@
#if PIN_EXISTS(Z2_MS1)
#define HAS_Z2_MS_PINS 1
#endif
#if PIN_EXISTS(Z2_STDBY)
#define HAS_Z2_TMC_STDBY 1
#endif

#if PIN_EXISTS(Z3_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z3))
#define HAS_Z3_ENABLE 1
Expand All @@ -1414,6 +1432,9 @@
#if PIN_EXISTS(Z3_MS1)
#define HAS_Z3_MS_PINS 1
#endif
#if PIN_EXISTS(Z3_STDBY)
#define HAS_Z3_TMC_STDBY 1
#endif

#if PIN_EXISTS(Z4_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z4))
#define HAS_Z4_ENABLE 1
Expand All @@ -1427,6 +1448,9 @@
#if PIN_EXISTS(Z4_MS1)
#define HAS_Z4_MS_PINS 1
#endif
#if PIN_EXISTS(Z4_STDBY)
#define HAS_Z4_TMC_STDBY 1
#endif

// Extruder steppers and solenoids
#if PIN_EXISTS(E0_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E0))
Expand All @@ -1444,6 +1468,9 @@
#if PIN_EXISTS(SOL0)
#define HAS_SOLENOID_0 1
#endif
#if PIN_EXISTS(E0_STDBY)
#define HAS_E0_TMC_STDBY 1
#endif

#if PIN_EXISTS(E1_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E1))
#define HAS_E1_ENABLE 1
Expand All @@ -1460,6 +1487,9 @@
#if PIN_EXISTS(SOL1)
#define HAS_SOLENOID_1 1
#endif
#if PIN_EXISTS(E1_STDBY)
#define HAS_E1_TMC_STDBY 1
#endif

#if PIN_EXISTS(E2_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E2))
#define HAS_E2_ENABLE 1
Expand All @@ -1476,6 +1506,9 @@
#if PIN_EXISTS(SOL2)
#define HAS_SOLENOID_2 1
#endif
#if PIN_EXISTS(E2_STDBY)
#define HAS_E2_TMC_STDBY 1
#endif

#if PIN_EXISTS(E3_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E3))
#define HAS_E3_ENABLE 1
Expand All @@ -1492,6 +1525,9 @@
#if PIN_EXISTS(SOL3)
#define HAS_SOLENOID_3 1
#endif
#if PIN_EXISTS(E3_STDBY)
#define HAS_E3_TMC_STDBY 1
#endif

#if PIN_EXISTS(E4_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E4))
#define HAS_E4_ENABLE 1
Expand All @@ -1508,6 +1544,9 @@
#if PIN_EXISTS(SOL4)
#define HAS_SOLENOID_4 1
#endif
#if PIN_EXISTS(E4_STDBY)
#define HAS_E4_TMC_STDBY 1
#endif

#if PIN_EXISTS(E5_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E5))
#define HAS_E5_ENABLE 1
Expand All @@ -1524,6 +1563,9 @@
#if PIN_EXISTS(SOL5)
#define HAS_SOLENOID_5 1
#endif
#if PIN_EXISTS(E5_STDBY)
#define HAS_E5_TMC_STDBY 1
#endif

#if PIN_EXISTS(E6_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E6))
#define HAS_E6_ENABLE 1
Expand All @@ -1540,6 +1582,9 @@
#if PIN_EXISTS(SOL6)
#define HAS_SOLENOID_6 1
#endif
#if PIN_EXISTS(E6_STDBY)
#define HAS_E6_TMC_STDBY 1
#endif

#if PIN_EXISTS(E7_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E7))
#define HAS_E7_ENABLE 1
Expand All @@ -1556,6 +1601,9 @@
#if PIN_EXISTS(SOL7)
#define HAS_SOLENOID_7 1
#endif
#if PIN_EXISTS(E7_STDBY)
#define HAS_E7_TMC_STDBY 1
#endif

//
// Trinamic Stepper Drivers
Expand Down
Loading