Prevent name conflicts with mixed stepper drivers

This commit is contained in:
Scott Lahteine 2019-01-24 01:22:45 -06:00
parent 2b54e98f50
commit ae91914260
68 changed files with 14212 additions and 8976 deletions

View file

@ -1237,57 +1237,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1314,44 +1340,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1521,84 +1573,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1623,8 +1702,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1237,57 +1237,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1314,44 +1340,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1521,84 +1573,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1623,8 +1702,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1237,57 +1237,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1314,44 +1340,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1521,84 +1573,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1623,8 +1702,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1236,57 +1236,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1313,44 +1339,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1520,84 +1572,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1622,8 +1701,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1236,57 +1236,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1313,44 +1339,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1520,84 +1572,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1622,8 +1701,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1236,57 +1236,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1313,44 +1339,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1520,84 +1572,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1622,8 +1701,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1235,57 +1235,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1312,44 +1338,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1519,84 +1571,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1621,8 +1700,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1236,57 +1236,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1313,44 +1339,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1520,84 +1572,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1622,8 +1701,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1241,57 +1241,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1318,44 +1344,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1525,84 +1577,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1627,8 +1706,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1235,57 +1235,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1312,44 +1338,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1519,84 +1571,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1621,8 +1700,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1236,57 +1236,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1313,44 +1339,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1520,84 +1572,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1622,8 +1701,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1236,57 +1236,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1313,44 +1339,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1520,84 +1572,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1622,8 +1701,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1244,57 +1244,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1321,44 +1347,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1528,84 +1580,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1630,8 +1709,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1236,57 +1236,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1313,44 +1339,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1520,84 +1572,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1622,8 +1701,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1236,57 +1236,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1313,44 +1339,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1520,84 +1572,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1622,8 +1701,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1236,57 +1236,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1313,44 +1339,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1520,84 +1572,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1622,8 +1701,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1236,57 +1236,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1313,44 +1339,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1520,84 +1572,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1622,8 +1701,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1236,57 +1236,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1313,44 +1339,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1520,84 +1572,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1622,8 +1701,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1236,57 +1236,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1313,44 +1339,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1520,84 +1572,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1622,8 +1701,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1236,57 +1236,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1313,44 +1339,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1520,84 +1572,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1622,8 +1701,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1236,57 +1236,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1313,44 +1339,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1520,84 +1572,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1622,8 +1701,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1236,57 +1236,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1313,44 +1339,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1520,84 +1572,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1622,8 +1701,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1236,57 +1236,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1313,44 +1339,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1520,84 +1572,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1622,8 +1701,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1236,57 +1236,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1313,44 +1339,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1520,84 +1572,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1622,8 +1701,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1235,57 +1235,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1312,44 +1338,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1519,84 +1571,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1621,8 +1700,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1236,57 +1236,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1313,44 +1339,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1520,84 +1572,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1622,8 +1701,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1238,57 +1238,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1315,44 +1341,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1522,84 +1574,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1624,8 +1703,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1241,57 +1241,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1318,44 +1344,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1525,84 +1577,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1627,8 +1706,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1241,57 +1241,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1318,44 +1344,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1525,84 +1577,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1627,8 +1706,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1237,57 +1237,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1314,44 +1340,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1521,84 +1573,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1623,8 +1702,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1236,57 +1236,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1313,44 +1339,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1520,84 +1572,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1622,8 +1701,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1236,57 +1236,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1313,44 +1339,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1520,84 +1572,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1622,8 +1701,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1236,57 +1236,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1313,44 +1339,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1520,84 +1572,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1622,8 +1701,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1236,57 +1236,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1313,44 +1339,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1520,84 +1572,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1622,8 +1701,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1236,57 +1236,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1313,44 +1339,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1520,84 +1572,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1622,8 +1701,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1236,57 +1236,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1313,44 +1339,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1520,84 +1572,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1622,8 +1701,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1236,57 +1236,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1313,44 +1339,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1520,84 +1572,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1622,8 +1701,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1236,57 +1236,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1313,44 +1339,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1520,84 +1572,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1622,8 +1701,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1237,57 +1237,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1314,44 +1340,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1521,84 +1573,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1623,8 +1702,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1244,57 +1244,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1321,44 +1347,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1528,84 +1580,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1630,8 +1709,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1237,57 +1237,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1314,44 +1340,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1521,84 +1573,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1623,8 +1702,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1236,57 +1236,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1313,44 +1339,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1520,84 +1572,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1622,8 +1701,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1236,57 +1236,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1313,44 +1339,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1520,84 +1572,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1622,8 +1701,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1236,57 +1236,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1313,44 +1339,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1520,84 +1572,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1622,8 +1701,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1236,57 +1236,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1313,44 +1339,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1520,84 +1572,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1622,8 +1701,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1236,57 +1236,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1313,44 +1339,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1520,84 +1572,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1622,8 +1701,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1236,57 +1236,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1313,44 +1339,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1520,84 +1572,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1622,8 +1701,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1237,57 +1237,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1314,44 +1340,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1521,84 +1573,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1623,8 +1702,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1236,57 +1236,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1313,44 +1339,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1520,84 +1572,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1622,8 +1701,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1237,57 +1237,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1314,44 +1340,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1521,84 +1573,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1623,8 +1702,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1249,57 +1249,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1326,44 +1352,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1533,84 +1585,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1635,8 +1714,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1236,57 +1236,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1313,44 +1339,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1520,84 +1572,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1622,8 +1701,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1237,57 +1237,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1314,44 +1340,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1521,84 +1573,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1623,8 +1702,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1238,57 +1238,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1315,44 +1341,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1522,84 +1574,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1624,8 +1703,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1238,57 +1238,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1315,44 +1341,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1522,84 +1574,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1624,8 +1703,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1238,57 +1238,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1315,44 +1341,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1522,84 +1574,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1624,8 +1703,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1238,57 +1238,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1315,44 +1341,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1522,84 +1574,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1624,8 +1703,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1238,57 +1238,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1315,44 +1341,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1522,84 +1574,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1624,8 +1703,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1239,57 +1239,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1316,44 +1342,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1523,84 +1575,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1625,8 +1704,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1238,57 +1238,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1315,44 +1341,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1522,84 +1574,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1624,8 +1703,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1238,57 +1238,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1315,44 +1341,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1522,84 +1574,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1624,8 +1703,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1238,57 +1238,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1315,44 +1341,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1522,84 +1574,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1624,8 +1703,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1238,57 +1238,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1315,44 +1341,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1522,84 +1574,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1624,8 +1703,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1238,57 +1238,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1315,44 +1341,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1522,84 +1574,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1624,8 +1703,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1236,57 +1236,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1313,44 +1339,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1520,84 +1572,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1622,8 +1701,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1236,57 +1236,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1313,44 +1339,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1520,84 +1572,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1622,8 +1701,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1236,57 +1236,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1313,44 +1339,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1520,84 +1572,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1622,8 +1701,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**

