Skip to content

Commit

Permalink
TMC connection test, spreadCycle parameters, improved debugging (Marl…
Browse files Browse the repository at this point in the history
  • Loading branch information
teemuatlut authored and Weruminger committed Jan 6, 2019
1 parent cbe8c24 commit 75f0df9
Show file tree
Hide file tree
Showing 71 changed files with 917 additions and 452 deletions.
13 changes: 8 additions & 5 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -1415,6 +1412,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.
Expand Down
4 changes: 4 additions & 0 deletions Marlin/src/Marlin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

/**
Expand Down
13 changes: 8 additions & 5 deletions Marlin/src/config/default/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.
Expand Down
13 changes: 8 additions & 5 deletions Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.
Expand Down
13 changes: 8 additions & 5 deletions Marlin/src/config/examples/Anet/A2/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.
Expand Down
13 changes: 8 additions & 5 deletions Marlin/src/config/examples/Anet/A2plus/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.
Expand Down
13 changes: 8 additions & 5 deletions Marlin/src/config/examples/Anet/A6/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.
Expand Down
13 changes: 8 additions & 5 deletions Marlin/src/config/examples/Anet/A8/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.
Expand Down
13 changes: 8 additions & 5 deletions Marlin/src/config/examples/ArmEd/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.
Expand Down
13 changes: 8 additions & 5 deletions Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.
Expand Down
Loading

0 comments on commit 75f0df9

Please sign in to comment.