|
|
@ -1323,93 +1323,106 @@
|
|
|
|
// @section tmc_smart
|
|
|
|
// @section tmc_smart
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
|
|
|
|
* To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
|
|
|
|
* the hardware SPI interface on your board and define the required CS pins
|
|
|
|
* connect your SPI pins to the hardware SPI interface on your board and define
|
|
|
|
* in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
|
|
|
|
* the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
|
|
|
|
|
|
|
|
* pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
|
|
|
|
* You may also use software SPI if you wish to use general purpose IO pins.
|
|
|
|
* You may also use software SPI if you wish to use general purpose IO pins.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* To use TMC2208 stepper UART-configurable stepper drivers
|
|
|
|
* To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
|
|
|
|
* connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
|
|
|
|
* to the driver side PDN_UART pin with a 1K resistor.
|
|
|
|
* To use the reading capabilities, also connect #_SERIAL_RX_PIN
|
|
|
|
* To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
|
|
|
|
* to PDN_UART without a resistor.
|
|
|
|
* a resistor.
|
|
|
|
* The drivers can also be used with hardware serial.
|
|
|
|
* The drivers can also be used with hardware serial.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* TMCStepper library is required for connected TMC stepper drivers.
|
|
|
|
* TMCStepper library is required to use TMC stepper drivers.
|
|
|
|
* https://github.com/teemuatlut/TMCStepper
|
|
|
|
* https://github.com/teemuatlut/TMCStepper
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
#if HAS_TRINAMIC
|
|
|
|
#if HAS_TRINAMIC
|
|
|
|
|
|
|
|
|
|
|
|
#define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
|
|
|
|
|
|
|
|
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
|
|
|
|
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
|
|
|
|
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
|
|
|
|
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
|
|
|
|
|
|
|
|
|
|
|
|
#if AXIS_IS_TMC(X)
|
|
|
|
#if AXIS_IS_TMC(X)
|
|
|
|
#define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
|
|
|
|
#define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
|
|
|
|
#define X_MICROSTEPS 16 // 0..256
|
|
|
|
#define X_MICROSTEPS 16 // 0..256
|
|
|
|
|
|
|
|
#define X_RSENSE 0.11
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if AXIS_IS_TMC(X2)
|
|
|
|
#if AXIS_IS_TMC(X2)
|
|
|
|
#define X2_CURRENT 800
|
|
|
|
#define X2_CURRENT 800
|
|
|
|
#define X2_MICROSTEPS 16
|
|
|
|
#define X2_MICROSTEPS 16
|
|
|
|
|
|
|
|
#define X2_RSENSE 0.11
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if AXIS_IS_TMC(Y)
|
|
|
|
#if AXIS_IS_TMC(Y)
|
|
|
|
#define Y_CURRENT 800
|
|
|
|
#define Y_CURRENT 800
|
|
|
|
#define Y_MICROSTEPS 16
|
|
|
|
#define Y_MICROSTEPS 16
|
|
|
|
|
|
|
|
#define Y_RSENSE 0.11
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if AXIS_IS_TMC(Y2)
|
|
|
|
#if AXIS_IS_TMC(Y2)
|
|
|
|
#define Y2_CURRENT 800
|
|
|
|
#define Y2_CURRENT 800
|
|
|
|
#define Y2_MICROSTEPS 16
|
|
|
|
#define Y2_MICROSTEPS 16
|
|
|
|
|
|
|
|
#define Y2_RSENSE 0.11
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if AXIS_IS_TMC(Z)
|
|
|
|
#if AXIS_IS_TMC(Z)
|
|
|
|
#define Z_CURRENT 800
|
|
|
|
#define Z_CURRENT 800
|
|
|
|
#define Z_MICROSTEPS 16
|
|
|
|
#define Z_MICROSTEPS 16
|
|
|
|
|
|
|
|
#define Z_RSENSE 0.11
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if AXIS_IS_TMC(Z2)
|
|
|
|
#if AXIS_IS_TMC(Z2)
|
|
|
|
#define Z2_CURRENT 800
|
|
|
|
#define Z2_CURRENT 800
|
|
|
|
#define Z2_MICROSTEPS 16
|
|
|
|
#define Z2_MICROSTEPS 16
|
|
|
|
|
|
|
|
#define Z2_RSENSE 0.11
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if AXIS_IS_TMC(Z3)
|
|
|
|
#if AXIS_IS_TMC(Z3)
|
|
|
|
#define Z3_CURRENT 800
|
|
|
|
#define Z3_CURRENT 800
|
|
|
|
#define Z3_MICROSTEPS 16
|
|
|
|
#define Z3_MICROSTEPS 16
|
|
|
|
|
|
|
|
#define Z3_RSENSE 0.11
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if AXIS_IS_TMC(E0)
|
|
|
|
#if AXIS_IS_TMC(E0)
|
|
|
|
#define E0_CURRENT 800
|
|
|
|
#define E0_CURRENT 800
|
|
|
|
#define E0_MICROSTEPS 16
|
|
|
|
#define E0_MICROSTEPS 16
|
|
|
|
|
|
|
|
#define E0_RSENSE 0.11
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if AXIS_IS_TMC(E1)
|
|
|
|
#if AXIS_IS_TMC(E1)
|
|
|
|
#define E1_CURRENT 800
|
|
|
|
#define E1_CURRENT 800
|
|
|
|
#define E1_MICROSTEPS 16
|
|
|
|
#define E1_MICROSTEPS 16
|
|
|
|
|
|
|
|
#define E1_RSENSE 0.11
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if AXIS_IS_TMC(E2)
|
|
|
|
#if AXIS_IS_TMC(E2)
|
|
|
|
#define E2_CURRENT 800
|
|
|
|
#define E2_CURRENT 800
|
|
|
|
#define E2_MICROSTEPS 16
|
|
|
|
#define E2_MICROSTEPS 16
|
|
|
|
|
|
|
|
#define E2_RSENSE 0.11
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if AXIS_IS_TMC(E3)
|
|
|
|
#if AXIS_IS_TMC(E3)
|
|
|
|
#define E3_CURRENT 800
|
|
|
|
#define E3_CURRENT 800
|
|
|
|
#define E3_MICROSTEPS 16
|
|
|
|
#define E3_MICROSTEPS 16
|
|
|
|
|
|
|
|
#define E3_RSENSE 0.11
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if AXIS_IS_TMC(E4)
|
|
|
|
#if AXIS_IS_TMC(E4)
|
|
|
|
#define E4_CURRENT 800
|
|
|
|
#define E4_CURRENT 800
|
|
|
|
#define E4_MICROSTEPS 16
|
|
|
|
#define E4_MICROSTEPS 16
|
|
|
|
|
|
|
|
#define E4_RSENSE 0.11
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if AXIS_IS_TMC(E5)
|
|
|
|
#if AXIS_IS_TMC(E5)
|
|
|
|
#define E5_CURRENT 800
|
|
|
|
#define E5_CURRENT 800
|
|
|
|
#define E5_MICROSTEPS 16
|
|
|
|
#define E5_MICROSTEPS 16
|
|
|
|
|
|
|
|
#define E5_RSENSE 0.11
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Override default SPI pins for TMC2130 and TMC2660 drivers here.
|
|
|
|
* 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.
|
|
|
|
* The default pins can be found in your board's pins file.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
//#define X_CS_PIN -1
|
|
|
|
//#define X_CS_PIN -1
|
|
|
@ -1428,6 +1441,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Use software SPI for TMC2130.
|
|
|
|
* Use software SPI for TMC2130.
|
|
|
|
|
|
|
|
* Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
|
|
|
|
* The default SW SPI pins are defined the respective pins files,
|
|
|
|
* The default SW SPI pins are defined the respective pins files,
|
|
|
|
* but you can override or define them here.
|
|
|
|
* but you can override or define them here.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -1445,6 +1459,7 @@
|
|
|
|
//#define SOFTWARE_DRIVER_ENABLE
|
|
|
|
//#define SOFTWARE_DRIVER_ENABLE
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
|
|
|
|
* TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
|
|
|
|
* Use Trinamic's ultra quiet stepping mode.
|
|
|
|
* Use Trinamic's ultra quiet stepping mode.
|
|
|
|
* When disabled, Marlin will use spreadCycle stepping mode.
|
|
|
|
* When disabled, Marlin will use spreadCycle stepping mode.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -1469,7 +1484,7 @@
|
|
|
|
#define CHOPPER_TIMING { 4, -2, 1 }
|
|
|
|
#define CHOPPER_TIMING { 4, -2, 1 }
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
|
|
|
|
* Monitor Trinamic drivers for error conditions,
|
|
|
|
* like overtemperature and short to ground. TMC2208 requires hardware serial.
|
|
|
|
* like overtemperature and short to ground. TMC2208 requires hardware serial.
|
|
|
|
* In the case of overtemperature Marlin can decrease the driver current until error condition clears.
|
|
|
|
* In the case of overtemperature Marlin can decrease the driver current until error condition clears.
|
|
|
|
* Other detected conditions can be used to stop the current print.
|
|
|
|
* Other detected conditions can be used to stop the current print.
|
|
|
@ -1488,6 +1503,7 @@
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
|
|
|
|
* TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
|
|
|
|
* The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
|
|
|
|
* The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
|
|
|
|
* This mode allows for faster movements at the expense of higher noise levels.
|
|
|
|
* This mode allows for faster movements at the expense of higher noise levels.
|
|
|
|
* STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
|
|
|
|
* STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
|
|
|
@ -1510,6 +1526,7 @@
|
|
|
|
#define E5_HYBRID_THRESHOLD 30
|
|
|
|
#define E5_HYBRID_THRESHOLD 30
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
|
|
|
|
* TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
|
|
|
|
* Use StallGuard2 to sense an obstacle and trigger an endstop.
|
|
|
|
* Use StallGuard2 to sense an obstacle and trigger an endstop.
|
|
|
|
* Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
|
|
|
|
* Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
|
|
|
|
* X, Y, and Z homing will always be done in spreadCycle mode.
|
|
|
|
* X, Y, and Z homing will always be done in spreadCycle mode.
|
|
|
|