From cdc61ebf53e81137a00cd010549123fcd0594f09 Mon Sep 17 00:00:00 2001 From: teemuatlut Date: Fri, 29 Dec 2017 21:47:41 +0200 Subject: [PATCH] Add M915 configuration option --- Marlin/Configuration_adv.h | 14 ++ Marlin/src/config/default/Configuration_adv.h | 14 ++ .../AlephObjects/TAZ4/Configuration_adv.h | 14 ++ .../examples/Anet/A6/Configuration_adv.h | 14 ++ .../examples/Anet/A8/Configuration_adv.h | 14 ++ .../examples/Azteeg/X5GT/Configuration_adv.h | 14 ++ .../examples/BQ/Hephestos/Configuration_adv.h | 14 ++ .../BQ/Hephestos_2/Configuration_adv.h | 14 ++ .../examples/BQ/WITBOX/Configuration_adv.h | 14 ++ .../examples/Cartesio/Configuration_adv.h | 14 ++ .../Creality/CR-10/Configuration_adv.h | 14 ++ .../config/examples/Felix/Configuration_adv.h | 14 ++ .../FolgerTech/i3-2020/Configuration_adv.h | 14 ++ .../Infitary/i3-M508/Configuration_adv.h | 14 ++ .../examples/MakerParts/Configuration_adv.h | 129 ++++++++++++------ .../examples/Malyan/M150/Configuration_adv.h | 14 ++ .../examples/Malyan/M200/Configuration_adv.h | 14 ++ .../Micromake/C1/enhanced/Configuration_adv.h | 14 ++ .../examples/Mks/Sbase/Configuration_adv.h | 14 ++ .../examples/RigidBot/Configuration_adv.h | 14 ++ .../config/examples/SCARA/Configuration_adv.h | 14 ++ .../examples/Sanguinololu/Configuration_adv.h | 14 ++ .../examples/TinyBoy2/Configuration_adv.h | 14 ++ .../UltiMachine/Archim2/Configuration_adv.h | 14 ++ .../Velleman/K8200/Configuration_adv.h | 14 ++ .../Velleman/K8400/Configuration_adv.h | 14 ++ .../Wanhao/Duplicator 6/Configuration_adv.h | 14 ++ .../FLSUN/auto_calibrate/Configuration_adv.h | 14 ++ .../FLSUN/kossel_mini/Configuration_adv.h | 14 ++ .../delta/generic/Configuration_adv.h | 14 ++ .../delta/kossel_mini/Configuration_adv.h | 14 ++ .../delta/kossel_pro/Configuration_adv.h | 14 ++ .../delta/kossel_xl/Configuration_adv.h | 14 ++ .../gCreate/gMax1.5+/Configuration_adv.h | 14 ++ .../examples/makibox/Configuration_adv.h | 14 ++ .../tvrrug/Round2/Configuration_adv.h | 14 ++ .../config/examples/wt150/Configuration_adv.h | 14 ++ 37 files changed, 590 insertions(+), 43 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 8cc0eb4b33..391c12d9d5 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1148,6 +1148,20 @@ */ //#define TMC_DEBUG + /* + * Enable M915 Z axis calibration. + * Marlin will first adjust Z stepper current and then drive + * the Z axis to its' physical maximum. Finally it will home + * the Z axis to account for the lost steps. Use + * M915 S### to specify the current and + * M925 Z## to specify the extra Z height that's added to Z_MAX_POS. + */ + //#define TMC_Z_CALIBRATION + #if ENABLED(TMC_Z_CALIBRATION) + #define CALIBRATION_CURRENT 250 + #define CALIBRATION_EXTRA_HEIGHT 10 + #endif + /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page diff --git a/Marlin/src/config/default/Configuration_adv.h b/Marlin/src/config/default/Configuration_adv.h index 8cc0eb4b33..391c12d9d5 100644 --- a/Marlin/src/config/default/Configuration_adv.h +++ b/Marlin/src/config/default/Configuration_adv.h @@ -1148,6 +1148,20 @@ */ //#define TMC_DEBUG + /* + * Enable M915 Z axis calibration. + * Marlin will first adjust Z stepper current and then drive + * the Z axis to its' physical maximum. Finally it will home + * the Z axis to account for the lost steps. Use + * M915 S### to specify the current and + * M925 Z## to specify the extra Z height that's added to Z_MAX_POS. + */ + //#define TMC_Z_CALIBRATION + #if ENABLED(TMC_Z_CALIBRATION) + #define CALIBRATION_CURRENT 250 + #define CALIBRATION_EXTRA_HEIGHT 10 + #endif + /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h index c5a67c631b..a7793b41a0 100644 --- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h +++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h @@ -1148,6 +1148,20 @@ */ //#define TMC_DEBUG + /* + * Enable M915 Z axis calibration. + * Marlin will first adjust Z stepper current and then drive + * the Z axis to its' physical maximum. Finally it will home + * the Z axis to account for the lost steps. Use + * M915 S### to specify the current and + * M925 Z## to specify the extra Z height that's added to Z_MAX_POS. + */ + //#define TMC_Z_CALIBRATION + #if ENABLED(TMC_Z_CALIBRATION) + #define CALIBRATION_CURRENT 250 + #define CALIBRATION_EXTRA_HEIGHT 10 + #endif + /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page diff --git a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h index f0ddf90ee9..8bcc41e82c 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h @@ -1148,6 +1148,20 @@ */ //#define TMC_DEBUG + /* + * Enable M915 Z axis calibration. + * Marlin will first adjust Z stepper current and then drive + * the Z axis to its' physical maximum. Finally it will home + * the Z axis to account for the lost steps. Use + * M915 S### to specify the current and + * M925 Z## to specify the extra Z height that's added to Z_MAX_POS. + */ + //#define TMC_Z_CALIBRATION + #if ENABLED(TMC_Z_CALIBRATION) + #define CALIBRATION_CURRENT 250 + #define CALIBRATION_EXTRA_HEIGHT 10 + #endif + /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page diff --git a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h index 1838306ddd..69a1c7950c 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h @@ -1148,6 +1148,20 @@ */ //#define TMC_DEBUG + /* + * Enable M915 Z axis calibration. + * Marlin will first adjust Z stepper current and then drive + * the Z axis to its' physical maximum. Finally it will home + * the Z axis to account for the lost steps. Use + * M915 S### to specify the current and + * M925 Z## to specify the extra Z height that's added to Z_MAX_POS. + */ + //#define TMC_Z_CALIBRATION + #if ENABLED(TMC_Z_CALIBRATION) + #define CALIBRATION_CURRENT 250 + #define CALIBRATION_EXTRA_HEIGHT 10 + #endif + /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page diff --git a/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h b/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h index cd8f881623..a948232ddd 100644 --- a/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h +++ b/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h @@ -1149,6 +1149,20 @@ */ //#define TMC_DEBUG + /* + * Enable M915 Z axis calibration. + * Marlin will first adjust Z stepper current and then drive + * the Z axis to its' physical maximum. Finally it will home + * the Z axis to account for the lost steps. Use + * M915 S### to specify the current and + * M925 Z## to specify the extra Z height that's added to Z_MAX_POS. + */ + //#define TMC_Z_CALIBRATION + #if ENABLED(TMC_Z_CALIBRATION) + #define CALIBRATION_CURRENT 250 + #define CALIBRATION_EXTRA_HEIGHT 10 + #endif + /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h index 60a4898bfa..33e6ffaf86 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h @@ -1148,6 +1148,20 @@ */ //#define TMC_DEBUG + /* + * Enable M915 Z axis calibration. + * Marlin will first adjust Z stepper current and then drive + * the Z axis to its' physical maximum. Finally it will home + * the Z axis to account for the lost steps. Use + * M915 S### to specify the current and + * M925 Z## to specify the extra Z height that's added to Z_MAX_POS. + */ + //#define TMC_Z_CALIBRATION + #if ENABLED(TMC_Z_CALIBRATION) + #define CALIBRATION_CURRENT 250 + #define CALIBRATION_EXTRA_HEIGHT 10 + #endif + /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page diff --git a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h index dcd4a6c185..1b4a0fb62f 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h @@ -1148,6 +1148,20 @@ */ //#define TMC_DEBUG + /* + * Enable M915 Z axis calibration. + * Marlin will first adjust Z stepper current and then drive + * the Z axis to its' physical maximum. Finally it will home + * the Z axis to account for the lost steps. Use + * M915 S### to specify the current and + * M925 Z## to specify the extra Z height that's added to Z_MAX_POS. + */ + //#define TMC_Z_CALIBRATION + #if ENABLED(TMC_Z_CALIBRATION) + #define CALIBRATION_CURRENT 250 + #define CALIBRATION_EXTRA_HEIGHT 10 + #endif + /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h index 60a4898bfa..33e6ffaf86 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h @@ -1148,6 +1148,20 @@ */ //#define TMC_DEBUG + /* + * Enable M915 Z axis calibration. + * Marlin will first adjust Z stepper current and then drive + * the Z axis to its' physical maximum. Finally it will home + * the Z axis to account for the lost steps. Use + * M915 S### to specify the current and + * M925 Z## to specify the extra Z height that's added to Z_MAX_POS. + */ + //#define TMC_Z_CALIBRATION + #if ENABLED(TMC_Z_CALIBRATION) + #define CALIBRATION_CURRENT 250 + #define CALIBRATION_EXTRA_HEIGHT 10 + #endif + /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page diff --git a/Marlin/src/config/examples/Cartesio/Configuration_adv.h b/Marlin/src/config/examples/Cartesio/Configuration_adv.h index 8db2403c57..d2dd46bfa7 100644 --- a/Marlin/src/config/examples/Cartesio/Configuration_adv.h +++ b/Marlin/src/config/examples/Cartesio/Configuration_adv.h @@ -1148,6 +1148,20 @@ */ //#define TMC_DEBUG + /* + * Enable M915 Z axis calibration. + * Marlin will first adjust Z stepper current and then drive + * the Z axis to its' physical maximum. Finally it will home + * the Z axis to account for the lost steps. Use + * M915 S### to specify the current and + * M925 Z## to specify the extra Z height that's added to Z_MAX_POS. + */ + //#define TMC_Z_CALIBRATION + #if ENABLED(TMC_Z_CALIBRATION) + #define CALIBRATION_CURRENT 250 + #define CALIBRATION_EXTRA_HEIGHT 10 + #endif + /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page diff --git a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h index a5f35d1094..b9d20654a6 100644 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h @@ -1148,6 +1148,20 @@ */ //#define TMC_DEBUG + /* + * Enable M915 Z axis calibration. + * Marlin will first adjust Z stepper current and then drive + * the Z axis to its' physical maximum. Finally it will home + * the Z axis to account for the lost steps. Use + * M915 S### to specify the current and + * M925 Z## to specify the extra Z height that's added to Z_MAX_POS. + */ + //#define TMC_Z_CALIBRATION + #if ENABLED(TMC_Z_CALIBRATION) + #define CALIBRATION_CURRENT 250 + #define CALIBRATION_EXTRA_HEIGHT 10 + #endif + /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page diff --git a/Marlin/src/config/examples/Felix/Configuration_adv.h b/Marlin/src/config/examples/Felix/Configuration_adv.h index e934e694e0..2a0c2e7056 100644 --- a/Marlin/src/config/examples/Felix/Configuration_adv.h +++ b/Marlin/src/config/examples/Felix/Configuration_adv.h @@ -1148,6 +1148,20 @@ */ //#define TMC_DEBUG + /* + * Enable M915 Z axis calibration. + * Marlin will first adjust Z stepper current and then drive + * the Z axis to its' physical maximum. Finally it will home + * the Z axis to account for the lost steps. Use + * M915 S### to specify the current and + * M925 Z## to specify the extra Z height that's added to Z_MAX_POS. + */ + //#define TMC_Z_CALIBRATION + #if ENABLED(TMC_Z_CALIBRATION) + #define CALIBRATION_CURRENT 250 + #define CALIBRATION_EXTRA_HEIGHT 10 + #endif + /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page diff --git a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h index b368ecd8ba..43f6aa2458 100644 --- a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h +++ b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h @@ -1148,6 +1148,20 @@ */ //#define TMC_DEBUG + /* + * Enable M915 Z axis calibration. + * Marlin will first adjust Z stepper current and then drive + * the Z axis to its' physical maximum. Finally it will home + * the Z axis to account for the lost steps. Use + * M915 S### to specify the current and + * M925 Z## to specify the extra Z height that's added to Z_MAX_POS. + */ + //#define TMC_Z_CALIBRATION + #if ENABLED(TMC_Z_CALIBRATION) + #define CALIBRATION_CURRENT 250 + #define CALIBRATION_EXTRA_HEIGHT 10 + #endif + /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page diff --git a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h index 0adb8d0e63..b3c4add64e 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h @@ -1148,6 +1148,20 @@ */ //#define TMC_DEBUG + /* + * Enable M915 Z axis calibration. + * Marlin will first adjust Z stepper current and then drive + * the Z axis to its' physical maximum. Finally it will home + * the Z axis to account for the lost steps. Use + * M915 S### to specify the current and + * M925 Z## to specify the extra Z height that's added to Z_MAX_POS. + */ + //#define TMC_Z_CALIBRATION + #if ENABLED(TMC_Z_CALIBRATION) + #define CALIBRATION_CURRENT 250 + #define CALIBRATION_EXTRA_HEIGHT 10 + #endif + /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page diff --git a/Marlin/src/config/examples/MakerParts/Configuration_adv.h b/Marlin/src/config/examples/MakerParts/Configuration_adv.h index 21b2fc2d09..fc5c07c913 100644 --- a/Marlin/src/config/examples/MakerParts/Configuration_adv.h +++ b/Marlin/src/config/examples/MakerParts/Configuration_adv.h @@ -985,7 +985,7 @@ #endif -// @section TMC2130 +// @section TMC2130, TMC2208 /** * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers. @@ -999,7 +999,19 @@ */ //#define HAVE_TMC2130 -#if ENABLED(HAVE_TMC2130) +/** + * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper drivers. + * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin. + * To use the reading capabilities, also connect #_SERIAL_RX_PIN + * to #_SERIAL_TX_PIN with a 1K resistor. + * The drivers can also be used with hardware serial. + * + * You'll also need the TMC2208Stepper Arduino library + * (https://github.com/teemuatlut/TMC2208Stepper). + */ +//#define HAVE_TMC2208 + +#if ENABLED(HAVE_TMC2130) || ENABLED(HAVE_TMC2208) // CHOOSE YOUR MOTORS HERE, THIS IS MANDATORY //#define X_IS_TMC2130 @@ -1014,46 +1026,58 @@ //#define E3_IS_TMC2130 //#define E4_IS_TMC2130 + //#define X_IS_TMC2208 + //#define X2_IS_TMC2208 + //#define Y_IS_TMC2208 + //#define Y2_IS_TMC2208 + //#define Z_IS_TMC2208 + //#define Z2_IS_TMC2208 + //#define E0_IS_TMC2208 + //#define E1_IS_TMC2208 + //#define E2_IS_TMC2208 + //#define E3_IS_TMC2208 + //#define E4_IS_TMC2208 + /** * Stepper driver settings */ #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current - #define INTERPOLATE 1 // Interpolate X/Y/Z_MICROSTEPS to 256 + #define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256 - #define X_CURRENT 1000 // rms current in mA. Multiply by 1.41 for peak current. + #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current. #define X_MICROSTEPS 16 // 0..256 - #define Y_CURRENT 1000 + #define Y_CURRENT 800 #define Y_MICROSTEPS 16 - #define Z_CURRENT 1000 + #define Z_CURRENT 800 #define Z_MICROSTEPS 16 - //#define X2_CURRENT 1000 - //#define X2_MICROSTEPS 16 + #define X2_CURRENT 800 + #define X2_MICROSTEPS 16 - //#define Y2_CURRENT 1000 - //#define Y2_MICROSTEPS 16 + #define Y2_CURRENT 800 + #define Y2_MICROSTEPS 16 - //#define Z2_CURRENT 1000 - //#define Z2_MICROSTEPS 16 + #define Z2_CURRENT 800 + #define Z2_MICROSTEPS 16 - //#define E0_CURRENT 1000 - //#define E0_MICROSTEPS 16 + #define E0_CURRENT 800 + #define E0_MICROSTEPS 16 - //#define E1_CURRENT 1000 - //#define E1_MICROSTEPS 16 + #define E1_CURRENT 800 + #define E1_MICROSTEPS 16 - //#define E2_CURRENT 1000 - //#define E2_MICROSTEPS 16 + #define E2_CURRENT 800 + #define E2_MICROSTEPS 16 - //#define E3_CURRENT 1000 - //#define E3_MICROSTEPS 16 + #define E3_CURRENT 800 + #define E3_MICROSTEPS 16 - //#define E4_CURRENT 1000 - //#define E4_MICROSTEPS 16 + #define E4_CURRENT 800 + #define E4_MICROSTEPS 16 /** * Use Trinamic's ultra quiet stepping mode. @@ -1062,24 +1086,22 @@ #define STEALTHCHOP /** - * Let Marlin automatically control stepper current. - * This is still an experimental feature. - * Increase current every 5s by CURRENT_STEP until stepper temperature prewarn gets triggered, - * then decrease current by CURRENT_STEP until temperature prewarn is cleared. - * Adjusting starts from X/Y/Z/E_CURRENT but will not increase over AUTO_ADJUST_MAX + * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, + * like overtemperature and short to ground. TMC2208 requires hardware serial. + * In the case of overtemperature Marlin can decrease the driver current until error condition clears. + * Other detected conditions can be used to stop the current print. * Relevant g-codes: * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. - * M906 S1 - Start adjusting current - * M906 S0 - Stop adjusting current * M911 - Report stepper driver overtemperature pre-warn condition. * M912 - Clear stepper driver overtemperature pre-warn condition flag. + * M122 S0/1 - Report driver parameters (Requires TMC_DEBUG) */ - //#define AUTOMATIC_CURRENT_CONTROL + //#define MONITOR_DRIVER_STATUS - #if ENABLED(AUTOMATIC_CURRENT_CONTROL) - #define CURRENT_STEP 50 // [mA] - #define AUTO_ADJUST_MAX 1300 // [mA], 1300mA_rms = 1840mA_peak + #if ENABLED(MONITOR_DRIVER_STATUS) + #define CURRENT_STEP_DOWN 50 // [mA] #define REPORT_CURRENT_CHANGE + #define STOP_ON_ERROR #endif /** @@ -1094,8 +1116,8 @@ #define X2_HYBRID_THRESHOLD 100 #define Y_HYBRID_THRESHOLD 100 #define Y2_HYBRID_THRESHOLD 100 - #define Z_HYBRID_THRESHOLD 4 - #define Z2_HYBRID_THRESHOLD 4 + #define Z_HYBRID_THRESHOLD 3 + #define Z2_HYBRID_THRESHOLD 3 #define E0_HYBRID_THRESHOLD 30 #define E1_HYBRID_THRESHOLD 30 #define E2_HYBRID_THRESHOLD 30 @@ -1105,7 +1127,7 @@ /** * Use stallGuard2 to sense an obstacle and trigger an endstop. * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin. - * If used along with STEALTHCHOP, the movement will be louder when homing. This is normal. + * X and Y homing will always be done in spreadCycle mode. * * X/Y_HOMING_SENSITIVITY is used for tuning the trigger sensitivity. * Higher values make the system LESS sensitive. @@ -1114,27 +1136,48 @@ * It is advised to set X/Y_HOME_BUMP_MM to 0. * M914 X/Y to live tune the setting */ - //#define SENSORLESS_HOMING + //#define SENSORLESS_HOMING // TMC2130 only #if ENABLED(SENSORLESS_HOMING) - #define X_HOMING_SENSITIVITY 19 - #define Y_HOMING_SENSITIVITY 19 + #define X_HOMING_SENSITIVITY 8 + #define Y_HOMING_SENSITIVITY 8 + #endif + + /** + * Enable M122 debugging command for TMC stepper drivers. + * M122 S0/1 will enable continous reporting. + */ + //#define TMC_DEBUG + + /* + * Enable M915 Z axis calibration. + * Marlin will first adjust Z stepper current and then drive + * the Z axis to its' physical maximum. Finally it will home + * the Z axis to account for the lost steps. Use + * M915 S### to specify the current and + * M925 Z## to specify the extra Z height that's added to Z_MAX_POS. + */ + //#define TMC_Z_CALIBRATION + #if ENABLED(TMC_Z_CALIBRATION) + #define CALIBRATION_CURRENT 250 + #define CALIBRATION_EXTRA_HEIGHT 10 #endif /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page * https://github.com/teemuatlut/TMC2130Stepper + * https://github.com/teemuatlut/TMC2208Stepper * * Example: - * #define TMC2130_ADV() { \ + * #define TMC_ADV() { \ * stepperX.diag0_temp_prewarn(1); \ - * stepperX.interpolate(0); \ + * stepperY.interpolate(0); \ * } */ - #define TMC2130_ADV() { } + #define TMC_ADV() { } -#endif // HAVE_TMC2130 +#endif // TMC2130 || TMC2208 // @section L6470 diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h index 650f7b0a5b..3aad75b463 100644 --- a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h @@ -1148,6 +1148,20 @@ */ //#define TMC_DEBUG + /* + * Enable M915 Z axis calibration. + * Marlin will first adjust Z stepper current and then drive + * the Z axis to its' physical maximum. Finally it will home + * the Z axis to account for the lost steps. Use + * M915 S### to specify the current and + * M925 Z## to specify the extra Z height that's added to Z_MAX_POS. + */ + //#define TMC_Z_CALIBRATION + #if ENABLED(TMC_Z_CALIBRATION) + #define CALIBRATION_CURRENT 250 + #define CALIBRATION_EXTRA_HEIGHT 10 + #endif + /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page diff --git a/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h index 403d8e7a8f..aa8c95a43a 100644 --- a/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h @@ -1148,6 +1148,20 @@ */ //#define TMC_DEBUG + /* + * Enable M915 Z axis calibration. + * Marlin will first adjust Z stepper current and then drive + * the Z axis to its' physical maximum. Finally it will home + * the Z axis to account for the lost steps. Use + * M915 S### to specify the current and + * M925 Z## to specify the extra Z height that's added to Z_MAX_POS. + */ + //#define TMC_Z_CALIBRATION + #if ENABLED(TMC_Z_CALIBRATION) + #define CALIBRATION_CURRENT 250 + #define CALIBRATION_EXTRA_HEIGHT 10 + #endif + /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page diff --git a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h index d2c3e4c1c5..db19080086 100644 --- a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h +++ b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h @@ -1149,6 +1149,20 @@ */ //#define TMC_DEBUG + /* + * Enable M915 Z axis calibration. + * Marlin will first adjust Z stepper current and then drive + * the Z axis to its' physical maximum. Finally it will home + * the Z axis to account for the lost steps. Use + * M915 S### to specify the current and + * M925 Z## to specify the extra Z height that's added to Z_MAX_POS. + */ + //#define TMC_Z_CALIBRATION + #if ENABLED(TMC_Z_CALIBRATION) + #define CALIBRATION_CURRENT 250 + #define CALIBRATION_EXTRA_HEIGHT 10 + #endif + /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h index e5b7ee9932..69d1453922 100644 --- a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h +++ b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h @@ -1156,6 +1156,20 @@ */ //#define TMC_DEBUG + /* + * Enable M915 Z axis calibration. + * Marlin will first adjust Z stepper current and then drive + * the Z axis to its' physical maximum. Finally it will home + * the Z axis to account for the lost steps. Use + * M915 S### to specify the current and + * M925 Z## to specify the extra Z height that's added to Z_MAX_POS. + */ + //#define TMC_Z_CALIBRATION + #if ENABLED(TMC_Z_CALIBRATION) + #define CALIBRATION_CURRENT 250 + #define CALIBRATION_EXTRA_HEIGHT 10 + #endif + /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page diff --git a/Marlin/src/config/examples/RigidBot/Configuration_adv.h b/Marlin/src/config/examples/RigidBot/Configuration_adv.h index b8e965c93f..41d091873e 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration_adv.h +++ b/Marlin/src/config/examples/RigidBot/Configuration_adv.h @@ -1148,6 +1148,20 @@ */ //#define TMC_DEBUG + /* + * Enable M915 Z axis calibration. + * Marlin will first adjust Z stepper current and then drive + * the Z axis to its' physical maximum. Finally it will home + * the Z axis to account for the lost steps. Use + * M915 S### to specify the current and + * M925 Z## to specify the extra Z height that's added to Z_MAX_POS. + */ + //#define TMC_Z_CALIBRATION + #if ENABLED(TMC_Z_CALIBRATION) + #define CALIBRATION_CURRENT 250 + #define CALIBRATION_EXTRA_HEIGHT 10 + #endif + /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page diff --git a/Marlin/src/config/examples/SCARA/Configuration_adv.h b/Marlin/src/config/examples/SCARA/Configuration_adv.h index 8b4b2b70e0..3b5763b91a 100644 --- a/Marlin/src/config/examples/SCARA/Configuration_adv.h +++ b/Marlin/src/config/examples/SCARA/Configuration_adv.h @@ -1148,6 +1148,20 @@ */ //#define TMC_DEBUG + /* + * Enable M915 Z axis calibration. + * Marlin will first adjust Z stepper current and then drive + * the Z axis to its' physical maximum. Finally it will home + * the Z axis to account for the lost steps. Use + * M915 S### to specify the current and + * M925 Z## to specify the extra Z height that's added to Z_MAX_POS. + */ + //#define TMC_Z_CALIBRATION + #if ENABLED(TMC_Z_CALIBRATION) + #define CALIBRATION_CURRENT 250 + #define CALIBRATION_EXTRA_HEIGHT 10 + #endif + /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h index 59d37dc30d..1218b5a95a 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h @@ -1137,6 +1137,20 @@ */ //#define TMC_DEBUG + /* + * Enable M915 Z axis calibration. + * Marlin will first adjust Z stepper current and then drive + * the Z axis to its' physical maximum. Finally it will home + * the Z axis to account for the lost steps. Use + * M915 S### to specify the current and + * M925 Z## to specify the extra Z height that's added to Z_MAX_POS. + */ + //#define TMC_Z_CALIBRATION + #if ENABLED(TMC_Z_CALIBRATION) + #define CALIBRATION_CURRENT 250 + #define CALIBRATION_EXTRA_HEIGHT 10 + #endif + /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h index b6f27505af..432d4df25d 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h +++ b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h @@ -1148,6 +1148,20 @@ */ //#define TMC_DEBUG + /* + * Enable M915 Z axis calibration. + * Marlin will first adjust Z stepper current and then drive + * the Z axis to its' physical maximum. Finally it will home + * the Z axis to account for the lost steps. Use + * M915 S### to specify the current and + * M925 Z## to specify the extra Z height that's added to Z_MAX_POS. + */ + //#define TMC_Z_CALIBRATION + #if ENABLED(TMC_Z_CALIBRATION) + #define CALIBRATION_CURRENT 250 + #define CALIBRATION_EXTRA_HEIGHT 10 + #endif + /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page diff --git a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h index 57575d34c8..9a94a75df6 100644 --- a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h +++ b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h @@ -1148,6 +1148,20 @@ */ //#define TMC_DEBUG + /* + * Enable M915 Z axis calibration. + * Marlin will first adjust Z stepper current and then drive + * the Z axis to its' physical maximum. Finally it will home + * the Z axis to account for the lost steps. Use + * M915 S### to specify the current and + * M925 Z## to specify the extra Z height that's added to Z_MAX_POS. + */ + //#define TMC_Z_CALIBRATION + #if ENABLED(TMC_Z_CALIBRATION) + #define CALIBRATION_CURRENT 250 + #define CALIBRATION_EXTRA_HEIGHT 10 + #endif + /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h index c18525912d..bb0d8a7600 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h @@ -1159,6 +1159,20 @@ */ //#define TMC_DEBUG + /* + * Enable M915 Z axis calibration. + * Marlin will first adjust Z stepper current and then drive + * the Z axis to its' physical maximum. Finally it will home + * the Z axis to account for the lost steps. Use + * M915 S### to specify the current and + * M925 Z## to specify the extra Z height that's added to Z_MAX_POS. + */ + //#define TMC_Z_CALIBRATION + #if ENABLED(TMC_Z_CALIBRATION) + #define CALIBRATION_CURRENT 250 + #define CALIBRATION_EXTRA_HEIGHT 10 + #endif + /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h index bcf3e2b4c8..afa648d11c 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h @@ -1148,6 +1148,20 @@ */ //#define TMC_DEBUG + /* + * Enable M915 Z axis calibration. + * Marlin will first adjust Z stepper current and then drive + * the Z axis to its' physical maximum. Finally it will home + * the Z axis to account for the lost steps. Use + * M915 S### to specify the current and + * M925 Z## to specify the extra Z height that's added to Z_MAX_POS. + */ + //#define TMC_Z_CALIBRATION + #if ENABLED(TMC_Z_CALIBRATION) + #define CALIBRATION_CURRENT 250 + #define CALIBRATION_EXTRA_HEIGHT 10 + #endif + /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page diff --git a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h index 1755cc571e..023951cdec 100644 --- a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h +++ b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h @@ -1150,6 +1150,20 @@ */ //#define TMC_DEBUG + /* + * Enable M915 Z axis calibration. + * Marlin will first adjust Z stepper current and then drive + * the Z axis to its' physical maximum. Finally it will home + * the Z axis to account for the lost steps. Use + * M915 S### to specify the current and + * M925 Z## to specify the extra Z height that's added to Z_MAX_POS. + */ + //#define TMC_Z_CALIBRATION + #if ENABLED(TMC_Z_CALIBRATION) + #define CALIBRATION_CURRENT 250 + #define CALIBRATION_EXTRA_HEIGHT 10 + #endif + /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page diff --git a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h index cc4afd923e..e1590bd9f4 100644 --- a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h @@ -1150,6 +1150,20 @@ */ //#define TMC_DEBUG + /* + * Enable M915 Z axis calibration. + * Marlin will first adjust Z stepper current and then drive + * the Z axis to its' physical maximum. Finally it will home + * the Z axis to account for the lost steps. Use + * M915 S### to specify the current and + * M925 Z## to specify the extra Z height that's added to Z_MAX_POS. + */ + //#define TMC_Z_CALIBRATION + #if ENABLED(TMC_Z_CALIBRATION) + #define CALIBRATION_CURRENT 250 + #define CALIBRATION_EXTRA_HEIGHT 10 + #endif + /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h index 83bde0e19e..4a2802c5b6 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h @@ -1150,6 +1150,20 @@ */ //#define TMC_DEBUG + /* + * Enable M915 Z axis calibration. + * Marlin will first adjust Z stepper current and then drive + * the Z axis to its' physical maximum. Finally it will home + * the Z axis to account for the lost steps. Use + * M915 S### to specify the current and + * M925 Z## to specify the extra Z height that's added to Z_MAX_POS. + */ + //#define TMC_Z_CALIBRATION + #if ENABLED(TMC_Z_CALIBRATION) + #define CALIBRATION_CURRENT 250 + #define CALIBRATION_EXTRA_HEIGHT 10 + #endif + /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page diff --git a/Marlin/src/config/examples/delta/generic/Configuration_adv.h b/Marlin/src/config/examples/delta/generic/Configuration_adv.h index 83bde0e19e..4a2802c5b6 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/generic/Configuration_adv.h @@ -1150,6 +1150,20 @@ */ //#define TMC_DEBUG + /* + * Enable M915 Z axis calibration. + * Marlin will first adjust Z stepper current and then drive + * the Z axis to its' physical maximum. Finally it will home + * the Z axis to account for the lost steps. Use + * M915 S### to specify the current and + * M925 Z## to specify the extra Z height that's added to Z_MAX_POS. + */ + //#define TMC_Z_CALIBRATION + #if ENABLED(TMC_Z_CALIBRATION) + #define CALIBRATION_CURRENT 250 + #define CALIBRATION_EXTRA_HEIGHT 10 + #endif + /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page diff --git a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h index 83bde0e19e..4a2802c5b6 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h @@ -1150,6 +1150,20 @@ */ //#define TMC_DEBUG + /* + * Enable M915 Z axis calibration. + * Marlin will first adjust Z stepper current and then drive + * the Z axis to its' physical maximum. Finally it will home + * the Z axis to account for the lost steps. Use + * M915 S### to specify the current and + * M925 Z## to specify the extra Z height that's added to Z_MAX_POS. + */ + //#define TMC_Z_CALIBRATION + #if ENABLED(TMC_Z_CALIBRATION) + #define CALIBRATION_CURRENT 250 + #define CALIBRATION_EXTRA_HEIGHT 10 + #endif + /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page diff --git a/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h index 4543129674..ecd80f9b52 100644 --- a/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h @@ -1155,6 +1155,20 @@ */ //#define TMC_DEBUG + /* + * Enable M915 Z axis calibration. + * Marlin will first adjust Z stepper current and then drive + * the Z axis to its' physical maximum. Finally it will home + * the Z axis to account for the lost steps. Use + * M915 S### to specify the current and + * M925 Z## to specify the extra Z height that's added to Z_MAX_POS. + */ + //#define TMC_Z_CALIBRATION + #if ENABLED(TMC_Z_CALIBRATION) + #define CALIBRATION_CURRENT 250 + #define CALIBRATION_EXTRA_HEIGHT 10 + #endif + /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page diff --git a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h index 18602a3ed6..3234bd9fcb 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h @@ -1150,6 +1150,20 @@ */ //#define TMC_DEBUG + /* + * Enable M915 Z axis calibration. + * Marlin will first adjust Z stepper current and then drive + * the Z axis to its' physical maximum. Finally it will home + * the Z axis to account for the lost steps. Use + * M915 S### to specify the current and + * M925 Z## to specify the extra Z height that's added to Z_MAX_POS. + */ + //#define TMC_Z_CALIBRATION + #if ENABLED(TMC_Z_CALIBRATION) + #define CALIBRATION_CURRENT 250 + #define CALIBRATION_EXTRA_HEIGHT 10 + #endif + /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h index 1a012652e3..a8581c0802 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h @@ -1148,6 +1148,20 @@ */ //#define TMC_DEBUG + /* + * Enable M915 Z axis calibration. + * Marlin will first adjust Z stepper current and then drive + * the Z axis to its' physical maximum. Finally it will home + * the Z axis to account for the lost steps. Use + * M915 S### to specify the current and + * M925 Z## to specify the extra Z height that's added to Z_MAX_POS. + */ + //#define TMC_Z_CALIBRATION + #if ENABLED(TMC_Z_CALIBRATION) + #define CALIBRATION_CURRENT 250 + #define CALIBRATION_EXTRA_HEIGHT 10 + #endif + /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page diff --git a/Marlin/src/config/examples/makibox/Configuration_adv.h b/Marlin/src/config/examples/makibox/Configuration_adv.h index a3b327a607..d0c280bbc7 100644 --- a/Marlin/src/config/examples/makibox/Configuration_adv.h +++ b/Marlin/src/config/examples/makibox/Configuration_adv.h @@ -1148,6 +1148,20 @@ */ //#define TMC_DEBUG + /* + * Enable M915 Z axis calibration. + * Marlin will first adjust Z stepper current and then drive + * the Z axis to its' physical maximum. Finally it will home + * the Z axis to account for the lost steps. Use + * M915 S### to specify the current and + * M925 Z## to specify the extra Z height that's added to Z_MAX_POS. + */ + //#define TMC_Z_CALIBRATION + #if ENABLED(TMC_Z_CALIBRATION) + #define CALIBRATION_CURRENT 250 + #define CALIBRATION_EXTRA_HEIGHT 10 + #endif + /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h index a22b44a921..d01eb1ad7c 100644 --- a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h @@ -1148,6 +1148,20 @@ */ //#define TMC_DEBUG + /* + * Enable M915 Z axis calibration. + * Marlin will first adjust Z stepper current and then drive + * the Z axis to its' physical maximum. Finally it will home + * the Z axis to account for the lost steps. Use + * M915 S### to specify the current and + * M925 Z## to specify the extra Z height that's added to Z_MAX_POS. + */ + //#define TMC_Z_CALIBRATION + #if ENABLED(TMC_Z_CALIBRATION) + #define CALIBRATION_CURRENT 250 + #define CALIBRATION_EXTRA_HEIGHT 10 + #endif + /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page diff --git a/Marlin/src/config/examples/wt150/Configuration_adv.h b/Marlin/src/config/examples/wt150/Configuration_adv.h index 3ac5a05292..a87df1c00a 100644 --- a/Marlin/src/config/examples/wt150/Configuration_adv.h +++ b/Marlin/src/config/examples/wt150/Configuration_adv.h @@ -1149,6 +1149,20 @@ */ //#define TMC_DEBUG + /* + * Enable M915 Z axis calibration. + * Marlin will first adjust Z stepper current and then drive + * the Z axis to its' physical maximum. Finally it will home + * the Z axis to account for the lost steps. Use + * M915 S### to specify the current and + * M925 Z## to specify the extra Z height that's added to Z_MAX_POS. + */ + //#define TMC_Z_CALIBRATION + #if ENABLED(TMC_Z_CALIBRATION) + #define CALIBRATION_CURRENT 250 + #define CALIBRATION_EXTRA_HEIGHT 10 + #endif + /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page