diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 5238a89ff8..1fb0b1fe78 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1298,17 +1298,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1391,6 +1388,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/Marlin.cpp b/Marlin/src/Marlin.cpp index 290cb06425..4792f24380 100644 --- a/Marlin/src/Marlin.cpp +++ b/Marlin/src/Marlin.cpp @@ -945,6 +945,10 @@ void setup() { #if ENABLED(SDSUPPORT) && DISABLED(ULTRA_LCD) card.beginautostart(); #endif + + #if HAS_TRINAMIC && DISABLED(PS_DEFAULT_OFF) + test_tmc_connection(true, true, true, true); + #endif } /** diff --git a/Marlin/src/config/default/Configuration_adv.h b/Marlin/src/config/default/Configuration_adv.h index dddd390ceb..99275e3e82 100755 --- a/Marlin/src/config/default/Configuration_adv.h +++ b/Marlin/src/config/default/Configuration_adv.h @@ -1298,17 +1298,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1391,6 +1388,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h index e527cc3317..b7db75de20 100644 --- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h +++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h @@ -1297,17 +1297,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1390,6 +1387,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/Anet/A2/Configuration_adv.h b/Marlin/src/config/examples/Anet/A2/Configuration_adv.h index 5b062a1bf7..216c84df02 100644 --- a/Marlin/src/config/examples/Anet/A2/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A2/Configuration_adv.h @@ -1297,17 +1297,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1390,6 +1387,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/Anet/A2plus/Configuration_adv.h b/Marlin/src/config/examples/Anet/A2plus/Configuration_adv.h index 5b062a1bf7..216c84df02 100644 --- a/Marlin/src/config/examples/Anet/A2plus/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A2plus/Configuration_adv.h @@ -1297,17 +1297,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1390,6 +1387,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h index 3a5ac02cbc..7af5b2f9b1 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h @@ -1296,17 +1296,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1389,6 +1386,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h index 8b3d263b93..ce8fc489fe 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h @@ -1297,17 +1297,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1390,6 +1387,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/ArmEd/Configuration_adv.h b/Marlin/src/config/examples/ArmEd/Configuration_adv.h index 2ea83dd12b..8dd295275c 100644 --- a/Marlin/src/config/examples/ArmEd/Configuration_adv.h +++ b/Marlin/src/config/examples/ArmEd/Configuration_adv.h @@ -1271,17 +1271,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1364,6 +1361,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h index 2f29f97934..621b4285a1 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h +++ b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h @@ -1296,17 +1296,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1389,6 +1386,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h index 2e1bb95b84..253ac90ccc 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h +++ b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h @@ -1297,17 +1297,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1390,6 +1387,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h index 8917beafb1..3c6355d8c7 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h @@ -1297,17 +1297,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1390,6 +1387,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. 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 93f8fe8bb5..2c27c36788 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h @@ -1305,17 +1305,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1398,6 +1395,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h index 8917beafb1..3c6355d8c7 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h @@ -1297,17 +1297,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1390,6 +1387,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/Cartesio/Configuration_adv.h b/Marlin/src/config/examples/Cartesio/Configuration_adv.h index 6dd6443868..bf3c29d074 100644 --- a/Marlin/src/config/examples/Cartesio/Configuration_adv.h +++ b/Marlin/src/config/examples/Cartesio/Configuration_adv.h @@ -1297,17 +1297,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1390,6 +1387,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. 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 ae01d37d2a..014f4dff7f 100755 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h @@ -1297,17 +1297,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1390,6 +1387,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h index 4a684b1956..cb30524980 100644 --- a/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h @@ -1297,17 +1297,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1390,6 +1387,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h index fc14a9e473..e4c1605859 100644 --- a/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h @@ -1297,17 +1297,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1390,6 +1387,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h index 53d40b08c7..de3592ff2b 100644 --- a/Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h @@ -1297,17 +1297,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1390,6 +1387,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h b/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h index dd57719b08..0c7c70a4fe 100644 --- a/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h @@ -1297,17 +1297,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1390,6 +1387,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h b/Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h index 99d5020344..682f862c0c 100644 --- a/Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h @@ -1297,17 +1297,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1390,6 +1387,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h b/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h index 9f92023aef..985bf034cb 100644 --- a/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h @@ -1297,17 +1297,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1390,6 +1387,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/Einstart-S/Configuration_adv.h b/Marlin/src/config/examples/Einstart-S/Configuration_adv.h index c121f6ffde..249a3b563b 100644 --- a/Marlin/src/config/examples/Einstart-S/Configuration_adv.h +++ b/Marlin/src/config/examples/Einstart-S/Configuration_adv.h @@ -1297,17 +1297,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1390,6 +1387,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/Felix/Configuration_adv.h b/Marlin/src/config/examples/Felix/Configuration_adv.h index 0aedede49f..6ba72ac1c4 100644 --- a/Marlin/src/config/examples/Felix/Configuration_adv.h +++ b/Marlin/src/config/examples/Felix/Configuration_adv.h @@ -1297,17 +1297,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1390,6 +1387,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. 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 ca326e4ca2..b3b54dae16 100644 --- a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h +++ b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h @@ -1297,17 +1297,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1390,6 +1387,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/Formbot/Raptor/Configuration_adv.h b/Marlin/src/config/examples/Formbot/Raptor/Configuration_adv.h index 9f5517b27f..838c18c14a 100644 --- a/Marlin/src/config/examples/Formbot/Raptor/Configuration_adv.h +++ b/Marlin/src/config/examples/Formbot/Raptor/Configuration_adv.h @@ -1299,17 +1299,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1392,6 +1389,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration_adv.h b/Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration_adv.h index ecd25ee185..9fb031508a 100644 --- a/Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration_adv.h +++ b/Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration_adv.h @@ -1302,17 +1302,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1395,6 +1392,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/Formbot/T_Rex_3/Configuration_adv.h b/Marlin/src/config/examples/Formbot/T_Rex_3/Configuration_adv.h index 1253197e61..46459201b3 100644 --- a/Marlin/src/config/examples/Formbot/T_Rex_3/Configuration_adv.h +++ b/Marlin/src/config/examples/Formbot/T_Rex_3/Configuration_adv.h @@ -1302,17 +1302,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1395,6 +1392,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/Geeetech/MeCreator2/Configuration_adv.h b/Marlin/src/config/examples/Geeetech/MeCreator2/Configuration_adv.h index 2cb36a9b7a..b6540142a6 100644 --- a/Marlin/src/config/examples/Geeetech/MeCreator2/Configuration_adv.h +++ b/Marlin/src/config/examples/Geeetech/MeCreator2/Configuration_adv.h @@ -1298,17 +1298,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1391,6 +1388,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h index 554720d02f..454a293616 100644 --- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h +++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h @@ -1297,17 +1297,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1390,6 +1387,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h index 554720d02f..454a293616 100644 --- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h +++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h @@ -1297,17 +1297,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1390,6 +1387,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. 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 e6c48e2d68..c50526c2ba 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h @@ -1297,17 +1297,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1390,6 +1387,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h b/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h index 5d6cc2a109..f87407f025 100644 --- a/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h +++ b/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h @@ -1297,17 +1297,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1390,6 +1387,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/MakerParts/Configuration_adv.h b/Marlin/src/config/examples/MakerParts/Configuration_adv.h index c921adf88f..3ba9663814 100644 --- a/Marlin/src/config/examples/MakerParts/Configuration_adv.h +++ b/Marlin/src/config/examples/MakerParts/Configuration_adv.h @@ -1297,17 +1297,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1390,6 +1387,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h index f547de1f1d..fe4413e657 100644 --- a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h @@ -1297,17 +1297,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1390,6 +1387,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h index ad1189dc40..b4f9f138f1 100644 --- a/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h @@ -1297,17 +1297,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1390,6 +1387,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. 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 4730b5804d..6dc22838b3 100644 --- a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h +++ b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h @@ -1297,17 +1297,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1390,6 +1387,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h index bd641e1a25..ed30e423c7 100644 --- a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h +++ b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h @@ -1305,17 +1305,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1398,6 +1395,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/RigidBot/Configuration_adv.h b/Marlin/src/config/examples/RigidBot/Configuration_adv.h index a8779cb6af..47be304a11 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration_adv.h +++ b/Marlin/src/config/examples/RigidBot/Configuration_adv.h @@ -1297,17 +1297,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1390,6 +1387,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/SCARA/Configuration_adv.h b/Marlin/src/config/examples/SCARA/Configuration_adv.h index 2a1a5064b3..48da50560e 100644 --- a/Marlin/src/config/examples/SCARA/Configuration_adv.h +++ b/Marlin/src/config/examples/SCARA/Configuration_adv.h @@ -1297,17 +1297,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1390,6 +1387,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h index c4e98dce3a..ec92a6b013 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h @@ -1297,17 +1297,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1390,6 +1387,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/TheBorg/Configuration_adv.h b/Marlin/src/config/examples/TheBorg/Configuration_adv.h index 990cc4cc9f..7e257ccb95 100644 --- a/Marlin/src/config/examples/TheBorg/Configuration_adv.h +++ b/Marlin/src/config/examples/TheBorg/Configuration_adv.h @@ -1297,17 +1297,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1390,6 +1387,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h index 75626efd4a..89ed8b93f9 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h +++ b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h @@ -1297,17 +1297,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1390,6 +1387,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/Tronxy/X3A/Configuration_adv.h b/Marlin/src/config/examples/Tronxy/X3A/Configuration_adv.h index edc15505ec..fb38788b66 100644 --- a/Marlin/src/config/examples/Tronxy/X3A/Configuration_adv.h +++ b/Marlin/src/config/examples/Tronxy/X3A/Configuration_adv.h @@ -1297,17 +1297,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1390,6 +1387,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/UltiMachine/Archim1/Configuration_adv.h b/Marlin/src/config/examples/UltiMachine/Archim1/Configuration_adv.h index 971423826e..b5021b51a0 100644 --- a/Marlin/src/config/examples/UltiMachine/Archim1/Configuration_adv.h +++ b/Marlin/src/config/examples/UltiMachine/Archim1/Configuration_adv.h @@ -1298,17 +1298,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1391,6 +1388,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h index f715e81731..fcf528b036 100644 --- a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h +++ b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h @@ -1297,17 +1297,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1390,6 +1387,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h index 37459ad04d..44e4c4c7b2 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h @@ -1310,17 +1310,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1403,6 +1400,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h index 24d109c452..34e34a6d44 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h @@ -1297,17 +1297,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1390,6 +1387,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. 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 ed4ee530c0..0bf32e53af 100644 --- a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h +++ b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h @@ -1299,17 +1299,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1392,6 +1389,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration_adv.h b/Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration_adv.h index 3d16143b25..75aa225399 100644 --- a/Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration_adv.h @@ -1299,17 +1299,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1392,6 +1389,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. 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 6093fa768d..7877805001 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 @@ -1299,17 +1299,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1392,6 +1389,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h index 6093fa768d..7877805001 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h @@ -1299,17 +1299,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1392,6 +1389,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. 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 d28debad9f..ccf8192133 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 @@ -1299,17 +1299,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1392,6 +1389,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h b/Marlin/src/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h index 29862b7eb7..70f815ab89 100644 --- a/Marlin/src/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h @@ -1272,17 +1272,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1365,6 +1362,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/delta/MKS/SBASE/Configuration_adv.h b/Marlin/src/config/examples/delta/MKS/SBASE/Configuration_adv.h index c8080e3bdb..2cd6407412 100644 --- a/Marlin/src/config/examples/delta/MKS/SBASE/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/MKS/SBASE/Configuration_adv.h @@ -1299,17 +1299,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1392,6 +1389,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/delta/Tevo Little Monster/Configuration_adv.h b/Marlin/src/config/examples/delta/Tevo Little Monster/Configuration_adv.h index 053b6ee23f..9ede7f8c4c 100644 --- a/Marlin/src/config/examples/delta/Tevo Little Monster/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/Tevo Little Monster/Configuration_adv.h @@ -1299,17 +1299,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1392,6 +1389,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/delta/generic/Configuration_adv.h b/Marlin/src/config/examples/delta/generic/Configuration_adv.h index d28debad9f..ccf8192133 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/generic/Configuration_adv.h @@ -1299,17 +1299,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1392,6 +1389,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. 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 d28debad9f..ccf8192133 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h @@ -1299,17 +1299,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1392,6 +1389,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. 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 31e51a2cac..63a2c4d3b0 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h @@ -1299,17 +1299,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1392,6 +1389,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. 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 c08e5ab683..028fdc30f1 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h @@ -1297,17 +1297,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1390,6 +1387,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/makibox/Configuration_adv.h b/Marlin/src/config/examples/makibox/Configuration_adv.h index 816cbccb1d..52dc202d7a 100644 --- a/Marlin/src/config/examples/makibox/Configuration_adv.h +++ b/Marlin/src/config/examples/makibox/Configuration_adv.h @@ -1297,17 +1297,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1390,6 +1387,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h index 2d0e6442e6..e573e4ba52 100644 --- a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h @@ -1297,17 +1297,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1390,6 +1387,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/config/examples/wt150/Configuration_adv.h b/Marlin/src/config/examples/wt150/Configuration_adv.h index dab7963159..3707b0af07 100644 --- a/Marlin/src/config/examples/wt150/Configuration_adv.h +++ b/Marlin/src/config/examples/wt150/Configuration_adv.h @@ -1298,17 +1298,14 @@ * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). * You may also use software SPI if you wish to use general purpose IO pins. * - * The TMC2130Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2130Stepper - * * To use TMC2208 stepper UART-configurable stepper drivers * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor. * To use the reading capabilities, also connect #_SERIAL_RX_PIN * to PDN_UART without a resistor. * The drivers can also be used with hardware serial. * - * The TMC2208Stepper library is required for this stepper driver. - * https://github.com/teemuatlut/TMC2208Stepper + * TMCStepper library is required for connected TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper */ #if HAS_TRINAMIC @@ -1391,6 +1388,12 @@ #define STEALTHCHOP_Z #define STEALTHCHOP_E + /** + * Adjust spreadCycle chopper parameters with the help of an example included in the library. + * The parameters are off time, hysteresis end and hysteresis start. + */ + #define CHOPPER_TIMING { 4, -2, 1 } + /** * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions, * like overtemperature and short to ground. TMC2208 requires hardware serial. diff --git a/Marlin/src/feature/tmc_util.cpp b/Marlin/src/feature/tmc_util.cpp index a0fd58d301..681b93b6af 100644 --- a/Marlin/src/feature/tmc_util.cpp +++ b/Marlin/src/feature/tmc_util.cpp @@ -34,7 +34,10 @@ #if ENABLED(TMC_DEBUG) #include "../module/planner.h" - static bool report_tmc_status; // = false; + #include "../libs/hex_print_routines.h" + #if ENABLED(MONITOR_DRIVER_STATUS) + static bool report_tmc_status; // = false; + #endif #endif /** @@ -130,7 +133,7 @@ if (data.is_s2ga) SERIAL_ECHOLNPGM("short to ground (coil A)"); if (data.is_s2gb) SERIAL_ECHOLNPGM("short to ground (coil B)"); #if ENABLED(TMC_DEBUG) - tmc_report_all(); + tmc_report_all(true, true, true, true); #endif kill(PSTR("Driver error")); } @@ -326,16 +329,28 @@ TMC_S2VSB, TMC_S2VSA }; - static void drv_status_print_hex(const uint32_t drv_status) { - for (int B = 24; B >= 8; B -= 8){ - SERIAL_PRINT((drv_status >> (B + 4)) & 0xF, HEX); - SERIAL_PRINT((drv_status >> B) & 0xF, HEX); - SERIAL_CHAR(':'); - } - SERIAL_PRINT((drv_status >> 4) & 0xF, HEX); - SERIAL_PRINT((drv_status) & 0xF, HEX); - SERIAL_EOL(); - } + enum TMC_get_registers_enum : char { + TMC_AXIS_CODES, + TMC_GET_GCONF, + TMC_GET_IHOLD_IRUN, + TMC_GET_GSTAT, + TMC_GET_IOIN, + TMC_GET_TPOWERDOWN, + TMC_GET_TSTEP, + TMC_GET_TPWMTHRS, + TMC_GET_TCOOLTHRS, + TMC_GET_THIGH, + TMC_GET_CHOPCONF, + TMC_GET_COOLCONF, + TMC_GET_PWMCONF, + TMC_GET_PWM_SCALE, + TMC_GET_DRV_STATUS, + TMC_GET_DRVCONF, + TMC_GET_DRVCTRL, + TMC_GET_DRVSTATUS, + TMC_GET_SGCSCONF, + TMC_GET_SMARTEN + }; template static void print_vsense(TMC &st) { serialprintPGM(st.vsense() ? PSTR("1=.18") : PSTR("0=.325")); } @@ -480,125 +495,146 @@ case TMC_S2GA: if (st.s2ga()) SERIAL_CHAR('X'); break; case TMC_DRV_OTPW: if (st.otpw()) SERIAL_CHAR('X'); break; case TMC_OT: if (st.ot()) SERIAL_CHAR('X'); break; - case TMC_DRV_STATUS_HEX: + case TMC_DRV_STATUS_HEX: { + const uint32_t drv_status = st.DRV_STATUS(); + SERIAL_CHAR('\t'); st.printLabel(); - SERIAL_ECHOPGM("\t0x"); - drv_status_print_hex(st.DRV_STATUS()); + SERIAL_CHAR('\t'); + print_hex_long(drv_status, ':'); + if (drv_status == 0xFFFFFFFF || drv_status == 0) SERIAL_ECHOPGM("\t Bad response!"); + SERIAL_EOL(); break; + } default: _tmc_parse_drv_status(st, i); break; } } - static void tmc_debug_loop(const TMC_debug_enum i) { - #if AXIS_IS_TMC(X) - tmc_status(stepperX, i, planner.settings.axis_steps_per_mm[X_AXIS]); - #endif - #if AXIS_IS_TMC(X2) - tmc_status(stepperX2, i, planner.settings.axis_steps_per_mm[X_AXIS]); - #endif + static void tmc_debug_loop(const TMC_debug_enum i, const bool print_x, const bool print_y, const bool print_z, const bool print_e) { + if (print_x) { + #if AXIS_IS_TMC(X) + tmc_status(stepperX, i, planner.settings.axis_steps_per_mm[X_AXIS]); + #endif + #if AXIS_IS_TMC(X2) + tmc_status(stepperX2, i, planner.settings.axis_steps_per_mm[X_AXIS]); + #endif + } - #if AXIS_IS_TMC(Y) - tmc_status(stepperY, i, planner.settings.axis_steps_per_mm[Y_AXIS]); - #endif - #if AXIS_IS_TMC(Y2) - tmc_status(stepperY2, i, planner.settings.axis_steps_per_mm[Y_AXIS]); - #endif + if (print_y) { + #if AXIS_IS_TMC(Y) + tmc_status(stepperY, i, planner.settings.axis_steps_per_mm[Y_AXIS]); + #endif + #if AXIS_IS_TMC(Y2) + tmc_status(stepperY2, i, planner.settings.axis_steps_per_mm[Y_AXIS]); + #endif + } - #if AXIS_IS_TMC(Z) - tmc_status(stepperZ, i, planner.settings.axis_steps_per_mm[Z_AXIS]); - #endif - #if AXIS_IS_TMC(Z2) - tmc_status(stepperZ2, i, planner.settings.axis_steps_per_mm[Z_AXIS]); - #endif - #if AXIS_IS_TMC(Z3) - tmc_status(stepperZ3, i, planner.settings.axis_steps_per_mm[Z_AXIS]); - #endif + if (print_z) { + #if AXIS_IS_TMC(Z) + tmc_status(stepperZ, i, planner.settings.axis_steps_per_mm[Z_AXIS]); + #endif + #if AXIS_IS_TMC(Z2) + tmc_status(stepperZ2, i, planner.settings.axis_steps_per_mm[Z_AXIS]); + #endif + #if AXIS_IS_TMC(Z3) + tmc_status(stepperZ3, i, planner.settings.axis_steps_per_mm[Z_AXIS]); + #endif + } - #if AXIS_IS_TMC(E0) - tmc_status(stepperE0, i, planner.settings.axis_steps_per_mm[E_AXIS]); - #endif - #if AXIS_IS_TMC(E1) - tmc_status(stepperE1, i, planner.settings.axis_steps_per_mm[E_AXIS - #if ENABLED(DISTINCT_E_FACTORS) - + 1 - #endif - ]); - #endif - #if AXIS_IS_TMC(E2) - tmc_status(stepperE2, i, planner.settings.axis_steps_per_mm[E_AXIS - #if ENABLED(DISTINCT_E_FACTORS) - + 2 - #endif - ]); - #endif - #if AXIS_IS_TMC(E3) - tmc_status(stepperE3, i, planner.settings.axis_steps_per_mm[E_AXIS - #if ENABLED(DISTINCT_E_FACTORS) - + 3 - #endif - ]); - #endif - #if AXIS_IS_TMC(E4) - tmc_status(stepperE4, i, planner.settings.axis_steps_per_mm[E_AXIS - #if ENABLED(DISTINCT_E_FACTORS) - + 4 - #endif - ]); - #endif - #if AXIS_IS_TMC(E5) - tmc_status(stepperE5, i, planner.settings.axis_steps_per_mm[E_AXIS - #if ENABLED(DISTINCT_E_FACTORS) - + 5 - #endif - ]); - #endif + if (print_e) { + #if AXIS_IS_TMC(E0) + tmc_status(stepperE0, i, planner.settings.axis_steps_per_mm[E_AXIS]); + #endif + #if AXIS_IS_TMC(E1) + tmc_status(stepperE1, i, planner.settings.axis_steps_per_mm[E_AXIS + #if ENABLED(DISTINCT_E_FACTORS) + + 1 + #endif + ]); + #endif + #if AXIS_IS_TMC(E2) + tmc_status(stepperE2, i, planner.settings.axis_steps_per_mm[E_AXIS + #if ENABLED(DISTINCT_E_FACTORS) + + 2 + #endif + ]); + #endif + #if AXIS_IS_TMC(E3) + tmc_status(stepperE3, i, planner.settings.axis_steps_per_mm[E_AXIS + #if ENABLED(DISTINCT_E_FACTORS) + + 3 + #endif + ]); + #endif + #if AXIS_IS_TMC(E4) + tmc_status(stepperE4, i, planner.settings.axis_steps_per_mm[E_AXIS + #if ENABLED(DISTINCT_E_FACTORS) + + 4 + #endif + ]); + #endif + #if AXIS_IS_TMC(E5) + tmc_status(stepperE5, i, planner.settings.axis_steps_per_mm[E_AXIS + #if ENABLED(DISTINCT_E_FACTORS) + + 5 + #endif + ]); + #endif + } SERIAL_EOL(); } - static void drv_status_loop(const TMC_drv_status_enum i) { - #if AXIS_IS_TMC(X) - tmc_parse_drv_status(stepperX, i); - #endif - #if AXIS_IS_TMC(X2) - tmc_parse_drv_status(stepperX2, i); - #endif + static void drv_status_loop(const TMC_drv_status_enum i, const bool print_x, const bool print_y, const bool print_z, const bool print_e) { + if (print_x) { + #if AXIS_IS_TMC(X) + tmc_parse_drv_status(stepperX, i); + #endif + #if AXIS_IS_TMC(X2) + tmc_parse_drv_status(stepperX2, i); + #endif + } - #if AXIS_IS_TMC(Y) - tmc_parse_drv_status(stepperY, i); - #endif - #if AXIS_IS_TMC(Y2) - tmc_parse_drv_status(stepperY2, i); - #endif + if (print_y) { + #if AXIS_IS_TMC(Y) + tmc_parse_drv_status(stepperY, i); + #endif + #if AXIS_IS_TMC(Y2) + tmc_parse_drv_status(stepperY2, i); + #endif + } - #if AXIS_IS_TMC(Z) - tmc_parse_drv_status(stepperZ, i); - #endif - #if AXIS_IS_TMC(Z2) - tmc_parse_drv_status(stepperZ2, i); - #endif - #if AXIS_IS_TMC(Z3) - tmc_parse_drv_status(stepperZ3, i); - #endif + if (print_z) { + #if AXIS_IS_TMC(Z) + tmc_parse_drv_status(stepperZ, i); + #endif + #if AXIS_IS_TMC(Z2) + tmc_parse_drv_status(stepperZ2, i); + #endif + #if AXIS_IS_TMC(Z3) + tmc_parse_drv_status(stepperZ3, i); + #endif + } - #if AXIS_IS_TMC(E0) - tmc_parse_drv_status(stepperE0, i); - #endif - #if AXIS_IS_TMC(E1) - tmc_parse_drv_status(stepperE1, i); - #endif - #if AXIS_IS_TMC(E2) - tmc_parse_drv_status(stepperE2, i); - #endif - #if AXIS_IS_TMC(E3) - tmc_parse_drv_status(stepperE3, i); - #endif - #if AXIS_IS_TMC(E4) - tmc_parse_drv_status(stepperE4, i); - #endif - #if AXIS_IS_TMC(E5) - tmc_parse_drv_status(stepperE5, i); - #endif + if (print_e) { + #if AXIS_IS_TMC(E0) + tmc_parse_drv_status(stepperE0, i); + #endif + #if AXIS_IS_TMC(E1) + tmc_parse_drv_status(stepperE1, i); + #endif + #if AXIS_IS_TMC(E2) + tmc_parse_drv_status(stepperE2, i); + #endif + #if AXIS_IS_TMC(E3) + tmc_parse_drv_status(stepperE3, i); + #endif + #if AXIS_IS_TMC(E4) + tmc_parse_drv_status(stepperE4, i); + #endif + #if AXIS_IS_TMC(E5) + tmc_parse_drv_status(stepperE5, i); + #endif + } SERIAL_EOL(); } @@ -607,9 +643,9 @@ * M122 report functions */ - void tmc_report_all() { - #define TMC_REPORT(LABEL, ITEM) do{ SERIAL_ECHOPGM(LABEL); tmc_debug_loop(ITEM); }while(0) - #define DRV_REPORT(LABEL, ITEM) do{ SERIAL_ECHOPGM(LABEL); drv_status_loop(ITEM); }while(0) + void tmc_report_all(bool print_x, const bool print_y, const bool print_z, const bool print_e) { + #define TMC_REPORT(LABEL, ITEM) do{ SERIAL_ECHOPGM(LABEL); tmc_debug_loop(ITEM, print_x, print_y, print_z, print_e); }while(0) + #define DRV_REPORT(LABEL, ITEM) do{ SERIAL_ECHOPGM(LABEL); drv_status_loop(ITEM, print_x, print_y, print_z, print_e); }while(0) TMC_REPORT("\t", TMC_CODES); TMC_REPORT("Enabled\t", TMC_ENABLED); TMC_REPORT("Set current", TMC_CURRENT); @@ -661,6 +697,135 @@ SERIAL_EOL(); } + #define PRINT_TMC_REGISTER(REG_CASE) case TMC_GET_##REG_CASE: print_hex_long(st.REG_CASE(), ':'); break + + #if HAS_DRIVER(TMC2130) + static void tmc_get_ic_registers(TMC2130Stepper &st, const TMC_get_registers_enum i) { + switch (i) { + PRINT_TMC_REGISTER(TCOOLTHRS); + PRINT_TMC_REGISTER(THIGH); + PRINT_TMC_REGISTER(COOLCONF); + default: SERIAL_CHAR('\t'); break; + } + } + #endif + #if HAS_DRIVER(TMC2208) + static void tmc_get_ic_registers(TMC2208Stepper, const TMC_get_registers_enum) { SERIAL_CHAR('\t'); } + #endif + + #if HAS_TRINAMIC + template + static void tmc_get_registers(TMC &st, const TMC_get_registers_enum i) { + switch (i) { + case TMC_AXIS_CODES: SERIAL_CHAR('\t'); st.printLabel(); break; + PRINT_TMC_REGISTER(GCONF); + PRINT_TMC_REGISTER(IHOLD_IRUN); + PRINT_TMC_REGISTER(GSTAT); + PRINT_TMC_REGISTER(IOIN); + PRINT_TMC_REGISTER(TPOWERDOWN); + PRINT_TMC_REGISTER(TSTEP); + PRINT_TMC_REGISTER(TPWMTHRS); + PRINT_TMC_REGISTER(CHOPCONF); + PRINT_TMC_REGISTER(PWMCONF); + PRINT_TMC_REGISTER(PWM_SCALE); + PRINT_TMC_REGISTER(DRV_STATUS); + default: tmc_get_ic_registers(st, i); break; + } + SERIAL_CHAR('\t'); + } + #endif + #if HAS_DRIVER(TMC2660) + template + static void tmc_get_registers(TMCMarlin &st, const TMC_get_registers_enum i) { + switch (i) { + case TMC_AXIS_CODES: SERIAL_CHAR('\t'); st.printLabel(); break; + PRINT_TMC_REGISTER(DRVCONF); + PRINT_TMC_REGISTER(DRVCTRL); + PRINT_TMC_REGISTER(CHOPCONF); + PRINT_TMC_REGISTER(DRVSTATUS); + PRINT_TMC_REGISTER(SGCSCONF); + PRINT_TMC_REGISTER(SMARTEN); + default: SERIAL_CHAR('\t'); break; + } + SERIAL_CHAR('\t'); + } + #endif + + static void tmc_get_registers(TMC_get_registers_enum i, const bool print_x, const bool print_y, const bool print_z, const bool print_e) { + if (print_x) { + #if AXIS_IS_TMC(X) + tmc_get_registers(stepperX, i); + #endif + #if AXIS_IS_TMC(X2) + tmc_get_registers(stepperX2, i); + #endif + } + + if (print_y) { + #if AXIS_IS_TMC(Y) + tmc_get_registers(stepperY, i); + #endif + #if AXIS_IS_TMC(Y2) + tmc_get_registers(stepperY2, i); + #endif + } + + if (print_z) { + #if AXIS_IS_TMC(Z) + tmc_get_registers(stepperZ, i); + #endif + #if AXIS_IS_TMC(Z2) + tmc_get_registers(stepperZ2, i); + #endif + #if AXIS_IS_TMC(Z3) + tmc_get_registers(stepperZ3, i); + #endif + } + + if (print_e) { + #if AXIS_IS_TMC(E0) + tmc_get_registers(stepperE0, i); + #endif + #if AXIS_IS_TMC(E1) + tmc_get_registers(stepperE1, i); + #endif + #if AXIS_IS_TMC(E2) + tmc_get_registers(stepperE2, i); + #endif + #if AXIS_IS_TMC(E3) + tmc_get_registers(stepperE3, i); + #endif + #if AXIS_IS_TMC(E4) + tmc_get_registers(stepperE4, i); + #endif + #if AXIS_IS_TMC(E5) + tmc_get_registers(stepperE5, i); + #endif + } + + SERIAL_EOL(); + } + + void tmc_get_registers(bool print_x, bool print_y, bool print_z, bool print_e) { + #define _TMC_GET_REG(LABEL, ITEM) do{ SERIAL_ECHOPGM(LABEL); tmc_get_registers(ITEM, print_x, print_y, print_z, print_e); }while(0) + #define TMC_GET_REG(NAME, TABS) _TMC_GET_REG(STRINGIFY(NAME) TABS, TMC_GET_##NAME) + _TMC_GET_REG("\t", TMC_AXIS_CODES); + TMC_GET_REG(GCONF, "\t\t"); + TMC_GET_REG(IHOLD_IRUN, "\t"); + TMC_GET_REG(GSTAT, "\t\t"); + TMC_GET_REG(IOIN, "\t\t"); + TMC_GET_REG(TPOWERDOWN, "\t"); + TMC_GET_REG(TSTEP, "\t\t"); + TMC_GET_REG(TPWMTHRS, "\t"); + TMC_GET_REG(TCOOLTHRS, "\t"); + TMC_GET_REG(THIGH, "\t\t"); + TMC_GET_REG(CHOPCONF, "\t"); + TMC_GET_REG(COOLCONF, "\t"); + TMC_GET_REG(PWMCONF, "\t"); + TMC_GET_REG(PWM_SCALE, "\t"); + TMC_GET_REG(DRV_STATUS, "\t"); + } + #endif // TMC_DEBUG #if USE_SENSORLESS @@ -736,4 +901,83 @@ } #endif // TMC_HAS_SPI +template +static bool test_connection(TMC &st) { + SERIAL_ECHOPGM("Testing "); + st.printLabel(); + SERIAL_ECHOPGM(" connection... "); + const uint8_t test_result = st.test_connection(); + + if (test_result > 0) SERIAL_ECHOPGM("Error: All "); + + const char *stat; + switch (test_result) { + default: + case 0: stat = PSTR("OK"); break; + case 1: stat = PSTR("HIGH"); break; + case 2: stat = PSTR("LOW"); break; + } + serialprintPGM(stat); + SERIAL_EOL(); + + return test_result; +} + +void test_tmc_connection(const bool test_x, const bool test_y, const bool test_z, const bool test_e) { + uint8_t axis_connection = 0; + + if (test_x) { + #if AXIS_IS_TMC(X) + axis_connection += test_connection(stepperX); + #endif + #if AXIS_IS_TMC(X2) + axis_connection += test_connection(stepperX2); + #endif + } + + if (test_y) { + #if AXIS_IS_TMC(Y) + axis_connection += test_connection(stepperY); + #endif + #if AXIS_IS_TMC(Y2) + axis_connection += test_connection(stepperY2); + #endif + } + + if (test_z) { + #if AXIS_IS_TMC(Z) + axis_connection += test_connection(stepperZ); + #endif + #if AXIS_IS_TMC(Z2) + axis_connection += test_connection(stepperZ2); + #endif + #if AXIS_IS_TMC(Z3) + axis_connection += test_connection(stepperZ3); + #endif + } + + if (test_e) { + #if AXIS_IS_TMC(E0) + axis_connection += test_connection(stepperE0); + #endif + #if AXIS_IS_TMC(E1) + axis_connection += test_connection(stepperE1); + #endif + #if AXIS_IS_TMC(E2) + axis_connection += test_connection(stepperE2); + #endif + #if AXIS_IS_TMC(E3) + axis_connection += test_connection(stepperE3); + #endif + #if AXIS_IS_TMC(E4) + axis_connection += test_connection(stepperE4); + #endif + #if AXIS_IS_TMC(E5) + axis_connection += test_connection(stepperE5); + #endif + } + + if (axis_connection) ui.set_status_P(PSTR("TMC CONNECTION ERROR")); +} + #endif // HAS_TRINAMIC diff --git a/Marlin/src/feature/tmc_util.h b/Marlin/src/feature/tmc_util.h index 7e075cd454..d9bf8143f6 100644 --- a/Marlin/src/feature/tmc_util.h +++ b/Marlin/src/feature/tmc_util.h @@ -22,6 +22,7 @@ #pragma once #include "../inc/MarlinConfig.h" +#include "../lcd/ultralcd.h" #if HAS_TRINAMIC #include #endif @@ -155,12 +156,14 @@ void tmc_set_sgt(TMC &st, const int8_t sgt_val) { } void monitor_tmc_driver(); +void test_tmc_connection(const bool test_x, const bool test_y, const bool test_z, const bool test_e); #if ENABLED(TMC_DEBUG) #if ENABLED(MONITOR_DRIVER_STATUS) void tmc_set_report_status(const bool status); #endif - void tmc_report_all(); + void tmc_report_all(const bool print_x, const bool print_y, const bool print_z, const bool print_e); + void tmc_get_registers(const bool print_x, const bool print_y, const bool print_z, const bool print_e); #endif /** diff --git a/Marlin/src/gcode/feature/trinamic/M122.cpp b/Marlin/src/gcode/feature/trinamic/M122.cpp index 73e6b3c846..fb1e4b9ef8 100644 --- a/Marlin/src/gcode/feature/trinamic/M122.cpp +++ b/Marlin/src/gcode/feature/trinamic/M122.cpp @@ -22,7 +22,7 @@ #include "../../../inc/MarlinConfig.h" -#if ENABLED(TMC_DEBUG) +#if HAS_TRINAMIC #include "../../gcode.h" #include "../../../feature/tmc_util.h" @@ -31,14 +31,25 @@ * M122: Debug TMC drivers */ void GcodeSuite::M122() { + bool print_axis[XYZE] = { false, false, false, false }, + print_all = true; + LOOP_XYZE(i) if (parser.seen(axis_codes[i])) { print_axis[i] = true; print_all = false; } - #if ENABLED(MONITOR_DRIVER_STATUS) - if (parser.seen('S')) - tmc_set_report_status(parser.value_bool()); + if (print_all) LOOP_XYZE(i) print_axis[i] = true; + + #if ENABLED(TMC_DEBUG) + #if ENABLED(MONITOR_DRIVER_STATUS) + if (parser.seen('S')) + tmc_set_report_status(parser.value_bool()); + #endif + + if (parser.seen('V')) + tmc_get_registers(print_axis[X_AXIS], print_axis[Y_AXIS], print_axis[Z_AXIS], print_axis[E_AXIS]); else + tmc_report_all(print_axis[X_AXIS], print_axis[Y_AXIS], print_axis[Z_AXIS], print_axis[E_AXIS]); #endif - tmc_report_all(); + test_tmc_connection(print_axis[X_AXIS], print_axis[Y_AXIS], print_axis[Z_AXIS], print_axis[E_AXIS]); } -#endif // TMC_DEBUG +#endif // HAS_TRINAMIC diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index 5f7e4b1f0a..973d8713ea 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -650,9 +650,7 @@ void GcodeSuite::process_parsed_command( #endif #if HAS_TRINAMIC - #if ENABLED(TMC_DEBUG) - case 122: M122(); break; - #endif + case 122: M122(); break; case 906: M906(); break; // M906: Set motor current in milliamps using axis codes X, Y, Z, E #if ENABLED(MONITOR_DRIVER_STATUS) case 911: M911(); break; // M911: Report TMC2130 prewarn triggered flags diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index a3dc074ae0..07582bc351 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -792,9 +792,7 @@ private: #endif #if HAS_TRINAMIC - #if ENABLED(TMC_DEBUG) - static void M122(); - #endif + static void M122(); static void M906(); #if ENABLED(MONITOR_DRIVER_STATUS) static void M911(); diff --git a/Marlin/src/libs/hex_print_routines.cpp b/Marlin/src/libs/hex_print_routines.cpp index ebf8bca7ec..912c24fe7e 100644 --- a/Marlin/src/libs/hex_print_routines.cpp +++ b/Marlin/src/libs/hex_print_routines.cpp @@ -23,7 +23,7 @@ #include "../inc/MarlinConfig.h" #include "../gcode/parser.h" -#if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(M100_FREE_MEMORY_WATCHER) || ENABLED(DEBUG_GCODE_PARSER) +#if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(M100_FREE_MEMORY_WATCHER) || ENABLED(DEBUG_GCODE_PARSER) || ENABLED(TMC_DEBUG) #include "hex_print_routines.h" @@ -78,4 +78,13 @@ void print_hex_word(const uint16_t w) { SERIAL_ECHO(hex_word(w)); } void print_hex_address(const void * const w) { SERIAL_ECHO(hex_address(w)); } + void print_hex_long(const uint32_t w, const char delimiter) { + SERIAL_ECHOPGM("0x"); + for (int B = 24; B >= 8; B -= 8){ + print_hex_byte(w >> B); + SERIAL_CHAR(delimiter); + } + print_hex_byte(w); + } + #endif // AUTO_BED_LEVELING_UBL || M100_FREE_MEMORY_WATCHER || DEBUG_GCODE_PARSER diff --git a/Marlin/src/libs/hex_print_routines.h b/Marlin/src/libs/hex_print_routines.h index 2033e5670b..864306bb9c 100644 --- a/Marlin/src/libs/hex_print_routines.h +++ b/Marlin/src/libs/hex_print_routines.h @@ -38,6 +38,7 @@ void print_hex_nybble(const uint8_t n); void print_hex_byte(const uint8_t b); void print_hex_word(const uint16_t w); void print_hex_address(const void * const w); +void print_hex_long(const uint32_t w, const char delimiter); #ifdef CPU_32_BIT typedef uint32_t ptr_int_t; diff --git a/Marlin/src/module/stepper_indirection.cpp b/Marlin/src/module/stepper_indirection.cpp index b64e646379..248582ce95 100644 --- a/Marlin/src/module/stepper_indirection.cpp +++ b/Marlin/src/module/stepper_indirection.cpp @@ -205,12 +205,14 @@ void tmc_init(TMCMarlin &st, const uint16_t mA, const uint16_t microsteps, const uint32_t thrs, const float spmm, const bool stealth) { st.begin(); + static constexpr int8_t timings[] = CHOPPER_TIMING; // Default 4, -2, 1 + CHOPCONF_t chopconf{0}; chopconf.tbl = 1; - chopconf.toff = 3; + chopconf.toff = timings[0]; chopconf.intpol = INTERPOLATE; - chopconf.hstrt = 2; - chopconf.hend = 5; + chopconf.hend = timings[1] + 3; + chopconf.hstrt = timings[2] - 1; st.CHOPCONF(chopconf.sr); st.rms_current(mA, HOLD_MULTIPLIER); @@ -440,6 +442,8 @@ template void tmc_init(TMCMarlin &st, const uint16_t mA, const uint16_t microsteps, const uint32_t thrs, const float spmm, const bool stealth) { + static constexpr int8_t timings[] = CHOPPER_TIMING; // Default 4, -2, 1 + TMC2208_n::GCONF_t gconf{0}; gconf.pdn_disable = true; // Use UART gconf.mstep_reg_select = true; // Select microsteps with UART @@ -449,10 +453,10 @@ TMC2208_n::CHOPCONF_t chopconf{0}; chopconf.tbl = 0b01; // blank_time = 24 - chopconf.toff = 5; + chopconf.toff = timings[0]; chopconf.intpol = INTERPOLATE; - chopconf.hstrt = 2; - chopconf.hend = 5; + chopconf.hend = timings[1] + 3; + chopconf.hstrt = timings[2] - 1; st.CHOPCONF(chopconf.sr); st.rms_current(mA, HOLD_MULTIPLIER); @@ -540,13 +544,20 @@ template void tmc_init(TMCMarlin &st, const uint16_t mA, const uint16_t microsteps, const uint32_t, const float, const bool) { st.begin(); + + static constexpr int8_t timings[] = CHOPPER_TIMING; // Default 4, -2, 1 + + TMC2660_n::CHOPCONF_t chopconf{0}; + chopconf.tbl = 1; + chopconf.toff = timings[0]; + chopconf.hend = timings[1] + 3; + chopconf.hstrt = timings[2] - 1; + st.CHOPCONF(chopconf.sr); + st.rms_current(mA); st.microsteps(microsteps); - st.blank_time(24); - st.toff(5); // Only enables the driver if used with stealthChop st.intpol(INTERPOLATE); - //st.hysteresis_start(3); - //st.hysteresis_end(2); + st.diss2g(true); // Disable short to ground protection. Too many false readings? } #endif // TMC2660