Ver código fonte

M569 to change stepping mode. Add new TMC section to LCD. (#12884)

teemuatlut 5 anos atrás
pai
commit
e6805582a6
84 arquivos alterados com 1541 adições e 79 exclusões
  1. 8
    0
      Marlin/Configuration_adv.h
  2. 8
    0
      Marlin/src/config/default/Configuration_adv.h
  3. 8
    0
      Marlin/src/config/examples/3DFabXYZ/Migbot/Configuration_adv.h
  4. 8
    0
      Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h
  5. 8
    0
      Marlin/src/config/examples/Anet/A2/Configuration_adv.h
  6. 8
    0
      Marlin/src/config/examples/Anet/A2plus/Configuration_adv.h
  7. 8
    0
      Marlin/src/config/examples/Anet/A6/Configuration_adv.h
  8. 8
    0
      Marlin/src/config/examples/Anet/A8/Configuration_adv.h
  9. 8
    0
      Marlin/src/config/examples/ArmEd/Configuration_adv.h
  10. 8
    0
      Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h
  11. 8
    0
      Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h
  12. 8
    0
      Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h
  13. 8
    0
      Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h
  14. 8
    0
      Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h
  15. 8
    0
      Marlin/src/config/examples/Cartesio/Configuration_adv.h
  16. 8
    0
      Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h
  17. 8
    0
      Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h
  18. 8
    0
      Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h
  19. 8
    0
      Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h
  20. 8
    0
      Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h
  21. 8
    0
      Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h
  22. 8
    0
      Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h
  23. 8
    0
      Marlin/src/config/examples/Einstart-S/Configuration_adv.h
  24. 8
    0
      Marlin/src/config/examples/Felix/Configuration_adv.h
  25. 8
    0
      Marlin/src/config/examples/FlashForge/CreatorPro/Configuration_adv.h
  26. 8
    0
      Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h
  27. 8
    0
      Marlin/src/config/examples/Formbot/Raptor/Configuration_adv.h
  28. 8
    0
      Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration_adv.h
  29. 8
    0
      Marlin/src/config/examples/Formbot/T_Rex_3/Configuration_adv.h
  30. 8
    0
      Marlin/src/config/examples/Geeetech/MeCreator2/Configuration_adv.h
  31. 8
    0
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h
  32. 8
    0
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h
  33. 8
    0
      Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h
  34. 8
    0
      Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h
  35. 8
    0
      Marlin/src/config/examples/MakerParts/Configuration_adv.h
  36. 8
    0
      Marlin/src/config/examples/Malyan/M150/Configuration_adv.h
  37. 8
    0
      Marlin/src/config/examples/Malyan/M200/Configuration_adv.h
  38. 8
    0
      Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h
  39. 8
    0
      Marlin/src/config/examples/Mks/Robin/Configuration_adv.h
  40. 8
    0
      Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h
  41. 8
    0
      Marlin/src/config/examples/RigidBot/Configuration_adv.h
  42. 8
    0
      Marlin/src/config/examples/SCARA/Configuration_adv.h
  43. 8
    0
      Marlin/src/config/examples/Sanguinololu/Configuration_adv.h
  44. 8
    0
      Marlin/src/config/examples/TheBorg/Configuration_adv.h
  45. 8
    0
      Marlin/src/config/examples/TinyBoy2/Configuration_adv.h
  46. 8
    0
      Marlin/src/config/examples/Tronxy/X3A/Configuration_adv.h
  47. 8
    0
      Marlin/src/config/examples/UltiMachine/Archim1/Configuration_adv.h
  48. 8
    0
      Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h
  49. 8
    0
      Marlin/src/config/examples/VORONDesign/Configuration_adv.h
  50. 8
    0
      Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h
  51. 8
    0
      Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h
  52. 8
    0
      Marlin/src/config/examples/WASP/PowerWASP/Configuration_adv.h
  53. 8
    0
      Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h
  54. 8
    0
      Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration_adv.h
  55. 8
    0
      Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h
  56. 8
    0
      Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h
  57. 8
    0
      Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h
  58. 8
    0
      Marlin/src/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h
  59. 8
    0
      Marlin/src/config/examples/delta/MKS/SBASE/Configuration_adv.h
  60. 8
    0
      Marlin/src/config/examples/delta/Tevo Little Monster/Configuration_adv.h
  61. 8
    0
      Marlin/src/config/examples/delta/generic/Configuration_adv.h
  62. 8
    0
      Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h
  63. 8
    0
      Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h
  64. 8
    0
      Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h
  65. 8
    0
      Marlin/src/config/examples/makibox/Configuration_adv.h
  66. 8
    0
      Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h
  67. 8
    0
      Marlin/src/config/examples/wt150/Configuration_adv.h
  68. 50
    0
      Marlin/src/feature/tmc_util.cpp
  69. 111
    13
      Marlin/src/feature/tmc_util.h
  70. 165
    0
      Marlin/src/gcode/feature/trinamic/M569.cpp
  71. 3
    0
      Marlin/src/gcode/gcode.cpp
  72. 4
    0
      Marlin/src/gcode/gcode.h
  73. 13
    13
      Marlin/src/inc/Conditionals_post.h
  74. 7
    7
      Marlin/src/inc/SanityCheck.h
  75. 5
    0
      Marlin/src/lcd/extensible_ui/ui_api.cpp
  76. 19
    0
      Marlin/src/lcd/language/language_en.h
  77. 2
    1
      Marlin/src/lcd/menu/menu.cpp
  78. 6
    3
      Marlin/src/lcd/menu/menu.h
  79. 5
    0
      Marlin/src/lcd/menu/menu_configuration.cpp
  80. 352
    0
      Marlin/src/lcd/menu/menu_tmc.cpp
  81. 8
    0
      Marlin/src/lcd/ultralcd.cpp
  82. 210
    1
      Marlin/src/module/configuration_store.cpp
  83. 11
    15
      Marlin/src/module/stepper_indirection.cpp
  84. 34
    26
      Marlin/src/module/stepper_indirection.h

+ 8
- 0
Marlin/Configuration_adv.h Ver arquivo

@@ -1382,6 +1382,14 @@
1382 1382
   //#define TMC_SW_SCK        -1
1383 1383
 
1384 1384
   /**
1385
+   * Software enable
1386
+   *
1387
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1388
+   * function through a communication line such as SPI or UART.
1389
+   */
1390
+  //#define SOFTWARE_DRIVER_ENABLE
1391
+
1392
+  /**
1385 1393
    * Use Trinamic's ultra quiet stepping mode.
1386 1394
    * When disabled, Marlin will use spreadCycle stepping mode.
1387 1395
    */

+ 8
- 0
Marlin/src/config/default/Configuration_adv.h Ver arquivo

@@ -1382,6 +1382,14 @@
1382 1382
   //#define TMC_SW_SCK        -1
1383 1383
 
1384 1384
   /**
1385
+   * Software enable
1386
+   *
1387
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1388
+   * function through a communication line such as SPI or UART.
1389
+   */
1390
+  //#define SOFTWARE_DRIVER_ENABLE
1391
+
1392
+  /**
1385 1393
    * Use Trinamic's ultra quiet stepping mode.
1386 1394
    * When disabled, Marlin will use spreadCycle stepping mode.
1387 1395
    */

+ 8
- 0
Marlin/src/config/examples/3DFabXYZ/Migbot/Configuration_adv.h Ver arquivo

@@ -1382,6 +1382,14 @@
1382 1382
   //#define TMC_SW_SCK        -1
1383 1383
 
1384 1384
   /**
1385
+   * Software enable
1386
+   *
1387
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1388
+   * function through a communication line such as SPI or UART.
1389
+   */
1390
+  //#define SOFTWARE_DRIVER_ENABLE
1391
+
1392
+  /**
1385 1393
    * Use Trinamic's ultra quiet stepping mode.
1386 1394
    * When disabled, Marlin will use spreadCycle stepping mode.
1387 1395
    */

+ 8
- 0
Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h Ver arquivo

@@ -1381,6 +1381,14 @@
1381 1381
   //#define TMC_SW_SCK        -1
1382 1382
 
1383 1383
   /**
1384
+   * Software enable
1385
+   *
1386
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1387
+   * function through a communication line such as SPI or UART.
1388
+   */
1389
+  //#define SOFTWARE_DRIVER_ENABLE
1390
+
1391
+  /**
1384 1392
    * Use Trinamic's ultra quiet stepping mode.
1385 1393
    * When disabled, Marlin will use spreadCycle stepping mode.
1386 1394
    */

+ 8
- 0
Marlin/src/config/examples/Anet/A2/Configuration_adv.h Ver arquivo

@@ -1381,6 +1381,14 @@
1381 1381
   //#define TMC_SW_SCK        -1
1382 1382
 
1383 1383
   /**
1384
+   * Software enable
1385
+   *
1386
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1387
+   * function through a communication line such as SPI or UART.
1388
+   */
1389
+  //#define SOFTWARE_DRIVER_ENABLE
1390
+
1391
+  /**
1384 1392
    * Use Trinamic's ultra quiet stepping mode.
1385 1393
    * When disabled, Marlin will use spreadCycle stepping mode.
1386 1394
    */

+ 8
- 0
Marlin/src/config/examples/Anet/A2plus/Configuration_adv.h Ver arquivo

@@ -1381,6 +1381,14 @@
1381 1381
   //#define TMC_SW_SCK        -1
1382 1382
 
1383 1383
   /**
1384
+   * Software enable
1385
+   *
1386
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1387
+   * function through a communication line such as SPI or UART.
1388
+   */
1389
+  //#define SOFTWARE_DRIVER_ENABLE
1390
+
1391
+  /**
1384 1392
    * Use Trinamic's ultra quiet stepping mode.
1385 1393
    * When disabled, Marlin will use spreadCycle stepping mode.
1386 1394
    */

+ 8
- 0
Marlin/src/config/examples/Anet/A6/Configuration_adv.h Ver arquivo

@@ -1380,6 +1380,14 @@
1380 1380
   //#define TMC_SW_SCK        -1
1381 1381
 
1382 1382
   /**
1383
+   * Software enable
1384
+   *
1385
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1386
+   * function through a communication line such as SPI or UART.
1387
+   */
1388
+  //#define SOFTWARE_DRIVER_ENABLE
1389
+
1390
+  /**
1383 1391
    * Use Trinamic's ultra quiet stepping mode.
1384 1392
    * When disabled, Marlin will use spreadCycle stepping mode.
1385 1393
    */

+ 8
- 0
Marlin/src/config/examples/Anet/A8/Configuration_adv.h Ver arquivo

@@ -1381,6 +1381,14 @@
1381 1381
   //#define TMC_SW_SCK        -1
1382 1382
 
1383 1383
   /**
1384
+   * Software enable
1385
+   *
1386
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1387
+   * function through a communication line such as SPI or UART.
1388
+   */
1389
+  //#define SOFTWARE_DRIVER_ENABLE
1390
+
1391
+  /**
1384 1392
    * Use Trinamic's ultra quiet stepping mode.
1385 1393
    * When disabled, Marlin will use spreadCycle stepping mode.
1386 1394
    */

+ 8
- 0
Marlin/src/config/examples/ArmEd/Configuration_adv.h Ver arquivo

@@ -1355,6 +1355,14 @@
1355 1355
   //#define TMC_SW_SCK        -1
1356 1356
 
1357 1357
   /**
1358
+   * Software enable
1359
+   *
1360
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1361
+   * function through a communication line such as SPI or UART.
1362
+   */
1363
+  //#define SOFTWARE_DRIVER_ENABLE
1364
+
1365
+  /**
1358 1366
    * Use Trinamic's ultra quiet stepping mode.
1359 1367
    * When disabled, Marlin will use spreadCycle stepping mode.
1360 1368
    */

+ 8
- 0
Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h Ver arquivo

@@ -1380,6 +1380,14 @@
1380 1380
   //#define TMC_SW_SCK        -1
1381 1381
 
1382 1382
   /**
1383
+   * Software enable
1384
+   *
1385
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1386
+   * function through a communication line such as SPI or UART.
1387
+   */
1388
+  //#define SOFTWARE_DRIVER_ENABLE
1389
+
1390
+  /**
1383 1391
    * Use Trinamic's ultra quiet stepping mode.
1384 1392
    * When disabled, Marlin will use spreadCycle stepping mode.
1385 1393
    */

+ 8
- 0
Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h Ver arquivo

@@ -1381,6 +1381,14 @@
1381 1381
   //#define TMC_SW_SCK        -1
1382 1382
 
1383 1383
   /**
1384
+   * Software enable
1385
+   *
1386
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1387
+   * function through a communication line such as SPI or UART.
1388
+   */
1389
+  //#define SOFTWARE_DRIVER_ENABLE
1390
+
1391
+  /**
1384 1392
    * Use Trinamic's ultra quiet stepping mode.
1385 1393
    * When disabled, Marlin will use spreadCycle stepping mode.
1386 1394
    */

+ 8
- 0
Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h Ver arquivo

@@ -1381,6 +1381,14 @@
1381 1381
   //#define TMC_SW_SCK        -1
1382 1382
 
1383 1383
   /**
1384
+   * Software enable
1385
+   *
1386
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1387
+   * function through a communication line such as SPI or UART.
1388
+   */
1389
+  //#define SOFTWARE_DRIVER_ENABLE
1390
+
1391
+  /**
1384 1392
    * Use Trinamic's ultra quiet stepping mode.
1385 1393
    * When disabled, Marlin will use spreadCycle stepping mode.
1386 1394
    */

+ 8
- 0
Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h Ver arquivo

@@ -1389,6 +1389,14 @@
1389 1389
   //#define TMC_SW_SCK        -1
1390 1390
 
1391 1391
   /**
1392
+   * Software enable
1393
+   *
1394
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1395
+   * function through a communication line such as SPI or UART.
1396
+   */
1397
+  //#define SOFTWARE_DRIVER_ENABLE
1398
+
1399
+  /**
1392 1400
    * Use Trinamic's ultra quiet stepping mode.
1393 1401
    * When disabled, Marlin will use spreadCycle stepping mode.
1394 1402
    */

+ 8
- 0
Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h Ver arquivo

@@ -1381,6 +1381,14 @@
1381 1381
   //#define TMC_SW_SCK        -1
1382 1382
 
1383 1383
   /**
1384
+   * Software enable
1385
+   *
1386
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1387
+   * function through a communication line such as SPI or UART.
1388
+   */
1389
+  //#define SOFTWARE_DRIVER_ENABLE
1390
+
1391
+  /**
1384 1392
    * Use Trinamic's ultra quiet stepping mode.
1385 1393
    * When disabled, Marlin will use spreadCycle stepping mode.
1386 1394
    */

+ 8
- 0
Marlin/src/config/examples/Cartesio/Configuration_adv.h Ver arquivo

@@ -1381,6 +1381,14 @@
1381 1381
   //#define TMC_SW_SCK        -1
1382 1382
 
1383 1383
   /**
1384
+   * Software enable
1385
+   *
1386
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1387
+   * function through a communication line such as SPI or UART.
1388
+   */
1389
+  //#define SOFTWARE_DRIVER_ENABLE
1390
+
1391
+  /**
1384 1392
    * Use Trinamic's ultra quiet stepping mode.
1385 1393
    * When disabled, Marlin will use spreadCycle stepping mode.
1386 1394
    */

+ 8
- 0
Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h Ver arquivo

@@ -1381,6 +1381,14 @@
1381 1381
   //#define TMC_SW_SCK        -1
1382 1382
 
1383 1383
   /**
1384
+   * Software enable
1385
+   *
1386
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1387
+   * function through a communication line such as SPI or UART.
1388
+   */
1389
+  //#define SOFTWARE_DRIVER_ENABLE
1390
+
1391
+  /**
1384 1392
    * Use Trinamic's ultra quiet stepping mode.
1385 1393
    * When disabled, Marlin will use spreadCycle stepping mode.
1386 1394
    */

+ 8
- 0
Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h Ver arquivo

@@ -1381,6 +1381,14 @@
1381 1381
   //#define TMC_SW_SCK        -1
1382 1382
 
1383 1383
   /**
1384
+   * Software enable
1385
+   *
1386
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1387
+   * function through a communication line such as SPI or UART.
1388
+   */
1389
+  //#define SOFTWARE_DRIVER_ENABLE
1390
+
1391
+  /**
1384 1392
    * Use Trinamic's ultra quiet stepping mode.
1385 1393
    * When disabled, Marlin will use spreadCycle stepping mode.
1386 1394
    */

+ 8
- 0
Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h Ver arquivo

@@ -1381,6 +1381,14 @@
1381 1381
   //#define TMC_SW_SCK        -1
1382 1382
 
1383 1383
   /**
1384
+   * Software enable
1385
+   *
1386
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1387
+   * function through a communication line such as SPI or UART.
1388
+   */
1389
+  //#define SOFTWARE_DRIVER_ENABLE
1390
+
1391
+  /**
1384 1392
    * Use Trinamic's ultra quiet stepping mode.
1385 1393
    * When disabled, Marlin will use spreadCycle stepping mode.
1386 1394
    */

+ 8
- 0
Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h Ver arquivo

@@ -1381,6 +1381,14 @@
1381 1381
   //#define TMC_SW_SCK        -1
1382 1382
 
1383 1383
   /**
1384
+   * Software enable
1385
+   *
1386
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1387
+   * function through a communication line such as SPI or UART.
1388
+   */
1389
+  //#define SOFTWARE_DRIVER_ENABLE
1390
+
1391
+  /**
1384 1392
    * Use Trinamic's ultra quiet stepping mode.
1385 1393
    * When disabled, Marlin will use spreadCycle stepping mode.
1386 1394
    */

+ 8
- 0
Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h Ver arquivo

@@ -1381,6 +1381,14 @@
1381 1381
   //#define TMC_SW_SCK        -1
1382 1382
 
1383 1383
   /**
1384
+   * Software enable
1385
+   *
1386
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1387
+   * function through a communication line such as SPI or UART.
1388
+   */
1389
+  //#define SOFTWARE_DRIVER_ENABLE
1390
+
1391
+  /**
1384 1392
    * Use Trinamic's ultra quiet stepping mode.
1385 1393
    * When disabled, Marlin will use spreadCycle stepping mode.
1386 1394
    */

+ 8
- 0
Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h Ver arquivo

@@ -1381,6 +1381,14 @@
1381 1381
   //#define TMC_SW_SCK        -1
1382 1382
 
1383 1383
   /**
1384
+   * Software enable
1385
+   *
1386
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1387
+   * function through a communication line such as SPI or UART.
1388
+   */
1389
+  //#define SOFTWARE_DRIVER_ENABLE
1390
+
1391
+  /**
1384 1392
    * Use Trinamic's ultra quiet stepping mode.
1385 1393
    * When disabled, Marlin will use spreadCycle stepping mode.
1386 1394
    */

+ 8
- 0
Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h Ver arquivo

@@ -1381,6 +1381,14 @@
1381 1381
   //#define TMC_SW_SCK        -1
1382 1382
 
1383 1383
   /**
1384
+   * Software enable
1385
+   *
1386
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1387
+   * function through a communication line such as SPI or UART.
1388
+   */
1389
+  //#define SOFTWARE_DRIVER_ENABLE
1390
+
1391
+  /**
1384 1392
    * Use Trinamic's ultra quiet stepping mode.
1385 1393
    * When disabled, Marlin will use spreadCycle stepping mode.
1386 1394
    */

+ 8
- 0
Marlin/src/config/examples/Einstart-S/Configuration_adv.h Ver arquivo

@@ -1381,6 +1381,14 @@
1381 1381
   //#define TMC_SW_SCK        -1
1382 1382
 
1383 1383
   /**
1384
+   * Software enable
1385
+   *
1386
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1387
+   * function through a communication line such as SPI or UART.
1388
+   */
1389
+  //#define SOFTWARE_DRIVER_ENABLE
1390
+
1391
+  /**
1384 1392
    * Use Trinamic's ultra quiet stepping mode.
1385 1393
    * When disabled, Marlin will use spreadCycle stepping mode.
1386 1394
    */

+ 8
- 0
Marlin/src/config/examples/Felix/Configuration_adv.h Ver arquivo

@@ -1381,6 +1381,14 @@
1381 1381
   //#define TMC_SW_SCK        -1
1382 1382
 
1383 1383
   /**
1384
+   * Software enable
1385
+   *
1386
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1387
+   * function through a communication line such as SPI or UART.
1388
+   */
1389
+  //#define SOFTWARE_DRIVER_ENABLE
1390
+
1391
+  /**
1384 1392
    * Use Trinamic's ultra quiet stepping mode.
1385 1393
    * When disabled, Marlin will use spreadCycle stepping mode.
1386 1394
    */

+ 8
- 0
Marlin/src/config/examples/FlashForge/CreatorPro/Configuration_adv.h Ver arquivo

@@ -1382,6 +1382,14 @@
1382 1382
   //#define TMC_SW_SCK        -1
1383 1383
 
1384 1384
   /**
1385
+   * Software enable
1386
+   *
1387
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1388
+   * function through a communication line such as SPI or UART.
1389
+   */
1390
+  //#define SOFTWARE_DRIVER_ENABLE
1391
+
1392
+  /**
1385 1393
    * Use Trinamic's ultra quiet stepping mode.
1386 1394
    * When disabled, Marlin will use spreadCycle stepping mode.
1387 1395
    */

+ 8
- 0
Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h Ver arquivo

@@ -1381,6 +1381,14 @@
1381 1381
   //#define TMC_SW_SCK        -1
1382 1382
 
1383 1383
   /**
1384
+   * Software enable
1385
+   *
1386
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1387
+   * function through a communication line such as SPI or UART.
1388
+   */
1389
+  //#define SOFTWARE_DRIVER_ENABLE
1390
+
1391
+  /**
1384 1392
    * Use Trinamic's ultra quiet stepping mode.
1385 1393
    * When disabled, Marlin will use spreadCycle stepping mode.
1386 1394
    */

+ 8
- 0
Marlin/src/config/examples/Formbot/Raptor/Configuration_adv.h Ver arquivo

@@ -1383,6 +1383,14 @@
1383 1383
   //#define TMC_SW_SCK        -1
1384 1384
 
1385 1385
   /**
1386
+   * Software enable
1387
+   *
1388
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1389
+   * function through a communication line such as SPI or UART.
1390
+   */
1391
+  //#define SOFTWARE_DRIVER_ENABLE
1392
+
1393
+  /**
1386 1394
    * Use Trinamic's ultra quiet stepping mode.
1387 1395
    * When disabled, Marlin will use spreadCycle stepping mode.
1388 1396
    */

+ 8
- 0
Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration_adv.h Ver arquivo

@@ -1386,6 +1386,14 @@
1386 1386
   //#define TMC_SW_SCK        -1
1387 1387
 
1388 1388
   /**
1389
+   * Software enable
1390
+   *
1391
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1392
+   * function through a communication line such as SPI or UART.
1393
+   */
1394
+  //#define SOFTWARE_DRIVER_ENABLE
1395
+
1396
+  /**
1389 1397
    * Use Trinamic's ultra quiet stepping mode.
1390 1398
    * When disabled, Marlin will use spreadCycle stepping mode.
1391 1399
    */

+ 8
- 0
Marlin/src/config/examples/Formbot/T_Rex_3/Configuration_adv.h Ver arquivo

@@ -1386,6 +1386,14 @@
1386 1386
   //#define TMC_SW_SCK        -1
1387 1387
 
1388 1388
   /**
1389
+   * Software enable
1390
+   *
1391
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1392
+   * function through a communication line such as SPI or UART.
1393
+   */
1394
+  //#define SOFTWARE_DRIVER_ENABLE
1395
+
1396
+  /**
1389 1397
    * Use Trinamic's ultra quiet stepping mode.
1390 1398
    * When disabled, Marlin will use spreadCycle stepping mode.
1391 1399
    */

+ 8
- 0
Marlin/src/config/examples/Geeetech/MeCreator2/Configuration_adv.h Ver arquivo

@@ -1382,6 +1382,14 @@
1382 1382
   //#define TMC_SW_SCK        -1
1383 1383
 
1384 1384
   /**
1385
+   * Software enable
1386
+   *
1387
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1388
+   * function through a communication line such as SPI or UART.
1389
+   */
1390
+  //#define SOFTWARE_DRIVER_ENABLE
1391
+
1392
+  /**
1385 1393
    * Use Trinamic's ultra quiet stepping mode.
1386 1394
    * When disabled, Marlin will use spreadCycle stepping mode.
1387 1395
    */

+ 8
- 0
Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h Ver arquivo

@@ -1381,6 +1381,14 @@
1381 1381
   //#define TMC_SW_SCK        -1
1382 1382
 
1383 1383
   /**
1384
+   * Software enable
1385
+   *
1386
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1387
+   * function through a communication line such as SPI or UART.
1388
+   */
1389
+  //#define SOFTWARE_DRIVER_ENABLE
1390
+
1391
+  /**
1384 1392
    * Use Trinamic's ultra quiet stepping mode.
1385 1393
    * When disabled, Marlin will use spreadCycle stepping mode.
1386 1394
    */

+ 8
- 0
Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h Ver arquivo

@@ -1381,6 +1381,14 @@
1381 1381
   //#define TMC_SW_SCK        -1
1382 1382
 
1383 1383
   /**
1384
+   * Software enable
1385
+   *
1386
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1387
+   * function through a communication line such as SPI or UART.
1388
+   */
1389
+  //#define SOFTWARE_DRIVER_ENABLE
1390
+
1391
+  /**
1384 1392
    * Use Trinamic's ultra quiet stepping mode.
1385 1393
    * When disabled, Marlin will use spreadCycle stepping mode.
1386 1394
    */

+ 8
- 0
Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h Ver arquivo

@@ -1381,6 +1381,14 @@
1381 1381
   //#define TMC_SW_SCK        -1
1382 1382
 
1383 1383
   /**
1384
+   * Software enable
1385
+   *
1386
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1387
+   * function through a communication line such as SPI or UART.
1388
+   */
1389
+  //#define SOFTWARE_DRIVER_ENABLE
1390
+
1391
+  /**
1384 1392
    * Use Trinamic's ultra quiet stepping mode.
1385 1393
    * When disabled, Marlin will use spreadCycle stepping mode.
1386 1394
    */

+ 8
- 0
Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h Ver arquivo

@@ -1381,6 +1381,14 @@
1381 1381
   //#define TMC_SW_SCK        -1
1382 1382
 
1383 1383
   /**
1384
+   * Software enable
1385
+   *
1386
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1387
+   * function through a communication line such as SPI or UART.
1388
+   */
1389
+  //#define SOFTWARE_DRIVER_ENABLE
1390
+
1391
+  /**
1384 1392
    * Use Trinamic's ultra quiet stepping mode.
1385 1393
    * When disabled, Marlin will use spreadCycle stepping mode.
1386 1394
    */

+ 8
- 0
Marlin/src/config/examples/MakerParts/Configuration_adv.h Ver arquivo

@@ -1381,6 +1381,14 @@
1381 1381
   //#define TMC_SW_SCK        -1
1382 1382
 
1383 1383
   /**
1384
+   * Software enable
1385
+   *
1386
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1387
+   * function through a communication line such as SPI or UART.
1388
+   */
1389
+  //#define SOFTWARE_DRIVER_ENABLE
1390
+
1391
+  /**
1384 1392
    * Use Trinamic's ultra quiet stepping mode.
1385 1393
    * When disabled, Marlin will use spreadCycle stepping mode.
1386 1394
    */

+ 8
- 0
Marlin/src/config/examples/Malyan/M150/Configuration_adv.h Ver arquivo

@@ -1381,6 +1381,14 @@
1381 1381
   //#define TMC_SW_SCK        -1
1382 1382
 
1383 1383
   /**
1384
+   * Software enable
1385
+   *
1386
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1387
+   * function through a communication line such as SPI or UART.
1388
+   */
1389
+  //#define SOFTWARE_DRIVER_ENABLE
1390
+
1391
+  /**
1384 1392
    * Use Trinamic's ultra quiet stepping mode.
1385 1393
    * When disabled, Marlin will use spreadCycle stepping mode.
1386 1394
    */

+ 8
- 0
Marlin/src/config/examples/Malyan/M200/Configuration_adv.h Ver arquivo

@@ -1381,6 +1381,14 @@
1381 1381
   //#define TMC_SW_SCK        -1
1382 1382
 
1383 1383
   /**
1384
+   * Software enable
1385
+   *
1386
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1387
+   * function through a communication line such as SPI or UART.
1388
+   */
1389
+  //#define SOFTWARE_DRIVER_ENABLE
1390
+
1391
+  /**
1384 1392
    * Use Trinamic's ultra quiet stepping mode.
1385 1393
    * When disabled, Marlin will use spreadCycle stepping mode.
1386 1394
    */

+ 8
- 0
Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h Ver arquivo

@@ -1381,6 +1381,14 @@
1381 1381
   //#define TMC_SW_SCK        -1
1382 1382
 
1383 1383
   /**
1384
+   * Software enable
1385
+   *
1386
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1387
+   * function through a communication line such as SPI or UART.
1388
+   */
1389
+  //#define SOFTWARE_DRIVER_ENABLE
1390
+
1391
+  /**
1384 1392
    * Use Trinamic's ultra quiet stepping mode.
1385 1393
    * When disabled, Marlin will use spreadCycle stepping mode.
1386 1394
    */

+ 8
- 0
Marlin/src/config/examples/Mks/Robin/Configuration_adv.h Ver arquivo

@@ -1382,6 +1382,14 @@
1382 1382
   //#define TMC_SW_SCK        -1
1383 1383
 
1384 1384
   /**
1385
+   * Software enable
1386
+   *
1387
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1388
+   * function through a communication line such as SPI or UART.
1389
+   */
1390
+  //#define SOFTWARE_DRIVER_ENABLE
1391
+
1392
+  /**
1385 1393
    * Use Trinamic's ultra quiet stepping mode.
1386 1394
    * When disabled, Marlin will use spreadCycle stepping mode.
1387 1395
    */

+ 8
- 0
Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h Ver arquivo

@@ -1389,6 +1389,14 @@
1389 1389
   //#define TMC_SW_SCK        -1
1390 1390
 
1391 1391
   /**
1392
+   * Software enable
1393
+   *
1394
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1395
+   * function through a communication line such as SPI or UART.
1396
+   */
1397
+  //#define SOFTWARE_DRIVER_ENABLE
1398
+
1399
+  /**
1392 1400
    * Use Trinamic's ultra quiet stepping mode.
1393 1401
    * When disabled, Marlin will use spreadCycle stepping mode.
1394 1402
    */

+ 8
- 0
Marlin/src/config/examples/RigidBot/Configuration_adv.h Ver arquivo

@@ -1381,6 +1381,14 @@
1381 1381
   //#define TMC_SW_SCK        -1
1382 1382
 
1383 1383
   /**
1384
+   * Software enable
1385
+   *
1386
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1387
+   * function through a communication line such as SPI or UART.
1388
+   */
1389
+  //#define SOFTWARE_DRIVER_ENABLE
1390
+
1391
+  /**
1384 1392
    * Use Trinamic's ultra quiet stepping mode.
1385 1393
    * When disabled, Marlin will use spreadCycle stepping mode.
1386 1394
    */

+ 8
- 0
Marlin/src/config/examples/SCARA/Configuration_adv.h Ver arquivo

@@ -1381,6 +1381,14 @@
1381 1381
   //#define TMC_SW_SCK        -1
1382 1382
 
1383 1383
   /**
1384
+   * Software enable
1385
+   *
1386
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1387
+   * function through a communication line such as SPI or UART.
1388
+   */
1389
+  //#define SOFTWARE_DRIVER_ENABLE
1390
+
1391
+  /**
1384 1392
    * Use Trinamic's ultra quiet stepping mode.
1385 1393
    * When disabled, Marlin will use spreadCycle stepping mode.
1386 1394
    */

+ 8
- 0
Marlin/src/config/examples/Sanguinololu/Configuration_adv.h Ver arquivo

@@ -1381,6 +1381,14 @@
1381 1381
   //#define TMC_SW_SCK        -1
1382 1382
 
1383 1383
   /**
1384
+   * Software enable
1385
+   *
1386
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1387
+   * function through a communication line such as SPI or UART.
1388
+   */
1389
+  //#define SOFTWARE_DRIVER_ENABLE
1390
+
1391
+  /**
1384 1392
    * Use Trinamic's ultra quiet stepping mode.
1385 1393
    * When disabled, Marlin will use spreadCycle stepping mode.
1386 1394
    */

+ 8
- 0
Marlin/src/config/examples/TheBorg/Configuration_adv.h Ver arquivo

@@ -1381,6 +1381,14 @@
1381 1381
   //#define TMC_SW_SCK        -1
1382 1382
 
1383 1383
   /**
1384
+   * Software enable
1385
+   *
1386
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1387
+   * function through a communication line such as SPI or UART.
1388
+   */
1389
+  //#define SOFTWARE_DRIVER_ENABLE
1390
+
1391
+  /**
1384 1392
    * Use Trinamic's ultra quiet stepping mode.
1385 1393
    * When disabled, Marlin will use spreadCycle stepping mode.
1386 1394
    */

+ 8
- 0
Marlin/src/config/examples/TinyBoy2/Configuration_adv.h Ver arquivo

@@ -1381,6 +1381,14 @@
1381 1381
   //#define TMC_SW_SCK        -1
1382 1382
 
1383 1383
   /**
1384
+   * Software enable
1385
+   *
1386
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1387
+   * function through a communication line such as SPI or UART.
1388
+   */
1389
+  //#define SOFTWARE_DRIVER_ENABLE
1390
+
1391
+  /**
1384 1392
    * Use Trinamic's ultra quiet stepping mode.
1385 1393
    * When disabled, Marlin will use spreadCycle stepping mode.
1386 1394
    */

+ 8
- 0
Marlin/src/config/examples/Tronxy/X3A/Configuration_adv.h Ver arquivo

@@ -1381,6 +1381,14 @@
1381 1381
   //#define TMC_SW_SCK        -1
1382 1382
 
1383 1383
   /**
1384
+   * Software enable
1385
+   *
1386
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1387
+   * function through a communication line such as SPI or UART.
1388
+   */
1389
+  //#define SOFTWARE_DRIVER_ENABLE
1390
+
1391
+  /**
1384 1392
    * Use Trinamic's ultra quiet stepping mode.
1385 1393
    * When disabled, Marlin will use spreadCycle stepping mode.
1386 1394
    */

+ 8
- 0
Marlin/src/config/examples/UltiMachine/Archim1/Configuration_adv.h Ver arquivo

@@ -1382,6 +1382,14 @@
1382 1382
   //#define TMC_SW_SCK        -1
1383 1383
 
1384 1384
   /**
1385
+   * Software enable
1386
+   *
1387
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1388
+   * function through a communication line such as SPI or UART.
1389
+   */
1390
+  //#define SOFTWARE_DRIVER_ENABLE
1391
+
1392
+  /**
1385 1393
    * Use Trinamic's ultra quiet stepping mode.
1386 1394
    * When disabled, Marlin will use spreadCycle stepping mode.
1387 1395
    */

+ 8
- 0
Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h Ver arquivo

@@ -1381,6 +1381,14 @@
1381 1381
   //#define TMC_SW_SCK        -1
1382 1382
 
1383 1383
   /**
1384
+   * Software enable
1385
+   *
1386
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1387
+   * function through a communication line such as SPI or UART.
1388
+   */
1389
+  //#define SOFTWARE_DRIVER_ENABLE
1390
+
1391
+  /**
1384 1392
    * Use Trinamic's ultra quiet stepping mode.
1385 1393
    * When disabled, Marlin will use spreadCycle stepping mode.
1386 1394
    */

+ 8
- 0
Marlin/src/config/examples/VORONDesign/Configuration_adv.h Ver arquivo

@@ -1382,6 +1382,14 @@
1382 1382
   //#define TMC_SW_SCK        -1
1383 1383
 
1384 1384
   /**
1385
+   * Software enable
1386
+   *
1387
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1388
+   * function through a communication line such as SPI or UART.
1389
+   */
1390
+  //#define SOFTWARE_DRIVER_ENABLE
1391
+
1392
+  /**
1385 1393
    * Use Trinamic's ultra quiet stepping mode.
1386 1394
    * When disabled, Marlin will use spreadCycle stepping mode.
1387 1395
    */

+ 8
- 0
Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h Ver arquivo

@@ -1394,6 +1394,14 @@
1394 1394
   //#define TMC_SW_SCK        -1
1395 1395
 
1396 1396
   /**
1397
+   * Software enable
1398
+   *
1399
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1400
+   * function through a communication line such as SPI or UART.
1401
+   */
1402
+  //#define SOFTWARE_DRIVER_ENABLE
1403
+
1404
+  /**
1397 1405
    * Use Trinamic's ultra quiet stepping mode.
1398 1406
    * When disabled, Marlin will use spreadCycle stepping mode.
1399 1407
    */

+ 8
- 0
Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h Ver arquivo

@@ -1381,6 +1381,14 @@
1381 1381
   //#define TMC_SW_SCK        -1
1382 1382
 
1383 1383
   /**
1384
+   * Software enable
1385
+   *
1386
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1387
+   * function through a communication line such as SPI or UART.
1388
+   */
1389
+  //#define SOFTWARE_DRIVER_ENABLE
1390
+
1391
+  /**
1384 1392
    * Use Trinamic's ultra quiet stepping mode.
1385 1393
    * When disabled, Marlin will use spreadCycle stepping mode.
1386 1394
    */

+ 8
- 0
Marlin/src/config/examples/WASP/PowerWASP/Configuration_adv.h Ver arquivo

@@ -1382,6 +1382,14 @@
1382 1382
   //#define TMC_SW_SCK        -1
1383 1383
 
1384 1384
   /**
1385
+   * Software enable
1386
+   *
1387
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1388
+   * function through a communication line such as SPI or UART.
1389
+   */
1390
+  //#define SOFTWARE_DRIVER_ENABLE
1391
+
1392
+  /**
1385 1393
    * Use Trinamic's ultra quiet stepping mode.
1386 1394
    * When disabled, Marlin will use spreadCycle stepping mode.
1387 1395
    */

+ 8
- 0
Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h Ver arquivo

@@ -1383,6 +1383,14 @@
1383 1383
   //#define TMC_SW_SCK        -1
1384 1384
 
1385 1385
   /**
1386
+   * Software enable
1387
+   *
1388
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1389
+   * function through a communication line such as SPI or UART.
1390
+   */
1391
+  //#define SOFTWARE_DRIVER_ENABLE
1392
+
1393
+  /**
1386 1394
    * Use Trinamic's ultra quiet stepping mode.
1387 1395
    * When disabled, Marlin will use spreadCycle stepping mode.
1388 1396
    */

+ 8
- 0
Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration_adv.h Ver arquivo

@@ -1383,6 +1383,14 @@
1383 1383
   //#define TMC_SW_SCK        -1
1384 1384
 
1385 1385
   /**
1386
+   * Software enable
1387
+   *
1388
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1389
+   * function through a communication line such as SPI or UART.
1390
+   */
1391
+  //#define SOFTWARE_DRIVER_ENABLE
1392
+
1393
+  /**
1386 1394
    * Use Trinamic's ultra quiet stepping mode.
1387 1395
    * When disabled, Marlin will use spreadCycle stepping mode.
1388 1396
    */

+ 8
- 0
Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h Ver arquivo

@@ -1383,6 +1383,14 @@
1383 1383
   //#define TMC_SW_SCK        -1
1384 1384
 
1385 1385
   /**
1386
+   * Software enable
1387
+   *
1388
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1389
+   * function through a communication line such as SPI or UART.
1390
+   */
1391
+  //#define SOFTWARE_DRIVER_ENABLE
1392
+
1393
+  /**
1386 1394
    * Use Trinamic's ultra quiet stepping mode.
1387 1395
    * When disabled, Marlin will use spreadCycle stepping mode.
1388 1396
    */

+ 8
- 0
Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h Ver arquivo

@@ -1383,6 +1383,14 @@
1383 1383
   //#define TMC_SW_SCK        -1
1384 1384
 
1385 1385
   /**
1386
+   * Software enable
1387
+   *
1388
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1389
+   * function through a communication line such as SPI or UART.
1390
+   */
1391
+  //#define SOFTWARE_DRIVER_ENABLE
1392
+
1393
+  /**
1386 1394
    * Use Trinamic's ultra quiet stepping mode.
1387 1395
    * When disabled, Marlin will use spreadCycle stepping mode.
1388 1396
    */

+ 8
- 0
Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h Ver arquivo

@@ -1383,6 +1383,14 @@
1383 1383
   //#define TMC_SW_SCK        -1
1384 1384
 
1385 1385
   /**
1386
+   * Software enable
1387
+   *
1388
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1389
+   * function through a communication line such as SPI or UART.
1390
+   */
1391
+  //#define SOFTWARE_DRIVER_ENABLE
1392
+
1393
+  /**
1386 1394
    * Use Trinamic's ultra quiet stepping mode.
1387 1395
    * When disabled, Marlin will use spreadCycle stepping mode.
1388 1396
    */

+ 8
- 0
Marlin/src/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h Ver arquivo

@@ -1356,6 +1356,14 @@
1356 1356
   //#define TMC_SW_SCK        -1
1357 1357
 
1358 1358
   /**
1359
+   * Software enable
1360
+   *
1361
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1362
+   * function through a communication line such as SPI or UART.
1363
+   */
1364
+  //#define SOFTWARE_DRIVER_ENABLE
1365
+
1366
+  /**
1359 1367
    * Use Trinamic's ultra quiet stepping mode.
1360 1368
    * When disabled, Marlin will use spreadCycle stepping mode.
1361 1369
    */

+ 8
- 0
Marlin/src/config/examples/delta/MKS/SBASE/Configuration_adv.h Ver arquivo

@@ -1383,6 +1383,14 @@
1383 1383
   //#define TMC_SW_SCK        -1
1384 1384
 
1385 1385
   /**
1386
+   * Software enable
1387
+   *
1388
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1389
+   * function through a communication line such as SPI or UART.
1390
+   */
1391
+  //#define SOFTWARE_DRIVER_ENABLE
1392
+
1393
+  /**
1386 1394
    * Use Trinamic's ultra quiet stepping mode.
1387 1395
    * When disabled, Marlin will use spreadCycle stepping mode.
1388 1396
    */

+ 8
- 0
Marlin/src/config/examples/delta/Tevo Little Monster/Configuration_adv.h Ver arquivo

@@ -1383,6 +1383,14 @@
1383 1383
   //#define TMC_SW_SCK        -1
1384 1384
 
1385 1385
   /**
1386
+   * Software enable
1387
+   *
1388
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1389
+   * function through a communication line such as SPI or UART.
1390
+   */
1391
+  //#define SOFTWARE_DRIVER_ENABLE
1392
+
1393
+  /**
1386 1394
    * Use Trinamic's ultra quiet stepping mode.
1387 1395
    * When disabled, Marlin will use spreadCycle stepping mode.
1388 1396
    */

+ 8
- 0
Marlin/src/config/examples/delta/generic/Configuration_adv.h Ver arquivo

@@ -1383,6 +1383,14 @@
1383 1383
   //#define TMC_SW_SCK        -1
1384 1384
 
1385 1385
   /**
1386
+   * Software enable
1387
+   *
1388
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1389
+   * function through a communication line such as SPI or UART.
1390
+   */
1391
+  //#define SOFTWARE_DRIVER_ENABLE
1392
+
1393
+  /**
1386 1394
    * Use Trinamic's ultra quiet stepping mode.
1387 1395
    * When disabled, Marlin will use spreadCycle stepping mode.
1388 1396
    */

+ 8
- 0
Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h Ver arquivo

@@ -1383,6 +1383,14 @@
1383 1383
   //#define TMC_SW_SCK        -1
1384 1384
 
1385 1385
   /**
1386
+   * Software enable
1387
+   *
1388
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1389
+   * function through a communication line such as SPI or UART.
1390
+   */
1391
+  //#define SOFTWARE_DRIVER_ENABLE
1392
+
1393
+  /**
1386 1394
    * Use Trinamic's ultra quiet stepping mode.
1387 1395
    * When disabled, Marlin will use spreadCycle stepping mode.
1388 1396
    */

+ 8
- 0
Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h Ver arquivo

@@ -1383,6 +1383,14 @@
1383 1383
   //#define TMC_SW_SCK        -1
1384 1384
 
1385 1385
   /**
1386
+   * Software enable
1387
+   *
1388
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1389
+   * function through a communication line such as SPI or UART.
1390
+   */
1391
+  //#define SOFTWARE_DRIVER_ENABLE
1392
+
1393
+  /**
1386 1394
    * Use Trinamic's ultra quiet stepping mode.
1387 1395
    * When disabled, Marlin will use spreadCycle stepping mode.
1388 1396
    */

+ 8
- 0
Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h Ver arquivo

@@ -1381,6 +1381,14 @@
1381 1381
   //#define TMC_SW_SCK        -1
1382 1382
 
1383 1383
   /**
1384
+   * Software enable
1385
+   *
1386
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1387
+   * function through a communication line such as SPI or UART.
1388
+   */
1389
+  //#define SOFTWARE_DRIVER_ENABLE
1390
+
1391
+  /**
1384 1392
    * Use Trinamic's ultra quiet stepping mode.
1385 1393
    * When disabled, Marlin will use spreadCycle stepping mode.
1386 1394
    */

+ 8
- 0
Marlin/src/config/examples/makibox/Configuration_adv.h Ver arquivo

@@ -1381,6 +1381,14 @@
1381 1381
   //#define TMC_SW_SCK        -1
1382 1382
 
1383 1383
   /**
1384
+   * Software enable
1385
+   *
1386
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1387
+   * function through a communication line such as SPI or UART.
1388
+   */
1389
+  //#define SOFTWARE_DRIVER_ENABLE
1390
+
1391
+  /**
1384 1392
    * Use Trinamic's ultra quiet stepping mode.
1385 1393
    * When disabled, Marlin will use spreadCycle stepping mode.
1386 1394
    */

+ 8
- 0
Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h Ver arquivo

@@ -1381,6 +1381,14 @@
1381 1381
   //#define TMC_SW_SCK        -1
1382 1382
 
1383 1383
   /**
1384
+   * Software enable
1385
+   *
1386
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1387
+   * function through a communication line such as SPI or UART.
1388
+   */
1389
+  //#define SOFTWARE_DRIVER_ENABLE
1390
+
1391
+  /**
1384 1392
    * Use Trinamic's ultra quiet stepping mode.
1385 1393
    * When disabled, Marlin will use spreadCycle stepping mode.
1386 1394
    */

+ 8
- 0
Marlin/src/config/examples/wt150/Configuration_adv.h Ver arquivo

@@ -1382,6 +1382,14 @@
1382 1382
   //#define TMC_SW_SCK        -1
1383 1383
 
1384 1384
   /**
1385
+   * Software enable
1386
+   *
1387
+   * Use for drivers that do not use a dedicated enable pin, but rather handle the same
1388
+   * function through a communication line such as SPI or UART.
1389
+   */
1390
+  //#define SOFTWARE_DRIVER_ENABLE
1391
+
1392
+  /**
1385 1393
    * Use Trinamic's ultra quiet stepping mode.
1386 1394
    * When disabled, Marlin will use spreadCycle stepping mode.
1387 1395
    */

+ 50
- 0
Marlin/src/feature/tmc_util.cpp Ver arquivo

@@ -40,6 +40,10 @@
40 40
   #endif
41 41
 #endif
42 42
 
43
+#if HAS_LCD_MENU
44
+  #include "../module/stepper.h"
45
+#endif
46
+
43 47
 /**
44 48
  * Check for over temperature or short to ground error flags.
45 49
  * Report and log warning of overtemperature condition.
@@ -980,4 +984,50 @@ void test_tmc_connection(const bool test_x, const bool test_y, const bool test_z
980 984
   if (axis_connection) ui.set_status_P(PSTR("TMC CONNECTION ERROR"));
981 985
 }
982 986
 
987
+#if HAS_LCD_MENU
988
+
989
+  void init_tmc_section() {
990
+    #if AXIS_IS_TMC(X)
991
+      stepperX.init_lcd_variables(X_AXIS);
992
+    #endif
993
+    #if AXIS_IS_TMC(Y)
994
+      stepperY.init_lcd_variables(Y_AXIS);
995
+    #endif
996
+    #if AXIS_IS_TMC(Z)
997
+      stepperZ.init_lcd_variables(Z_AXIS);
998
+    #endif
999
+    #if AXIS_IS_TMC(X2)
1000
+      stepperX2.init_lcd_variables(X_AXIS);
1001
+    #endif
1002
+    #if AXIS_IS_TMC(Y2)
1003
+      stepperY2.init_lcd_variables(Y_AXIS);
1004
+    #endif
1005
+    #if AXIS_IS_TMC(Z2)
1006
+      stepperZ2.init_lcd_variables(Z_AXIS);
1007
+    #endif
1008
+    #if AXIS_IS_TMC(Z3)
1009
+      stepperZ3.init_lcd_variables(Z_AXIS);
1010
+    #endif
1011
+    #if AXIS_IS_TMC(E0)
1012
+      stepperE0.init_lcd_variables(E_AXIS);
1013
+    #endif
1014
+    #if AXIS_IS_TMC(E1)
1015
+      stepperE1.init_lcd_variables(E_AXIS_N(1));
1016
+    #endif
1017
+    #if AXIS_IS_TMC(E2)
1018
+      stepperE2.init_lcd_variables(E_AXIS_N(2));
1019
+    #endif
1020
+    #if AXIS_IS_TMC(E3)
1021
+      stepperE3.init_lcd_variables(E_AXIS_N(3));
1022
+    #endif
1023
+    #if AXIS_IS_TMC(E4)
1024
+      stepperE4.init_lcd_variables(E_AXIS_N(4));
1025
+    #endif
1026
+    #if AXIS_IS_TMC(E5)
1027
+      stepperE5.init_lcd_variables(E_AXIS_N(5));
1028
+    #endif
1029
+  }
1030
+
1031
+#endif
1032
+
983 1033
 #endif // HAS_TRINAMIC

+ 111
- 13
Marlin/src/feature/tmc_util.h Ver arquivo

@@ -26,6 +26,9 @@
26 26
 #if HAS_TRINAMIC
27 27
   #include <TMCStepper.h>
28 28
 #endif
29
+#if HAS_LCD_MENU
30
+  #include "../module/planner.h"
31
+#endif
29 32
 
30 33
 #define TMC_X_LABEL 'X', '0'
31 34
 #define TMC_Y_LABEL 'Y', '0'
@@ -50,29 +53,45 @@
50 53
 #define CHOPPER_PRUSAMK3_24V { 4,  1, 4 }
51 54
 #define CHOPPER_MARLIN_119   { 5,  2, 3 }
52 55
 
56
+constexpr uint16_t _tmc_thrs(const uint16_t msteps, const int32_t thrs, const uint32_t spmm) {
57
+  return 12650000UL * msteps / (256 * thrs * spmm);
58
+}
59
+
53 60
 template<char AXIS_LETTER, char DRIVER_ID>
54 61
 class TMCStorage {
55 62
   protected:
56 63
     // Only a child class has access to constructor => Don't create on its own! "Poor man's abstract class"
57 64
     TMCStorage() {}
58 65
 
66
+  public:
59 67
     uint16_t val_mA = 0;
60 68
 
61
-  public:
62 69
     #if ENABLED(MONITOR_DRIVER_STATUS)
63 70
       uint8_t otpw_count = 0,
64 71
               error_count = 0;
65 72
       bool flag_otpw = false;
66
-      bool getOTPW() { return flag_otpw; }
67
-      void clear_otpw() { flag_otpw = 0; }
73
+      inline bool getOTPW() { return flag_otpw; }
74
+      inline void clear_otpw() { flag_otpw = 0; }
68 75
     #endif
69 76
 
70
-    uint16_t getMilliamps() { return val_mA; }
77
+    inline uint16_t getMilliamps() { return val_mA; }
71 78
 
72
-    void printLabel() {
79
+    inline void printLabel() {
73 80
       SERIAL_CHAR(AXIS_LETTER);
74 81
       if (DRIVER_ID > '0') SERIAL_CHAR(DRIVER_ID);
75 82
     }
83
+
84
+    struct {
85
+      #if STEALTHCHOP_ENABLED
86
+        bool stealthChop_enabled = false;
87
+      #endif
88
+      #if ENABLED(HYBRID_THRESHOLD)
89
+        uint8_t hybrid_thrs = 0;
90
+      #endif
91
+      #if ENABLED(SENSORLESS_HOMING)
92
+        int8_t homing_thrs = 0;
93
+      #endif
94
+    } stored;
76 95
 };
77 96
 
78 97
 template<class TMC, char AXIS_LETTER, char DRIVER_ID>
@@ -84,15 +103,41 @@ class TMCMarlin : public TMC, public TMCStorage<AXIS_LETTER, DRIVER_ID> {
84 103
     TMCMarlin(uint16_t CS, float RS, uint16_t pinMOSI, uint16_t pinMISO, uint16_t pinSCK) :
85 104
       TMC(CS, RS, pinMOSI, pinMISO, pinSCK)
86 105
       {}
87
-    uint16_t rms_current() { return TMC::rms_current(); }
88
-    void rms_current(uint16_t mA) {
106
+    inline uint16_t rms_current() { return TMC::rms_current(); }
107
+    inline void rms_current(uint16_t mA) {
89 108
       this->val_mA = mA;
90 109
       TMC::rms_current(mA);
91 110
     }
92
-    void rms_current(uint16_t mA, float mult) {
111
+    inline void rms_current(uint16_t mA, float mult) {
93 112
       this->val_mA = mA;
94 113
       TMC::rms_current(mA, mult);
95 114
     }
115
+
116
+    #if STEALTHCHOP_ENABLED
117
+      inline void refresh_stepping_mode() { this->en_pwm_mode(this->stored.stealthChop_enabled); }
118
+      inline bool get_stealthChop_status() { return this->en_pwm_mode(); }
119
+    #endif
120
+
121
+    #if HAS_LCD_MENU
122
+
123
+      inline void init_lcd_variables(const AxisEnum spmm_id) {
124
+        #if ENABLED(HYBRID_THRESHOLD)
125
+          this->stored.hybrid_thrs = _tmc_thrs(this->microsteps(), this->TPWMTHRS(), planner.settings.axis_steps_per_mm[spmm_id]);
126
+        #endif
127
+        #if ENABLED(SENSORLESS_HOMING)
128
+          this->stored.homing_thrs = this->sgt();
129
+        #endif
130
+      }
131
+
132
+      inline void refresh_stepper_current() { rms_current(this->val_mA); }
133
+
134
+      #if ENABLED(HYBRID_THRESHOLD)
135
+        inline void refresh_hybrid_thrs(float spmm) { this->TPWMTHRS(_tmc_thrs(this->microsteps(), this->stored.hybrid_thrs, spmm)); }
136
+      #endif
137
+      #if ENABLED(SENSORLESS_HOMING)
138
+        inline void refresh_homing_thrs() { this->sgt(this->stored.homing_thrs); }
139
+      #endif
140
+    #endif
96 141
 };
97 142
 template<char AXIS_LETTER, char DRIVER_ID>
98 143
 class TMCMarlin<TMC2208Stepper, AXIS_LETTER, DRIVER_ID> : public TMC2208Stepper, public TMCStorage<AXIS_LETTER, DRIVER_ID> {
@@ -104,19 +149,67 @@ class TMCMarlin<TMC2208Stepper, AXIS_LETTER, DRIVER_ID> : public TMC2208Stepper,
104 149
       TMC2208Stepper(RX, TX, RS, has_rx=true)
105 150
       {}
106 151
     uint16_t rms_current() { return TMC2208Stepper::rms_current(); }
107
-    void rms_current(uint16_t mA) {
152
+    inline void rms_current(uint16_t mA) {
108 153
       this->val_mA = mA;
109 154
       TMC2208Stepper::rms_current(mA);
110 155
     }
111
-    void rms_current(uint16_t mA, float mult) {
156
+    inline void rms_current(uint16_t mA, float mult) {
112 157
       this->val_mA = mA;
113 158
       TMC2208Stepper::rms_current(mA, mult);
114 159
     }
160
+
161
+    #if STEALTHCHOP_ENABLED
162
+      inline void refresh_stepping_mode() { en_spreadCycle(!this->stored.stealthChop_enabled); }
163
+      inline bool get_stealthChop_status() { !this->en_spreadCycle(); }
164
+    #endif
165
+
166
+    #if HAS_LCD_MENU
167
+
168
+      inline void init_lcd_variables(const AxisEnum spmm_id) {
169
+        #if ENABLED(HYBRID_THRESHOLD)
170
+          this->stored.hybrid_thrs = _tmc_thrs(this->microsteps(), this->TPWMTHRS(), planner.settings.axis_steps_per_mm[spmm_id]);
171
+        #endif
172
+        #if STEALTHCHOP_ENABLED
173
+          this->stored.stealthChop_enabled = !this->en_spreadCycle();
174
+        #endif
175
+      }
176
+
177
+      inline void refresh_stepper_current() { rms_current(this->val_mA); }
178
+
179
+      #if ENABLED(HYBRID_THRESHOLD)
180
+        inline void refresh_hybrid_thrs(float spmm) { this->TPWMTHRS(_tmc_thrs(this->microsteps(), this->stored.hybrid_thrs, spmm)); }
181
+      #endif
182
+    #endif
115 183
 };
184
+template<char AXIS_LETTER, char DRIVER_ID>
185
+class TMCMarlin<TMC2660Stepper, AXIS_LETTER, DRIVER_ID> : public TMC2660Stepper, public TMCStorage<AXIS_LETTER, DRIVER_ID> {
186
+  public:
187
+    TMCMarlin(uint16_t cs_pin, float RS) :
188
+      TMC2660Stepper(cs_pin, RS)
189
+      {}
190
+    TMCMarlin(uint16_t CS, float RS, uint16_t pinMOSI, uint16_t pinMISO, uint16_t pinSCK) :
191
+      TMC2660Stepper(CS, RS, pinMOSI, pinMISO, pinSCK)
192
+      {}
193
+    inline uint16_t rms_current() { return TMC2660Stepper::rms_current(); }
194
+    inline void rms_current(uint16_t mA) {
195
+      this->val_mA = mA;
196
+      TMC2660Stepper::rms_current(mA);
197
+    }
116 198
 
117
-constexpr uint16_t _tmc_thrs(const uint16_t msteps, const int32_t thrs, const uint32_t spmm) {
118
-  return 12650000UL * msteps / (256 * thrs * spmm);
119
-}
199
+    #if HAS_LCD_MENU
200
+      inline void init_lcd_variables(const AxisEnum spmm_id) {
201
+        #if ENABLED(SENSORLESS_HOMING)
202
+          this->stored.homing_thrs = this->sgt();
203
+        #endif
204
+      }
205
+
206
+      inline void refresh_stepper_current() { rms_current(this->val_mA); }
207
+
208
+      #if ENABLED(SENSORLESS_HOMING)
209
+        inline void refresh_homing_thrs() { this->sgt(this->stored.homing_thrs); }
210
+      #endif
211
+    #endif
212
+};
120 213
 
121 214
 template<typename TMC>
122 215
 void tmc_get_current(TMC &st) {
@@ -127,6 +220,7 @@ template<typename TMC>
127 220
 void tmc_set_current(TMC &st, const int mA) {
128 221
   st.rms_current(mA);
129 222
 }
223
+
130 224
 #if ENABLED(MONITOR_DRIVER_STATUS)
131 225
   template<typename TMC>
132 226
   void tmc_report_otpw(TMC &st) {
@@ -173,6 +267,10 @@ void test_tmc_connection(const bool test_x, const bool test_y, const bool test_z
173 267
   void tmc_get_registers(const bool print_x, const bool print_y, const bool print_z, const bool print_e);
174 268
 #endif
175 269
 
270
+#if HAS_LCD_MENU
271
+  void init_tmc_section();
272
+#endif
273
+
176 274
 /**
177 275
  * TMC2130 specific sensorless homing using stallGuard2.
178 276
  * stallGuard2 only works when in spreadCycle mode.

+ 165
- 0
Marlin/src/gcode/feature/trinamic/M569.cpp Ver arquivo

@@ -0,0 +1,165 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+#include "../../../inc/MarlinConfig.h"
24
+
25
+#if HAS_STEALTHCHOP
26
+
27
+#include "../../gcode.h"
28
+#include "../../../feature/tmc_util.h"
29
+#include "../../../module/stepper_indirection.h"
30
+
31
+template<typename TMC>
32
+void tmc_say_stealth_status(TMC &st) {
33
+  st.printLabel();
34
+  SERIAL_ECHOPGM(" driver mode:\t");
35
+  serialprintPGM(st.get_stealthChop_status() ? PSTR("stealthChop") : PSTR("spreadCycle"));
36
+  SERIAL_EOL();
37
+}
38
+template<typename TMC>
39
+void tmc_set_stealthChop(TMC &st, const bool enable) {
40
+  st.stored.stealthChop_enabled = enable;
41
+  st.refresh_stepping_mode();
42
+}
43
+
44
+static void set_stealth_status(const bool enable, const int8_t target_extruder) {
45
+  #define TMC_SET_STEALTH(Q) tmc_set_stealthChop(stepper##Q, enable)
46
+
47
+  #if AXIS_HAS_STEALTHCHOP(X) || AXIS_HAS_STEALTHCHOP(X2) || AXIS_HAS_STEALTHCHOP(Y) || AXIS_HAS_STEALTHCHOP(Y2) || AXIS_HAS_STEALTHCHOP(Z) || AXIS_HAS_STEALTHCHOP(Z2) || AXIS_HAS_STEALTHCHOP(Z3)
48
+    const uint8_t index = parser.byteval('I');
49
+  #endif
50
+
51
+  LOOP_XYZE(i) if (parser.seen(axis_codes[i])) {
52
+    switch (i) {
53
+      case X_AXIS:
54
+        #if AXIS_HAS_STEALTHCHOP(X)
55
+          if (index == 0) TMC_SET_STEALTH(X);
56
+        #endif
57
+        #if AXIS_HAS_STEALTHCHOP(X2)
58
+          if (index == 1) TMC_SET_STEALTH(X2);
59
+        #endif
60
+        break;
61
+      case Y_AXIS:
62
+        #if AXIS_HAS_STEALTHCHOP(Y)
63
+          if (index == 0) TMC_SET_STEALTH(Y);
64
+        #endif
65
+        #if AXIS_HAS_STEALTHCHOP(Y2)
66
+          if (index == 1) TMC_SET_STEALTH(Y2);
67
+        #endif
68
+        break;
69
+      case Z_AXIS:
70
+        #if AXIS_HAS_STEALTHCHOP(Z)
71
+          if (index == 0) TMC_SET_STEALTH(Z);
72
+        #endif
73
+        #if AXIS_HAS_STEALTHCHOP(Z2)
74
+          if (index == 1) TMC_SET_STEALTH(Z2);
75
+        #endif
76
+        #if AXIS_HAS_STEALTHCHOP(Z3)
77
+          if (index == 2) TMC_SET_STEALTH(Z3);
78
+        #endif
79
+        break;
80
+      case E_AXIS: {
81
+        if (target_extruder < 0) return;
82
+        switch (target_extruder) {
83
+          #if AXIS_HAS_STEALTHCHOP(E0)
84
+            case 0: TMC_SET_STEALTH(E0); break;
85
+          #endif
86
+          #if AXIS_HAS_STEALTHCHOP(E1)
87
+            case 1: TMC_SET_STEALTH(E1); break;
88
+          #endif
89
+          #if AXIS_HAS_STEALTHCHOP(E2)
90
+            case 2: TMC_SET_STEALTH(E2); break;
91
+          #endif
92
+          #if AXIS_HAS_STEALTHCHOP(E3)
93
+            case 3: TMC_SET_STEALTH(E3); break;
94
+          #endif
95
+          #if AXIS_HAS_STEALTHCHOP(E4)
96
+            case 4: TMC_SET_STEALTH(E4); break;
97
+          #endif
98
+          #if AXIS_HAS_STEALTHCHOP(E5)
99
+            case 5: TMC_SET_STEALTH(E5); break;
100
+          #endif
101
+        }
102
+      } break;
103
+    }
104
+  }
105
+}
106
+
107
+static void say_stealth_status() {
108
+  #define TMC_SAY_STEALTH_STATUS(Q) tmc_say_stealth_status(stepper##Q)
109
+
110
+  #if AXIS_HAS_STEALTHCHOP(X)
111
+    TMC_SAY_STEALTH_STATUS(X);
112
+  #endif
113
+  #if AXIS_HAS_STEALTHCHOP(X2)
114
+    TMC_SAY_STEALTH_STATUS(X2);
115
+  #endif
116
+  #if AXIS_HAS_STEALTHCHOP(Y)
117
+    TMC_SAY_STEALTH_STATUS(Y);
118
+  #endif
119
+  #if AXIS_HAS_STEALTHCHOP(Y2)
120
+    TMC_SAY_STEALTH_STATUS(Y2);
121
+  #endif
122
+  #if AXIS_HAS_STEALTHCHOP(Z)
123
+    TMC_SAY_STEALTH_STATUS(Z);
124
+  #endif
125
+  #if AXIS_HAS_STEALTHCHOP(Z2)
126
+    TMC_SAY_STEALTH_STATUS(Z2);
127
+  #endif
128
+  #if AXIS_HAS_STEALTHCHOP(Z3)
129
+    TMC_SAY_STEALTH_STATUS(Z3);
130
+  #endif
131
+  #if AXIS_HAS_STEALTHCHOP(E0)
132
+    TMC_SAY_STEALTH_STATUS(E0);
133
+  #endif
134
+  #if AXIS_HAS_STEALTHCHOP(E1)
135
+    TMC_SAY_STEALTH_STATUS(E1);
136
+  #endif
137
+  #if AXIS_HAS_STEALTHCHOP(E2)
138
+    TMC_SAY_STEALTH_STATUS(E2);
139
+  #endif
140
+  #if AXIS_HAS_STEALTHCHOP(E3)
141
+    TMC_SAY_STEALTH_STATUS(E3);
142
+  #endif
143
+  #if AXIS_HAS_STEALTHCHOP(E4)
144
+    TMC_SAY_STEALTH_STATUS(E4);
145
+  #endif
146
+  #if AXIS_HAS_STEALTHCHOP(E5)
147
+    TMC_SAY_STEALTH_STATUS(E5);
148
+  #endif
149
+}
150
+
151
+/**
152
+ * M569: Enable stealthChop on an axis
153
+ *
154
+ *   S[1|0] to enable or disable
155
+ *   XYZE to target an axis
156
+ *   No arguments reports the stealthChop status of all capable drivers.
157
+ */
158
+void GcodeSuite::M569() {
159
+  if (parser.seen('S'))
160
+    set_stealth_status(parser.value_bool(), get_target_extruder_from_command());
161
+  else
162
+    say_stealth_status();
163
+}
164
+
165
+#endif // HAS_STEALTHCHOP

+ 3
- 0
Marlin/src/gcode/gcode.cpp Ver arquivo

@@ -652,6 +652,9 @@ void GcodeSuite::process_parsed_command(
652 652
       #if HAS_TRINAMIC
653 653
         case 122: M122(); break;
654 654
         case 906: M906(); break;                                  // M906: Set motor current in milliamps using axis codes X, Y, Z, E
655
+        #if HAS_STEALTHCHOP
656
+          case 569: M569(); break;                                // M569: Enable stealthChop on an axis.
657
+        #endif
655 658
         #if ENABLED(MONITOR_DRIVER_STATUS)
656 659
           case 911: M911(); break;                                // M911: Report TMC2130 prewarn triggered flags
657 660
           case 912: M912(); break;                                // M912: Clear TMC2130 prewarn triggered flags

+ 4
- 0
Marlin/src/gcode/gcode.h Ver arquivo

@@ -209,6 +209,7 @@
209 209
  * M503 - Print the current settings (in memory): "M503 S<verbose>". S0 specifies compact output.
210 210
  * M524 - Abort the current SD print job (started with M24)
211 211
  * M540 - Enable/disable SD card abort on endstop hit: "M540 S<state>". (Requires ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
212
+ * M569 - Enable stealthChop on an axis. (Requires at least one #_X_DRIVER_TYPE to be TMC2130 or TMC2208)
212 213
  * M600 - Pause for filament change: "M600 X<pos> Y<pos> Z<raise> E<first_retract> L<later_retract>". (Requires ADVANCED_PAUSE_FEATURE)
213 214
  * M603 - Configure filament change: "M603 T<tool> U<unload_length> L<load_length>". (Requires ADVANCED_PAUSE_FEATURE)
214 215
  * M605 - Set Dual X-Carriage movement mode: "M605 S<mode> [X<x_offset>] [R<temp_offset>]". (Requires DUAL_X_CARRIAGE)
@@ -796,6 +797,9 @@ private:
796 797
   #if HAS_TRINAMIC
797 798
     static void M122();
798 799
     static void M906();
800
+    #if HAS_STEALTHCHOP
801
+      static void M569();
802
+    #endif
799 803
     #if ENABLED(MONITOR_DRIVER_STATUS)
800 804
       static void M911();
801 805
       static void M912();

+ 13
- 13
Marlin/src/inc/Conditionals_post.h Ver arquivo

@@ -779,73 +779,73 @@
779 779
  */
780 780
 
781 781
 // Steppers
782
-#define HAS_X_ENABLE      (PIN_EXISTS(X_ENABLE))
782
+#define HAS_X_ENABLE      (PIN_EXISTS(X_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(X)))
783 783
 #define HAS_X_DIR         (PIN_EXISTS(X_DIR))
784 784
 #define HAS_X_STEP        (PIN_EXISTS(X_STEP))
785 785
 #define HAS_X_MICROSTEPS  (PIN_EXISTS(X_MS1))
786 786
 
787
-#define HAS_X2_ENABLE     (PIN_EXISTS(X2_ENABLE))
787
+#define HAS_X2_ENABLE     (PIN_EXISTS(X2_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(X2)))
788 788
 #define HAS_X2_DIR        (PIN_EXISTS(X2_DIR))
789 789
 #define HAS_X2_STEP       (PIN_EXISTS(X2_STEP))
790 790
 #define HAS_X2_MICROSTEPS (PIN_EXISTS(X2_MS1))
791 791
 
792
-#define HAS_Y_ENABLE      (PIN_EXISTS(Y_ENABLE))
792
+#define HAS_Y_ENABLE      (PIN_EXISTS(Y_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Y)))
793 793
 #define HAS_Y_DIR         (PIN_EXISTS(Y_DIR))
794 794
 #define HAS_Y_STEP        (PIN_EXISTS(Y_STEP))
795 795
 #define HAS_Y_MICROSTEPS  (PIN_EXISTS(Y_MS1))
796 796
 
797
-#define HAS_Y2_ENABLE     (PIN_EXISTS(Y2_ENABLE))
797
+#define HAS_Y2_ENABLE     (PIN_EXISTS(Y2_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Y2)))
798 798
 #define HAS_Y2_DIR        (PIN_EXISTS(Y2_DIR))
799 799
 #define HAS_Y2_STEP       (PIN_EXISTS(Y2_STEP))
800 800
 #define HAS_Y2_MICROSTEPS (PIN_EXISTS(Y2_MS1))
801 801
 
802
-#define HAS_Z_ENABLE      (PIN_EXISTS(Z_ENABLE))
802
+#define HAS_Z_ENABLE      (PIN_EXISTS(Z_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z)))
803 803
 #define HAS_Z_DIR         (PIN_EXISTS(Z_DIR))
804 804
 #define HAS_Z_STEP        (PIN_EXISTS(Z_STEP))
805 805
 #define HAS_Z_MICROSTEPS  (PIN_EXISTS(Z_MS1))
806 806
 
807
-#define HAS_Z2_ENABLE     (PIN_EXISTS(Z2_ENABLE))
807
+#define HAS_Z2_ENABLE     (PIN_EXISTS(Z2_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z2)))
808 808
 #define HAS_Z2_DIR        (PIN_EXISTS(Z2_DIR))
809 809
 #define HAS_Z2_STEP       (PIN_EXISTS(Z2_STEP))
810 810
 #define HAS_Z2_MICROSTEPS (PIN_EXISTS(Z2_MS1))
811 811
 
812
-#define HAS_Z3_ENABLE     (PIN_EXISTS(Z3_ENABLE))
812
+#define HAS_Z3_ENABLE     (PIN_EXISTS(Z3_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z3)))
813 813
 #define HAS_Z3_DIR        (PIN_EXISTS(Z3_DIR))
814 814
 #define HAS_Z3_STEP       (PIN_EXISTS(Z3_STEP))
815 815
 #define HAS_Z3_MICROSTEPS (PIN_EXISTS(Z3_MS1))
816 816
 
817 817
 // Extruder steppers and solenoids
818
-#define HAS_E0_ENABLE     (PIN_EXISTS(E0_ENABLE))
818
+#define HAS_E0_ENABLE     (PIN_EXISTS(E0_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E0)))
819 819
 #define HAS_E0_DIR        (PIN_EXISTS(E0_DIR))
820 820
 #define HAS_E0_STEP       (PIN_EXISTS(E0_STEP))
821 821
 #define HAS_E0_MICROSTEPS (PIN_EXISTS(E0_MS1))
822 822
 #define HAS_SOLENOID_0    (PIN_EXISTS(SOL0))
823 823
 
824
-#define HAS_E1_ENABLE     (PIN_EXISTS(E1_ENABLE))
824
+#define HAS_E1_ENABLE     (PIN_EXISTS(E1_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E1)))
825 825
 #define HAS_E1_DIR        (PIN_EXISTS(E1_DIR))
826 826
 #define HAS_E1_STEP       (PIN_EXISTS(E1_STEP))
827 827
 #define HAS_E1_MICROSTEPS (PIN_EXISTS(E1_MS1))
828 828
 #define HAS_SOLENOID_1    (PIN_EXISTS(SOL1))
829 829
 
830
-#define HAS_E2_ENABLE     (PIN_EXISTS(E2_ENABLE))
830
+#define HAS_E2_ENABLE     (PIN_EXISTS(E2_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E2)))
831 831
 #define HAS_E2_DIR        (PIN_EXISTS(E2_DIR))
832 832
 #define HAS_E2_STEP       (PIN_EXISTS(E2_STEP))
833 833
 #define HAS_E2_MICROSTEPS (PIN_EXISTS(E2_MS1))
834 834
 #define HAS_SOLENOID_2    (PIN_EXISTS(SOL2))
835 835
 
836
-#define HAS_E3_ENABLE     (PIN_EXISTS(E3_ENABLE))
836
+#define HAS_E3_ENABLE     (PIN_EXISTS(E3_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E3)))
837 837
 #define HAS_E3_DIR        (PIN_EXISTS(E3_DIR))
838 838
 #define HAS_E3_STEP       (PIN_EXISTS(E3_STEP))
839 839
 #define HAS_E3_MICROSTEPS (PIN_EXISTS(E3_MS1))
840 840
 #define HAS_SOLENOID_3    (PIN_EXISTS(SOL3))
841 841
 
842
-#define HAS_E4_ENABLE     (PIN_EXISTS(E4_ENABLE))
842
+#define HAS_E4_ENABLE     (PIN_EXISTS(E4_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E4)))
843 843
 #define HAS_E4_DIR        (PIN_EXISTS(E4_DIR))
844 844
 #define HAS_E4_STEP       (PIN_EXISTS(E4_STEP))
845 845
 #define HAS_E4_MICROSTEPS (PIN_EXISTS(E4_MS1))
846 846
 #define HAS_SOLENOID_4    (PIN_EXISTS(SOL4))
847 847
 
848
-#define HAS_E5_ENABLE     (PIN_EXISTS(E5_ENABLE))
848
+#define HAS_E5_ENABLE     (PIN_EXISTS(E5_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E5)))
849 849
 #define HAS_E5_DIR        (PIN_EXISTS(E5_DIR))
850 850
 #define HAS_E5_STEP       (PIN_EXISTS(E5_STEP))
851 851
 #define HAS_E5_MICROSTEPS (PIN_EXISTS(E5_MS1))

+ 7
- 7
Marlin/src/inc/SanityCheck.h Ver arquivo

@@ -1298,7 +1298,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
1298 1298
   #error "TEMP_0_PIN not defined for this board."
1299 1299
 #elif ((defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)) && (!PIN_EXISTS(E0_STEP) || !PIN_EXISTS(E0_DIR)))
1300 1300
   #error "E0_STEP_PIN or E0_DIR_PIN not defined for this board."
1301
-#elif ( !(defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)) && (!PIN_EXISTS(E0_STEP) || !PIN_EXISTS(E0_DIR) || !PIN_EXISTS(E0_ENABLE)))
1301
+#elif ( !(defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)) && (!PIN_EXISTS(E0_STEP) || !PIN_EXISTS(E0_DIR) || !HAS_E0_ENABLE))
1302 1302
   #error "E0_STEP_PIN, E0_DIR_PIN, or E0_ENABLE_PIN not defined for this board."
1303 1303
 #elif TEMP_SENSOR_0 == 0
1304 1304
   #error "TEMP_SENSOR_0 is required."
@@ -1427,27 +1427,27 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
1427 1427
  */
1428 1428
 #if DISABLED(MK2_MULTIPLEXER) // MK2_MULTIPLEXER uses E0 stepper only
1429 1429
   #if E_STEPPERS
1430
-    #if !(PIN_EXISTS(E0_STEP) && PIN_EXISTS(E0_DIR) && PIN_EXISTS(E0_ENABLE))
1430
+    #if !(PIN_EXISTS(E0_STEP) && PIN_EXISTS(E0_DIR) && HAS_E0_ENABLE)
1431 1431
       #error "E0_STEP_PIN, E0_DIR_PIN, or E0_ENABLE_PIN not defined for this board."
1432 1432
     #endif
1433 1433
     #if E_STEPPERS > 1
1434
-      #if !(PIN_EXISTS(E1_STEP) && PIN_EXISTS(E1_DIR) && PIN_EXISTS(E1_ENABLE))
1434
+      #if !(PIN_EXISTS(E1_STEP) && PIN_EXISTS(E1_DIR) && HAS_E1_ENABLE)
1435 1435
         #error "E1_STEP_PIN, E1_DIR_PIN, or E1_ENABLE_PIN not defined for this board."
1436 1436
       #endif
1437 1437
       #if E_STEPPERS > 2
1438
-        #if !(PIN_EXISTS(E2_STEP) && PIN_EXISTS(E2_DIR) && PIN_EXISTS(E2_ENABLE))
1438
+        #if !(PIN_EXISTS(E2_STEP) && PIN_EXISTS(E2_DIR) && HAS_E2_ENABLE)
1439 1439
           #error "E2_STEP_PIN, E2_DIR_PIN, or E2_ENABLE_PIN not defined for this board."
1440 1440
         #endif
1441 1441
         #if E_STEPPERS > 3
1442
-          #if !(PIN_EXISTS(E3_STEP) && PIN_EXISTS(E3_DIR) && PIN_EXISTS(E3_ENABLE))
1442
+          #if !(PIN_EXISTS(E3_STEP) && PIN_EXISTS(E3_DIR) && HAS_E3_ENABLE)
1443 1443
             #error "E3_STEP_PIN, E3_DIR_PIN, or E3_ENABLE_PIN not defined for this board."
1444 1444
           #endif
1445 1445
           #if E_STEPPERS > 4
1446
-            #if !(PIN_EXISTS(E4_STEP) && PIN_EXISTS(E4_DIR) && PIN_EXISTS(E4_ENABLE))
1446
+            #if !(PIN_EXISTS(E4_STEP) && PIN_EXISTS(E4_DIR) && HAS_E4_ENABLE)
1447 1447
               #error "E4_STEP_PIN, E4_DIR_PIN, or E4_ENABLE_PIN not defined for this board."
1448 1448
             #endif
1449 1449
             #if E_STEPPERS > 5
1450
-              #if !(PIN_EXISTS(E5_STEP) && PIN_EXISTS(E5_DIR) && PIN_EXISTS(E5_ENABLE))
1450
+              #if !(PIN_EXISTS(E5_STEP) && PIN_EXISTS(E5_DIR) && HAS_E5_ENABLE)
1451 1451
                 #error "E5_STEP_PIN, E5_DIR_PIN, or E5_ENABLE_PIN not defined for this board."
1452 1452
               #endif
1453 1453
             #endif // E_STEPPERS > 5

+ 5
- 0
Marlin/src/lcd/extensible_ui/ui_api.cpp Ver arquivo

@@ -698,6 +698,11 @@ void MarlinUI::init() {
698 698
   #if ENABLED(SDSUPPORT) && PIN_EXISTS(SD_DETECT)
699 699
     SET_INPUT_PULLUP(SD_DETECT_PIN);
700 700
   #endif
701
+
702
+  #if HAS_TRINAMIC
703
+    init_tmc_section();
704
+  #endif
705
+
701 706
   ExtUI::onStartup();
702 707
 }
703 708
 

+ 19
- 0
Marlin/src/lcd/language/language_en.h Ver arquivo

@@ -1178,3 +1178,22 @@
1178 1178
     #define MSG_FILAMENT_CHANGE_RESUME_1      _UxGT("Resuming...")
1179 1179
   #endif
1180 1180
 #endif // LCD_HEIGHT < 4
1181
+
1182
+#ifndef MSG_TMC_DRIVERS
1183
+  #define MSG_TMC_DRIVERS                     _UxGT("TMC drivers")
1184
+#endif
1185
+#ifndef MSG_TMC_CURRENT
1186
+  #define MSG_TMC_CURRENT                     _UxGT("Driver current")
1187
+#endif
1188
+#ifndef MSG_TMC_HYBRID_THRS
1189
+  #define MSG_TMC_HYBRID_THRS                 _UxGT("Hybrid threshold")
1190
+#endif
1191
+#ifndef MSG_TMC_HOMING_THRS
1192
+  #define MSG_TMC_HOMING_THRS                 _UxGT("Sensorless homing")
1193
+#endif
1194
+#ifndef MSG_TMC_STEPPING_MODE
1195
+  #define MSG_TMC_STEPPING_MODE               _UxGT("Stepping mode")
1196
+#endif
1197
+#ifndef MSG_TMC_STEALTH_ENABLED
1198
+  #define MSG_TMC_STEALTH_ENABLED             _UxGT("StealthChop enabled")
1199
+#endif

+ 2
- 1
Marlin/src/lcd/menu/menu.cpp Ver arquivo

@@ -164,7 +164,8 @@ DEFINE_MENU_EDIT_ITEM(int3);
164 164
 DEFINE_MENU_EDIT_ITEM(int4);
165 165
 DEFINE_MENU_EDIT_ITEM(int8);
166 166
 DEFINE_MENU_EDIT_ITEM(uint8);
167
-DEFINE_MENU_EDIT_ITEM(uint16);
167
+DEFINE_MENU_EDIT_ITEM(uint16_3);
168
+DEFINE_MENU_EDIT_ITEM(uint16_4);
168 169
 DEFINE_MENU_EDIT_ITEM(float3);
169 170
 DEFINE_MENU_EDIT_ITEM(float52);
170 171
 DEFINE_MENU_EDIT_ITEM(float43);

+ 6
- 3
Marlin/src/lcd/menu/menu.h Ver arquivo

@@ -47,7 +47,8 @@ DECLARE_MENU_EDIT_TYPE(int16_t,  int3,        i16tostr3,       1     );
47 47
 DECLARE_MENU_EDIT_TYPE(int16_t,  int4,        i16tostr4sign,   1     );
48 48
 DECLARE_MENU_EDIT_TYPE(int8_t,   int8,        i8tostr3,        1     );
49 49
 DECLARE_MENU_EDIT_TYPE(uint8_t,  uint8,       ui8tostr3,       1     );
50
-DECLARE_MENU_EDIT_TYPE(uint16_t, uint16,      ui16tostr3,      1     );
50
+DECLARE_MENU_EDIT_TYPE(uint16_t, uint16_3,    ui16tostr3,      1     );
51
+DECLARE_MENU_EDIT_TYPE(uint16_t, uint16_4,    ui16tostr4,      0.1   );
51 52
 DECLARE_MENU_EDIT_TYPE(float,    float3,      ftostr3,         1     );
52 53
 DECLARE_MENU_EDIT_TYPE(float,    float52,     ftostr52,      100     );
53 54
 DECLARE_MENU_EDIT_TYPE(float,    float43,     ftostr43sign, 1000     );
@@ -105,7 +106,8 @@ DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(int3);
105 106
 DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(int4);
106 107
 DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(int8);
107 108
 DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(uint8);
108
-DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(uint16);
109
+DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(uint16_3);
110
+DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(uint16_4);
109 111
 DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(float3);
110 112
 DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(float52);
111 113
 DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(float43);
@@ -176,7 +178,8 @@ DECLARE_MENU_EDIT_ITEM(int3);
176 178
 DECLARE_MENU_EDIT_ITEM(int4);
177 179
 DECLARE_MENU_EDIT_ITEM(int8);
178 180
 DECLARE_MENU_EDIT_ITEM(uint8);
179
-DECLARE_MENU_EDIT_ITEM(uint16);
181
+DECLARE_MENU_EDIT_ITEM(uint16_3);
182
+DECLARE_MENU_EDIT_ITEM(uint16_4);
180 183
 DECLARE_MENU_EDIT_ITEM(float3);
181 184
 DECLARE_MENU_EDIT_ITEM(float52);
182 185
 DECLARE_MENU_EDIT_ITEM(float43);

+ 5
- 0
Marlin/src/lcd/menu/menu_configuration.cpp Ver arquivo

@@ -44,6 +44,7 @@
44 44
 
45 45
 void menu_advanced_settings();
46 46
 void menu_delta_calibrate();
47
+void menu_tmc();
47 48
 
48 49
 static void lcd_factory_settings() {
49 50
   settings.reset();
@@ -353,6 +354,10 @@ void menu_configuration() {
353 354
     MENU_ITEM(submenu, MSG_DRIVE_STRENGTH, menu_pwm);
354 355
   #endif
355 356
 
357
+  #if HAS_TRINAMIC
358
+    MENU_ITEM(submenu, MSG_TMC_DRIVERS, menu_tmc);
359
+  #endif
360
+
356 361
   #if ENABLED(FILAMENT_RUNOUT_SENSOR)
357 362
     MENU_ITEM_EDIT_CALLBACK(bool, MSG_RUNOUT_SENSOR_ENABLE, &runout.enabled, runout.reset);
358 363
   #endif

+ 352
- 0
Marlin/src/lcd/menu/menu_tmc.cpp Ver arquivo

@@ -0,0 +1,352 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+//
24
+// TMC Menu
25
+//
26
+
27
+#include "../../inc/MarlinConfigPre.h"
28
+
29
+#if HAS_TRINAMIC && HAS_LCD_MENU
30
+
31
+#include "menu.h"
32
+#include "../../module/stepper_indirection.h"
33
+#include "../../feature/tmc_util.h"
34
+
35
+#define TMC_EDIT_STORED_I_RMS(ST) MENU_ITEM_EDIT_CALLBACK(uint16_4, MSG_##ST, &stepper##ST.val_mA, 100, 3000, refresh_stepper_current_##ST)
36
+
37
+#if AXIS_IS_TMC(X)
38
+  void refresh_stepper_current_X()  { stepperX.refresh_stepper_current();  }
39
+#endif
40
+#if AXIS_IS_TMC(Y)
41
+  void refresh_stepper_current_Y()  { stepperY.refresh_stepper_current();  }
42
+#endif
43
+#if AXIS_IS_TMC(Z)
44
+  void refresh_stepper_current_Z()  { stepperZ.refresh_stepper_current();  }
45
+#endif
46
+#if AXIS_IS_TMC(X2)
47
+  void refresh_stepper_current_X2() { stepperX2.refresh_stepper_current(); }
48
+#endif
49
+#if AXIS_IS_TMC(Y2)
50
+  void refresh_stepper_current_Y2() { stepperY2.refresh_stepper_current(); }
51
+#endif
52
+#if AXIS_IS_TMC(Z2)
53
+  void refresh_stepper_current_Z2() { stepperZ2.refresh_stepper_current(); }
54
+#endif
55
+#if AXIS_IS_TMC(Z3)
56
+  void refresh_stepper_current_Z3() { stepperZ3.refresh_stepper_current(); }
57
+#endif
58
+#if AXIS_IS_TMC(E0)
59
+  void refresh_stepper_current_E0() { stepperE0.refresh_stepper_current(); }
60
+#endif
61
+#if AXIS_IS_TMC(E1)
62
+  void refresh_stepper_current_E1() { stepperE1.refresh_stepper_current(); }
63
+#endif
64
+#if AXIS_IS_TMC(E2)
65
+  void refresh_stepper_current_E2() { stepperE2.refresh_stepper_current(); }
66
+#endif
67
+#if AXIS_IS_TMC(E3)
68
+  void refresh_stepper_current_E3() { stepperE3.refresh_stepper_current(); }
69
+#endif
70
+#if AXIS_IS_TMC(E4)
71
+  void refresh_stepper_current_E4() { stepperE4.refresh_stepper_current(); }
72
+#endif
73
+#if AXIS_IS_TMC(E5)
74
+  void refresh_stepper_current_E5() { stepperE5.refresh_stepper_current(); }
75
+#endif
76
+
77
+void menu_tmc_current() {
78
+  START_MENU();
79
+  MENU_BACK(MSG_TMC_DRIVERS);
80
+  #if AXIS_IS_TMC(X)
81
+    TMC_EDIT_STORED_I_RMS(X);
82
+  #endif
83
+  #if AXIS_IS_TMC(Y)
84
+    TMC_EDIT_STORED_I_RMS(Y);
85
+  #endif
86
+  #if AXIS_IS_TMC(Z)
87
+    TMC_EDIT_STORED_I_RMS(Z);
88
+  #endif
89
+  #if AXIS_IS_TMC(X2)
90
+    TMC_EDIT_STORED_I_RMS(X2);
91
+  #endif
92
+  #if AXIS_IS_TMC(Y2)
93
+    TMC_EDIT_STORED_I_RMS(Y2);
94
+  #endif
95
+  #if AXIS_IS_TMC(Z2)
96
+    TMC_EDIT_STORED_I_RMS(Z2);
97
+  #endif
98
+  #if AXIS_IS_TMC(Z3)
99
+    TMC_EDIT_STORED_I_RMS(Z3);
100
+  #endif
101
+  #if AXIS_IS_TMC(E0)
102
+    TMC_EDIT_STORED_I_RMS(E0);
103
+  #endif
104
+  #if AXIS_IS_TMC(E1)
105
+    TMC_EDIT_STORED_I_RMS(E1);
106
+  #endif
107
+  #if AXIS_IS_TMC(E2)
108
+    TMC_EDIT_STORED_I_RMS(E2);
109
+  #endif
110
+  #if AXIS_IS_TMC(E3)
111
+    TMC_EDIT_STORED_I_RMS(E3);
112
+  #endif
113
+  #if AXIS_IS_TMC(E4)
114
+    TMC_EDIT_STORED_I_RMS(E4);
115
+  #endif
116
+  #if AXIS_IS_TMC(E5)
117
+    TMC_EDIT_STORED_I_RMS(E5);
118
+  #endif
119
+  END_MENU();
120
+}
121
+
122
+#if ENABLED(HYBRID_THRESHOLD)
123
+
124
+  #define TMC_EDIT_STORED_HYBRID_THRS(ST) MENU_ITEM_EDIT_CALLBACK(uint8, MSG_##ST, &stepper##ST.stored.hybrid_thrs, 0, 255, refresh_hybrid_thrs_##ST);
125
+
126
+  #if AXIS_HAS_STEALTHCHOP(X)
127
+    void refresh_hybrid_thrs_X()  {  stepperX.refresh_hybrid_thrs(planner.settings.axis_steps_per_mm[X_AXIS]); }
128
+  #endif
129
+  #if AXIS_HAS_STEALTHCHOP(Y)
130
+    void refresh_hybrid_thrs_Y()  {  stepperY.refresh_hybrid_thrs(planner.settings.axis_steps_per_mm[Y_AXIS]); }
131
+  #endif
132
+  #if AXIS_HAS_STEALTHCHOP(Z)
133
+    void refresh_hybrid_thrs_Z()  {  stepperZ.refresh_hybrid_thrs(planner.settings.axis_steps_per_mm[Z_AXIS]); }
134
+  #endif
135
+  #if AXIS_HAS_STEALTHCHOP(X2)
136
+    void refresh_hybrid_thrs_X2() { stepperX2.refresh_hybrid_thrs(planner.settings.axis_steps_per_mm[X_AXIS]); }
137
+  #endif
138
+  #if AXIS_HAS_STEALTHCHOP(Y2)
139
+    void refresh_hybrid_thrs_Y2() { stepperY2.refresh_hybrid_thrs(planner.settings.axis_steps_per_mm[Y_AXIS]); }
140
+  #endif
141
+  #if AXIS_HAS_STEALTHCHOP(Z2)
142
+    void refresh_hybrid_thrs_Z2() { stepperZ2.refresh_hybrid_thrs(planner.settings.axis_steps_per_mm[Z_AXIS]); }
143
+  #endif
144
+  #if AXIS_HAS_STEALTHCHOP(Z3)
145
+    void refresh_hybrid_thrs_Z3() { stepperZ3.refresh_hybrid_thrs(planner.settings.axis_steps_per_mm[Z_AXIS]); }
146
+  #endif
147
+  #if AXIS_HAS_STEALTHCHOP(E0)
148
+    void refresh_hybrid_thrs_E0() { stepperE0.refresh_hybrid_thrs(planner.settings.axis_steps_per_mm[E_AXIS]); }
149
+  #endif
150
+  #if AXIS_HAS_STEALTHCHOP(E1)
151
+    void refresh_hybrid_thrs_E1() { stepperE1.refresh_hybrid_thrs(planner.settings.axis_steps_per_mm[E_AXIS_N(1)]); }
152
+  #endif
153
+  #if AXIS_HAS_STEALTHCHOP(E2)
154
+    void refresh_hybrid_thrs_E2() { stepperE2.refresh_hybrid_thrs(planner.settings.axis_steps_per_mm[E_AXIS_N(2)]); }
155
+  #endif
156
+  #if AXIS_HAS_STEALTHCHOP(E3)
157
+    void refresh_hybrid_thrs_E3() { stepperE3.refresh_hybrid_thrs(planner.settings.axis_steps_per_mm[E_AXIS_N(3)]); }
158
+  #endif
159
+  #if AXIS_HAS_STEALTHCHOP(E4)
160
+    void refresh_hybrid_thrs_E4() { stepperE4.refresh_hybrid_thrs(planner.settings.axis_steps_per_mm[E_AXIS_N(4)]); }
161
+  #endif
162
+  #if AXIS_HAS_STEALTHCHOP(E5)
163
+    void refresh_hybrid_thrs_E5() { stepperE5.refresh_hybrid_thrs(planner.settings.axis_steps_per_mm[E_AXIS_N(5)]); }
164
+  #endif
165
+
166
+  void menu_tmc_hybrid_thrs() {
167
+    START_MENU();
168
+    MENU_BACK(MSG_TMC_DRIVERS);
169
+    #if AXIS_HAS_STEALTHCHOP(X)
170
+      TMC_EDIT_STORED_HYBRID_THRS(X);
171
+    #endif
172
+    #if AXIS_HAS_STEALTHCHOP(Y)
173
+      TMC_EDIT_STORED_HYBRID_THRS(Y);
174
+    #endif
175
+    #if AXIS_HAS_STEALTHCHOP(Z)
176
+      TMC_EDIT_STORED_HYBRID_THRS(Z);
177
+    #endif
178
+    #if AXIS_HAS_STEALTHCHOP(X2)
179
+      TMC_EDIT_STORED_HYBRID_THRS(X2);
180
+    #endif
181
+    #if AXIS_HAS_STEALTHCHOP(Y2)
182
+      TMC_EDIT_STORED_HYBRID_THRS(Y2);
183
+    #endif
184
+    #if AXIS_HAS_STEALTHCHOP(Z2)
185
+      TMC_EDIT_STORED_HYBRID_THRS(Z2);
186
+    #endif
187
+    #if AXIS_HAS_STEALTHCHOP(Z3)
188
+      TMC_EDIT_STORED_HYBRID_THRS(Z3);
189
+    #endif
190
+    #if AXIS_HAS_STEALTHCHOP(E0)
191
+      TMC_EDIT_STORED_HYBRID_THRS(E0);
192
+    #endif
193
+    #if AXIS_HAS_STEALTHCHOP(E1)
194
+      TMC_EDIT_STORED_HYBRID_THRS(E1);
195
+    #endif
196
+    #if AXIS_HAS_STEALTHCHOP(E2)
197
+      TMC_EDIT_STORED_HYBRID_THRS(E2);
198
+    #endif
199
+    #if AXIS_HAS_STEALTHCHOP(E3)
200
+      TMC_EDIT_STORED_HYBRID_THRS(E3);
201
+    #endif
202
+    #if AXIS_HAS_STEALTHCHOP(E4)
203
+      TMC_EDIT_STORED_HYBRID_THRS(E4);
204
+    #endif
205
+    #if AXIS_HAS_STEALTHCHOP(E5)
206
+      TMC_EDIT_STORED_HYBRID_THRS(E5);
207
+    #endif
208
+    END_MENU();
209
+  }
210
+
211
+#endif
212
+
213
+#if ENABLED(SENSORLESS_HOMING)
214
+
215
+  #define TMC_EDIT_STORED_SGT(ST) MENU_ITEM_EDIT_CALLBACK(int8, MSG_##ST, &stepper##ST.stored.homing_thrs, -64, 63, refresh_homing_thrs_##ST);
216
+
217
+  #if X_SENSORLESS
218
+    void refresh_homing_thrs_X()  { stepperX.refresh_homing_thrs();  }
219
+  #endif
220
+  #if Y_SENSORLESS
221
+    void refresh_homing_thrs_Y()  { stepperY.refresh_homing_thrs();  }
222
+  #endif
223
+  #if Z_SENSORLESS
224
+    void refresh_homing_thrs_Z()  { stepperZ.refresh_homing_thrs();  }
225
+  #endif
226
+
227
+  void menu_tmc_homing_thrs() {
228
+    START_MENU();
229
+    MENU_BACK(MSG_TMC_DRIVERS);
230
+    #if X_SENSORLESS
231
+      TMC_EDIT_STORED_SGT(X);
232
+    #endif
233
+    #if Y_SENSORLESS
234
+      TMC_EDIT_STORED_SGT(Y);
235
+    #endif
236
+    #if Z_SENSORLESS
237
+      TMC_EDIT_STORED_SGT(Z);
238
+    #endif
239
+    END_MENU();
240
+  }
241
+
242
+#endif
243
+
244
+#if STEALTHCHOP_ENABLED
245
+
246
+  #define TMC_EDIT_STEP_MODE(ST) MENU_ITEM_EDIT_CALLBACK(bool, MSG_##ST, &stepper##ST.stored.stealthChop_enabled, refresh_stepping_mode_##ST)
247
+
248
+  #if AXIS_HAS_STEALTHCHOP(X)
249
+    void refresh_stepping_mode_X()  { stepperX.refresh_stepping_mode();  }
250
+  #endif
251
+  #if AXIS_HAS_STEALTHCHOP(Y)
252
+    void refresh_stepping_mode_Y()  { stepperY.refresh_stepping_mode();  }
253
+  #endif
254
+  #if AXIS_HAS_STEALTHCHOP(Z)
255
+    void refresh_stepping_mode_Z()  { stepperZ.refresh_stepping_mode();  }
256
+  #endif
257
+  #if AXIS_HAS_STEALTHCHOP(X2)
258
+    void refresh_stepping_mode_X2() { stepperX2.refresh_stepping_mode(); }
259
+  #endif
260
+  #if AXIS_HAS_STEALTHCHOP(Y2)
261
+    void refresh_stepping_mode_Y2() { stepperY2.refresh_stepping_mode(); }
262
+  #endif
263
+  #if AXIS_HAS_STEALTHCHOP(Z2)
264
+    void refresh_stepping_mode_Z2() { stepperZ2.refresh_stepping_mode(); }
265
+  #endif
266
+  #if AXIS_HAS_STEALTHCHOP(Z3)
267
+    void refresh_stepping_mode_Z3() { stepperZ3.refresh_stepping_mode(); }
268
+  #endif
269
+  #if AXIS_HAS_STEALTHCHOP(E0)
270
+    void refresh_stepping_mode_E0() { stepperE0.refresh_stepping_mode(); }
271
+  #endif
272
+  #if AXIS_HAS_STEALTHCHOP(E1)
273
+    void refresh_stepping_mode_E1() { stepperE1.refresh_stepping_mode(); }
274
+  #endif
275
+  #if AXIS_HAS_STEALTHCHOP(E2)
276
+    void refresh_stepping_mode_E2() { stepperE2.refresh_stepping_mode(); }
277
+  #endif
278
+  #if AXIS_HAS_STEALTHCHOP(E3)
279
+    void refresh_stepping_mode_E3() { stepperE3.refresh_stepping_mode(); }
280
+  #endif
281
+  #if AXIS_HAS_STEALTHCHOP(E4)
282
+    void refresh_stepping_mode_E4() { stepperE4.refresh_stepping_mode(); }
283
+  #endif
284
+  #if AXIS_HAS_STEALTHCHOP(E5)
285
+    void refresh_stepping_mode_E5() { stepperE5.refresh_stepping_mode(); }
286
+  #endif
287
+
288
+  void menu_tmc_step_mode() {
289
+    START_MENU();
290
+    STATIC_ITEM(MSG_TMC_STEALTH_ENABLED);
291
+    MENU_BACK(MSG_TMC_DRIVERS);
292
+    #if AXIS_HAS_STEALTHCHOP(X)
293
+      TMC_EDIT_STEP_MODE(X);
294
+    #endif
295
+    #if AXIS_HAS_STEALTHCHOP(Y)
296
+      TMC_EDIT_STEP_MODE(Y);
297
+    #endif
298
+    #if AXIS_HAS_STEALTHCHOP(Z)
299
+      TMC_EDIT_STEP_MODE(Z);
300
+    #endif
301
+    #if AXIS_HAS_STEALTHCHOP(X2)
302
+      TMC_EDIT_STEP_MODE(X2);
303
+    #endif
304
+    #if AXIS_HAS_STEALTHCHOP(Y2)
305
+      TMC_EDIT_STEP_MODE(Y2);
306
+    #endif
307
+    #if AXIS_HAS_STEALTHCHOP(Z2)
308
+      TMC_EDIT_STEP_MODE(Z2);
309
+    #endif
310
+    #if AXIS_HAS_STEALTHCHOP(Z3)
311
+      TMC_EDIT_STEP_MODE(Z3);
312
+    #endif
313
+    #if AXIS_HAS_STEALTHCHOP(E0)
314
+      TMC_EDIT_STEP_MODE(E0);
315
+    #endif
316
+    #if AXIS_HAS_STEALTHCHOP(E1)
317
+      TMC_EDIT_STEP_MODE(E1);
318
+    #endif
319
+    #if AXIS_HAS_STEALTHCHOP(E2)
320
+      TMC_EDIT_STEP_MODE(E2);
321
+    #endif
322
+    #if AXIS_HAS_STEALTHCHOP(E3)
323
+      TMC_EDIT_STEP_MODE(E3);
324
+    #endif
325
+    #if AXIS_HAS_STEALTHCHOP(E4)
326
+      TMC_EDIT_STEP_MODE(E4);
327
+    #endif
328
+    #if AXIS_HAS_STEALTHCHOP(E5)
329
+      TMC_EDIT_STEP_MODE(E5);
330
+    #endif
331
+    END_MENU();
332
+  }
333
+
334
+#endif
335
+
336
+void menu_tmc() {
337
+  START_MENU();
338
+  MENU_BACK(MSG_CONTROL);
339
+  MENU_ITEM(submenu, MSG_TMC_CURRENT, menu_tmc_current);
340
+  #if ENABLED(HYBRID_THRESHOLD)
341
+    MENU_ITEM(submenu, MSG_TMC_HYBRID_THRS, menu_tmc_hybrid_thrs);
342
+  #endif
343
+  #if ENABLED(SENSORLESS_HOMING)
344
+    MENU_ITEM(submenu, MSG_TMC_HOMING_THRS, menu_tmc_homing_thrs);
345
+  #endif
346
+  #if STEALTHCHOP_ENABLED
347
+    MENU_ITEM(submenu, MSG_TMC_STEPPING_MODE, menu_tmc_step_mode);
348
+  #endif
349
+  END_MENU();
350
+}
351
+
352
+#endif // HAS_TRINAMIC

+ 8
- 0
Marlin/src/lcd/ultralcd.cpp Ver arquivo

@@ -85,6 +85,10 @@
85 85
   #include "../libs/buzzer.h"
86 86
 #endif
87 87
 
88
+#if HAS_TRINAMIC
89
+  #include "../feature/tmc_util.h"
90
+#endif
91
+
88 92
 #if HAS_ENCODER_ACTION
89 93
   volatile uint8_t MarlinUI::buttons;
90 94
   #if HAS_SLOW_BUTTONS
@@ -255,6 +259,10 @@ void MarlinUI::init() {
255 259
   #if HAS_ENCODER_ACTION
256 260
     encoderDiff = 0;
257 261
   #endif
262
+
263
+  #if HAS_TRINAMIC
264
+    init_tmc_section();
265
+  #endif
258 266
 }
259 267
 
260 268
 bool MarlinUI::get_blink() {

+ 210
- 1
Marlin/src/module/configuration_store.cpp Ver arquivo

@@ -37,7 +37,7 @@
37 37
  */
38 38
 
39 39
 // Change EEPROM version if the structure changes
40
-#define EEPROM_VERSION "V63"
40
+#define EEPROM_VERSION "V64"
41 41
 #define EEPROM_OFFSET 100
42 42
 
43 43
 // Check the integrity of data offsets.
@@ -48,12 +48,16 @@
48 48
 
49 49
 #if ADD_PORT_ARG
50 50
   #define PORTARG_SOLO     const int8_t port
51
+  #define PORTARG_BEFORE   const int8_t port,
51 52
   #define PORTARG_AFTER   ,const int8_t port
52 53
   #define PORTVAR_SOLO     port
54
+  #define PORTVAR_BEFORE   port,
53 55
 #else
54 56
   #define PORTARG_SOLO
57
+  #define PORTARG_BEFORE
55 58
   #define PORTARG_AFTER
56 59
   #define PORTVAR_SOLO
60
+  #define PORTVAR_BEFORE
57 61
 #endif
58 62
 
59 63
 #include "endstops.h"
@@ -112,6 +116,7 @@
112 116
 typedef struct { uint16_t X, Y, Z, X2, Y2, Z2, Z3, E0, E1, E2, E3, E4, E5; } tmc_stepper_current_t;
113 117
 typedef struct { uint32_t X, Y, Z, X2, Y2, Z2, Z3, E0, E1, E2, E3, E4, E5; } tmc_hybrid_threshold_t;
114 118
 typedef struct {  int16_t X, Y, Z;                                         } tmc_sgt_t;
119
+typedef struct {     bool X, Y, Z, X2, Y2, Z2, Z3, E0, E1, E2, E3, E4, E5; } tmc_stealth_enabled_t;
115 120
 
116 121
 // Limit an index to an array size
117 122
 #define ALIM(I,ARR) MIN(I, COUNT(ARR) - 1)
@@ -256,6 +261,7 @@ typedef struct SettingsDataStruct {
256 261
   tmc_stepper_current_t tmc_stepper_current;            // M906 X Y Z X2 Y2 Z2 Z3 E0 E1 E2 E3 E4 E5
257 262
   tmc_hybrid_threshold_t tmc_hybrid_threshold;          // M913 X Y Z X2 Y2 Z2 Z3 E0 E1 E2 E3 E4 E5
258 263
   tmc_sgt_t tmc_sgt;                                    // M914 X Y Z
264
+  tmc_stealth_enabled_t tmc_stealth_enabled;            // M569 X Y Z X2 Y2 Z2 Z3 E0 E1 E2 E3 E4 E5
259 265
 
260 266
   //
261 267
   // LIN_ADVANCE
@@ -975,6 +981,70 @@ void MarlinSettings::postprocess() {
975 981
     }
976 982
 
977 983
     //
984
+    // TMC stepping mode
985
+    //
986
+    {
987
+      _FIELD_TEST(tmc_stealth_enabled);
988
+
989
+      tmc_stealth_enabled_t tmc_stealth_enabled = { false, false, false, false, false, false, false, false, false, false, false, false, false };
990
+
991
+      #if HAS_STEALTHCHOP
992
+        #if AXIS_HAS_STEALTHCHOP(X)
993
+          tmc_stealth_enabled.X = stepperX.get_stealthChop_status();
994
+        #endif
995
+        #if AXIS_HAS_STEALTHCHOP(Y)
996
+          tmc_stealth_enabled.Y = stepperY.get_stealthChop_status();
997
+        #endif
998
+        #if AXIS_HAS_STEALTHCHOP(Z)
999
+          tmc_stealth_enabled.Z = stepperZ.get_stealthChop_status();
1000
+        #endif
1001
+        #if AXIS_HAS_STEALTHCHOP(X2)
1002
+          tmc_stealth_enabled.X2 = stepperX2.get_stealthChop_status();
1003
+        #endif
1004
+        #if AXIS_HAS_STEALTHCHOP(Y2)
1005
+          tmc_stealth_enabled.Y2 = stepperY2.get_stealthChop_status();
1006
+        #endif
1007
+        #if AXIS_HAS_STEALTHCHOP(Z2)
1008
+          tmc_stealth_enabled.Z2 = stepperZ2.get_stealthChop_status();
1009
+        #endif
1010
+        #if AXIS_HAS_STEALTHCHOP(Z3)
1011
+          tmc_stealth_enabled.Z3 = stepperZ3.get_stealthChop_status();
1012
+        #endif
1013
+        #if MAX_EXTRUDERS
1014
+          #if AXIS_HAS_STEALTHCHOP(E0)
1015
+            tmc_stealth_enabled.E0 = stepperE0.get_stealthChop_status();
1016
+          #endif
1017
+          #if MAX_EXTRUDERS > 1
1018
+            #if AXIS_HAS_STEALTHCHOP(E1)
1019
+              tmc_stealth_enabled.E1 = stepperE1.get_stealthChop_status();
1020
+            #endif
1021
+            #if MAX_EXTRUDERS > 2
1022
+              #if AXIS_HAS_STEALTHCHOP(E2)
1023
+                tmc_stealth_enabled.E2 = stepperE2.get_stealthChop_status();
1024
+              #endif
1025
+              #if MAX_EXTRUDERS > 3
1026
+                #if AXIS_HAS_STEALTHCHOP(E3)
1027
+                  tmc_stealth_enabled.E3 = stepperE3.get_stealthChop_status();
1028
+                #endif
1029
+                #if MAX_EXTRUDERS > 4
1030
+                  #if AXIS_HAS_STEALTHCHOP(E4)
1031
+                    tmc_stealth_enabled.E4 = stepperE4.get_stealthChop_status();
1032
+                  #endif
1033
+                  #if MAX_EXTRUDERS > 5
1034
+                    #if AXIS_HAS_STEALTHCHOP(E5)
1035
+                      tmc_stealth_enabled.E5 = stepperE5.get_stealthChop_status();
1036
+                    #endif
1037
+                  #endif // MAX_EXTRUDERS > 5
1038
+                #endif // MAX_EXTRUDERS > 4
1039
+              #endif // MAX_EXTRUDERS > 3
1040
+            #endif // MAX_EXTRUDERS > 2
1041
+          #endif // MAX_EXTRUDERS > 1
1042
+        #endif // MAX_EXTRUDERS
1043
+      #endif
1044
+      EEPROM_WRITE(tmc_stealth_enabled);
1045
+    }
1046
+
1047
+    //
978 1048
     // Linear Advance
979 1049
     //
980 1050
     {
@@ -1630,6 +1700,60 @@ void MarlinSettings::postprocess() {
1630 1700
         #endif
1631 1701
       }
1632 1702
 
1703
+      // TMC stepping mode
1704
+      {
1705
+        _FIELD_TEST(tmc_stealth_enabled);
1706
+
1707
+        tmc_stealth_enabled_t tmc_stealth_enabled;
1708
+        EEPROM_READ(tmc_stealth_enabled);
1709
+
1710
+        #if HAS_TRINAMIC
1711
+
1712
+          #define SET_STEPPING_MODE(ST) stepper##ST.stored.stealthChop_enabled = tmc_stealth_enabled.ST; stepper##ST.refresh_stepping_mode();
1713
+          if (!validating) {
1714
+            #if AXIS_HAS_STEALTHCHOP(X)
1715
+              SET_STEPPING_MODE(X);
1716
+            #endif
1717
+            #if AXIS_HAS_STEALTHCHOP(Y)
1718
+              SET_STEPPING_MODE(Y);
1719
+            #endif
1720
+            #if AXIS_HAS_STEALTHCHOP(Z)
1721
+              SET_STEPPING_MODE(Z);
1722
+            #endif
1723
+            #if AXIS_HAS_STEALTHCHOP(X2)
1724
+              SET_STEPPING_MODE(X2);
1725
+            #endif
1726
+            #if AXIS_HAS_STEALTHCHOP(Y2)
1727
+              SET_STEPPING_MODE(Y2);
1728
+            #endif
1729
+            #if AXIS_HAS_STEALTHCHOP(Z2)
1730
+              SET_STEPPING_MODE(Z2);
1731
+            #endif
1732
+            #if AXIS_HAS_STEALTHCHOP(Z3)
1733
+              SET_STEPPING_MODE(Z3);
1734
+            #endif
1735
+            #if AXIS_HAS_STEALTHCHOP(E0)
1736
+              SET_STEPPING_MODE(E0);
1737
+            #endif
1738
+            #if AXIS_HAS_STEALTHCHOP(E1)
1739
+              SET_STEPPING_MODE(E1);
1740
+            #endif
1741
+            #if AXIS_HAS_STEALTHCHOP(E2)
1742
+              SET_STEPPING_MODE(E2);
1743
+            #endif
1744
+            #if AXIS_HAS_STEALTHCHOP(E3)
1745
+              SET_STEPPING_MODE(E3);
1746
+            #endif
1747
+            #if AXIS_HAS_STEALTHCHOP(E4)
1748
+              SET_STEPPING_MODE(E4);
1749
+            #endif
1750
+            #if AXIS_HAS_STEALTHCHOP(E5)
1751
+              SET_STEPPING_MODE(E5);
1752
+            #endif
1753
+          }
1754
+        #endif
1755
+      }
1756
+
1633 1757
       //
1634 1758
       // Linear Advance
1635 1759
       //
@@ -2200,6 +2324,16 @@ void MarlinSettings::reset(PORTARG_SOLO) {
2200 2324
 
2201 2325
   #if HAS_TRINAMIC
2202 2326
     void say_M906(PORTARG_SOLO) { SERIAL_ECHOPGM_P(port, "  M906"); }
2327
+    #if HAS_STEALTHCHOP
2328
+      void say_M569(PORTARG_BEFORE const char * const etc=NULL) {
2329
+        SERIAL_ECHOPGM_P(port, "  M569 S1");
2330
+        if (etc) {
2331
+          SERIAL_CHAR_P(port, ' ');
2332
+          serialprintPGM_P(port, etc);
2333
+          SERIAL_EOL_P(port);
2334
+        }
2335
+      }
2336
+    #endif
2203 2337
     #if ENABLED(HYBRID_THRESHOLD)
2204 2338
       void say_M913(PORTARG_SOLO) { SERIAL_ECHOPGM_P(port, "  M913"); }
2205 2339
     #endif
@@ -2895,6 +3029,81 @@ void MarlinSettings::reset(PORTARG_SOLO) {
2895 3029
 
2896 3030
       #endif // USE_SENSORLESS
2897 3031
 
3032
+      /**
3033
+       * TMC stepping mode
3034
+       */
3035
+      #if HAS_STEALTHCHOP
3036
+        CONFIG_ECHO_HEADING("Driver stepping mode:");
3037
+        CONFIG_ECHO_START();
3038
+        #if AXIS_HAS_STEALTHCHOP(X)
3039
+          const bool chop_x = stepperX.get_stealthChop_status();
3040
+        #else
3041
+          constexpr bool chop_x = false;
3042
+        #endif
3043
+        #if AXIS_HAS_STEALTHCHOP(Y)
3044
+          const bool chop_y = stepperY.get_stealthChop_status();
3045
+        #else
3046
+          constexpr bool chop_y = false;
3047
+        #endif
3048
+        #if AXIS_HAS_STEALTHCHOP(Z)
3049
+          const bool chop_z = stepperZ.get_stealthChop_status();
3050
+        #else
3051
+          constexpr bool chop_z = false;
3052
+        #endif
3053
+
3054
+        if (chop_x || chop_y || chop_z) say_M569(PORTVAR_SOLO);
3055
+        if (chop_x) SERIAL_ECHOPGM_P(port, " X");
3056
+        if (chop_y) SERIAL_ECHOPGM_P(port, " Y");
3057
+        if (chop_z) SERIAL_ECHOPGM_P(port, " Z");
3058
+        if (chop_x || chop_y || chop_z) SERIAL_EOL_P(port);
3059
+
3060
+        #if AXIS_HAS_STEALTHCHOP(X2)
3061
+          const bool chop_x2 = stepperX2.get_stealthChop_status();
3062
+        #else
3063
+          constexpr bool chop_x2 = false;
3064
+        #endif
3065
+        #if AXIS_HAS_STEALTHCHOP(Y2)
3066
+          const bool chop_y2 = stepperY2.get_stealthChop_status();
3067
+        #else
3068
+          constexpr bool chop_y2 = false;
3069
+        #endif
3070
+        #if AXIS_HAS_STEALTHCHOP(Z2)
3071
+          const bool chop_z2 = stepperZ2.get_stealthChop_status();
3072
+        #else
3073
+          constexpr bool chop_z2 = false;
3074
+        #endif
3075
+
3076
+        if (chop_x2 || chop_y2 || chop_z2) say_M569(PORTVAR_BEFORE PSTR("I1"));
3077
+        if (chop_x2) SERIAL_ECHOPGM_P(port, " X");
3078
+        if (chop_y2) SERIAL_ECHOPGM_P(port, " Y");
3079
+        if (chop_z2) SERIAL_ECHOPGM_P(port, " Z");
3080
+        if (chop_x2 || chop_y2 || chop_z2) SERIAL_EOL_P(port);
3081
+
3082
+        #if AXIS_HAS_STEALTHCHOP(Z3)
3083
+          if (stepperZ3.get_stealthChop_status()) { say_M569(PORTVAR_BEFORE PSTR("I2 Z")); }
3084
+        #endif
3085
+
3086
+        #if AXIS_HAS_STEALTHCHOP(E0)
3087
+          if (stepperE0.get_stealthChop_status()) { say_M569(PORTVAR_BEFORE PSTR("T0 E")); }
3088
+        #endif
3089
+        #if AXIS_HAS_STEALTHCHOP(E1)
3090
+          if (stepperE1.get_stealthChop_status()) { say_M569(PORTVAR_BEFORE PSTR("T1 E")); }
3091
+        #endif
3092
+        #if AXIS_HAS_STEALTHCHOP(E2)
3093
+          if (stepperE2.get_stealthChop_status()) { say_M569(PORTVAR_BEFORE PSTR("T2 E")); }
3094
+        #endif
3095
+        #if AXIS_HAS_STEALTHCHOP(E3)
3096
+          if (stepperE3.get_stealthChop_status()) { say_M569(PORTVAR_BEFORE PSTR("T3 E")); }
3097
+        #endif
3098
+        #if AXIS_HAS_STEALTHCHOP(E4)
3099
+          if (stepperE4.get_stealthChop_status()) { say_M569(PORTVAR_BEFORE PSTR("T4 E")); }
3100
+        #endif
3101
+        #if AXIS_HAS_STEALTHCHOP(E5)
3102
+          if (stepperE5.get_stealthChop_status()) { say_M569(PORTVAR_BEFORE PSTR("T5 E")); }
3103
+        #endif
3104
+
3105
+      #endif // HAS_STEALTHCHOP
3106
+
2898 3107
     #endif // HAS_TRINAMIC
2899 3108
 
2900 3109
     /**

+ 11
- 15
Marlin/src/module/stepper_indirection.cpp Ver arquivo

@@ -205,14 +205,12 @@
205 205
   void tmc_init(TMCMarlin<TMC2130Stepper, AXIS_LETTER, DRIVER_ID> &st, const uint16_t mA, const uint16_t microsteps, const uint32_t thrs, const float spmm, const bool stealth) {
206 206
     st.begin();
207 207
 
208
-    static constexpr int8_t timings[] = CHOPPER_TIMING; // Default 4, -2, 1
209
-
210 208
     CHOPCONF_t chopconf{0};
211 209
     chopconf.tbl = 1;
212
-    chopconf.toff = timings[0];
210
+    chopconf.toff = chopper_timing.toff;
213 211
     chopconf.intpol = INTERPOLATE;
214
-    chopconf.hend = timings[1] + 3;
215
-    chopconf.hstrt = timings[2] - 1;
212
+    chopconf.hend = chopper_timing.hstrt + 3;
213
+    chopconf.hstrt = chopper_timing.hend - 1;
216 214
     st.CHOPCONF(chopconf.sr);
217 215
 
218 216
     st.rms_current(mA, HOLD_MULTIPLIER);
@@ -221,6 +219,7 @@
221 219
     st.TPOWERDOWN(128); // ~2s until driver lowers to hold current
222 220
 
223 221
     st.en_pwm_mode(stealth);
222
+    st.stored.stealthChop_enabled = stealth;
224 223
 
225 224
     PWMCONF_t pwmconf{0};
226 225
     pwmconf.pwm_freq = 0b01; // f_pwm = 2/683 f_clk
@@ -442,21 +441,20 @@
442 441
 
443 442
   template<char AXIS_LETTER, char DRIVER_ID>
444 443
   void tmc_init(TMCMarlin<TMC2208Stepper, AXIS_LETTER, DRIVER_ID> &st, const uint16_t mA, const uint16_t microsteps, const uint32_t thrs, const float spmm, const bool stealth) {
445
-    static constexpr int8_t timings[] = CHOPPER_TIMING; // Default 4, -2, 1
446
-
447 444
     TMC2208_n::GCONF_t gconf{0};
448 445
     gconf.pdn_disable = true; // Use UART
449 446
     gconf.mstep_reg_select = true; // Select microsteps with UART
450 447
     gconf.i_scale_analog = false;
451 448
     gconf.en_spreadcycle = !stealth;
452 449
     st.GCONF(gconf.sr);
450
+    st.stored.stealthChop_enabled = stealth;
453 451
 
454 452
     TMC2208_n::CHOPCONF_t chopconf{0};
455 453
     chopconf.tbl = 0b01; // blank_time = 24
456
-    chopconf.toff = timings[0];
454
+    chopconf.toff = chopper_timing.toff;
457 455
     chopconf.intpol = INTERPOLATE;
458
-    chopconf.hend = timings[1] + 3;
459
-    chopconf.hstrt = timings[2] - 1;
456
+    chopconf.hend = chopper_timing.hstrt + 3;
457
+    chopconf.hstrt = chopper_timing.hend - 1;
460 458
     st.CHOPCONF(chopconf.sr);
461 459
 
462 460
     st.rms_current(mA, HOLD_MULTIPLIER);
@@ -545,13 +543,11 @@
545 543
   void tmc_init(TMCMarlin<TMC2660Stepper, AXIS_LETTER, DRIVER_ID> &st, const uint16_t mA, const uint16_t microsteps, const uint32_t, const float, const bool) {
546 544
     st.begin();
547 545
 
548
-    static constexpr int8_t timings[] = CHOPPER_TIMING; // Default 4, -2, 1
549
-
550 546
     TMC2660_n::CHOPCONF_t chopconf{0};
551 547
     chopconf.tbl = 1;
552
-    chopconf.toff = timings[0];
553
-    chopconf.hend = timings[1] + 3;
554
-    chopconf.hstrt = timings[2] - 1;
548
+    chopconf.toff = chopper_timing.toff;
549
+    chopconf.hend = chopper_timing.hstrt + 3;
550
+    chopconf.hstrt = chopper_timing.hend - 1;
555 551
     st.CHOPCONF(chopconf.sr);
556 552
 
557 553
     st.rms_current(mA);

+ 34
- 26
Marlin/src/module/stepper_indirection.h Ver arquivo

@@ -66,6 +66,14 @@
66 66
   #define _TMC_CLASS(MODEL, L) __TMC_CLASS(MODEL, L)
67 67
   #define TMC_CLASS(ST) _TMC_CLASS(ST##_DRIVER_TYPE, TMC_##ST##_LABEL)
68 68
 
69
+  typedef struct {
70
+    uint8_t toff;
71
+    int8_t hstrt;
72
+    uint8_t hend;
73
+  } chopper_timing_t;
74
+
75
+  static constexpr chopper_timing_t chopper_timing = CHOPPER_TIMING;
76
+
69 77
   #if HAS_DRIVER(TMC2208)
70 78
     void tmc2208_serial_begin();
71 79
   #endif
@@ -99,9 +107,9 @@ void reset_stepper_drivers();    // Called by settings.load / settings.reset
99 107
     #define X_ENABLE_INIT NOOP
100 108
     #define X_ENABLE_WRITE(STATE) stepperX.setEnabled(STATE)
101 109
     #define X_ENABLE_READ stepperX.isEnabled()
102
-  #elif AXIS_DRIVER_TYPE(X, TMC2660)
110
+  #elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(X)
103 111
     #define X_ENABLE_INIT NOOP
104
-    #define X_ENABLE_WRITE(STATE) stepperX.toff((STATE)==X_ENABLE_ON ? stepperX.savedToff() : 0)
112
+    #define X_ENABLE_WRITE(STATE) stepperX.toff((STATE)==X_ENABLE_ON ? chopper_timing.toff : 0)
105 113
     #define X_ENABLE_READ stepperX.isEnabled()
106 114
   #else
107 115
     #define X_ENABLE_INIT SET_OUTPUT(X_ENABLE_PIN)
@@ -134,9 +142,9 @@ void reset_stepper_drivers();    // Called by settings.load / settings.reset
134 142
     #define Y_ENABLE_INIT NOOP
135 143
     #define Y_ENABLE_WRITE(STATE) stepperY.setEnabled(STATE)
136 144
     #define Y_ENABLE_READ stepperY.isEnabled()
137
-  #elif AXIS_DRIVER_TYPE(Y, TMC2660)
145
+  #elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Y)
138 146
     #define Y_ENABLE_INIT NOOP
139
-    #define Y_ENABLE_WRITE(STATE) stepperY.toff((STATE)==Y_ENABLE_ON ? stepperY.savedToff() : 0)
147
+    #define Y_ENABLE_WRITE(STATE) stepperY.toff((STATE)==Y_ENABLE_ON ? chopper_timing.toff : 0)
140 148
     #define Y_ENABLE_READ stepperY.isEnabled()
141 149
   #else
142 150
     #define Y_ENABLE_INIT SET_OUTPUT(Y_ENABLE_PIN)
@@ -169,9 +177,9 @@ void reset_stepper_drivers();    // Called by settings.load / settings.reset
169 177
     #define Z_ENABLE_INIT NOOP
170 178
     #define Z_ENABLE_WRITE(STATE) stepperZ.setEnabled(STATE)
171 179
     #define Z_ENABLE_READ stepperZ.isEnabled()
172
-  #elif AXIS_DRIVER_TYPE(Z, TMC2660)
180
+  #elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z)
173 181
     #define Z_ENABLE_INIT NOOP
174
-    #define Z_ENABLE_WRITE(STATE) stepperZ.toff((STATE)==Z_ENABLE_ON ? stepperZ.savedToff() : 0)
182
+    #define Z_ENABLE_WRITE(STATE) stepperZ.toff((STATE)==Z_ENABLE_ON ? chopper_timing.toff : 0)
175 183
     #define Z_ENABLE_READ stepperZ.isEnabled()
176 184
   #else
177 185
     #define Z_ENABLE_INIT SET_OUTPUT(Z_ENABLE_PIN)
@@ -205,9 +213,9 @@ void reset_stepper_drivers();    // Called by settings.load / settings.reset
205 213
       #define X2_ENABLE_INIT NOOP
206 214
       #define X2_ENABLE_WRITE(STATE) stepperX2.setEnabled(STATE)
207 215
       #define X2_ENABLE_READ stepperX2.isEnabled()
208
-    #elif AXIS_DRIVER_TYPE(X2, TMC2660)
216
+    #elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(X2)
209 217
       #define X2_ENABLE_INIT NOOP
210
-      #define X2_ENABLE_WRITE(STATE) stepperX2.toff((STATE)==X_ENABLE_ON ? stepperX2.savedToff() : 0)
218
+      #define X2_ENABLE_WRITE(STATE) stepperX2.toff((STATE)==X_ENABLE_ON ? chopper_timing.toff : 0)
211 219
       #define X2_ENABLE_READ stepperX2.isEnabled()
212 220
     #else
213 221
       #define X2_ENABLE_INIT SET_OUTPUT(X2_ENABLE_PIN)
@@ -242,9 +250,9 @@ void reset_stepper_drivers();    // Called by settings.load / settings.reset
242 250
       #define Y2_ENABLE_INIT NOOP
243 251
       #define Y2_ENABLE_WRITE(STATE) stepperY2.setEnabled(STATE)
244 252
       #define Y2_ENABLE_READ stepperY2.isEnabled()
245
-    #elif AXIS_DRIVER_TYPE(Y2, TMC2660)
253
+    #elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Y2)
246 254
       #define Y2_ENABLE_INIT NOOP
247
-      #define Y2_ENABLE_WRITE(STATE) stepperY2.toff((STATE)==Y_ENABLE_ON ? stepperY2.savedToff() : 0)
255
+      #define Y2_ENABLE_WRITE(STATE) stepperY2.toff((STATE)==Y_ENABLE_ON ? chopper_timing.toff : 0)
248 256
       #define Y2_ENABLE_READ stepperY2.isEnabled()
249 257
     #else
250 258
       #define Y2_ENABLE_INIT SET_OUTPUT(Y2_ENABLE_PIN)
@@ -279,9 +287,9 @@ void reset_stepper_drivers();    // Called by settings.load / settings.reset
279 287
       #define Z2_ENABLE_INIT NOOP
280 288
       #define Z2_ENABLE_WRITE(STATE) stepperZ2.setEnabled(STATE)
281 289
       #define Z2_ENABLE_READ stepperZ2.isEnabled()
282
-    #elif AXIS_DRIVER_TYPE(Z2, TMC2660)
290
+    #elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z2)
283 291
       #define Z2_ENABLE_INIT NOOP
284
-      #define Z2_ENABLE_WRITE(STATE) stepperZ2.toff((STATE)==Z_ENABLE_ON ? stepperZ2.savedToff() : 0)
292
+      #define Z2_ENABLE_WRITE(STATE) stepperZ2.toff((STATE)==Z_ENABLE_ON ? chopper_timing.toff : 0)
285 293
       #define Z2_ENABLE_READ stepperZ2.isEnabled()
286 294
     #else
287 295
       #define Z2_ENABLE_INIT SET_OUTPUT(Z2_ENABLE_PIN)
@@ -316,9 +324,9 @@ void reset_stepper_drivers();    // Called by settings.load / settings.reset
316 324
       #define Z3_ENABLE_INIT NOOP
317 325
       #define Z3_ENABLE_WRITE(STATE) stepperZ3.setEnabled(STATE)
318 326
       #define Z3_ENABLE_READ stepperZ3.isEnabled()
319
-    #elif AXIS_DRIVER_TYPE(Z3, TMC2660)
327
+    #elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z3)
320 328
       #define Z3_ENABLE_INIT NOOP
321
-      #define Z3_ENABLE_WRITE(STATE) stepperZ3.toff((STATE)==Z_ENABLE_ON ? stepperZ3.savedToff() : 0)
329
+      #define Z3_ENABLE_WRITE(STATE) stepperZ3.toff((STATE)==Z_ENABLE_ON ? chopper_timing.toff : 0)
322 330
       #define Z3_ENABLE_READ stepperZ3.isEnabled()
323 331
     #else
324 332
       #define Z3_ENABLE_INIT SET_OUTPUT(Z3_ENABLE_PIN)
@@ -352,9 +360,9 @@ void reset_stepper_drivers();    // Called by settings.load / settings.reset
352 360
     #define E0_ENABLE_INIT NOOP
353 361
     #define E0_ENABLE_WRITE(STATE) stepperE0.setEnabled(STATE)
354 362
     #define E0_ENABLE_READ stepperE0.isEnabled()
355
-  #elif AXIS_DRIVER_TYPE(E0, TMC2660)
363
+  #elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E0)
356 364
     #define E0_ENABLE_INIT NOOP
357
-    #define E0_ENABLE_WRITE(STATE) stepperE0.toff((STATE)==E_ENABLE_ON ? stepperE0.savedToff() : 0)
365
+    #define E0_ENABLE_WRITE(STATE) stepperE0.toff((STATE)==E_ENABLE_ON ? chopper_timing.toff : 0)
358 366
     #define E0_ENABLE_READ stepperE0.isEnabled()
359 367
   #else
360 368
     #define E0_ENABLE_INIT SET_OUTPUT(E0_ENABLE_PIN)
@@ -387,9 +395,9 @@ void reset_stepper_drivers();    // Called by settings.load / settings.reset
387 395
     #define E1_ENABLE_INIT NOOP
388 396
     #define E1_ENABLE_WRITE(STATE) stepperE1.setEnabled(STATE)
389 397
     #define E1_ENABLE_READ stepperE1.isEnabled()
390
-  #elif AXIS_DRIVER_TYPE(E1, TMC2660)
398
+  #elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E1)
391 399
     #define E1_ENABLE_INIT NOOP
392
-    #define E1_ENABLE_WRITE(STATE) stepperE1.toff((STATE)==E_ENABLE_ON ? stepperE1.savedToff() : 0)
400
+    #define E1_ENABLE_WRITE(STATE) stepperE1.toff((STATE)==E_ENABLE_ON ? chopper_timing.toff : 0)
393 401
     #define E1_ENABLE_READ stepperE1.isEnabled()
394 402
   #else
395 403
     #define E1_ENABLE_INIT SET_OUTPUT(E1_ENABLE_PIN)
@@ -422,9 +430,9 @@ void reset_stepper_drivers();    // Called by settings.load / settings.reset
422 430
     #define E2_ENABLE_INIT NOOP
423 431
     #define E2_ENABLE_WRITE(STATE) stepperE2.setEnabled(STATE)
424 432
     #define E2_ENABLE_READ stepperE2.isEnabled()
425
-  #elif AXIS_DRIVER_TYPE(E2, TMC2660)
433
+  #elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E2)
426 434
     #define E2_ENABLE_INIT NOOP
427
-    #define E2_ENABLE_WRITE(STATE) stepperE2.toff((STATE)==E_ENABLE_ON ? stepperE2.savedToff() : 0)
435
+    #define E2_ENABLE_WRITE(STATE) stepperE2.toff((STATE)==E_ENABLE_ON ? chopper_timing.toff : 0)
428 436
     #define E2_ENABLE_READ stepperE2.isEnabled()
429 437
   #else
430 438
     #define E2_ENABLE_INIT SET_OUTPUT(E2_ENABLE_PIN)
@@ -457,9 +465,9 @@ void reset_stepper_drivers();    // Called by settings.load / settings.reset
457 465
     #define E3_ENABLE_INIT NOOP
458 466
     #define E3_ENABLE_WRITE(STATE) stepperE3.setEnabled(STATE)
459 467
     #define E3_ENABLE_READ stepperE3.isEnabled()
460
-  #elif AXIS_DRIVER_TYPE(E3, TMC2660)
468
+  #elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E3)
461 469
     #define E3_ENABLE_INIT NOOP
462
-    #define E3_ENABLE_WRITE(STATE) stepperE3.toff((STATE)==E_ENABLE_ON ? stepperE3.savedToff() : 0)
470
+    #define E3_ENABLE_WRITE(STATE) stepperE3.toff((STATE)==E_ENABLE_ON ? chopper_timing.toff : 0)
463 471
     #define E3_ENABLE_READ stepperE3.isEnabled()
464 472
   #else
465 473
     #define E3_ENABLE_INIT SET_OUTPUT(E3_ENABLE_PIN)
@@ -492,9 +500,9 @@ void reset_stepper_drivers();    // Called by settings.load / settings.reset
492 500
     #define E4_ENABLE_INIT NOOP
493 501
     #define E4_ENABLE_WRITE(STATE) stepperE4.setEnabled(STATE)
494 502
     #define E4_ENABLE_READ stepperE4.isEnabled()
495
-  #elif AXIS_DRIVER_TYPE(E4, TMC2660)
503
+  #elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E4)
496 504
     #define E4_ENABLE_INIT NOOP
497
-    #define E4_ENABLE_WRITE(STATE) stepperE4.toff((STATE)==E_ENABLE_ON ? stepperE4.savedToff() : 0)
505
+    #define E4_ENABLE_WRITE(STATE) stepperE4.toff((STATE)==E_ENABLE_ON ? chopper_timing.toff : 0)
498 506
     #define E4_ENABLE_READ stepperE4.isEnabled()
499 507
   #else
500 508
     #define E4_ENABLE_INIT SET_OUTPUT(E4_ENABLE_PIN)
@@ -527,9 +535,9 @@ void reset_stepper_drivers();    // Called by settings.load / settings.reset
527 535
     #define E5_ENABLE_INIT NOOP
528 536
     #define E5_ENABLE_WRITE(STATE) stepperE5.setEnabled(STATE)
529 537
     #define E5_ENABLE_READ stepperE5.isEnabled()
530
-  #elif AXIS_DRIVER_TYPE(E5, TMC2660)
538
+  #elif ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E5)
531 539
     #define E5_ENABLE_INIT NOOP
532
-    #define E5_ENABLE_WRITE(STATE) stepperE5.toff((STATE)==E_ENABLE_ON ? stepperE5.savedToff() : 0)
540
+    #define E5_ENABLE_WRITE(STATE) stepperE5.toff((STATE)==E_ENABLE_ON ? chopper_timing.toff : 0)
533 541
     #define E5_ENABLE_READ stepperE5.isEnabled()
534 542
   #else
535 543
     #define E5_ENABLE_INIT SET_OUTPUT(E5_ENABLE_PIN)

Carregando…
Cancelar
Salvar