View file

@ -1237,57 +1237,83 @@
*/ */
#if HAS_DRIVER(TMC26X) #if HAS_DRIVER(TMC26X)
#define X_MAX_CURRENT 1000 // in mA #if AXIS_DRIVER_TYPE_X(TMC26X)
#define X_SENSE_RESISTOR 91 // in mOhms #define X_MAX_CURRENT 1000 // (mA)
#define X_MICROSTEPS 16 // number of microsteps #define X_SENSE_RESISTOR 91 // (mOhms)
#define X_MICROSTEPS 16 // Number of microsteps
#endif
#define X2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_X2(TMC26X)
#define X2_SENSE_RESISTOR 91 #define X2_MAX_CURRENT 1000
#define X2_MICROSTEPS 16 #define X2_SENSE_RESISTOR 91
#define X2_MICROSTEPS 16
#endif
#define Y_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y(TMC26X)
#define Y_SENSE_RESISTOR 91 #define Y_MAX_CURRENT 1000
#define Y_MICROSTEPS 16 #define Y_SENSE_RESISTOR 91
#define Y_MICROSTEPS 16
#endif
#define Y2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Y2(TMC26X)
#define Y2_SENSE_RESISTOR 91 #define Y2_MAX_CURRENT 1000
#define Y2_MICROSTEPS 16 #define Y2_SENSE_RESISTOR 91
#define Y2_MICROSTEPS 16
#endif
#define Z_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z(TMC26X)
#define Z_SENSE_RESISTOR 91 #define Z_MAX_CURRENT 1000
#define Z_MICROSTEPS 16 #define Z_SENSE_RESISTOR 91
#define Z_MICROSTEPS 16
#endif
#define Z2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z2(TMC26X)
#define Z2_SENSE_RESISTOR 91 #define Z2_MAX_CURRENT 1000
#define Z2_MICROSTEPS 16 #define Z2_SENSE_RESISTOR 91
#define Z2_MICROSTEPS 16
#endif
#define Z3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_Z3(TMC26X)
#define Z3_SENSE_RESISTOR 91 #define Z3_MAX_CURRENT 1000
#define Z3_MICROSTEPS 16 #define Z3_SENSE_RESISTOR 91
#define Z3_MICROSTEPS 16
#endif
#define E0_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E0(TMC26X)
#define E0_SENSE_RESISTOR 91 #define E0_MAX_CURRENT 1000
#define E0_MICROSTEPS 16 #define E0_SENSE_RESISTOR 91
#define E0_MICROSTEPS 16
#endif
#define E1_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E1(TMC26X)
#define E1_SENSE_RESISTOR 91 #define E1_MAX_CURRENT 1000
#define E1_MICROSTEPS 16 #define E1_SENSE_RESISTOR 91
#define E1_MICROSTEPS 16
#endif
#define E2_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E2(TMC26X)
#define E2_SENSE_RESISTOR 91 #define E2_MAX_CURRENT 1000
#define E2_MICROSTEPS 16 #define E2_SENSE_RESISTOR 91
#define E2_MICROSTEPS 16
#endif
#define E3_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E3(TMC26X)
#define E3_SENSE_RESISTOR 91 #define E3_MAX_CURRENT 1000
#define E3_MICROSTEPS 16 #define E3_SENSE_RESISTOR 91
#define E3_MICROSTEPS 16
#endif
#define E4_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E4(TMC26X)
#define E4_SENSE_RESISTOR 91 #define E4_MAX_CURRENT 1000
#define E4_MICROSTEPS 16 #define E4_SENSE_RESISTOR 91
#define E4_MICROSTEPS 16
#endif
#define E5_MAX_CURRENT 1000 #if AXIS_DRIVER_TYPE_E5(TMC26X)
#define E5_SENSE_RESISTOR 91 #define E5_MAX_CURRENT 1000
#define E5_MICROSTEPS 16 #define E5_SENSE_RESISTOR 91
#define E5_MICROSTEPS 16
#endif
#endif // TMC26X #endif // TMC26X
@ -1314,44 +1340,70 @@
#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
#define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #if AXIS_IS_TMC(X)
#define X_MICROSTEPS 16 // 0..256 #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
#define X_MICROSTEPS 16 // 0..256
#endif
#define Y_CURRENT 800 #if AXIS_IS_TMC(X2)
#define Y_MICROSTEPS 16 #define X2_CURRENT 800
#define X2_MICROSTEPS 16
#endif
#define Z_CURRENT 800 #if AXIS_IS_TMC(Y)
#define Z_MICROSTEPS 16 #define Y_CURRENT 800
#define Y_MICROSTEPS 16
#endif
#define X2_CURRENT 800 #if AXIS_IS_TMC(Y2)
#define X2_MICROSTEPS 16 #define Y2_CURRENT 800
#define Y2_MICROSTEPS 16
#endif
#define Y2_CURRENT 800 #if AXIS_IS_TMC(Z)
#define Y2_MICROSTEPS 16 #define Z_CURRENT 800
#define Z_MICROSTEPS 16
#endif
#define Z2_CURRENT 800 #if AXIS_IS_TMC(Z2)
#define Z2_MICROSTEPS 16 #define Z2_CURRENT 800
#define Z2_MICROSTEPS 16
#endif
#define Z3_CURRENT 800 #if AXIS_IS_TMC(Z3)
#define Z3_MICROSTEPS 16 #define Z3_CURRENT 800
#define Z3_MICROSTEPS 16
#endif
#define E0_CURRENT 800 #if AXIS_IS_TMC(E0)
#define E0_MICROSTEPS 16 #define E0_CURRENT 800
#define E0_MICROSTEPS 16
#endif
#define E1_CURRENT 800 #if AXIS_IS_TMC(E1)
#define E1_MICROSTEPS 16 #define E1_CURRENT 800
#define E1_MICROSTEPS 16
#endif
#define E2_CURRENT 800 #if AXIS_IS_TMC(E2)
#define E2_MICROSTEPS 16 #define E2_CURRENT 800
#define E2_MICROSTEPS 16
#endif
#define E3_CURRENT 800 #if AXIS_IS_TMC(E3)
#define E3_MICROSTEPS 16 #define E3_CURRENT 800
#define E3_MICROSTEPS 16
#endif
#define E4_CURRENT 800 #if AXIS_IS_TMC(E4)
#define E4_MICROSTEPS 16 #define E4_CURRENT 800
#define E4_MICROSTEPS 16
#endif
#define E5_CURRENT 800 #if AXIS_IS_TMC(E5)
#define E5_MICROSTEPS 16 #define E5_CURRENT 800
#define E5_MICROSTEPS 16
#endif
/** /**
* Override default SPI pins for TMC2130 and TMC2660 drivers here. * Override default SPI pins for TMC2130 and TMC2660 drivers here.
@ -1521,84 +1573,111 @@
*/ */
#if HAS_DRIVER(L6470) #if HAS_DRIVER(L6470)
#define X_MICROSTEPS 128 // number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128 & 128) //#define L6470_CHITCHAT // Display additional status info
#define X_OVERCURRENT 2000 // current in mA where the driver will detect an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X_MAX_VOLTAGE 127 // 0-255, max effective voltage seen by stepper
#define X_CHAIN_POS 0 // position in SPI chain, 0 - not in chain, 1- nearest MOSI
#define X2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X(L6470)
#define X2_OVERCURRENT 2000 #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
#define X2_STALLCURRENT 1500 #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
#define X2_MAX_VOLTAGE 127 #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
#define X2_CHAIN_POS 0 #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
#define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
#endif
#define Y_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_X2(L6470)
#define Y_OVERCURRENT 2000 #define X2_MICROSTEPS 128
#define Y_STALLCURRENT 1500 #define X2_OVERCURRENT 2000
#define Y_MAX_VOLTAGE 127 #define X2_STALLCURRENT 1500
#define Y_CHAIN_POS 0 #define X2_MAX_VOLTAGE 127
#define X2_CHAIN_POS 0
#endif
#define Y2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y(L6470)
#define Y2_OVERCURRENT 2000 #define Y_MICROSTEPS 128
#define Y2_STALLCURRENT 1500 #define Y_OVERCURRENT 2000
#define Y2_MAX_VOLTAGE 127 #define Y_STALLCURRENT 1500
#define Y2_CHAIN_POS 0 #define Y_MAX_VOLTAGE 127
#define Y_CHAIN_POS 0
#endif
#define Z_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Y2(L6470)
#define Z_OVERCURRENT 2000 #define Y2_MICROSTEPS 128
#define Z_STALLCURRENT 1500 #define Y2_OVERCURRENT 2000
#define Z_MAX_VOLTAGE 127 #define Y2_STALLCURRENT 1500
#define Z_CHAIN_POS 0 #define Y2_MAX_VOLTAGE 127
#define Y2_CHAIN_POS 0
#endif
#define Z2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z(L6470)
#define Z2_OVERCURRENT 2000 #define Z_MICROSTEPS 128
#define Z2_STALLCURRENT 1500 #define Z_OVERCURRENT 2000
#define Z2_MAX_VOLTAGE 127 #define Z_STALLCURRENT 1500
#define Z2_CHAIN_POS 0 #define Z_MAX_VOLTAGE 127
#define Z_CHAIN_POS 0
#endif
#define Z3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z2(L6470)
#define Z3_OVERCURRENT 2000 #define Z2_MICROSTEPS 128
#define Z3_STALLCURRENT 1500 #define Z2_OVERCURRENT 2000
#define Z3_MAX_VOLTAGE 127 #define Z2_STALLCURRENT 1500
#define Z3_CHAIN_POS 0 #define Z2_MAX_VOLTAGE 127
#define Z2_CHAIN_POS 0
#endif
#define E0_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_Z3(L6470)
#define E0_OVERCURRENT 2000 #define Z3_MICROSTEPS 128
#define E0_STALLCURRENT 1500 #define Z3_OVERCURRENT 2000
#define E0_MAX_VOLTAGE 127 #define Z3_STALLCURRENT 1500
#define E0_CHAIN_POS 0 #define Z3_MAX_VOLTAGE 127
#define Z3_CHAIN_POS 0
#endif
#define E1_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E0(L6470)
#define E1_OVERCURRENT 2000 #define E0_MICROSTEPS 128
#define E1_STALLCURRENT 1500 #define E0_OVERCURRENT 2000
#define E1_MAX_VOLTAGE 127 #define E0_STALLCURRENT 1500
#define E1_CHAIN_POS 0 #define E0_MAX_VOLTAGE 127
#define E0_CHAIN_POS 0
#endif
#define E2_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E1(L6470)
#define E2_OVERCURRENT 2000 #define E1_MICROSTEPS 128
#define E2_STALLCURRENT 1500 #define E1_OVERCURRENT 2000
#define E2_MAX_VOLTAGE 127 #define E1_STALLCURRENT 1500
#define E2_CHAIN_POS 0 #define E1_MAX_VOLTAGE 127
#define E1_CHAIN_POS 0
#endif
#define E3_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E2(L6470)
#define E3_OVERCURRENT 2000 #define E2_MICROSTEPS 128
#define E3_STALLCURRENT 1500 #define E2_OVERCURRENT 2000
#define E3_MAX_VOLTAGE 127 #define E2_STALLCURRENT 1500
#define E3_CHAIN_POS 0 #define E2_MAX_VOLTAGE 127
#define E2_CHAIN_POS 0
#endif
#define E4_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E3(L6470)
#define E4_OVERCURRENT 2000 #define E3_MICROSTEPS 128
#define E4_STALLCURRENT 1500 #define E3_OVERCURRENT 2000
#define E4_MAX_VOLTAGE 127 #define E3_STALLCURRENT 1500
#define E4_CHAIN_POS 0 #define E3_MAX_VOLTAGE 127
#define E3_CHAIN_POS 0
#endif
#define E5_MICROSTEPS 128 #if AXIS_DRIVER_TYPE_E4(L6470)
#define E5_OVERCURRENT 2000 #define E4_MICROSTEPS 128
#define E5_STALLCURRENT 1500 #define E4_OVERCURRENT 2000
#define E5_MAX_VOLTAGE 127 #define E4_STALLCURRENT 1500
#define E5_CHAIN_POS 0 #define E4_MAX_VOLTAGE 127
#define E4_CHAIN_POS 0
#endif
#if AXIS_DRIVER_TYPE_E5(L6470)
#define E5_MICROSTEPS 128
#define E5_OVERCURRENT 2000
#define E5_STALLCURRENT 1500
#define E5_MAX_VOLTAGE 127
#define E5_CHAIN_POS 0
#endif
/** /**
* Monitor L6470 drivers for error conditions like over temperature and over current. * Monitor L6470 drivers for error conditions like over temperature and over current.
@ -1623,8 +1702,6 @@
//#define L6470_STOP_ON_ERROR //#define L6470_STOP_ON_ERROR
#endif #endif
#define L6470_CHITCHAT // enable display of additional status info
#endif // L6470 #endif // L6470
/** /**