浏览代码

Support new TMC drivers (#13026)

teemuatlut 6 年前
父节点
当前提交
d81342254a
共有 100 个文件被更改,包括 1397 次插入594 次删除
  1. 3
    2
      Marlin/Configuration.h
  2. 28
    11
      Marlin/Configuration_adv.h
  3. 3
    2
      Marlin/src/config/default/Configuration.h
  4. 28
    11
      Marlin/src/config/default/Configuration_adv.h
  5. 3
    2
      Marlin/src/config/examples/3DFabXYZ/Migbot/Configuration.h
  6. 28
    11
      Marlin/src/config/examples/3DFabXYZ/Migbot/Configuration_adv.h
  7. 3
    2
      Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h
  8. 28
    11
      Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h
  9. 3
    2
      Marlin/src/config/examples/AliExpress/CL-260/Configuration.h
  10. 3
    2
      Marlin/src/config/examples/Anet/A2/Configuration.h
  11. 28
    11
      Marlin/src/config/examples/Anet/A2/Configuration_adv.h
  12. 3
    2
      Marlin/src/config/examples/Anet/A2plus/Configuration.h
  13. 28
    11
      Marlin/src/config/examples/Anet/A2plus/Configuration_adv.h
  14. 3
    2
      Marlin/src/config/examples/Anet/A6/Configuration.h
  15. 28
    11
      Marlin/src/config/examples/Anet/A6/Configuration_adv.h
  16. 3
    2
      Marlin/src/config/examples/Anet/A8/Configuration.h
  17. 28
    11
      Marlin/src/config/examples/Anet/A8/Configuration_adv.h
  18. 3
    2
      Marlin/src/config/examples/AnyCubic/i3/Configuration.h
  19. 28
    11
      Marlin/src/config/examples/AnyCubic/i3/Configuration_adv.h
  20. 3
    2
      Marlin/src/config/examples/ArmEd/Configuration.h
  21. 28
    11
      Marlin/src/config/examples/ArmEd/Configuration_adv.h
  22. 3
    2
      Marlin/src/config/examples/Azteeg/X5GT/Configuration.h
  23. 3
    2
      Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h
  24. 28
    11
      Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h
  25. 3
    2
      Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h
  26. 28
    11
      Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h
  27. 3
    2
      Marlin/src/config/examples/BQ/Hephestos/Configuration.h
  28. 28
    11
      Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h
  29. 3
    2
      Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h
  30. 28
    11
      Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h
  31. 3
    2
      Marlin/src/config/examples/BQ/WITBOX/Configuration.h
  32. 28
    11
      Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h
  33. 3
    2
      Marlin/src/config/examples/Cartesio/Configuration.h
  34. 28
    11
      Marlin/src/config/examples/Cartesio/Configuration_adv.h
  35. 3
    2
      Marlin/src/config/examples/Creality/CR-10/Configuration.h
  36. 28
    11
      Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h
  37. 3
    2
      Marlin/src/config/examples/Creality/CR-10S/Configuration.h
  38. 28
    11
      Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h
  39. 3
    2
      Marlin/src/config/examples/Creality/CR-10mini/Configuration.h
  40. 28
    11
      Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h
  41. 3
    2
      Marlin/src/config/examples/Creality/CR-8/Configuration.h
  42. 28
    11
      Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h
  43. 3
    2
      Marlin/src/config/examples/Creality/Ender-2/Configuration.h
  44. 28
    11
      Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h
  45. 3
    2
      Marlin/src/config/examples/Creality/Ender-3/Configuration.h
  46. 28
    11
      Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h
  47. 3
    2
      Marlin/src/config/examples/Creality/Ender-4/Configuration.h
  48. 28
    11
      Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h
  49. 3
    2
      Marlin/src/config/examples/Einstart-S/Configuration.h
  50. 28
    11
      Marlin/src/config/examples/Einstart-S/Configuration_adv.h
  51. 3
    2
      Marlin/src/config/examples/Felix/Configuration.h
  52. 28
    11
      Marlin/src/config/examples/Felix/Configuration_adv.h
  53. 3
    2
      Marlin/src/config/examples/Felix/DUAL/Configuration.h
  54. 3
    2
      Marlin/src/config/examples/FlashForge/CreatorPro/Configuration.h
  55. 28
    11
      Marlin/src/config/examples/FlashForge/CreatorPro/Configuration_adv.h
  56. 3
    2
      Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h
  57. 28
    11
      Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h
  58. 3
    2
      Marlin/src/config/examples/Formbot/Raptor/Configuration.h
  59. 28
    11
      Marlin/src/config/examples/Formbot/Raptor/Configuration_adv.h
  60. 3
    2
      Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration.h
  61. 28
    11
      Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration_adv.h
  62. 3
    2
      Marlin/src/config/examples/Formbot/T_Rex_3/Configuration.h
  63. 28
    11
      Marlin/src/config/examples/Formbot/T_Rex_3/Configuration_adv.h
  64. 3
    2
      Marlin/src/config/examples/Geeetech/GT2560/Configuration.h
  65. 3
    2
      Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h
  66. 3
    2
      Marlin/src/config/examples/Geeetech/MeCreator2/Configuration.h
  67. 28
    11
      Marlin/src/config/examples/Geeetech/MeCreator2/Configuration_adv.h
  68. 3
    2
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h
  69. 3
    2
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h
  70. 3
    2
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h
  71. 28
    11
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h
  72. 3
    2
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h
  73. 28
    11
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h
  74. 3
    2
      Marlin/src/config/examples/Infitary/i3-M508/Configuration.h
  75. 28
    11
      Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h
  76. 3
    2
      Marlin/src/config/examples/JGAurora/A5/Configuration.h
  77. 28
    11
      Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h
  78. 3
    2
      Marlin/src/config/examples/MakerParts/Configuration.h
  79. 28
    11
      Marlin/src/config/examples/MakerParts/Configuration_adv.h
  80. 3
    2
      Marlin/src/config/examples/Malyan/M150/Configuration.h
  81. 28
    11
      Marlin/src/config/examples/Malyan/M150/Configuration_adv.h
  82. 3
    2
      Marlin/src/config/examples/Malyan/M200/Configuration.h
  83. 28
    11
      Marlin/src/config/examples/Malyan/M200/Configuration_adv.h
  84. 3
    2
      Marlin/src/config/examples/Micromake/C1/basic/Configuration.h
  85. 3
    2
      Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h
  86. 28
    11
      Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h
  87. 3
    2
      Marlin/src/config/examples/Mks/Robin/Configuration.h
  88. 28
    11
      Marlin/src/config/examples/Mks/Robin/Configuration_adv.h
  89. 3
    2
      Marlin/src/config/examples/Mks/Sbase/Configuration.h
  90. 28
    11
      Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h
  91. 3
    2
      Marlin/src/config/examples/RapideLite/RL200/Configuration.h
  92. 28
    11
      Marlin/src/config/examples/RapideLite/RL200/Configuration_adv.h
  93. 3
    2
      Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h
  94. 3
    2
      Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h
  95. 3
    2
      Marlin/src/config/examples/RigidBot/Configuration.h
  96. 28
    11
      Marlin/src/config/examples/RigidBot/Configuration_adv.h
  97. 3
    2
      Marlin/src/config/examples/SCARA/Configuration.h
  98. 28
    11
      Marlin/src/config/examples/SCARA/Configuration_adv.h
  99. 3
    2
      Marlin/src/config/examples/STM32F10/Configuration.h
  100. 0
    0
      Marlin/src/config/examples/STM32F4/Configuration.h

+ 3
- 2
Marlin/Configuration.h 查看文件

623
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
623
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
624
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
624
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
625
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
625
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
626
- *          TMC5130, TMC5130_STANDALONE
627
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
626
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
627
+ *          TMC5160, TMC5160_STANDALONE
628
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
628
  */
629
  */
629
 //#define X_DRIVER_TYPE  A4988
630
 //#define X_DRIVER_TYPE  A4988
630
 //#define Y_DRIVER_TYPE  A4988
631
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/Configuration_adv.h 查看文件

1323
 // @section tmc_smart
1323
 // @section tmc_smart
1324
 
1324
 
1325
 /**
1325
 /**
1326
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1327
- * the hardware SPI interface on your board and define the required CS pins
1328
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1326
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1327
+ * connect your SPI pins to the hardware SPI interface on your board and define
1328
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1329
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1329
  * You may also use software SPI if you wish to use general purpose IO pins.
1330
  * You may also use software SPI if you wish to use general purpose IO pins.
1330
  *
1331
  *
1331
- * To use TMC2208 stepper UART-configurable stepper drivers
1332
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1333
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1334
- * to PDN_UART without a resistor.
1332
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1333
+ * to the driver side PDN_UART pin with a 1K resistor.
1334
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1335
+ * a resistor.
1335
  * The drivers can also be used with hardware serial.
1336
  * The drivers can also be used with hardware serial.
1336
  *
1337
  *
1337
- * TMCStepper library is required for connected TMC stepper drivers.
1338
+ * TMCStepper library is required to use TMC stepper drivers.
1338
  * https://github.com/teemuatlut/TMCStepper
1339
  * https://github.com/teemuatlut/TMCStepper
1339
  */
1340
  */
1340
 #if HAS_TRINAMIC
1341
 #if HAS_TRINAMIC
1341
 
1342
 
1342
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1343
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1343
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1344
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1344
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1345
 
1345
 
1346
   #if AXIS_IS_TMC(X)
1346
   #if AXIS_IS_TMC(X)
1347
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1347
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1348
     #define X_MICROSTEPS   16  // 0..256
1348
     #define X_MICROSTEPS   16  // 0..256
1349
+    #define X_RSENSE     0.11
1349
   #endif
1350
   #endif
1350
 
1351
 
1351
   #if AXIS_IS_TMC(X2)
1352
   #if AXIS_IS_TMC(X2)
1352
     #define X2_CURRENT    800
1353
     #define X2_CURRENT    800
1353
     #define X2_MICROSTEPS  16
1354
     #define X2_MICROSTEPS  16
1355
+    #define X2_RSENSE    0.11
1354
   #endif
1356
   #endif
1355
 
1357
 
1356
   #if AXIS_IS_TMC(Y)
1358
   #if AXIS_IS_TMC(Y)
1357
     #define Y_CURRENT     800
1359
     #define Y_CURRENT     800
1358
     #define Y_MICROSTEPS   16
1360
     #define Y_MICROSTEPS   16
1361
+    #define Y_RSENSE     0.11
1359
   #endif
1362
   #endif
1360
 
1363
 
1361
   #if AXIS_IS_TMC(Y2)
1364
   #if AXIS_IS_TMC(Y2)
1362
     #define Y2_CURRENT    800
1365
     #define Y2_CURRENT    800
1363
     #define Y2_MICROSTEPS  16
1366
     #define Y2_MICROSTEPS  16
1367
+    #define Y2_RSENSE    0.11
1364
   #endif
1368
   #endif
1365
 
1369
 
1366
   #if AXIS_IS_TMC(Z)
1370
   #if AXIS_IS_TMC(Z)
1367
     #define Z_CURRENT     800
1371
     #define Z_CURRENT     800
1368
     #define Z_MICROSTEPS   16
1372
     #define Z_MICROSTEPS   16
1373
+    #define Z_RSENSE     0.11
1369
   #endif
1374
   #endif
1370
 
1375
 
1371
   #if AXIS_IS_TMC(Z2)
1376
   #if AXIS_IS_TMC(Z2)
1372
     #define Z2_CURRENT    800
1377
     #define Z2_CURRENT    800
1373
     #define Z2_MICROSTEPS  16
1378
     #define Z2_MICROSTEPS  16
1379
+    #define Z2_RSENSE    0.11
1374
   #endif
1380
   #endif
1375
 
1381
 
1376
   #if AXIS_IS_TMC(Z3)
1382
   #if AXIS_IS_TMC(Z3)
1377
     #define Z3_CURRENT    800
1383
     #define Z3_CURRENT    800
1378
     #define Z3_MICROSTEPS  16
1384
     #define Z3_MICROSTEPS  16
1385
+    #define Z3_RSENSE    0.11
1379
   #endif
1386
   #endif
1380
 
1387
 
1381
   #if AXIS_IS_TMC(E0)
1388
   #if AXIS_IS_TMC(E0)
1382
     #define E0_CURRENT    800
1389
     #define E0_CURRENT    800
1383
     #define E0_MICROSTEPS  16
1390
     #define E0_MICROSTEPS  16
1391
+    #define E0_RSENSE    0.11
1384
   #endif
1392
   #endif
1385
 
1393
 
1386
   #if AXIS_IS_TMC(E1)
1394
   #if AXIS_IS_TMC(E1)
1387
     #define E1_CURRENT    800
1395
     #define E1_CURRENT    800
1388
     #define E1_MICROSTEPS  16
1396
     #define E1_MICROSTEPS  16
1397
+    #define E1_RSENSE    0.11
1389
   #endif
1398
   #endif
1390
 
1399
 
1391
   #if AXIS_IS_TMC(E2)
1400
   #if AXIS_IS_TMC(E2)
1392
     #define E2_CURRENT    800
1401
     #define E2_CURRENT    800
1393
     #define E2_MICROSTEPS  16
1402
     #define E2_MICROSTEPS  16
1403
+    #define E2_RSENSE    0.11
1394
   #endif
1404
   #endif
1395
 
1405
 
1396
   #if AXIS_IS_TMC(E3)
1406
   #if AXIS_IS_TMC(E3)
1397
     #define E3_CURRENT    800
1407
     #define E3_CURRENT    800
1398
     #define E3_MICROSTEPS  16
1408
     #define E3_MICROSTEPS  16
1409
+    #define E3_RSENSE    0.11
1399
   #endif
1410
   #endif
1400
 
1411
 
1401
   #if AXIS_IS_TMC(E4)
1412
   #if AXIS_IS_TMC(E4)
1402
     #define E4_CURRENT    800
1413
     #define E4_CURRENT    800
1403
     #define E4_MICROSTEPS  16
1414
     #define E4_MICROSTEPS  16
1415
+    #define E4_RSENSE    0.11
1404
   #endif
1416
   #endif
1405
 
1417
 
1406
   #if AXIS_IS_TMC(E5)
1418
   #if AXIS_IS_TMC(E5)
1407
     #define E5_CURRENT    800
1419
     #define E5_CURRENT    800
1408
     #define E5_MICROSTEPS  16
1420
     #define E5_MICROSTEPS  16
1421
+    #define E5_RSENSE    0.11
1409
   #endif
1422
   #endif
1410
 
1423
 
1411
   /**
1424
   /**
1412
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1425
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1413
    * The default pins can be found in your board's pins file.
1426
    * The default pins can be found in your board's pins file.
1414
    */
1427
    */
1415
   //#define X_CS_PIN          -1
1428
   //#define X_CS_PIN          -1
1428
 
1441
 
1429
   /**
1442
   /**
1430
    * Use software SPI for TMC2130.
1443
    * Use software SPI for TMC2130.
1444
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1431
    * The default SW SPI pins are defined the respective pins files,
1445
    * The default SW SPI pins are defined the respective pins files,
1432
    * but you can override or define them here.
1446
    * but you can override or define them here.
1433
    */
1447
    */
1445
   //#define SOFTWARE_DRIVER_ENABLE
1459
   //#define SOFTWARE_DRIVER_ENABLE
1446
 
1460
 
1447
   /**
1461
   /**
1462
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1448
    * Use Trinamic's ultra quiet stepping mode.
1463
    * Use Trinamic's ultra quiet stepping mode.
1449
    * When disabled, Marlin will use spreadCycle stepping mode.
1464
    * When disabled, Marlin will use spreadCycle stepping mode.
1450
    */
1465
    */
1469
   #define CHOPPER_TIMING { 4, -2, 1 }
1484
   #define CHOPPER_TIMING { 4, -2, 1 }
1470
 
1485
 
1471
   /**
1486
   /**
1472
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1487
+   * Monitor Trinamic drivers for error conditions,
1473
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1488
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1474
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1489
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1475
    * Other detected conditions can be used to stop the current print.
1490
    * Other detected conditions can be used to stop the current print.
1488
   #endif
1503
   #endif
1489
 
1504
 
1490
   /**
1505
   /**
1506
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1491
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1507
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1492
    * This mode allows for faster movements at the expense of higher noise levels.
1508
    * This mode allows for faster movements at the expense of higher noise levels.
1493
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1509
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1510
   #define E5_HYBRID_THRESHOLD     30
1526
   #define E5_HYBRID_THRESHOLD     30
1511
 
1527
 
1512
   /**
1528
   /**
1529
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1513
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1530
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1514
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1531
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1515
    * X, Y, and Z homing will always be done in spreadCycle mode.
1532
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/default/Configuration.h 查看文件

623
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
623
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
624
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
624
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
625
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
625
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
626
- *          TMC5130, TMC5130_STANDALONE
627
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
626
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
627
+ *          TMC5160, TMC5160_STANDALONE
628
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
628
  */
629
  */
629
 //#define X_DRIVER_TYPE  A4988
630
 //#define X_DRIVER_TYPE  A4988
630
 //#define Y_DRIVER_TYPE  A4988
631
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/default/Configuration_adv.h 查看文件

1323
 // @section tmc_smart
1323
 // @section tmc_smart
1324
 
1324
 
1325
 /**
1325
 /**
1326
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1327
- * the hardware SPI interface on your board and define the required CS pins
1328
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1326
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1327
+ * connect your SPI pins to the hardware SPI interface on your board and define
1328
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1329
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1329
  * You may also use software SPI if you wish to use general purpose IO pins.
1330
  * You may also use software SPI if you wish to use general purpose IO pins.
1330
  *
1331
  *
1331
- * To use TMC2208 stepper UART-configurable stepper drivers
1332
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1333
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1334
- * to PDN_UART without a resistor.
1332
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1333
+ * to the driver side PDN_UART pin with a 1K resistor.
1334
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1335
+ * a resistor.
1335
  * The drivers can also be used with hardware serial.
1336
  * The drivers can also be used with hardware serial.
1336
  *
1337
  *
1337
- * TMCStepper library is required for connected TMC stepper drivers.
1338
+ * TMCStepper library is required to use TMC stepper drivers.
1338
  * https://github.com/teemuatlut/TMCStepper
1339
  * https://github.com/teemuatlut/TMCStepper
1339
  */
1340
  */
1340
 #if HAS_TRINAMIC
1341
 #if HAS_TRINAMIC
1341
 
1342
 
1342
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1343
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1343
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1344
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1344
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1345
 
1345
 
1346
   #if AXIS_IS_TMC(X)
1346
   #if AXIS_IS_TMC(X)
1347
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1347
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1348
     #define X_MICROSTEPS   16  // 0..256
1348
     #define X_MICROSTEPS   16  // 0..256
1349
+    #define X_RSENSE     0.11
1349
   #endif
1350
   #endif
1350
 
1351
 
1351
   #if AXIS_IS_TMC(X2)
1352
   #if AXIS_IS_TMC(X2)
1352
     #define X2_CURRENT    800
1353
     #define X2_CURRENT    800
1353
     #define X2_MICROSTEPS  16
1354
     #define X2_MICROSTEPS  16
1355
+    #define X2_RSENSE    0.11
1354
   #endif
1356
   #endif
1355
 
1357
 
1356
   #if AXIS_IS_TMC(Y)
1358
   #if AXIS_IS_TMC(Y)
1357
     #define Y_CURRENT     800
1359
     #define Y_CURRENT     800
1358
     #define Y_MICROSTEPS   16
1360
     #define Y_MICROSTEPS   16
1361
+    #define Y_RSENSE     0.11
1359
   #endif
1362
   #endif
1360
 
1363
 
1361
   #if AXIS_IS_TMC(Y2)
1364
   #if AXIS_IS_TMC(Y2)
1362
     #define Y2_CURRENT    800
1365
     #define Y2_CURRENT    800
1363
     #define Y2_MICROSTEPS  16
1366
     #define Y2_MICROSTEPS  16
1367
+    #define Y2_RSENSE    0.11
1364
   #endif
1368
   #endif
1365
 
1369
 
1366
   #if AXIS_IS_TMC(Z)
1370
   #if AXIS_IS_TMC(Z)
1367
     #define Z_CURRENT     800
1371
     #define Z_CURRENT     800
1368
     #define Z_MICROSTEPS   16
1372
     #define Z_MICROSTEPS   16
1373
+    #define Z_RSENSE     0.11
1369
   #endif
1374
   #endif
1370
 
1375
 
1371
   #if AXIS_IS_TMC(Z2)
1376
   #if AXIS_IS_TMC(Z2)
1372
     #define Z2_CURRENT    800
1377
     #define Z2_CURRENT    800
1373
     #define Z2_MICROSTEPS  16
1378
     #define Z2_MICROSTEPS  16
1379
+    #define Z2_RSENSE    0.11
1374
   #endif
1380
   #endif
1375
 
1381
 
1376
   #if AXIS_IS_TMC(Z3)
1382
   #if AXIS_IS_TMC(Z3)
1377
     #define Z3_CURRENT    800
1383
     #define Z3_CURRENT    800
1378
     #define Z3_MICROSTEPS  16
1384
     #define Z3_MICROSTEPS  16
1385
+    #define Z3_RSENSE    0.11
1379
   #endif
1386
   #endif
1380
 
1387
 
1381
   #if AXIS_IS_TMC(E0)
1388
   #if AXIS_IS_TMC(E0)
1382
     #define E0_CURRENT    800
1389
     #define E0_CURRENT    800
1383
     #define E0_MICROSTEPS  16
1390
     #define E0_MICROSTEPS  16
1391
+    #define E0_RSENSE    0.11
1384
   #endif
1392
   #endif
1385
 
1393
 
1386
   #if AXIS_IS_TMC(E1)
1394
   #if AXIS_IS_TMC(E1)
1387
     #define E1_CURRENT    800
1395
     #define E1_CURRENT    800
1388
     #define E1_MICROSTEPS  16
1396
     #define E1_MICROSTEPS  16
1397
+    #define E1_RSENSE    0.11
1389
   #endif
1398
   #endif
1390
 
1399
 
1391
   #if AXIS_IS_TMC(E2)
1400
   #if AXIS_IS_TMC(E2)
1392
     #define E2_CURRENT    800
1401
     #define E2_CURRENT    800
1393
     #define E2_MICROSTEPS  16
1402
     #define E2_MICROSTEPS  16
1403
+    #define E2_RSENSE    0.11
1394
   #endif
1404
   #endif
1395
 
1405
 
1396
   #if AXIS_IS_TMC(E3)
1406
   #if AXIS_IS_TMC(E3)
1397
     #define E3_CURRENT    800
1407
     #define E3_CURRENT    800
1398
     #define E3_MICROSTEPS  16
1408
     #define E3_MICROSTEPS  16
1409
+    #define E3_RSENSE    0.11
1399
   #endif
1410
   #endif
1400
 
1411
 
1401
   #if AXIS_IS_TMC(E4)
1412
   #if AXIS_IS_TMC(E4)
1402
     #define E4_CURRENT    800
1413
     #define E4_CURRENT    800
1403
     #define E4_MICROSTEPS  16
1414
     #define E4_MICROSTEPS  16
1415
+    #define E4_RSENSE    0.11
1404
   #endif
1416
   #endif
1405
 
1417
 
1406
   #if AXIS_IS_TMC(E5)
1418
   #if AXIS_IS_TMC(E5)
1407
     #define E5_CURRENT    800
1419
     #define E5_CURRENT    800
1408
     #define E5_MICROSTEPS  16
1420
     #define E5_MICROSTEPS  16
1421
+    #define E5_RSENSE    0.11
1409
   #endif
1422
   #endif
1410
 
1423
 
1411
   /**
1424
   /**
1412
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1425
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1413
    * The default pins can be found in your board's pins file.
1426
    * The default pins can be found in your board's pins file.
1414
    */
1427
    */
1415
   //#define X_CS_PIN          -1
1428
   //#define X_CS_PIN          -1
1428
 
1441
 
1429
   /**
1442
   /**
1430
    * Use software SPI for TMC2130.
1443
    * Use software SPI for TMC2130.
1444
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1431
    * The default SW SPI pins are defined the respective pins files,
1445
    * The default SW SPI pins are defined the respective pins files,
1432
    * but you can override or define them here.
1446
    * but you can override or define them here.
1433
    */
1447
    */
1445
   //#define SOFTWARE_DRIVER_ENABLE
1459
   //#define SOFTWARE_DRIVER_ENABLE
1446
 
1460
 
1447
   /**
1461
   /**
1462
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1448
    * Use Trinamic's ultra quiet stepping mode.
1463
    * Use Trinamic's ultra quiet stepping mode.
1449
    * When disabled, Marlin will use spreadCycle stepping mode.
1464
    * When disabled, Marlin will use spreadCycle stepping mode.
1450
    */
1465
    */
1469
   #define CHOPPER_TIMING { 4, -2, 1 }
1484
   #define CHOPPER_TIMING { 4, -2, 1 }
1470
 
1485
 
1471
   /**
1486
   /**
1472
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1487
+   * Monitor Trinamic drivers for error conditions,
1473
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1488
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1474
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1489
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1475
    * Other detected conditions can be used to stop the current print.
1490
    * Other detected conditions can be used to stop the current print.
1488
   #endif
1503
   #endif
1489
 
1504
 
1490
   /**
1505
   /**
1506
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1491
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1507
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1492
    * This mode allows for faster movements at the expense of higher noise levels.
1508
    * This mode allows for faster movements at the expense of higher noise levels.
1493
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1509
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1510
   #define E5_HYBRID_THRESHOLD     30
1526
   #define E5_HYBRID_THRESHOLD     30
1511
 
1527
 
1512
   /**
1528
   /**
1529
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1513
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1530
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1514
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1531
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1515
    * X, Y, and Z homing will always be done in spreadCycle mode.
1532
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/3DFabXYZ/Migbot/Configuration.h 查看文件

627
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
627
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
628
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
628
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
629
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
629
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
630
- *          TMC5130, TMC5130_STANDALONE
631
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
630
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
631
+ *          TMC5160, TMC5160_STANDALONE
632
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
632
  */
633
  */
633
 //#define X_DRIVER_TYPE  A4988
634
 //#define X_DRIVER_TYPE  A4988
634
 //#define Y_DRIVER_TYPE  A4988
635
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/3DFabXYZ/Migbot/Configuration_adv.h 查看文件

1323
 // @section tmc_smart
1323
 // @section tmc_smart
1324
 
1324
 
1325
 /**
1325
 /**
1326
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1327
- * the hardware SPI interface on your board and define the required CS pins
1328
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1326
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1327
+ * connect your SPI pins to the hardware SPI interface on your board and define
1328
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1329
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1329
  * You may also use software SPI if you wish to use general purpose IO pins.
1330
  * You may also use software SPI if you wish to use general purpose IO pins.
1330
  *
1331
  *
1331
- * To use TMC2208 stepper UART-configurable stepper drivers
1332
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1333
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1334
- * to PDN_UART without a resistor.
1332
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1333
+ * to the driver side PDN_UART pin with a 1K resistor.
1334
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1335
+ * a resistor.
1335
  * The drivers can also be used with hardware serial.
1336
  * The drivers can also be used with hardware serial.
1336
  *
1337
  *
1337
- * TMCStepper library is required for connected TMC stepper drivers.
1338
+ * TMCStepper library is required to use TMC stepper drivers.
1338
  * https://github.com/teemuatlut/TMCStepper
1339
  * https://github.com/teemuatlut/TMCStepper
1339
  */
1340
  */
1340
 #if HAS_TRINAMIC
1341
 #if HAS_TRINAMIC
1341
 
1342
 
1342
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1343
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1343
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1344
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1344
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1345
 
1345
 
1346
   #if AXIS_IS_TMC(X)
1346
   #if AXIS_IS_TMC(X)
1347
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1347
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1348
     #define X_MICROSTEPS   16  // 0..256
1348
     #define X_MICROSTEPS   16  // 0..256
1349
+    #define X_RSENSE     0.11
1349
   #endif
1350
   #endif
1350
 
1351
 
1351
   #if AXIS_IS_TMC(X2)
1352
   #if AXIS_IS_TMC(X2)
1352
     #define X2_CURRENT    800
1353
     #define X2_CURRENT    800
1353
     #define X2_MICROSTEPS  16
1354
     #define X2_MICROSTEPS  16
1355
+    #define X2_RSENSE    0.11
1354
   #endif
1356
   #endif
1355
 
1357
 
1356
   #if AXIS_IS_TMC(Y)
1358
   #if AXIS_IS_TMC(Y)
1357
     #define Y_CURRENT     800
1359
     #define Y_CURRENT     800
1358
     #define Y_MICROSTEPS   16
1360
     #define Y_MICROSTEPS   16
1361
+    #define Y_RSENSE     0.11
1359
   #endif
1362
   #endif
1360
 
1363
 
1361
   #if AXIS_IS_TMC(Y2)
1364
   #if AXIS_IS_TMC(Y2)
1362
     #define Y2_CURRENT    800
1365
     #define Y2_CURRENT    800
1363
     #define Y2_MICROSTEPS  16
1366
     #define Y2_MICROSTEPS  16
1367
+    #define Y2_RSENSE    0.11
1364
   #endif
1368
   #endif
1365
 
1369
 
1366
   #if AXIS_IS_TMC(Z)
1370
   #if AXIS_IS_TMC(Z)
1367
     #define Z_CURRENT     800
1371
     #define Z_CURRENT     800
1368
     #define Z_MICROSTEPS   16
1372
     #define Z_MICROSTEPS   16
1373
+    #define Z_RSENSE     0.11
1369
   #endif
1374
   #endif
1370
 
1375
 
1371
   #if AXIS_IS_TMC(Z2)
1376
   #if AXIS_IS_TMC(Z2)
1372
     #define Z2_CURRENT    800
1377
     #define Z2_CURRENT    800
1373
     #define Z2_MICROSTEPS  16
1378
     #define Z2_MICROSTEPS  16
1379
+    #define Z2_RSENSE    0.11
1374
   #endif
1380
   #endif
1375
 
1381
 
1376
   #if AXIS_IS_TMC(Z3)
1382
   #if AXIS_IS_TMC(Z3)
1377
     #define Z3_CURRENT    800
1383
     #define Z3_CURRENT    800
1378
     #define Z3_MICROSTEPS  16
1384
     #define Z3_MICROSTEPS  16
1385
+    #define Z3_RSENSE    0.11
1379
   #endif
1386
   #endif
1380
 
1387
 
1381
   #if AXIS_IS_TMC(E0)
1388
   #if AXIS_IS_TMC(E0)
1382
     #define E0_CURRENT    800
1389
     #define E0_CURRENT    800
1383
     #define E0_MICROSTEPS  16
1390
     #define E0_MICROSTEPS  16
1391
+    #define E0_RSENSE    0.11
1384
   #endif
1392
   #endif
1385
 
1393
 
1386
   #if AXIS_IS_TMC(E1)
1394
   #if AXIS_IS_TMC(E1)
1387
     #define E1_CURRENT    800
1395
     #define E1_CURRENT    800
1388
     #define E1_MICROSTEPS  16
1396
     #define E1_MICROSTEPS  16
1397
+    #define E1_RSENSE    0.11
1389
   #endif
1398
   #endif
1390
 
1399
 
1391
   #if AXIS_IS_TMC(E2)
1400
   #if AXIS_IS_TMC(E2)
1392
     #define E2_CURRENT    800
1401
     #define E2_CURRENT    800
1393
     #define E2_MICROSTEPS  16
1402
     #define E2_MICROSTEPS  16
1403
+    #define E2_RSENSE    0.11
1394
   #endif
1404
   #endif
1395
 
1405
 
1396
   #if AXIS_IS_TMC(E3)
1406
   #if AXIS_IS_TMC(E3)
1397
     #define E3_CURRENT    800
1407
     #define E3_CURRENT    800
1398
     #define E3_MICROSTEPS  16
1408
     #define E3_MICROSTEPS  16
1409
+    #define E3_RSENSE    0.11
1399
   #endif
1410
   #endif
1400
 
1411
 
1401
   #if AXIS_IS_TMC(E4)
1412
   #if AXIS_IS_TMC(E4)
1402
     #define E4_CURRENT    800
1413
     #define E4_CURRENT    800
1403
     #define E4_MICROSTEPS  16
1414
     #define E4_MICROSTEPS  16
1415
+    #define E4_RSENSE    0.11
1404
   #endif
1416
   #endif
1405
 
1417
 
1406
   #if AXIS_IS_TMC(E5)
1418
   #if AXIS_IS_TMC(E5)
1407
     #define E5_CURRENT    800
1419
     #define E5_CURRENT    800
1408
     #define E5_MICROSTEPS  16
1420
     #define E5_MICROSTEPS  16
1421
+    #define E5_RSENSE    0.11
1409
   #endif
1422
   #endif
1410
 
1423
 
1411
   /**
1424
   /**
1412
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1425
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1413
    * The default pins can be found in your board's pins file.
1426
    * The default pins can be found in your board's pins file.
1414
    */
1427
    */
1415
   //#define X_CS_PIN          -1
1428
   //#define X_CS_PIN          -1
1428
 
1441
 
1429
   /**
1442
   /**
1430
    * Use software SPI for TMC2130.
1443
    * Use software SPI for TMC2130.
1444
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1431
    * The default SW SPI pins are defined the respective pins files,
1445
    * The default SW SPI pins are defined the respective pins files,
1432
    * but you can override or define them here.
1446
    * but you can override or define them here.
1433
    */
1447
    */
1445
   //#define SOFTWARE_DRIVER_ENABLE
1459
   //#define SOFTWARE_DRIVER_ENABLE
1446
 
1460
 
1447
   /**
1461
   /**
1462
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1448
    * Use Trinamic's ultra quiet stepping mode.
1463
    * Use Trinamic's ultra quiet stepping mode.
1449
    * When disabled, Marlin will use spreadCycle stepping mode.
1464
    * When disabled, Marlin will use spreadCycle stepping mode.
1450
    */
1465
    */
1469
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1484
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1470
 
1485
 
1471
   /**
1486
   /**
1472
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1487
+   * Monitor Trinamic drivers for error conditions,
1473
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1488
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1474
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1489
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1475
    * Other detected conditions can be used to stop the current print.
1490
    * Other detected conditions can be used to stop the current print.
1488
   #endif
1503
   #endif
1489
 
1504
 
1490
   /**
1505
   /**
1506
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1491
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1507
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1492
    * This mode allows for faster movements at the expense of higher noise levels.
1508
    * This mode allows for faster movements at the expense of higher noise levels.
1493
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1509
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1510
   #define E5_HYBRID_THRESHOLD     30
1526
   #define E5_HYBRID_THRESHOLD     30
1511
 
1527
 
1512
   /**
1528
   /**
1529
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1513
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1530
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1514
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1531
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1515
    * X, Y, and Z homing will always be done in spreadCycle mode.
1532
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h 查看文件

643
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
643
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
644
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
644
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
645
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
645
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
646
- *          TMC5130, TMC5130_STANDALONE
647
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
646
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
647
+ *          TMC5160, TMC5160_STANDALONE
648
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
648
  */
649
  */
649
 //#define X_DRIVER_TYPE  A4988
650
 //#define X_DRIVER_TYPE  A4988
650
 //#define Y_DRIVER_TYPE  A4988
651
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h 查看文件

1322
 // @section tmc_smart
1322
 // @section tmc_smart
1323
 
1323
 
1324
 /**
1324
 /**
1325
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1326
- * the hardware SPI interface on your board and define the required CS pins
1327
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1325
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1326
+ * connect your SPI pins to the hardware SPI interface on your board and define
1327
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1328
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1328
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  *
1330
  *
1330
- * To use TMC2208 stepper UART-configurable stepper drivers
1331
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1332
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1333
- * to PDN_UART without a resistor.
1331
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1332
+ * to the driver side PDN_UART pin with a 1K resistor.
1333
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1334
+ * a resistor.
1334
  * The drivers can also be used with hardware serial.
1335
  * The drivers can also be used with hardware serial.
1335
  *
1336
  *
1336
- * TMCStepper library is required for connected TMC stepper drivers.
1337
+ * TMCStepper library is required to use TMC stepper drivers.
1337
  * https://github.com/teemuatlut/TMCStepper
1338
  * https://github.com/teemuatlut/TMCStepper
1338
  */
1339
  */
1339
 #if HAS_TRINAMIC
1340
 #if HAS_TRINAMIC
1340
 
1341
 
1341
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1344
 
1344
 
1345
   #if AXIS_IS_TMC(X)
1345
   #if AXIS_IS_TMC(X)
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1347
     #define X_MICROSTEPS   16  // 0..256
1347
     #define X_MICROSTEPS   16  // 0..256
1348
+    #define X_RSENSE     0.11
1348
   #endif
1349
   #endif
1349
 
1350
 
1350
   #if AXIS_IS_TMC(X2)
1351
   #if AXIS_IS_TMC(X2)
1351
     #define X2_CURRENT    800
1352
     #define X2_CURRENT    800
1352
     #define X2_MICROSTEPS  16
1353
     #define X2_MICROSTEPS  16
1354
+    #define X2_RSENSE    0.11
1353
   #endif
1355
   #endif
1354
 
1356
 
1355
   #if AXIS_IS_TMC(Y)
1357
   #if AXIS_IS_TMC(Y)
1356
     #define Y_CURRENT     800
1358
     #define Y_CURRENT     800
1357
     #define Y_MICROSTEPS   16
1359
     #define Y_MICROSTEPS   16
1360
+    #define Y_RSENSE     0.11
1358
   #endif
1361
   #endif
1359
 
1362
 
1360
   #if AXIS_IS_TMC(Y2)
1363
   #if AXIS_IS_TMC(Y2)
1361
     #define Y2_CURRENT    800
1364
     #define Y2_CURRENT    800
1362
     #define Y2_MICROSTEPS  16
1365
     #define Y2_MICROSTEPS  16
1366
+    #define Y2_RSENSE    0.11
1363
   #endif
1367
   #endif
1364
 
1368
 
1365
   #if AXIS_IS_TMC(Z)
1369
   #if AXIS_IS_TMC(Z)
1366
     #define Z_CURRENT     800
1370
     #define Z_CURRENT     800
1367
     #define Z_MICROSTEPS   16
1371
     #define Z_MICROSTEPS   16
1372
+    #define Z_RSENSE     0.11
1368
   #endif
1373
   #endif
1369
 
1374
 
1370
   #if AXIS_IS_TMC(Z2)
1375
   #if AXIS_IS_TMC(Z2)
1371
     #define Z2_CURRENT    800
1376
     #define Z2_CURRENT    800
1372
     #define Z2_MICROSTEPS  16
1377
     #define Z2_MICROSTEPS  16
1378
+    #define Z2_RSENSE    0.11
1373
   #endif
1379
   #endif
1374
 
1380
 
1375
   #if AXIS_IS_TMC(Z3)
1381
   #if AXIS_IS_TMC(Z3)
1376
     #define Z3_CURRENT    800
1382
     #define Z3_CURRENT    800
1377
     #define Z3_MICROSTEPS  16
1383
     #define Z3_MICROSTEPS  16
1384
+    #define Z3_RSENSE    0.11
1378
   #endif
1385
   #endif
1379
 
1386
 
1380
   #if AXIS_IS_TMC(E0)
1387
   #if AXIS_IS_TMC(E0)
1381
     #define E0_CURRENT    800
1388
     #define E0_CURRENT    800
1382
     #define E0_MICROSTEPS  16
1389
     #define E0_MICROSTEPS  16
1390
+    #define E0_RSENSE    0.11
1383
   #endif
1391
   #endif
1384
 
1392
 
1385
   #if AXIS_IS_TMC(E1)
1393
   #if AXIS_IS_TMC(E1)
1386
     #define E1_CURRENT    800
1394
     #define E1_CURRENT    800
1387
     #define E1_MICROSTEPS  16
1395
     #define E1_MICROSTEPS  16
1396
+    #define E1_RSENSE    0.11
1388
   #endif
1397
   #endif
1389
 
1398
 
1390
   #if AXIS_IS_TMC(E2)
1399
   #if AXIS_IS_TMC(E2)
1391
     #define E2_CURRENT    800
1400
     #define E2_CURRENT    800
1392
     #define E2_MICROSTEPS  16
1401
     #define E2_MICROSTEPS  16
1402
+    #define E2_RSENSE    0.11
1393
   #endif
1403
   #endif
1394
 
1404
 
1395
   #if AXIS_IS_TMC(E3)
1405
   #if AXIS_IS_TMC(E3)
1396
     #define E3_CURRENT    800
1406
     #define E3_CURRENT    800
1397
     #define E3_MICROSTEPS  16
1407
     #define E3_MICROSTEPS  16
1408
+    #define E3_RSENSE    0.11
1398
   #endif
1409
   #endif
1399
 
1410
 
1400
   #if AXIS_IS_TMC(E4)
1411
   #if AXIS_IS_TMC(E4)
1401
     #define E4_CURRENT    800
1412
     #define E4_CURRENT    800
1402
     #define E4_MICROSTEPS  16
1413
     #define E4_MICROSTEPS  16
1414
+    #define E4_RSENSE    0.11
1403
   #endif
1415
   #endif
1404
 
1416
 
1405
   #if AXIS_IS_TMC(E5)
1417
   #if AXIS_IS_TMC(E5)
1406
     #define E5_CURRENT    800
1418
     #define E5_CURRENT    800
1407
     #define E5_MICROSTEPS  16
1419
     #define E5_MICROSTEPS  16
1420
+    #define E5_RSENSE    0.11
1408
   #endif
1421
   #endif
1409
 
1422
 
1410
   /**
1423
   /**
1411
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1424
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1412
    * The default pins can be found in your board's pins file.
1425
    * The default pins can be found in your board's pins file.
1413
    */
1426
    */
1414
   //#define X_CS_PIN          -1
1427
   //#define X_CS_PIN          -1
1427
 
1440
 
1428
   /**
1441
   /**
1429
    * Use software SPI for TMC2130.
1442
    * Use software SPI for TMC2130.
1443
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1430
    * The default SW SPI pins are defined the respective pins files,
1444
    * The default SW SPI pins are defined the respective pins files,
1431
    * but you can override or define them here.
1445
    * but you can override or define them here.
1432
    */
1446
    */
1444
   //#define SOFTWARE_DRIVER_ENABLE
1458
   //#define SOFTWARE_DRIVER_ENABLE
1445
 
1459
 
1446
   /**
1460
   /**
1461
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1447
    * Use Trinamic's ultra quiet stepping mode.
1462
    * Use Trinamic's ultra quiet stepping mode.
1448
    * When disabled, Marlin will use spreadCycle stepping mode.
1463
    * When disabled, Marlin will use spreadCycle stepping mode.
1449
    */
1464
    */
1468
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1483
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1469
 
1484
 
1470
   /**
1485
   /**
1471
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1486
+   * Monitor Trinamic drivers for error conditions,
1472
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1487
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1473
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1488
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1474
    * Other detected conditions can be used to stop the current print.
1489
    * Other detected conditions can be used to stop the current print.
1487
   #endif
1502
   #endif
1488
 
1503
 
1489
   /**
1504
   /**
1505
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1490
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1506
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1491
    * This mode allows for faster movements at the expense of higher noise levels.
1507
    * This mode allows for faster movements at the expense of higher noise levels.
1492
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1508
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1509
   #define E5_HYBRID_THRESHOLD     30
1525
   #define E5_HYBRID_THRESHOLD     30
1510
 
1526
 
1511
   /**
1527
   /**
1528
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1512
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1529
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1513
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1530
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1514
    * X, Y, and Z homing will always be done in spreadCycle mode.
1531
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/AliExpress/CL-260/Configuration.h 查看文件

623
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
623
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
624
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
624
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
625
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
625
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
626
- *          TMC5130, TMC5130_STANDALONE
627
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
626
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
627
+ *          TMC5160, TMC5160_STANDALONE
628
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
628
  */
629
  */
629
 //#define X_DRIVER_TYPE  A4988
630
 //#define X_DRIVER_TYPE  A4988
630
 //#define Y_DRIVER_TYPE  A4988
631
 //#define Y_DRIVER_TYPE  A4988

+ 3
- 2
Marlin/src/config/examples/Anet/A2/Configuration.h 查看文件

623
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
623
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
624
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
624
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
625
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
625
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
626
- *          TMC5130, TMC5130_STANDALONE
627
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
626
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
627
+ *          TMC5160, TMC5160_STANDALONE
628
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
628
  */
629
  */
629
 //#define X_DRIVER_TYPE  A4988
630
 //#define X_DRIVER_TYPE  A4988
630
 //#define Y_DRIVER_TYPE  A4988
631
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/Anet/A2/Configuration_adv.h 查看文件

1322
 // @section tmc_smart
1322
 // @section tmc_smart
1323
 
1323
 
1324
 /**
1324
 /**
1325
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1326
- * the hardware SPI interface on your board and define the required CS pins
1327
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1325
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1326
+ * connect your SPI pins to the hardware SPI interface on your board and define
1327
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1328
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1328
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  *
1330
  *
1330
- * To use TMC2208 stepper UART-configurable stepper drivers
1331
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1332
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1333
- * to PDN_UART without a resistor.
1331
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1332
+ * to the driver side PDN_UART pin with a 1K resistor.
1333
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1334
+ * a resistor.
1334
  * The drivers can also be used with hardware serial.
1335
  * The drivers can also be used with hardware serial.
1335
  *
1336
  *
1336
- * TMCStepper library is required for connected TMC stepper drivers.
1337
+ * TMCStepper library is required to use TMC stepper drivers.
1337
  * https://github.com/teemuatlut/TMCStepper
1338
  * https://github.com/teemuatlut/TMCStepper
1338
  */
1339
  */
1339
 #if HAS_TRINAMIC
1340
 #if HAS_TRINAMIC
1340
 
1341
 
1341
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1344
 
1344
 
1345
   #if AXIS_IS_TMC(X)
1345
   #if AXIS_IS_TMC(X)
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1347
     #define X_MICROSTEPS   16  // 0..256
1347
     #define X_MICROSTEPS   16  // 0..256
1348
+    #define X_RSENSE     0.11
1348
   #endif
1349
   #endif
1349
 
1350
 
1350
   #if AXIS_IS_TMC(X2)
1351
   #if AXIS_IS_TMC(X2)
1351
     #define X2_CURRENT    800
1352
     #define X2_CURRENT    800
1352
     #define X2_MICROSTEPS  16
1353
     #define X2_MICROSTEPS  16
1354
+    #define X2_RSENSE    0.11
1353
   #endif
1355
   #endif
1354
 
1356
 
1355
   #if AXIS_IS_TMC(Y)
1357
   #if AXIS_IS_TMC(Y)
1356
     #define Y_CURRENT     800
1358
     #define Y_CURRENT     800
1357
     #define Y_MICROSTEPS   16
1359
     #define Y_MICROSTEPS   16
1360
+    #define Y_RSENSE     0.11
1358
   #endif
1361
   #endif
1359
 
1362
 
1360
   #if AXIS_IS_TMC(Y2)
1363
   #if AXIS_IS_TMC(Y2)
1361
     #define Y2_CURRENT    800
1364
     #define Y2_CURRENT    800
1362
     #define Y2_MICROSTEPS  16
1365
     #define Y2_MICROSTEPS  16
1366
+    #define Y2_RSENSE    0.11
1363
   #endif
1367
   #endif
1364
 
1368
 
1365
   #if AXIS_IS_TMC(Z)
1369
   #if AXIS_IS_TMC(Z)
1366
     #define Z_CURRENT     800
1370
     #define Z_CURRENT     800
1367
     #define Z_MICROSTEPS   16
1371
     #define Z_MICROSTEPS   16
1372
+    #define Z_RSENSE     0.11
1368
   #endif
1373
   #endif
1369
 
1374
 
1370
   #if AXIS_IS_TMC(Z2)
1375
   #if AXIS_IS_TMC(Z2)
1371
     #define Z2_CURRENT    800
1376
     #define Z2_CURRENT    800
1372
     #define Z2_MICROSTEPS  16
1377
     #define Z2_MICROSTEPS  16
1378
+    #define Z2_RSENSE    0.11
1373
   #endif
1379
   #endif
1374
 
1380
 
1375
   #if AXIS_IS_TMC(Z3)
1381
   #if AXIS_IS_TMC(Z3)
1376
     #define Z3_CURRENT    800
1382
     #define Z3_CURRENT    800
1377
     #define Z3_MICROSTEPS  16
1383
     #define Z3_MICROSTEPS  16
1384
+    #define Z3_RSENSE    0.11
1378
   #endif
1385
   #endif
1379
 
1386
 
1380
   #if AXIS_IS_TMC(E0)
1387
   #if AXIS_IS_TMC(E0)
1381
     #define E0_CURRENT    800
1388
     #define E0_CURRENT    800
1382
     #define E0_MICROSTEPS  16
1389
     #define E0_MICROSTEPS  16
1390
+    #define E0_RSENSE    0.11
1383
   #endif
1391
   #endif
1384
 
1392
 
1385
   #if AXIS_IS_TMC(E1)
1393
   #if AXIS_IS_TMC(E1)
1386
     #define E1_CURRENT    800
1394
     #define E1_CURRENT    800
1387
     #define E1_MICROSTEPS  16
1395
     #define E1_MICROSTEPS  16
1396
+    #define E1_RSENSE    0.11
1388
   #endif
1397
   #endif
1389
 
1398
 
1390
   #if AXIS_IS_TMC(E2)
1399
   #if AXIS_IS_TMC(E2)
1391
     #define E2_CURRENT    800
1400
     #define E2_CURRENT    800
1392
     #define E2_MICROSTEPS  16
1401
     #define E2_MICROSTEPS  16
1402
+    #define E2_RSENSE    0.11
1393
   #endif
1403
   #endif
1394
 
1404
 
1395
   #if AXIS_IS_TMC(E3)
1405
   #if AXIS_IS_TMC(E3)
1396
     #define E3_CURRENT    800
1406
     #define E3_CURRENT    800
1397
     #define E3_MICROSTEPS  16
1407
     #define E3_MICROSTEPS  16
1408
+    #define E3_RSENSE    0.11
1398
   #endif
1409
   #endif
1399
 
1410
 
1400
   #if AXIS_IS_TMC(E4)
1411
   #if AXIS_IS_TMC(E4)
1401
     #define E4_CURRENT    800
1412
     #define E4_CURRENT    800
1402
     #define E4_MICROSTEPS  16
1413
     #define E4_MICROSTEPS  16
1414
+    #define E4_RSENSE    0.11
1403
   #endif
1415
   #endif
1404
 
1416
 
1405
   #if AXIS_IS_TMC(E5)
1417
   #if AXIS_IS_TMC(E5)
1406
     #define E5_CURRENT    800
1418
     #define E5_CURRENT    800
1407
     #define E5_MICROSTEPS  16
1419
     #define E5_MICROSTEPS  16
1420
+    #define E5_RSENSE    0.11
1408
   #endif
1421
   #endif
1409
 
1422
 
1410
   /**
1423
   /**
1411
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1424
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1412
    * The default pins can be found in your board's pins file.
1425
    * The default pins can be found in your board's pins file.
1413
    */
1426
    */
1414
   //#define X_CS_PIN          -1
1427
   //#define X_CS_PIN          -1
1427
 
1440
 
1428
   /**
1441
   /**
1429
    * Use software SPI for TMC2130.
1442
    * Use software SPI for TMC2130.
1443
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1430
    * The default SW SPI pins are defined the respective pins files,
1444
    * The default SW SPI pins are defined the respective pins files,
1431
    * but you can override or define them here.
1445
    * but you can override or define them here.
1432
    */
1446
    */
1444
   //#define SOFTWARE_DRIVER_ENABLE
1458
   //#define SOFTWARE_DRIVER_ENABLE
1445
 
1459
 
1446
   /**
1460
   /**
1461
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1447
    * Use Trinamic's ultra quiet stepping mode.
1462
    * Use Trinamic's ultra quiet stepping mode.
1448
    * When disabled, Marlin will use spreadCycle stepping mode.
1463
    * When disabled, Marlin will use spreadCycle stepping mode.
1449
    */
1464
    */
1468
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1483
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1469
 
1484
 
1470
   /**
1485
   /**
1471
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1486
+   * Monitor Trinamic drivers for error conditions,
1472
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1487
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1473
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1488
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1474
    * Other detected conditions can be used to stop the current print.
1489
    * Other detected conditions can be used to stop the current print.
1487
   #endif
1502
   #endif
1488
 
1503
 
1489
   /**
1504
   /**
1505
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1490
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1506
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1491
    * This mode allows for faster movements at the expense of higher noise levels.
1507
    * This mode allows for faster movements at the expense of higher noise levels.
1492
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1508
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1509
   #define E5_HYBRID_THRESHOLD     30
1525
   #define E5_HYBRID_THRESHOLD     30
1510
 
1526
 
1511
   /**
1527
   /**
1528
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1512
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1529
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1513
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1530
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1514
    * X, Y, and Z homing will always be done in spreadCycle mode.
1531
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/Anet/A2plus/Configuration.h 查看文件

623
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
623
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
624
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
624
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
625
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
625
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
626
- *          TMC5130, TMC5130_STANDALONE
627
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
626
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
627
+ *          TMC5160, TMC5160_STANDALONE
628
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
628
  */
629
  */
629
 //#define X_DRIVER_TYPE  A4988
630
 //#define X_DRIVER_TYPE  A4988
630
 //#define Y_DRIVER_TYPE  A4988
631
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/Anet/A2plus/Configuration_adv.h 查看文件

1322
 // @section tmc_smart
1322
 // @section tmc_smart
1323
 
1323
 
1324
 /**
1324
 /**
1325
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1326
- * the hardware SPI interface on your board and define the required CS pins
1327
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1325
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1326
+ * connect your SPI pins to the hardware SPI interface on your board and define
1327
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1328
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1328
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  *
1330
  *
1330
- * To use TMC2208 stepper UART-configurable stepper drivers
1331
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1332
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1333
- * to PDN_UART without a resistor.
1331
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1332
+ * to the driver side PDN_UART pin with a 1K resistor.
1333
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1334
+ * a resistor.
1334
  * The drivers can also be used with hardware serial.
1335
  * The drivers can also be used with hardware serial.
1335
  *
1336
  *
1336
- * TMCStepper library is required for connected TMC stepper drivers.
1337
+ * TMCStepper library is required to use TMC stepper drivers.
1337
  * https://github.com/teemuatlut/TMCStepper
1338
  * https://github.com/teemuatlut/TMCStepper
1338
  */
1339
  */
1339
 #if HAS_TRINAMIC
1340
 #if HAS_TRINAMIC
1340
 
1341
 
1341
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1344
 
1344
 
1345
   #if AXIS_IS_TMC(X)
1345
   #if AXIS_IS_TMC(X)
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1347
     #define X_MICROSTEPS   16  // 0..256
1347
     #define X_MICROSTEPS   16  // 0..256
1348
+    #define X_RSENSE     0.11
1348
   #endif
1349
   #endif
1349
 
1350
 
1350
   #if AXIS_IS_TMC(X2)
1351
   #if AXIS_IS_TMC(X2)
1351
     #define X2_CURRENT    800
1352
     #define X2_CURRENT    800
1352
     #define X2_MICROSTEPS  16
1353
     #define X2_MICROSTEPS  16
1354
+    #define X2_RSENSE    0.11
1353
   #endif
1355
   #endif
1354
 
1356
 
1355
   #if AXIS_IS_TMC(Y)
1357
   #if AXIS_IS_TMC(Y)
1356
     #define Y_CURRENT     800
1358
     #define Y_CURRENT     800
1357
     #define Y_MICROSTEPS   16
1359
     #define Y_MICROSTEPS   16
1360
+    #define Y_RSENSE     0.11
1358
   #endif
1361
   #endif
1359
 
1362
 
1360
   #if AXIS_IS_TMC(Y2)
1363
   #if AXIS_IS_TMC(Y2)
1361
     #define Y2_CURRENT    800
1364
     #define Y2_CURRENT    800
1362
     #define Y2_MICROSTEPS  16
1365
     #define Y2_MICROSTEPS  16
1366
+    #define Y2_RSENSE    0.11
1363
   #endif
1367
   #endif
1364
 
1368
 
1365
   #if AXIS_IS_TMC(Z)
1369
   #if AXIS_IS_TMC(Z)
1366
     #define Z_CURRENT     800
1370
     #define Z_CURRENT     800
1367
     #define Z_MICROSTEPS   16
1371
     #define Z_MICROSTEPS   16
1372
+    #define Z_RSENSE     0.11
1368
   #endif
1373
   #endif
1369
 
1374
 
1370
   #if AXIS_IS_TMC(Z2)
1375
   #if AXIS_IS_TMC(Z2)
1371
     #define Z2_CURRENT    800
1376
     #define Z2_CURRENT    800
1372
     #define Z2_MICROSTEPS  16
1377
     #define Z2_MICROSTEPS  16
1378
+    #define Z2_RSENSE    0.11
1373
   #endif
1379
   #endif
1374
 
1380
 
1375
   #if AXIS_IS_TMC(Z3)
1381
   #if AXIS_IS_TMC(Z3)
1376
     #define Z3_CURRENT    800
1382
     #define Z3_CURRENT    800
1377
     #define Z3_MICROSTEPS  16
1383
     #define Z3_MICROSTEPS  16
1384
+    #define Z3_RSENSE    0.11
1378
   #endif
1385
   #endif
1379
 
1386
 
1380
   #if AXIS_IS_TMC(E0)
1387
   #if AXIS_IS_TMC(E0)
1381
     #define E0_CURRENT    800
1388
     #define E0_CURRENT    800
1382
     #define E0_MICROSTEPS  16
1389
     #define E0_MICROSTEPS  16
1390
+    #define E0_RSENSE    0.11
1383
   #endif
1391
   #endif
1384
 
1392
 
1385
   #if AXIS_IS_TMC(E1)
1393
   #if AXIS_IS_TMC(E1)
1386
     #define E1_CURRENT    800
1394
     #define E1_CURRENT    800
1387
     #define E1_MICROSTEPS  16
1395
     #define E1_MICROSTEPS  16
1396
+    #define E1_RSENSE    0.11
1388
   #endif
1397
   #endif
1389
 
1398
 
1390
   #if AXIS_IS_TMC(E2)
1399
   #if AXIS_IS_TMC(E2)
1391
     #define E2_CURRENT    800
1400
     #define E2_CURRENT    800
1392
     #define E2_MICROSTEPS  16
1401
     #define E2_MICROSTEPS  16
1402
+    #define E2_RSENSE    0.11
1393
   #endif
1403
   #endif
1394
 
1404
 
1395
   #if AXIS_IS_TMC(E3)
1405
   #if AXIS_IS_TMC(E3)
1396
     #define E3_CURRENT    800
1406
     #define E3_CURRENT    800
1397
     #define E3_MICROSTEPS  16
1407
     #define E3_MICROSTEPS  16
1408
+    #define E3_RSENSE    0.11
1398
   #endif
1409
   #endif
1399
 
1410
 
1400
   #if AXIS_IS_TMC(E4)
1411
   #if AXIS_IS_TMC(E4)
1401
     #define E4_CURRENT    800
1412
     #define E4_CURRENT    800
1402
     #define E4_MICROSTEPS  16
1413
     #define E4_MICROSTEPS  16
1414
+    #define E4_RSENSE    0.11
1403
   #endif
1415
   #endif
1404
 
1416
 
1405
   #if AXIS_IS_TMC(E5)
1417
   #if AXIS_IS_TMC(E5)
1406
     #define E5_CURRENT    800
1418
     #define E5_CURRENT    800
1407
     #define E5_MICROSTEPS  16
1419
     #define E5_MICROSTEPS  16
1420
+    #define E5_RSENSE    0.11
1408
   #endif
1421
   #endif
1409
 
1422
 
1410
   /**
1423
   /**
1411
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1424
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1412
    * The default pins can be found in your board's pins file.
1425
    * The default pins can be found in your board's pins file.
1413
    */
1426
    */
1414
   //#define X_CS_PIN          -1
1427
   //#define X_CS_PIN          -1
1427
 
1440
 
1428
   /**
1441
   /**
1429
    * Use software SPI for TMC2130.
1442
    * Use software SPI for TMC2130.
1443
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1430
    * The default SW SPI pins are defined the respective pins files,
1444
    * The default SW SPI pins are defined the respective pins files,
1431
    * but you can override or define them here.
1445
    * but you can override or define them here.
1432
    */
1446
    */
1444
   //#define SOFTWARE_DRIVER_ENABLE
1458
   //#define SOFTWARE_DRIVER_ENABLE
1445
 
1459
 
1446
   /**
1460
   /**
1461
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1447
    * Use Trinamic's ultra quiet stepping mode.
1462
    * Use Trinamic's ultra quiet stepping mode.
1448
    * When disabled, Marlin will use spreadCycle stepping mode.
1463
    * When disabled, Marlin will use spreadCycle stepping mode.
1449
    */
1464
    */
1468
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1483
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1469
 
1484
 
1470
   /**
1485
   /**
1471
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1486
+   * Monitor Trinamic drivers for error conditions,
1472
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1487
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1473
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1488
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1474
    * Other detected conditions can be used to stop the current print.
1489
    * Other detected conditions can be used to stop the current print.
1487
   #endif
1502
   #endif
1488
 
1503
 
1489
   /**
1504
   /**
1505
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1490
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1506
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1491
    * This mode allows for faster movements at the expense of higher noise levels.
1507
    * This mode allows for faster movements at the expense of higher noise levels.
1492
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1508
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1509
   #define E5_HYBRID_THRESHOLD     30
1525
   #define E5_HYBRID_THRESHOLD     30
1510
 
1526
 
1511
   /**
1527
   /**
1528
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1512
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1529
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1513
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1530
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1514
    * X, Y, and Z homing will always be done in spreadCycle mode.
1531
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/Anet/A6/Configuration.h 查看文件

643
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
643
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
644
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
644
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
645
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
645
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
646
- *          TMC5130, TMC5130_STANDALONE
647
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
646
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
647
+ *          TMC5160, TMC5160_STANDALONE
648
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
648
  */
649
  */
649
 //#define X_DRIVER_TYPE  A4988
650
 //#define X_DRIVER_TYPE  A4988
650
 //#define Y_DRIVER_TYPE  A4988
651
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/Anet/A6/Configuration_adv.h 查看文件

1321
 // @section tmc_smart
1321
 // @section tmc_smart
1322
 
1322
 
1323
 /**
1323
 /**
1324
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1325
- * the hardware SPI interface on your board and define the required CS pins
1326
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1324
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1325
+ * connect your SPI pins to the hardware SPI interface on your board and define
1326
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1327
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1327
  * You may also use software SPI if you wish to use general purpose IO pins.
1328
  * You may also use software SPI if you wish to use general purpose IO pins.
1328
  *
1329
  *
1329
- * To use TMC2208 stepper UART-configurable stepper drivers
1330
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1331
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1332
- * to PDN_UART without a resistor.
1330
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1331
+ * to the driver side PDN_UART pin with a 1K resistor.
1332
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1333
+ * a resistor.
1333
  * The drivers can also be used with hardware serial.
1334
  * The drivers can also be used with hardware serial.
1334
  *
1335
  *
1335
- * TMCStepper library is required for connected TMC stepper drivers.
1336
+ * TMCStepper library is required to use TMC stepper drivers.
1336
  * https://github.com/teemuatlut/TMCStepper
1337
  * https://github.com/teemuatlut/TMCStepper
1337
  */
1338
  */
1338
 #if HAS_TRINAMIC
1339
 #if HAS_TRINAMIC
1339
 
1340
 
1340
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1341
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1341
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1342
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1342
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1343
 
1343
 
1344
   #if AXIS_IS_TMC(X)
1344
   #if AXIS_IS_TMC(X)
1345
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1345
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1346
     #define X_MICROSTEPS   16  // 0..256
1346
     #define X_MICROSTEPS   16  // 0..256
1347
+    #define X_RSENSE     0.11
1347
   #endif
1348
   #endif
1348
 
1349
 
1349
   #if AXIS_IS_TMC(X2)
1350
   #if AXIS_IS_TMC(X2)
1350
     #define X2_CURRENT    800
1351
     #define X2_CURRENT    800
1351
     #define X2_MICROSTEPS  16
1352
     #define X2_MICROSTEPS  16
1353
+    #define X2_RSENSE    0.11
1352
   #endif
1354
   #endif
1353
 
1355
 
1354
   #if AXIS_IS_TMC(Y)
1356
   #if AXIS_IS_TMC(Y)
1355
     #define Y_CURRENT     800
1357
     #define Y_CURRENT     800
1356
     #define Y_MICROSTEPS   16
1358
     #define Y_MICROSTEPS   16
1359
+    #define Y_RSENSE     0.11
1357
   #endif
1360
   #endif
1358
 
1361
 
1359
   #if AXIS_IS_TMC(Y2)
1362
   #if AXIS_IS_TMC(Y2)
1360
     #define Y2_CURRENT    800
1363
     #define Y2_CURRENT    800
1361
     #define Y2_MICROSTEPS  16
1364
     #define Y2_MICROSTEPS  16
1365
+    #define Y2_RSENSE    0.11
1362
   #endif
1366
   #endif
1363
 
1367
 
1364
   #if AXIS_IS_TMC(Z)
1368
   #if AXIS_IS_TMC(Z)
1365
     #define Z_CURRENT     800
1369
     #define Z_CURRENT     800
1366
     #define Z_MICROSTEPS   16
1370
     #define Z_MICROSTEPS   16
1371
+    #define Z_RSENSE     0.11
1367
   #endif
1372
   #endif
1368
 
1373
 
1369
   #if AXIS_IS_TMC(Z2)
1374
   #if AXIS_IS_TMC(Z2)
1370
     #define Z2_CURRENT    800
1375
     #define Z2_CURRENT    800
1371
     #define Z2_MICROSTEPS  16
1376
     #define Z2_MICROSTEPS  16
1377
+    #define Z2_RSENSE    0.11
1372
   #endif
1378
   #endif
1373
 
1379
 
1374
   #if AXIS_IS_TMC(Z3)
1380
   #if AXIS_IS_TMC(Z3)
1375
     #define Z3_CURRENT    800
1381
     #define Z3_CURRENT    800
1376
     #define Z3_MICROSTEPS  16
1382
     #define Z3_MICROSTEPS  16
1383
+    #define Z3_RSENSE    0.11
1377
   #endif
1384
   #endif
1378
 
1385
 
1379
   #if AXIS_IS_TMC(E0)
1386
   #if AXIS_IS_TMC(E0)
1380
     #define E0_CURRENT    800
1387
     #define E0_CURRENT    800
1381
     #define E0_MICROSTEPS  16
1388
     #define E0_MICROSTEPS  16
1389
+    #define E0_RSENSE    0.11
1382
   #endif
1390
   #endif
1383
 
1391
 
1384
   #if AXIS_IS_TMC(E1)
1392
   #if AXIS_IS_TMC(E1)
1385
     #define E1_CURRENT    800
1393
     #define E1_CURRENT    800
1386
     #define E1_MICROSTEPS  16
1394
     #define E1_MICROSTEPS  16
1395
+    #define E1_RSENSE    0.11
1387
   #endif
1396
   #endif
1388
 
1397
 
1389
   #if AXIS_IS_TMC(E2)
1398
   #if AXIS_IS_TMC(E2)
1390
     #define E2_CURRENT    800
1399
     #define E2_CURRENT    800
1391
     #define E2_MICROSTEPS  16
1400
     #define E2_MICROSTEPS  16
1401
+    #define E2_RSENSE    0.11
1392
   #endif
1402
   #endif
1393
 
1403
 
1394
   #if AXIS_IS_TMC(E3)
1404
   #if AXIS_IS_TMC(E3)
1395
     #define E3_CURRENT    800
1405
     #define E3_CURRENT    800
1396
     #define E3_MICROSTEPS  16
1406
     #define E3_MICROSTEPS  16
1407
+    #define E3_RSENSE    0.11
1397
   #endif
1408
   #endif
1398
 
1409
 
1399
   #if AXIS_IS_TMC(E4)
1410
   #if AXIS_IS_TMC(E4)
1400
     #define E4_CURRENT    800
1411
     #define E4_CURRENT    800
1401
     #define E4_MICROSTEPS  16
1412
     #define E4_MICROSTEPS  16
1413
+    #define E4_RSENSE    0.11
1402
   #endif
1414
   #endif
1403
 
1415
 
1404
   #if AXIS_IS_TMC(E5)
1416
   #if AXIS_IS_TMC(E5)
1405
     #define E5_CURRENT    800
1417
     #define E5_CURRENT    800
1406
     #define E5_MICROSTEPS  16
1418
     #define E5_MICROSTEPS  16
1419
+    #define E5_RSENSE    0.11
1407
   #endif
1420
   #endif
1408
 
1421
 
1409
   /**
1422
   /**
1410
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1423
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1411
    * The default pins can be found in your board's pins file.
1424
    * The default pins can be found in your board's pins file.
1412
    */
1425
    */
1413
   //#define X_CS_PIN          -1
1426
   //#define X_CS_PIN          -1
1426
 
1439
 
1427
   /**
1440
   /**
1428
    * Use software SPI for TMC2130.
1441
    * Use software SPI for TMC2130.
1442
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1429
    * The default SW SPI pins are defined the respective pins files,
1443
    * The default SW SPI pins are defined the respective pins files,
1430
    * but you can override or define them here.
1444
    * but you can override or define them here.
1431
    */
1445
    */
1443
   //#define SOFTWARE_DRIVER_ENABLE
1457
   //#define SOFTWARE_DRIVER_ENABLE
1444
 
1458
 
1445
   /**
1459
   /**
1460
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1446
    * Use Trinamic's ultra quiet stepping mode.
1461
    * Use Trinamic's ultra quiet stepping mode.
1447
    * When disabled, Marlin will use spreadCycle stepping mode.
1462
    * When disabled, Marlin will use spreadCycle stepping mode.
1448
    */
1463
    */
1467
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1482
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1468
 
1483
 
1469
   /**
1484
   /**
1470
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1485
+   * Monitor Trinamic drivers for error conditions,
1471
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1486
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1472
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1487
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1473
    * Other detected conditions can be used to stop the current print.
1488
    * Other detected conditions can be used to stop the current print.
1486
   #endif
1501
   #endif
1487
 
1502
 
1488
   /**
1503
   /**
1504
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1489
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1505
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1490
    * This mode allows for faster movements at the expense of higher noise levels.
1506
    * This mode allows for faster movements at the expense of higher noise levels.
1491
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1507
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1508
   #define E5_HYBRID_THRESHOLD     30
1524
   #define E5_HYBRID_THRESHOLD     30
1509
 
1525
 
1510
   /**
1526
   /**
1527
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1511
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1528
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1512
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1529
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1513
    * X, Y, and Z homing will always be done in spreadCycle mode.
1530
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/Anet/A8/Configuration.h 查看文件

636
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
636
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
637
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
637
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
638
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
638
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
639
- *          TMC5130, TMC5130_STANDALONE
640
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
639
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
640
+ *          TMC5160, TMC5160_STANDALONE
641
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
641
  */
642
  */
642
 //#define X_DRIVER_TYPE  A4988
643
 //#define X_DRIVER_TYPE  A4988
643
 //#define Y_DRIVER_TYPE  A4988
644
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/Anet/A8/Configuration_adv.h 查看文件

1322
 // @section tmc_smart
1322
 // @section tmc_smart
1323
 
1323
 
1324
 /**
1324
 /**
1325
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1326
- * the hardware SPI interface on your board and define the required CS pins
1327
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1325
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1326
+ * connect your SPI pins to the hardware SPI interface on your board and define
1327
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1328
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1328
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  *
1330
  *
1330
- * To use TMC2208 stepper UART-configurable stepper drivers
1331
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1332
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1333
- * to PDN_UART without a resistor.
1331
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1332
+ * to the driver side PDN_UART pin with a 1K resistor.
1333
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1334
+ * a resistor.
1334
  * The drivers can also be used with hardware serial.
1335
  * The drivers can also be used with hardware serial.
1335
  *
1336
  *
1336
- * TMCStepper library is required for connected TMC stepper drivers.
1337
+ * TMCStepper library is required to use TMC stepper drivers.
1337
  * https://github.com/teemuatlut/TMCStepper
1338
  * https://github.com/teemuatlut/TMCStepper
1338
  */
1339
  */
1339
 #if HAS_TRINAMIC
1340
 #if HAS_TRINAMIC
1340
 
1341
 
1341
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1344
 
1344
 
1345
   #if AXIS_IS_TMC(X)
1345
   #if AXIS_IS_TMC(X)
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1347
     #define X_MICROSTEPS   16  // 0..256
1347
     #define X_MICROSTEPS   16  // 0..256
1348
+    #define X_RSENSE     0.11
1348
   #endif
1349
   #endif
1349
 
1350
 
1350
   #if AXIS_IS_TMC(X2)
1351
   #if AXIS_IS_TMC(X2)
1351
     #define X2_CURRENT    800
1352
     #define X2_CURRENT    800
1352
     #define X2_MICROSTEPS  16
1353
     #define X2_MICROSTEPS  16
1354
+    #define X2_RSENSE    0.11
1353
   #endif
1355
   #endif
1354
 
1356
 
1355
   #if AXIS_IS_TMC(Y)
1357
   #if AXIS_IS_TMC(Y)
1356
     #define Y_CURRENT     800
1358
     #define Y_CURRENT     800
1357
     #define Y_MICROSTEPS   16
1359
     #define Y_MICROSTEPS   16
1360
+    #define Y_RSENSE     0.11
1358
   #endif
1361
   #endif
1359
 
1362
 
1360
   #if AXIS_IS_TMC(Y2)
1363
   #if AXIS_IS_TMC(Y2)
1361
     #define Y2_CURRENT    800
1364
     #define Y2_CURRENT    800
1362
     #define Y2_MICROSTEPS  16
1365
     #define Y2_MICROSTEPS  16
1366
+    #define Y2_RSENSE    0.11
1363
   #endif
1367
   #endif
1364
 
1368
 
1365
   #if AXIS_IS_TMC(Z)
1369
   #if AXIS_IS_TMC(Z)
1366
     #define Z_CURRENT     800
1370
     #define Z_CURRENT     800
1367
     #define Z_MICROSTEPS   16
1371
     #define Z_MICROSTEPS   16
1372
+    #define Z_RSENSE     0.11
1368
   #endif
1373
   #endif
1369
 
1374
 
1370
   #if AXIS_IS_TMC(Z2)
1375
   #if AXIS_IS_TMC(Z2)
1371
     #define Z2_CURRENT    800
1376
     #define Z2_CURRENT    800
1372
     #define Z2_MICROSTEPS  16
1377
     #define Z2_MICROSTEPS  16
1378
+    #define Z2_RSENSE    0.11
1373
   #endif
1379
   #endif
1374
 
1380
 
1375
   #if AXIS_IS_TMC(Z3)
1381
   #if AXIS_IS_TMC(Z3)
1376
     #define Z3_CURRENT    800
1382
     #define Z3_CURRENT    800
1377
     #define Z3_MICROSTEPS  16
1383
     #define Z3_MICROSTEPS  16
1384
+    #define Z3_RSENSE    0.11
1378
   #endif
1385
   #endif
1379
 
1386
 
1380
   #if AXIS_IS_TMC(E0)
1387
   #if AXIS_IS_TMC(E0)
1381
     #define E0_CURRENT    800
1388
     #define E0_CURRENT    800
1382
     #define E0_MICROSTEPS  16
1389
     #define E0_MICROSTEPS  16
1390
+    #define E0_RSENSE    0.11
1383
   #endif
1391
   #endif
1384
 
1392
 
1385
   #if AXIS_IS_TMC(E1)
1393
   #if AXIS_IS_TMC(E1)
1386
     #define E1_CURRENT    800
1394
     #define E1_CURRENT    800
1387
     #define E1_MICROSTEPS  16
1395
     #define E1_MICROSTEPS  16
1396
+    #define E1_RSENSE    0.11
1388
   #endif
1397
   #endif
1389
 
1398
 
1390
   #if AXIS_IS_TMC(E2)
1399
   #if AXIS_IS_TMC(E2)
1391
     #define E2_CURRENT    800
1400
     #define E2_CURRENT    800
1392
     #define E2_MICROSTEPS  16
1401
     #define E2_MICROSTEPS  16
1402
+    #define E2_RSENSE    0.11
1393
   #endif
1403
   #endif
1394
 
1404
 
1395
   #if AXIS_IS_TMC(E3)
1405
   #if AXIS_IS_TMC(E3)
1396
     #define E3_CURRENT    800
1406
     #define E3_CURRENT    800
1397
     #define E3_MICROSTEPS  16
1407
     #define E3_MICROSTEPS  16
1408
+    #define E3_RSENSE    0.11
1398
   #endif
1409
   #endif
1399
 
1410
 
1400
   #if AXIS_IS_TMC(E4)
1411
   #if AXIS_IS_TMC(E4)
1401
     #define E4_CURRENT    800
1412
     #define E4_CURRENT    800
1402
     #define E4_MICROSTEPS  16
1413
     #define E4_MICROSTEPS  16
1414
+    #define E4_RSENSE    0.11
1403
   #endif
1415
   #endif
1404
 
1416
 
1405
   #if AXIS_IS_TMC(E5)
1417
   #if AXIS_IS_TMC(E5)
1406
     #define E5_CURRENT    800
1418
     #define E5_CURRENT    800
1407
     #define E5_MICROSTEPS  16
1419
     #define E5_MICROSTEPS  16
1420
+    #define E5_RSENSE    0.11
1408
   #endif
1421
   #endif
1409
 
1422
 
1410
   /**
1423
   /**
1411
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1424
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1412
    * The default pins can be found in your board's pins file.
1425
    * The default pins can be found in your board's pins file.
1413
    */
1426
    */
1414
   //#define X_CS_PIN          -1
1427
   //#define X_CS_PIN          -1
1427
 
1440
 
1428
   /**
1441
   /**
1429
    * Use software SPI for TMC2130.
1442
    * Use software SPI for TMC2130.
1443
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1430
    * The default SW SPI pins are defined the respective pins files,
1444
    * The default SW SPI pins are defined the respective pins files,
1431
    * but you can override or define them here.
1445
    * but you can override or define them here.
1432
    */
1446
    */
1444
   //#define SOFTWARE_DRIVER_ENABLE
1458
   //#define SOFTWARE_DRIVER_ENABLE
1445
 
1459
 
1446
   /**
1460
   /**
1461
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1447
    * Use Trinamic's ultra quiet stepping mode.
1462
    * Use Trinamic's ultra quiet stepping mode.
1448
    * When disabled, Marlin will use spreadCycle stepping mode.
1463
    * When disabled, Marlin will use spreadCycle stepping mode.
1449
    */
1464
    */
1468
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1483
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1469
 
1484
 
1470
   /**
1485
   /**
1471
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1486
+   * Monitor Trinamic drivers for error conditions,
1472
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1487
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1473
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1488
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1474
    * Other detected conditions can be used to stop the current print.
1489
    * Other detected conditions can be used to stop the current print.
1487
   #endif
1502
   #endif
1488
 
1503
 
1489
   /**
1504
   /**
1505
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1490
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1506
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1491
    * This mode allows for faster movements at the expense of higher noise levels.
1507
    * This mode allows for faster movements at the expense of higher noise levels.
1492
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1508
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1509
   #define E5_HYBRID_THRESHOLD     30
1525
   #define E5_HYBRID_THRESHOLD     30
1510
 
1526
 
1511
   /**
1527
   /**
1528
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1512
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1529
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1513
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1530
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1514
    * X, Y, and Z homing will always be done in spreadCycle mode.
1531
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/AnyCubic/i3/Configuration.h 查看文件

633
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
633
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
634
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
634
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
635
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
635
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
636
- *          TMC5130, TMC5130_STANDALONE
637
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
636
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
637
+ *          TMC5160, TMC5160_STANDALONE
638
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
638
  */
639
  */
639
 //#define X_DRIVER_TYPE  A4988
640
 //#define X_DRIVER_TYPE  A4988
640
 //#define Y_DRIVER_TYPE  A4988
641
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/AnyCubic/i3/Configuration_adv.h 查看文件

1323
 // @section tmc_smart
1323
 // @section tmc_smart
1324
 
1324
 
1325
 /**
1325
 /**
1326
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1327
- * the hardware SPI interface on your board and define the required CS pins
1328
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1326
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1327
+ * connect your SPI pins to the hardware SPI interface on your board and define
1328
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1329
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1329
  * You may also use software SPI if you wish to use general purpose IO pins.
1330
  * You may also use software SPI if you wish to use general purpose IO pins.
1330
  *
1331
  *
1331
- * To use TMC2208 stepper UART-configurable stepper drivers
1332
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1333
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1334
- * to PDN_UART without a resistor.
1332
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1333
+ * to the driver side PDN_UART pin with a 1K resistor.
1334
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1335
+ * a resistor.
1335
  * The drivers can also be used with hardware serial.
1336
  * The drivers can also be used with hardware serial.
1336
  *
1337
  *
1337
- * TMCStepper library is required for connected TMC stepper drivers.
1338
+ * TMCStepper library is required to use TMC stepper drivers.
1338
  * https://github.com/teemuatlut/TMCStepper
1339
  * https://github.com/teemuatlut/TMCStepper
1339
  */
1340
  */
1340
 #if HAS_TRINAMIC
1341
 #if HAS_TRINAMIC
1341
 
1342
 
1342
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1343
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1343
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1344
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1344
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1345
 
1345
 
1346
   #if AXIS_IS_TMC(X)
1346
   #if AXIS_IS_TMC(X)
1347
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1347
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1348
     #define X_MICROSTEPS   16  // 0..256
1348
     #define X_MICROSTEPS   16  // 0..256
1349
+    #define X_RSENSE     0.11
1349
   #endif
1350
   #endif
1350
 
1351
 
1351
   #if AXIS_IS_TMC(X2)
1352
   #if AXIS_IS_TMC(X2)
1352
     #define X2_CURRENT    800
1353
     #define X2_CURRENT    800
1353
     #define X2_MICROSTEPS  16
1354
     #define X2_MICROSTEPS  16
1355
+    #define X2_RSENSE    0.11
1354
   #endif
1356
   #endif
1355
 
1357
 
1356
   #if AXIS_IS_TMC(Y)
1358
   #if AXIS_IS_TMC(Y)
1357
     #define Y_CURRENT     800
1359
     #define Y_CURRENT     800
1358
     #define Y_MICROSTEPS   16
1360
     #define Y_MICROSTEPS   16
1361
+    #define Y_RSENSE     0.11
1359
   #endif
1362
   #endif
1360
 
1363
 
1361
   #if AXIS_IS_TMC(Y2)
1364
   #if AXIS_IS_TMC(Y2)
1362
     #define Y2_CURRENT    800
1365
     #define Y2_CURRENT    800
1363
     #define Y2_MICROSTEPS  16
1366
     #define Y2_MICROSTEPS  16
1367
+    #define Y2_RSENSE    0.11
1364
   #endif
1368
   #endif
1365
 
1369
 
1366
   #if AXIS_IS_TMC(Z)
1370
   #if AXIS_IS_TMC(Z)
1367
     #define Z_CURRENT     800
1371
     #define Z_CURRENT     800
1368
     #define Z_MICROSTEPS   16
1372
     #define Z_MICROSTEPS   16
1373
+    #define Z_RSENSE     0.11
1369
   #endif
1374
   #endif
1370
 
1375
 
1371
   #if AXIS_IS_TMC(Z2)
1376
   #if AXIS_IS_TMC(Z2)
1372
     #define Z2_CURRENT    800
1377
     #define Z2_CURRENT    800
1373
     #define Z2_MICROSTEPS  16
1378
     #define Z2_MICROSTEPS  16
1379
+    #define Z2_RSENSE    0.11
1374
   #endif
1380
   #endif
1375
 
1381
 
1376
   #if AXIS_IS_TMC(Z3)
1382
   #if AXIS_IS_TMC(Z3)
1377
     #define Z3_CURRENT    800
1383
     #define Z3_CURRENT    800
1378
     #define Z3_MICROSTEPS  16
1384
     #define Z3_MICROSTEPS  16
1385
+    #define Z3_RSENSE    0.11
1379
   #endif
1386
   #endif
1380
 
1387
 
1381
   #if AXIS_IS_TMC(E0)
1388
   #if AXIS_IS_TMC(E0)
1382
     #define E0_CURRENT    800
1389
     #define E0_CURRENT    800
1383
     #define E0_MICROSTEPS  16
1390
     #define E0_MICROSTEPS  16
1391
+    #define E0_RSENSE    0.11
1384
   #endif
1392
   #endif
1385
 
1393
 
1386
   #if AXIS_IS_TMC(E1)
1394
   #if AXIS_IS_TMC(E1)
1387
     #define E1_CURRENT    800
1395
     #define E1_CURRENT    800
1388
     #define E1_MICROSTEPS  16
1396
     #define E1_MICROSTEPS  16
1397
+    #define E1_RSENSE    0.11
1389
   #endif
1398
   #endif
1390
 
1399
 
1391
   #if AXIS_IS_TMC(E2)
1400
   #if AXIS_IS_TMC(E2)
1392
     #define E2_CURRENT    800
1401
     #define E2_CURRENT    800
1393
     #define E2_MICROSTEPS  16
1402
     #define E2_MICROSTEPS  16
1403
+    #define E2_RSENSE    0.11
1394
   #endif
1404
   #endif
1395
 
1405
 
1396
   #if AXIS_IS_TMC(E3)
1406
   #if AXIS_IS_TMC(E3)
1397
     #define E3_CURRENT    800
1407
     #define E3_CURRENT    800
1398
     #define E3_MICROSTEPS  16
1408
     #define E3_MICROSTEPS  16
1409
+    #define E3_RSENSE    0.11
1399
   #endif
1410
   #endif
1400
 
1411
 
1401
   #if AXIS_IS_TMC(E4)
1412
   #if AXIS_IS_TMC(E4)
1402
     #define E4_CURRENT    800
1413
     #define E4_CURRENT    800
1403
     #define E4_MICROSTEPS  16
1414
     #define E4_MICROSTEPS  16
1415
+    #define E4_RSENSE    0.11
1404
   #endif
1416
   #endif
1405
 
1417
 
1406
   #if AXIS_IS_TMC(E5)
1418
   #if AXIS_IS_TMC(E5)
1407
     #define E5_CURRENT    800
1419
     #define E5_CURRENT    800
1408
     #define E5_MICROSTEPS  16
1420
     #define E5_MICROSTEPS  16
1421
+    #define E5_RSENSE    0.11
1409
   #endif
1422
   #endif
1410
 
1423
 
1411
   /**
1424
   /**
1412
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1425
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1413
    * The default pins can be found in your board's pins file.
1426
    * The default pins can be found in your board's pins file.
1414
    */
1427
    */
1415
   //#define X_CS_PIN          -1
1428
   //#define X_CS_PIN          -1
1428
 
1441
 
1429
   /**
1442
   /**
1430
    * Use software SPI for TMC2130.
1443
    * Use software SPI for TMC2130.
1444
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1431
    * The default SW SPI pins are defined the respective pins files,
1445
    * The default SW SPI pins are defined the respective pins files,
1432
    * but you can override or define them here.
1446
    * but you can override or define them here.
1433
    */
1447
    */
1445
   //#define SOFTWARE_DRIVER_ENABLE
1459
   //#define SOFTWARE_DRIVER_ENABLE
1446
 
1460
 
1447
   /**
1461
   /**
1462
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1448
    * Use Trinamic's ultra quiet stepping mode.
1463
    * Use Trinamic's ultra quiet stepping mode.
1449
    * When disabled, Marlin will use spreadCycle stepping mode.
1464
    * When disabled, Marlin will use spreadCycle stepping mode.
1450
    */
1465
    */
1469
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1484
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1470
 
1485
 
1471
   /**
1486
   /**
1472
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1487
+   * Monitor Trinamic drivers for error conditions,
1473
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1488
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1474
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1489
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1475
    * Other detected conditions can be used to stop the current print.
1490
    * Other detected conditions can be used to stop the current print.
1488
   #endif
1503
   #endif
1489
 
1504
 
1490
   /**
1505
   /**
1506
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1491
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1507
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1492
    * This mode allows for faster movements at the expense of higher noise levels.
1508
    * This mode allows for faster movements at the expense of higher noise levels.
1493
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1509
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1510
   #define E5_HYBRID_THRESHOLD     30
1526
   #define E5_HYBRID_THRESHOLD     30
1511
 
1527
 
1512
   /**
1528
   /**
1529
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1513
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1530
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1514
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1531
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1515
    * X, Y, and Z homing will always be done in spreadCycle mode.
1532
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/ArmEd/Configuration.h 查看文件

624
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
624
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
625
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
625
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
626
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
626
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
627
- *          TMC5130, TMC5130_STANDALONE
628
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
627
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
628
+ *          TMC5160, TMC5160_STANDALONE
629
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
629
  */
630
  */
630
 //#define X_DRIVER_TYPE  A4988
631
 //#define X_DRIVER_TYPE  A4988
631
 //#define Y_DRIVER_TYPE  A4988
632
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/ArmEd/Configuration_adv.h 查看文件

1327
 // @section tmc_smart
1327
 // @section tmc_smart
1328
 
1328
 
1329
 /**
1329
 /**
1330
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1331
- * the hardware SPI interface on your board and define the required CS pins
1332
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1330
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1331
+ * connect your SPI pins to the hardware SPI interface on your board and define
1332
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1333
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1333
  * You may also use software SPI if you wish to use general purpose IO pins.
1334
  * You may also use software SPI if you wish to use general purpose IO pins.
1334
  *
1335
  *
1335
- * To use TMC2208 stepper UART-configurable stepper drivers
1336
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1337
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1338
- * to PDN_UART without a resistor.
1336
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1337
+ * to the driver side PDN_UART pin with a 1K resistor.
1338
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1339
+ * a resistor.
1339
  * The drivers can also be used with hardware serial.
1340
  * The drivers can also be used with hardware serial.
1340
  *
1341
  *
1341
- * TMCStepper library is required for connected TMC stepper drivers.
1342
+ * TMCStepper library is required to use TMC stepper drivers.
1342
  * https://github.com/teemuatlut/TMCStepper
1343
  * https://github.com/teemuatlut/TMCStepper
1343
  */
1344
  */
1344
 #if HAS_TRINAMIC
1345
 #if HAS_TRINAMIC
1345
 
1346
 
1346
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1347
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1347
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1348
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1348
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1349
 
1349
 
1350
   #if AXIS_IS_TMC(X)
1350
   #if AXIS_IS_TMC(X)
1351
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1351
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1352
     #define X_MICROSTEPS   16  // 0..256
1352
     #define X_MICROSTEPS   16  // 0..256
1353
+    #define X_RSENSE     0.11
1353
   #endif
1354
   #endif
1354
 
1355
 
1355
   #if AXIS_IS_TMC(X2)
1356
   #if AXIS_IS_TMC(X2)
1356
     #define X2_CURRENT    800
1357
     #define X2_CURRENT    800
1357
     #define X2_MICROSTEPS  16
1358
     #define X2_MICROSTEPS  16
1359
+    #define X2_RSENSE    0.11
1358
   #endif
1360
   #endif
1359
 
1361
 
1360
   #if AXIS_IS_TMC(Y)
1362
   #if AXIS_IS_TMC(Y)
1361
     #define Y_CURRENT     800
1363
     #define Y_CURRENT     800
1362
     #define Y_MICROSTEPS   16
1364
     #define Y_MICROSTEPS   16
1365
+    #define Y_RSENSE     0.11
1363
   #endif
1366
   #endif
1364
 
1367
 
1365
   #if AXIS_IS_TMC(Y2)
1368
   #if AXIS_IS_TMC(Y2)
1366
     #define Y2_CURRENT    800
1369
     #define Y2_CURRENT    800
1367
     #define Y2_MICROSTEPS  16
1370
     #define Y2_MICROSTEPS  16
1371
+    #define Y2_RSENSE    0.11
1368
   #endif
1372
   #endif
1369
 
1373
 
1370
   #if AXIS_IS_TMC(Z)
1374
   #if AXIS_IS_TMC(Z)
1371
     #define Z_CURRENT     800
1375
     #define Z_CURRENT     800
1372
     #define Z_MICROSTEPS   16
1376
     #define Z_MICROSTEPS   16
1377
+    #define Z_RSENSE     0.11
1373
   #endif
1378
   #endif
1374
 
1379
 
1375
   #if AXIS_IS_TMC(Z2)
1380
   #if AXIS_IS_TMC(Z2)
1376
     #define Z2_CURRENT    800
1381
     #define Z2_CURRENT    800
1377
     #define Z2_MICROSTEPS  16
1382
     #define Z2_MICROSTEPS  16
1383
+    #define Z2_RSENSE    0.11
1378
   #endif
1384
   #endif
1379
 
1385
 
1380
   #if AXIS_IS_TMC(Z3)
1386
   #if AXIS_IS_TMC(Z3)
1381
     #define Z3_CURRENT    800
1387
     #define Z3_CURRENT    800
1382
     #define Z3_MICROSTEPS  16
1388
     #define Z3_MICROSTEPS  16
1389
+    #define Z3_RSENSE    0.11
1383
   #endif
1390
   #endif
1384
 
1391
 
1385
   #if AXIS_IS_TMC(E0)
1392
   #if AXIS_IS_TMC(E0)
1386
     #define E0_CURRENT    800
1393
     #define E0_CURRENT    800
1387
     #define E0_MICROSTEPS  16
1394
     #define E0_MICROSTEPS  16
1395
+    #define E0_RSENSE    0.11
1388
   #endif
1396
   #endif
1389
 
1397
 
1390
   #if AXIS_IS_TMC(E1)
1398
   #if AXIS_IS_TMC(E1)
1391
     #define E1_CURRENT    800
1399
     #define E1_CURRENT    800
1392
     #define E1_MICROSTEPS  16
1400
     #define E1_MICROSTEPS  16
1401
+    #define E1_RSENSE    0.11
1393
   #endif
1402
   #endif
1394
 
1403
 
1395
   #if AXIS_IS_TMC(E2)
1404
   #if AXIS_IS_TMC(E2)
1396
     #define E2_CURRENT    800
1405
     #define E2_CURRENT    800
1397
     #define E2_MICROSTEPS  16
1406
     #define E2_MICROSTEPS  16
1407
+    #define E2_RSENSE    0.11
1398
   #endif
1408
   #endif
1399
 
1409
 
1400
   #if AXIS_IS_TMC(E3)
1410
   #if AXIS_IS_TMC(E3)
1401
     #define E3_CURRENT    800
1411
     #define E3_CURRENT    800
1402
     #define E3_MICROSTEPS  16
1412
     #define E3_MICROSTEPS  16
1413
+    #define E3_RSENSE    0.11
1403
   #endif
1414
   #endif
1404
 
1415
 
1405
   #if AXIS_IS_TMC(E4)
1416
   #if AXIS_IS_TMC(E4)
1406
     #define E4_CURRENT    800
1417
     #define E4_CURRENT    800
1407
     #define E4_MICROSTEPS  16
1418
     #define E4_MICROSTEPS  16
1419
+    #define E4_RSENSE    0.11
1408
   #endif
1420
   #endif
1409
 
1421
 
1410
   #if AXIS_IS_TMC(E5)
1422
   #if AXIS_IS_TMC(E5)
1411
     #define E5_CURRENT    800
1423
     #define E5_CURRENT    800
1412
     #define E5_MICROSTEPS  16
1424
     #define E5_MICROSTEPS  16
1425
+    #define E5_RSENSE    0.11
1413
   #endif
1426
   #endif
1414
 
1427
 
1415
   /**
1428
   /**
1416
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1429
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1417
    * The default pins can be found in your board's pins file.
1430
    * The default pins can be found in your board's pins file.
1418
    */
1431
    */
1419
   //#define X_CS_PIN          -1
1432
   //#define X_CS_PIN          -1
1432
 
1445
 
1433
   /**
1446
   /**
1434
    * Use software SPI for TMC2130.
1447
    * Use software SPI for TMC2130.
1448
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1435
    * The default SW SPI pins are defined the respective pins files,
1449
    * The default SW SPI pins are defined the respective pins files,
1436
    * but you can override or define them here.
1450
    * but you can override or define them here.
1437
    */
1451
    */
1449
   //#define SOFTWARE_DRIVER_ENABLE
1463
   //#define SOFTWARE_DRIVER_ENABLE
1450
 
1464
 
1451
   /**
1465
   /**
1466
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1452
    * Use Trinamic's ultra quiet stepping mode.
1467
    * Use Trinamic's ultra quiet stepping mode.
1453
    * When disabled, Marlin will use spreadCycle stepping mode.
1468
    * When disabled, Marlin will use spreadCycle stepping mode.
1454
    */
1469
    */
1473
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1488
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1474
 
1489
 
1475
   /**
1490
   /**
1476
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1491
+   * Monitor Trinamic drivers for error conditions,
1477
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1492
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1478
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1493
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1479
    * Other detected conditions can be used to stop the current print.
1494
    * Other detected conditions can be used to stop the current print.
1492
   #endif
1507
   #endif
1493
 
1508
 
1494
   /**
1509
   /**
1510
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1495
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1511
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1496
    * This mode allows for faster movements at the expense of higher noise levels.
1512
    * This mode allows for faster movements at the expense of higher noise levels.
1497
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1513
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1514
   #define E5_HYBRID_THRESHOLD     30
1530
   #define E5_HYBRID_THRESHOLD     30
1515
 
1531
 
1516
   /**
1532
   /**
1533
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1517
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1534
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1518
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1535
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1519
    * X, Y, and Z homing will always be done in spreadCycle mode.
1536
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/Azteeg/X5GT/Configuration.h 查看文件

623
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
623
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
624
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
624
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
625
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
625
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
626
- *          TMC5130, TMC5130_STANDALONE
627
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
626
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
627
+ *          TMC5160, TMC5160_STANDALONE
628
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
628
  */
629
  */
629
 //#define X_DRIVER_TYPE  A4988
630
 //#define X_DRIVER_TYPE  A4988
630
 //#define Y_DRIVER_TYPE  A4988
631
 //#define Y_DRIVER_TYPE  A4988

+ 3
- 2
Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h 查看文件

623
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
623
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
624
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
624
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
625
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
625
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
626
- *          TMC5130, TMC5130_STANDALONE
627
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
626
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
627
+ *          TMC5160, TMC5160_STANDALONE
628
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
628
  */
629
  */
629
 //#define X_DRIVER_TYPE  A4988
630
 //#define X_DRIVER_TYPE  A4988
630
 //#define Y_DRIVER_TYPE  A4988
631
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h 查看文件

1321
 // @section tmc_smart
1321
 // @section tmc_smart
1322
 
1322
 
1323
 /**
1323
 /**
1324
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1325
- * the hardware SPI interface on your board and define the required CS pins
1326
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1324
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1325
+ * connect your SPI pins to the hardware SPI interface on your board and define
1326
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1327
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1327
  * You may also use software SPI if you wish to use general purpose IO pins.
1328
  * You may also use software SPI if you wish to use general purpose IO pins.
1328
  *
1329
  *
1329
- * To use TMC2208 stepper UART-configurable stepper drivers
1330
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1331
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1332
- * to PDN_UART without a resistor.
1330
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1331
+ * to the driver side PDN_UART pin with a 1K resistor.
1332
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1333
+ * a resistor.
1333
  * The drivers can also be used with hardware serial.
1334
  * The drivers can also be used with hardware serial.
1334
  *
1335
  *
1335
- * TMCStepper library is required for connected TMC stepper drivers.
1336
+ * TMCStepper library is required to use TMC stepper drivers.
1336
  * https://github.com/teemuatlut/TMCStepper
1337
  * https://github.com/teemuatlut/TMCStepper
1337
  */
1338
  */
1338
 #if HAS_TRINAMIC
1339
 #if HAS_TRINAMIC
1339
 
1340
 
1340
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1341
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1341
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1342
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1342
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1343
 
1343
 
1344
   #if AXIS_IS_TMC(X)
1344
   #if AXIS_IS_TMC(X)
1345
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1345
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1346
     #define X_MICROSTEPS   16  // 0..256
1346
     #define X_MICROSTEPS   16  // 0..256
1347
+    #define X_RSENSE     0.11
1347
   #endif
1348
   #endif
1348
 
1349
 
1349
   #if AXIS_IS_TMC(X2)
1350
   #if AXIS_IS_TMC(X2)
1350
     #define X2_CURRENT    800
1351
     #define X2_CURRENT    800
1351
     #define X2_MICROSTEPS  16
1352
     #define X2_MICROSTEPS  16
1353
+    #define X2_RSENSE    0.11
1352
   #endif
1354
   #endif
1353
 
1355
 
1354
   #if AXIS_IS_TMC(Y)
1356
   #if AXIS_IS_TMC(Y)
1355
     #define Y_CURRENT     800
1357
     #define Y_CURRENT     800
1356
     #define Y_MICROSTEPS   16
1358
     #define Y_MICROSTEPS   16
1359
+    #define Y_RSENSE     0.11
1357
   #endif
1360
   #endif
1358
 
1361
 
1359
   #if AXIS_IS_TMC(Y2)
1362
   #if AXIS_IS_TMC(Y2)
1360
     #define Y2_CURRENT    800
1363
     #define Y2_CURRENT    800
1361
     #define Y2_MICROSTEPS  16
1364
     #define Y2_MICROSTEPS  16
1365
+    #define Y2_RSENSE    0.11
1362
   #endif
1366
   #endif
1363
 
1367
 
1364
   #if AXIS_IS_TMC(Z)
1368
   #if AXIS_IS_TMC(Z)
1365
     #define Z_CURRENT     800
1369
     #define Z_CURRENT     800
1366
     #define Z_MICROSTEPS   16
1370
     #define Z_MICROSTEPS   16
1371
+    #define Z_RSENSE     0.11
1367
   #endif
1372
   #endif
1368
 
1373
 
1369
   #if AXIS_IS_TMC(Z2)
1374
   #if AXIS_IS_TMC(Z2)
1370
     #define Z2_CURRENT    800
1375
     #define Z2_CURRENT    800
1371
     #define Z2_MICROSTEPS  16
1376
     #define Z2_MICROSTEPS  16
1377
+    #define Z2_RSENSE    0.11
1372
   #endif
1378
   #endif
1373
 
1379
 
1374
   #if AXIS_IS_TMC(Z3)
1380
   #if AXIS_IS_TMC(Z3)
1375
     #define Z3_CURRENT    800
1381
     #define Z3_CURRENT    800
1376
     #define Z3_MICROSTEPS  16
1382
     #define Z3_MICROSTEPS  16
1383
+    #define Z3_RSENSE    0.11
1377
   #endif
1384
   #endif
1378
 
1385
 
1379
   #if AXIS_IS_TMC(E0)
1386
   #if AXIS_IS_TMC(E0)
1380
     #define E0_CURRENT    800
1387
     #define E0_CURRENT    800
1381
     #define E0_MICROSTEPS  16
1388
     #define E0_MICROSTEPS  16
1389
+    #define E0_RSENSE    0.11
1382
   #endif
1390
   #endif
1383
 
1391
 
1384
   #if AXIS_IS_TMC(E1)
1392
   #if AXIS_IS_TMC(E1)
1385
     #define E1_CURRENT    800
1393
     #define E1_CURRENT    800
1386
     #define E1_MICROSTEPS  16
1394
     #define E1_MICROSTEPS  16
1395
+    #define E1_RSENSE    0.11
1387
   #endif
1396
   #endif
1388
 
1397
 
1389
   #if AXIS_IS_TMC(E2)
1398
   #if AXIS_IS_TMC(E2)
1390
     #define E2_CURRENT    800
1399
     #define E2_CURRENT    800
1391
     #define E2_MICROSTEPS  16
1400
     #define E2_MICROSTEPS  16
1401
+    #define E2_RSENSE    0.11
1392
   #endif
1402
   #endif
1393
 
1403
 
1394
   #if AXIS_IS_TMC(E3)
1404
   #if AXIS_IS_TMC(E3)
1395
     #define E3_CURRENT    800
1405
     #define E3_CURRENT    800
1396
     #define E3_MICROSTEPS  16
1406
     #define E3_MICROSTEPS  16
1407
+    #define E3_RSENSE    0.11
1397
   #endif
1408
   #endif
1398
 
1409
 
1399
   #if AXIS_IS_TMC(E4)
1410
   #if AXIS_IS_TMC(E4)
1400
     #define E4_CURRENT    800
1411
     #define E4_CURRENT    800
1401
     #define E4_MICROSTEPS  16
1412
     #define E4_MICROSTEPS  16
1413
+    #define E4_RSENSE    0.11
1402
   #endif
1414
   #endif
1403
 
1415
 
1404
   #if AXIS_IS_TMC(E5)
1416
   #if AXIS_IS_TMC(E5)
1405
     #define E5_CURRENT    800
1417
     #define E5_CURRENT    800
1406
     #define E5_MICROSTEPS  16
1418
     #define E5_MICROSTEPS  16
1419
+    #define E5_RSENSE    0.11
1407
   #endif
1420
   #endif
1408
 
1421
 
1409
   /**
1422
   /**
1410
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1423
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1411
    * The default pins can be found in your board's pins file.
1424
    * The default pins can be found in your board's pins file.
1412
    */
1425
    */
1413
   //#define X_CS_PIN          -1
1426
   //#define X_CS_PIN          -1
1426
 
1439
 
1427
   /**
1440
   /**
1428
    * Use software SPI for TMC2130.
1441
    * Use software SPI for TMC2130.
1442
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1429
    * The default SW SPI pins are defined the respective pins files,
1443
    * The default SW SPI pins are defined the respective pins files,
1430
    * but you can override or define them here.
1444
    * but you can override or define them here.
1431
    */
1445
    */
1443
   //#define SOFTWARE_DRIVER_ENABLE
1457
   //#define SOFTWARE_DRIVER_ENABLE
1444
 
1458
 
1445
   /**
1459
   /**
1460
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1446
    * Use Trinamic's ultra quiet stepping mode.
1461
    * Use Trinamic's ultra quiet stepping mode.
1447
    * When disabled, Marlin will use spreadCycle stepping mode.
1462
    * When disabled, Marlin will use spreadCycle stepping mode.
1448
    */
1463
    */
1467
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1482
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1468
 
1483
 
1469
   /**
1484
   /**
1470
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1485
+   * Monitor Trinamic drivers for error conditions,
1471
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1486
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1472
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1487
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1473
    * Other detected conditions can be used to stop the current print.
1488
    * Other detected conditions can be used to stop the current print.
1486
   #endif
1501
   #endif
1487
 
1502
 
1488
   /**
1503
   /**
1504
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1489
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1505
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1490
    * This mode allows for faster movements at the expense of higher noise levels.
1506
    * This mode allows for faster movements at the expense of higher noise levels.
1491
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1507
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1508
   #define E5_HYBRID_THRESHOLD     30
1524
   #define E5_HYBRID_THRESHOLD     30
1509
 
1525
 
1510
   /**
1526
   /**
1527
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1511
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1528
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1512
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1529
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1513
    * X, Y, and Z homing will always be done in spreadCycle mode.
1530
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h 查看文件

623
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
623
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
624
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
624
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
625
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
625
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
626
- *          TMC5130, TMC5130_STANDALONE
627
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
626
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
627
+ *          TMC5160, TMC5160_STANDALONE
628
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
628
  */
629
  */
629
 //#define X_DRIVER_TYPE  A4988
630
 //#define X_DRIVER_TYPE  A4988
630
 //#define Y_DRIVER_TYPE  A4988
631
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h 查看文件

1322
 // @section tmc_smart
1322
 // @section tmc_smart
1323
 
1323
 
1324
 /**
1324
 /**
1325
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1326
- * the hardware SPI interface on your board and define the required CS pins
1327
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1325
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1326
+ * connect your SPI pins to the hardware SPI interface on your board and define
1327
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1328
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1328
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  *
1330
  *
1330
- * To use TMC2208 stepper UART-configurable stepper drivers
1331
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1332
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1333
- * to PDN_UART without a resistor.
1331
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1332
+ * to the driver side PDN_UART pin with a 1K resistor.
1333
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1334
+ * a resistor.
1334
  * The drivers can also be used with hardware serial.
1335
  * The drivers can also be used with hardware serial.
1335
  *
1336
  *
1336
- * TMCStepper library is required for connected TMC stepper drivers.
1337
+ * TMCStepper library is required to use TMC stepper drivers.
1337
  * https://github.com/teemuatlut/TMCStepper
1338
  * https://github.com/teemuatlut/TMCStepper
1338
  */
1339
  */
1339
 #if HAS_TRINAMIC
1340
 #if HAS_TRINAMIC
1340
 
1341
 
1341
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1344
 
1344
 
1345
   #if AXIS_IS_TMC(X)
1345
   #if AXIS_IS_TMC(X)
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1347
     #define X_MICROSTEPS   16  // 0..256
1347
     #define X_MICROSTEPS   16  // 0..256
1348
+    #define X_RSENSE     0.11
1348
   #endif
1349
   #endif
1349
 
1350
 
1350
   #if AXIS_IS_TMC(X2)
1351
   #if AXIS_IS_TMC(X2)
1351
     #define X2_CURRENT    800
1352
     #define X2_CURRENT    800
1352
     #define X2_MICROSTEPS  16
1353
     #define X2_MICROSTEPS  16
1354
+    #define X2_RSENSE    0.11
1353
   #endif
1355
   #endif
1354
 
1356
 
1355
   #if AXIS_IS_TMC(Y)
1357
   #if AXIS_IS_TMC(Y)
1356
     #define Y_CURRENT     800
1358
     #define Y_CURRENT     800
1357
     #define Y_MICROSTEPS   16
1359
     #define Y_MICROSTEPS   16
1360
+    #define Y_RSENSE     0.11
1358
   #endif
1361
   #endif
1359
 
1362
 
1360
   #if AXIS_IS_TMC(Y2)
1363
   #if AXIS_IS_TMC(Y2)
1361
     #define Y2_CURRENT    800
1364
     #define Y2_CURRENT    800
1362
     #define Y2_MICROSTEPS  16
1365
     #define Y2_MICROSTEPS  16
1366
+    #define Y2_RSENSE    0.11
1363
   #endif
1367
   #endif
1364
 
1368
 
1365
   #if AXIS_IS_TMC(Z)
1369
   #if AXIS_IS_TMC(Z)
1366
     #define Z_CURRENT     800
1370
     #define Z_CURRENT     800
1367
     #define Z_MICROSTEPS   16
1371
     #define Z_MICROSTEPS   16
1372
+    #define Z_RSENSE     0.11
1368
   #endif
1373
   #endif
1369
 
1374
 
1370
   #if AXIS_IS_TMC(Z2)
1375
   #if AXIS_IS_TMC(Z2)
1371
     #define Z2_CURRENT    800
1376
     #define Z2_CURRENT    800
1372
     #define Z2_MICROSTEPS  16
1377
     #define Z2_MICROSTEPS  16
1378
+    #define Z2_RSENSE    0.11
1373
   #endif
1379
   #endif
1374
 
1380
 
1375
   #if AXIS_IS_TMC(Z3)
1381
   #if AXIS_IS_TMC(Z3)
1376
     #define Z3_CURRENT    800
1382
     #define Z3_CURRENT    800
1377
     #define Z3_MICROSTEPS  16
1383
     #define Z3_MICROSTEPS  16
1384
+    #define Z3_RSENSE    0.11
1378
   #endif
1385
   #endif
1379
 
1386
 
1380
   #if AXIS_IS_TMC(E0)
1387
   #if AXIS_IS_TMC(E0)
1381
     #define E0_CURRENT    800
1388
     #define E0_CURRENT    800
1382
     #define E0_MICROSTEPS  16
1389
     #define E0_MICROSTEPS  16
1390
+    #define E0_RSENSE    0.11
1383
   #endif
1391
   #endif
1384
 
1392
 
1385
   #if AXIS_IS_TMC(E1)
1393
   #if AXIS_IS_TMC(E1)
1386
     #define E1_CURRENT    800
1394
     #define E1_CURRENT    800
1387
     #define E1_MICROSTEPS  16
1395
     #define E1_MICROSTEPS  16
1396
+    #define E1_RSENSE    0.11
1388
   #endif
1397
   #endif
1389
 
1398
 
1390
   #if AXIS_IS_TMC(E2)
1399
   #if AXIS_IS_TMC(E2)
1391
     #define E2_CURRENT    800
1400
     #define E2_CURRENT    800
1392
     #define E2_MICROSTEPS  16
1401
     #define E2_MICROSTEPS  16
1402
+    #define E2_RSENSE    0.11
1393
   #endif
1403
   #endif
1394
 
1404
 
1395
   #if AXIS_IS_TMC(E3)
1405
   #if AXIS_IS_TMC(E3)
1396
     #define E3_CURRENT    800
1406
     #define E3_CURRENT    800
1397
     #define E3_MICROSTEPS  16
1407
     #define E3_MICROSTEPS  16
1408
+    #define E3_RSENSE    0.11
1398
   #endif
1409
   #endif
1399
 
1410
 
1400
   #if AXIS_IS_TMC(E4)
1411
   #if AXIS_IS_TMC(E4)
1401
     #define E4_CURRENT    800
1412
     #define E4_CURRENT    800
1402
     #define E4_MICROSTEPS  16
1413
     #define E4_MICROSTEPS  16
1414
+    #define E4_RSENSE    0.11
1403
   #endif
1415
   #endif
1404
 
1416
 
1405
   #if AXIS_IS_TMC(E5)
1417
   #if AXIS_IS_TMC(E5)
1406
     #define E5_CURRENT    800
1418
     #define E5_CURRENT    800
1407
     #define E5_MICROSTEPS  16
1419
     #define E5_MICROSTEPS  16
1420
+    #define E5_RSENSE    0.11
1408
   #endif
1421
   #endif
1409
 
1422
 
1410
   /**
1423
   /**
1411
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1424
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1412
    * The default pins can be found in your board's pins file.
1425
    * The default pins can be found in your board's pins file.
1413
    */
1426
    */
1414
   //#define X_CS_PIN          -1
1427
   //#define X_CS_PIN          -1
1427
 
1440
 
1428
   /**
1441
   /**
1429
    * Use software SPI for TMC2130.
1442
    * Use software SPI for TMC2130.
1443
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1430
    * The default SW SPI pins are defined the respective pins files,
1444
    * The default SW SPI pins are defined the respective pins files,
1431
    * but you can override or define them here.
1445
    * but you can override or define them here.
1432
    */
1446
    */
1444
   //#define SOFTWARE_DRIVER_ENABLE
1458
   //#define SOFTWARE_DRIVER_ENABLE
1445
 
1459
 
1446
   /**
1460
   /**
1461
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1447
    * Use Trinamic's ultra quiet stepping mode.
1462
    * Use Trinamic's ultra quiet stepping mode.
1448
    * When disabled, Marlin will use spreadCycle stepping mode.
1463
    * When disabled, Marlin will use spreadCycle stepping mode.
1449
    */
1464
    */
1468
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1483
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1469
 
1484
 
1470
   /**
1485
   /**
1471
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1486
+   * Monitor Trinamic drivers for error conditions,
1472
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1487
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1473
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1488
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1474
    * Other detected conditions can be used to stop the current print.
1489
    * Other detected conditions can be used to stop the current print.
1487
   #endif
1502
   #endif
1488
 
1503
 
1489
   /**
1504
   /**
1505
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1490
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1506
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1491
    * This mode allows for faster movements at the expense of higher noise levels.
1507
    * This mode allows for faster movements at the expense of higher noise levels.
1492
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1508
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1509
   #define E5_HYBRID_THRESHOLD     30
1525
   #define E5_HYBRID_THRESHOLD     30
1510
 
1526
 
1511
   /**
1527
   /**
1528
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1512
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1529
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1513
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1530
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1514
    * X, Y, and Z homing will always be done in spreadCycle mode.
1531
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/BQ/Hephestos/Configuration.h 查看文件

611
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
611
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
612
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
612
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
613
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
613
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
614
- *          TMC5130, TMC5130_STANDALONE
615
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
614
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
615
+ *          TMC5160, TMC5160_STANDALONE
616
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
616
  */
617
  */
617
 //#define X_DRIVER_TYPE  A4988
618
 //#define X_DRIVER_TYPE  A4988
618
 //#define Y_DRIVER_TYPE  A4988
619
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h 查看文件

1322
 // @section tmc_smart
1322
 // @section tmc_smart
1323
 
1323
 
1324
 /**
1324
 /**
1325
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1326
- * the hardware SPI interface on your board and define the required CS pins
1327
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1325
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1326
+ * connect your SPI pins to the hardware SPI interface on your board and define
1327
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1328
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1328
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  *
1330
  *
1330
- * To use TMC2208 stepper UART-configurable stepper drivers
1331
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1332
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1333
- * to PDN_UART without a resistor.
1331
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1332
+ * to the driver side PDN_UART pin with a 1K resistor.
1333
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1334
+ * a resistor.
1334
  * The drivers can also be used with hardware serial.
1335
  * The drivers can also be used with hardware serial.
1335
  *
1336
  *
1336
- * TMCStepper library is required for connected TMC stepper drivers.
1337
+ * TMCStepper library is required to use TMC stepper drivers.
1337
  * https://github.com/teemuatlut/TMCStepper
1338
  * https://github.com/teemuatlut/TMCStepper
1338
  */
1339
  */
1339
 #if HAS_TRINAMIC
1340
 #if HAS_TRINAMIC
1340
 
1341
 
1341
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1344
 
1344
 
1345
   #if AXIS_IS_TMC(X)
1345
   #if AXIS_IS_TMC(X)
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1347
     #define X_MICROSTEPS   16  // 0..256
1347
     #define X_MICROSTEPS   16  // 0..256
1348
+    #define X_RSENSE     0.11
1348
   #endif
1349
   #endif
1349
 
1350
 
1350
   #if AXIS_IS_TMC(X2)
1351
   #if AXIS_IS_TMC(X2)
1351
     #define X2_CURRENT    800
1352
     #define X2_CURRENT    800
1352
     #define X2_MICROSTEPS  16
1353
     #define X2_MICROSTEPS  16
1354
+    #define X2_RSENSE    0.11
1353
   #endif
1355
   #endif
1354
 
1356
 
1355
   #if AXIS_IS_TMC(Y)
1357
   #if AXIS_IS_TMC(Y)
1356
     #define Y_CURRENT     800
1358
     #define Y_CURRENT     800
1357
     #define Y_MICROSTEPS   16
1359
     #define Y_MICROSTEPS   16
1360
+    #define Y_RSENSE     0.11
1358
   #endif
1361
   #endif
1359
 
1362
 
1360
   #if AXIS_IS_TMC(Y2)
1363
   #if AXIS_IS_TMC(Y2)
1361
     #define Y2_CURRENT    800
1364
     #define Y2_CURRENT    800
1362
     #define Y2_MICROSTEPS  16
1365
     #define Y2_MICROSTEPS  16
1366
+    #define Y2_RSENSE    0.11
1363
   #endif
1367
   #endif
1364
 
1368
 
1365
   #if AXIS_IS_TMC(Z)
1369
   #if AXIS_IS_TMC(Z)
1366
     #define Z_CURRENT     800
1370
     #define Z_CURRENT     800
1367
     #define Z_MICROSTEPS   16
1371
     #define Z_MICROSTEPS   16
1372
+    #define Z_RSENSE     0.11
1368
   #endif
1373
   #endif
1369
 
1374
 
1370
   #if AXIS_IS_TMC(Z2)
1375
   #if AXIS_IS_TMC(Z2)
1371
     #define Z2_CURRENT    800
1376
     #define Z2_CURRENT    800
1372
     #define Z2_MICROSTEPS  16
1377
     #define Z2_MICROSTEPS  16
1378
+    #define Z2_RSENSE    0.11
1373
   #endif
1379
   #endif
1374
 
1380
 
1375
   #if AXIS_IS_TMC(Z3)
1381
   #if AXIS_IS_TMC(Z3)
1376
     #define Z3_CURRENT    800
1382
     #define Z3_CURRENT    800
1377
     #define Z3_MICROSTEPS  16
1383
     #define Z3_MICROSTEPS  16
1384
+    #define Z3_RSENSE    0.11
1378
   #endif
1385
   #endif
1379
 
1386
 
1380
   #if AXIS_IS_TMC(E0)
1387
   #if AXIS_IS_TMC(E0)
1381
     #define E0_CURRENT    800
1388
     #define E0_CURRENT    800
1382
     #define E0_MICROSTEPS  16
1389
     #define E0_MICROSTEPS  16
1390
+    #define E0_RSENSE    0.11
1383
   #endif
1391
   #endif
1384
 
1392
 
1385
   #if AXIS_IS_TMC(E1)
1393
   #if AXIS_IS_TMC(E1)
1386
     #define E1_CURRENT    800
1394
     #define E1_CURRENT    800
1387
     #define E1_MICROSTEPS  16
1395
     #define E1_MICROSTEPS  16
1396
+    #define E1_RSENSE    0.11
1388
   #endif
1397
   #endif
1389
 
1398
 
1390
   #if AXIS_IS_TMC(E2)
1399
   #if AXIS_IS_TMC(E2)
1391
     #define E2_CURRENT    800
1400
     #define E2_CURRENT    800
1392
     #define E2_MICROSTEPS  16
1401
     #define E2_MICROSTEPS  16
1402
+    #define E2_RSENSE    0.11
1393
   #endif
1403
   #endif
1394
 
1404
 
1395
   #if AXIS_IS_TMC(E3)
1405
   #if AXIS_IS_TMC(E3)
1396
     #define E3_CURRENT    800
1406
     #define E3_CURRENT    800
1397
     #define E3_MICROSTEPS  16
1407
     #define E3_MICROSTEPS  16
1408
+    #define E3_RSENSE    0.11
1398
   #endif
1409
   #endif
1399
 
1410
 
1400
   #if AXIS_IS_TMC(E4)
1411
   #if AXIS_IS_TMC(E4)
1401
     #define E4_CURRENT    800
1412
     #define E4_CURRENT    800
1402
     #define E4_MICROSTEPS  16
1413
     #define E4_MICROSTEPS  16
1414
+    #define E4_RSENSE    0.11
1403
   #endif
1415
   #endif
1404
 
1416
 
1405
   #if AXIS_IS_TMC(E5)
1417
   #if AXIS_IS_TMC(E5)
1406
     #define E5_CURRENT    800
1418
     #define E5_CURRENT    800
1407
     #define E5_MICROSTEPS  16
1419
     #define E5_MICROSTEPS  16
1420
+    #define E5_RSENSE    0.11
1408
   #endif
1421
   #endif
1409
 
1422
 
1410
   /**
1423
   /**
1411
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1424
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1412
    * The default pins can be found in your board's pins file.
1425
    * The default pins can be found in your board's pins file.
1413
    */
1426
    */
1414
   //#define X_CS_PIN          -1
1427
   //#define X_CS_PIN          -1
1427
 
1440
 
1428
   /**
1441
   /**
1429
    * Use software SPI for TMC2130.
1442
    * Use software SPI for TMC2130.
1443
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1430
    * The default SW SPI pins are defined the respective pins files,
1444
    * The default SW SPI pins are defined the respective pins files,
1431
    * but you can override or define them here.
1445
    * but you can override or define them here.
1432
    */
1446
    */
1444
   //#define SOFTWARE_DRIVER_ENABLE
1458
   //#define SOFTWARE_DRIVER_ENABLE
1445
 
1459
 
1446
   /**
1460
   /**
1461
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1447
    * Use Trinamic's ultra quiet stepping mode.
1462
    * Use Trinamic's ultra quiet stepping mode.
1448
    * When disabled, Marlin will use spreadCycle stepping mode.
1463
    * When disabled, Marlin will use spreadCycle stepping mode.
1449
    */
1464
    */
1468
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1483
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1469
 
1484
 
1470
   /**
1485
   /**
1471
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1486
+   * Monitor Trinamic drivers for error conditions,
1472
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1487
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1473
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1488
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1474
    * Other detected conditions can be used to stop the current print.
1489
    * Other detected conditions can be used to stop the current print.
1487
   #endif
1502
   #endif
1488
 
1503
 
1489
   /**
1504
   /**
1505
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1490
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1506
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1491
    * This mode allows for faster movements at the expense of higher noise levels.
1507
    * This mode allows for faster movements at the expense of higher noise levels.
1492
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1508
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1509
   #define E5_HYBRID_THRESHOLD     30
1525
   #define E5_HYBRID_THRESHOLD     30
1510
 
1526
 
1511
   /**
1527
   /**
1528
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1512
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1529
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1513
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1530
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1514
    * X, Y, and Z homing will always be done in spreadCycle mode.
1531
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h 查看文件

624
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
624
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
625
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
625
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
626
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
626
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
627
- *          TMC5130, TMC5130_STANDALONE
628
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
627
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
628
+ *          TMC5160, TMC5160_STANDALONE
629
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
629
  */
630
  */
630
 //#define X_DRIVER_TYPE  A4988
631
 //#define X_DRIVER_TYPE  A4988
631
 //#define Y_DRIVER_TYPE  A4988
632
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h 查看文件

1330
 // @section tmc_smart
1330
 // @section tmc_smart
1331
 
1331
 
1332
 /**
1332
 /**
1333
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1334
- * the hardware SPI interface on your board and define the required CS pins
1335
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1333
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1334
+ * connect your SPI pins to the hardware SPI interface on your board and define
1335
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1336
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1336
  * You may also use software SPI if you wish to use general purpose IO pins.
1337
  * You may also use software SPI if you wish to use general purpose IO pins.
1337
  *
1338
  *
1338
- * To use TMC2208 stepper UART-configurable stepper drivers
1339
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1340
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1341
- * to PDN_UART without a resistor.
1339
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1340
+ * to the driver side PDN_UART pin with a 1K resistor.
1341
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1342
+ * a resistor.
1342
  * The drivers can also be used with hardware serial.
1343
  * The drivers can also be used with hardware serial.
1343
  *
1344
  *
1344
- * TMCStepper library is required for connected TMC stepper drivers.
1345
+ * TMCStepper library is required to use TMC stepper drivers.
1345
  * https://github.com/teemuatlut/TMCStepper
1346
  * https://github.com/teemuatlut/TMCStepper
1346
  */
1347
  */
1347
 #if HAS_TRINAMIC
1348
 #if HAS_TRINAMIC
1348
 
1349
 
1349
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1350
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1350
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1351
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1351
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1352
 
1352
 
1353
   #if AXIS_IS_TMC(X)
1353
   #if AXIS_IS_TMC(X)
1354
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1354
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1355
     #define X_MICROSTEPS   16  // 0..256
1355
     #define X_MICROSTEPS   16  // 0..256
1356
+    #define X_RSENSE     0.11
1356
   #endif
1357
   #endif
1357
 
1358
 
1358
   #if AXIS_IS_TMC(X2)
1359
   #if AXIS_IS_TMC(X2)
1359
     #define X2_CURRENT    800
1360
     #define X2_CURRENT    800
1360
     #define X2_MICROSTEPS  16
1361
     #define X2_MICROSTEPS  16
1362
+    #define X2_RSENSE    0.11
1361
   #endif
1363
   #endif
1362
 
1364
 
1363
   #if AXIS_IS_TMC(Y)
1365
   #if AXIS_IS_TMC(Y)
1364
     #define Y_CURRENT     800
1366
     #define Y_CURRENT     800
1365
     #define Y_MICROSTEPS   16
1367
     #define Y_MICROSTEPS   16
1368
+    #define Y_RSENSE     0.11
1366
   #endif
1369
   #endif
1367
 
1370
 
1368
   #if AXIS_IS_TMC(Y2)
1371
   #if AXIS_IS_TMC(Y2)
1369
     #define Y2_CURRENT    800
1372
     #define Y2_CURRENT    800
1370
     #define Y2_MICROSTEPS  16
1373
     #define Y2_MICROSTEPS  16
1374
+    #define Y2_RSENSE    0.11
1371
   #endif
1375
   #endif
1372
 
1376
 
1373
   #if AXIS_IS_TMC(Z)
1377
   #if AXIS_IS_TMC(Z)
1374
     #define Z_CURRENT     800
1378
     #define Z_CURRENT     800
1375
     #define Z_MICROSTEPS   16
1379
     #define Z_MICROSTEPS   16
1380
+    #define Z_RSENSE     0.11
1376
   #endif
1381
   #endif
1377
 
1382
 
1378
   #if AXIS_IS_TMC(Z2)
1383
   #if AXIS_IS_TMC(Z2)
1379
     #define Z2_CURRENT    800
1384
     #define Z2_CURRENT    800
1380
     #define Z2_MICROSTEPS  16
1385
     #define Z2_MICROSTEPS  16
1386
+    #define Z2_RSENSE    0.11
1381
   #endif
1387
   #endif
1382
 
1388
 
1383
   #if AXIS_IS_TMC(Z3)
1389
   #if AXIS_IS_TMC(Z3)
1384
     #define Z3_CURRENT    800
1390
     #define Z3_CURRENT    800
1385
     #define Z3_MICROSTEPS  16
1391
     #define Z3_MICROSTEPS  16
1392
+    #define Z3_RSENSE    0.11
1386
   #endif
1393
   #endif
1387
 
1394
 
1388
   #if AXIS_IS_TMC(E0)
1395
   #if AXIS_IS_TMC(E0)
1389
     #define E0_CURRENT    800
1396
     #define E0_CURRENT    800
1390
     #define E0_MICROSTEPS  16
1397
     #define E0_MICROSTEPS  16
1398
+    #define E0_RSENSE    0.11
1391
   #endif
1399
   #endif
1392
 
1400
 
1393
   #if AXIS_IS_TMC(E1)
1401
   #if AXIS_IS_TMC(E1)
1394
     #define E1_CURRENT    800
1402
     #define E1_CURRENT    800
1395
     #define E1_MICROSTEPS  16
1403
     #define E1_MICROSTEPS  16
1404
+    #define E1_RSENSE    0.11
1396
   #endif
1405
   #endif
1397
 
1406
 
1398
   #if AXIS_IS_TMC(E2)
1407
   #if AXIS_IS_TMC(E2)
1399
     #define E2_CURRENT    800
1408
     #define E2_CURRENT    800
1400
     #define E2_MICROSTEPS  16
1409
     #define E2_MICROSTEPS  16
1410
+    #define E2_RSENSE    0.11
1401
   #endif
1411
   #endif
1402
 
1412
 
1403
   #if AXIS_IS_TMC(E3)
1413
   #if AXIS_IS_TMC(E3)
1404
     #define E3_CURRENT    800
1414
     #define E3_CURRENT    800
1405
     #define E3_MICROSTEPS  16
1415
     #define E3_MICROSTEPS  16
1416
+    #define E3_RSENSE    0.11
1406
   #endif
1417
   #endif
1407
 
1418
 
1408
   #if AXIS_IS_TMC(E4)
1419
   #if AXIS_IS_TMC(E4)
1409
     #define E4_CURRENT    800
1420
     #define E4_CURRENT    800
1410
     #define E4_MICROSTEPS  16
1421
     #define E4_MICROSTEPS  16
1422
+    #define E4_RSENSE    0.11
1411
   #endif
1423
   #endif
1412
 
1424
 
1413
   #if AXIS_IS_TMC(E5)
1425
   #if AXIS_IS_TMC(E5)
1414
     #define E5_CURRENT    800
1426
     #define E5_CURRENT    800
1415
     #define E5_MICROSTEPS  16
1427
     #define E5_MICROSTEPS  16
1428
+    #define E5_RSENSE    0.11
1416
   #endif
1429
   #endif
1417
 
1430
 
1418
   /**
1431
   /**
1419
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1432
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1420
    * The default pins can be found in your board's pins file.
1433
    * The default pins can be found in your board's pins file.
1421
    */
1434
    */
1422
   //#define X_CS_PIN          -1
1435
   //#define X_CS_PIN          -1
1435
 
1448
 
1436
   /**
1449
   /**
1437
    * Use software SPI for TMC2130.
1450
    * Use software SPI for TMC2130.
1451
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1438
    * The default SW SPI pins are defined the respective pins files,
1452
    * The default SW SPI pins are defined the respective pins files,
1439
    * but you can override or define them here.
1453
    * but you can override or define them here.
1440
    */
1454
    */
1452
   //#define SOFTWARE_DRIVER_ENABLE
1466
   //#define SOFTWARE_DRIVER_ENABLE
1453
 
1467
 
1454
   /**
1468
   /**
1469
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1455
    * Use Trinamic's ultra quiet stepping mode.
1470
    * Use Trinamic's ultra quiet stepping mode.
1456
    * When disabled, Marlin will use spreadCycle stepping mode.
1471
    * When disabled, Marlin will use spreadCycle stepping mode.
1457
    */
1472
    */
1476
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1491
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1477
 
1492
 
1478
   /**
1493
   /**
1479
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1494
+   * Monitor Trinamic drivers for error conditions,
1480
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1495
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1481
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1496
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1482
    * Other detected conditions can be used to stop the current print.
1497
    * Other detected conditions can be used to stop the current print.
1495
   #endif
1510
   #endif
1496
 
1511
 
1497
   /**
1512
   /**
1513
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1498
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1514
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1499
    * This mode allows for faster movements at the expense of higher noise levels.
1515
    * This mode allows for faster movements at the expense of higher noise levels.
1500
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1516
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1517
   #define E5_HYBRID_THRESHOLD     30
1533
   #define E5_HYBRID_THRESHOLD     30
1518
 
1534
 
1519
   /**
1535
   /**
1536
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1520
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1537
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1521
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1538
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1522
    * X, Y, and Z homing will always be done in spreadCycle mode.
1539
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/BQ/WITBOX/Configuration.h 查看文件

611
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
611
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
612
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
612
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
613
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
613
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
614
- *          TMC5130, TMC5130_STANDALONE
615
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
614
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
615
+ *          TMC5160, TMC5160_STANDALONE
616
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
616
  */
617
  */
617
 //#define X_DRIVER_TYPE  A4988
618
 //#define X_DRIVER_TYPE  A4988
618
 //#define Y_DRIVER_TYPE  A4988
619
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h 查看文件

1322
 // @section tmc_smart
1322
 // @section tmc_smart
1323
 
1323
 
1324
 /**
1324
 /**
1325
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1326
- * the hardware SPI interface on your board and define the required CS pins
1327
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1325
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1326
+ * connect your SPI pins to the hardware SPI interface on your board and define
1327
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1328
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1328
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  *
1330
  *
1330
- * To use TMC2208 stepper UART-configurable stepper drivers
1331
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1332
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1333
- * to PDN_UART without a resistor.
1331
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1332
+ * to the driver side PDN_UART pin with a 1K resistor.
1333
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1334
+ * a resistor.
1334
  * The drivers can also be used with hardware serial.
1335
  * The drivers can also be used with hardware serial.
1335
  *
1336
  *
1336
- * TMCStepper library is required for connected TMC stepper drivers.
1337
+ * TMCStepper library is required to use TMC stepper drivers.
1337
  * https://github.com/teemuatlut/TMCStepper
1338
  * https://github.com/teemuatlut/TMCStepper
1338
  */
1339
  */
1339
 #if HAS_TRINAMIC
1340
 #if HAS_TRINAMIC
1340
 
1341
 
1341
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1344
 
1344
 
1345
   #if AXIS_IS_TMC(X)
1345
   #if AXIS_IS_TMC(X)
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1347
     #define X_MICROSTEPS   16  // 0..256
1347
     #define X_MICROSTEPS   16  // 0..256
1348
+    #define X_RSENSE     0.11
1348
   #endif
1349
   #endif
1349
 
1350
 
1350
   #if AXIS_IS_TMC(X2)
1351
   #if AXIS_IS_TMC(X2)
1351
     #define X2_CURRENT    800
1352
     #define X2_CURRENT    800
1352
     #define X2_MICROSTEPS  16
1353
     #define X2_MICROSTEPS  16
1354
+    #define X2_RSENSE    0.11
1353
   #endif
1355
   #endif
1354
 
1356
 
1355
   #if AXIS_IS_TMC(Y)
1357
   #if AXIS_IS_TMC(Y)
1356
     #define Y_CURRENT     800
1358
     #define Y_CURRENT     800
1357
     #define Y_MICROSTEPS   16
1359
     #define Y_MICROSTEPS   16
1360
+    #define Y_RSENSE     0.11
1358
   #endif
1361
   #endif
1359
 
1362
 
1360
   #if AXIS_IS_TMC(Y2)
1363
   #if AXIS_IS_TMC(Y2)
1361
     #define Y2_CURRENT    800
1364
     #define Y2_CURRENT    800
1362
     #define Y2_MICROSTEPS  16
1365
     #define Y2_MICROSTEPS  16
1366
+    #define Y2_RSENSE    0.11
1363
   #endif
1367
   #endif
1364
 
1368
 
1365
   #if AXIS_IS_TMC(Z)
1369
   #if AXIS_IS_TMC(Z)
1366
     #define Z_CURRENT     800
1370
     #define Z_CURRENT     800
1367
     #define Z_MICROSTEPS   16
1371
     #define Z_MICROSTEPS   16
1372
+    #define Z_RSENSE     0.11
1368
   #endif
1373
   #endif
1369
 
1374
 
1370
   #if AXIS_IS_TMC(Z2)
1375
   #if AXIS_IS_TMC(Z2)
1371
     #define Z2_CURRENT    800
1376
     #define Z2_CURRENT    800
1372
     #define Z2_MICROSTEPS  16
1377
     #define Z2_MICROSTEPS  16
1378
+    #define Z2_RSENSE    0.11
1373
   #endif
1379
   #endif
1374
 
1380
 
1375
   #if AXIS_IS_TMC(Z3)
1381
   #if AXIS_IS_TMC(Z3)
1376
     #define Z3_CURRENT    800
1382
     #define Z3_CURRENT    800
1377
     #define Z3_MICROSTEPS  16
1383
     #define Z3_MICROSTEPS  16
1384
+    #define Z3_RSENSE    0.11
1378
   #endif
1385
   #endif
1379
 
1386
 
1380
   #if AXIS_IS_TMC(E0)
1387
   #if AXIS_IS_TMC(E0)
1381
     #define E0_CURRENT    800
1388
     #define E0_CURRENT    800
1382
     #define E0_MICROSTEPS  16
1389
     #define E0_MICROSTEPS  16
1390
+    #define E0_RSENSE    0.11
1383
   #endif
1391
   #endif
1384
 
1392
 
1385
   #if AXIS_IS_TMC(E1)
1393
   #if AXIS_IS_TMC(E1)
1386
     #define E1_CURRENT    800
1394
     #define E1_CURRENT    800
1387
     #define E1_MICROSTEPS  16
1395
     #define E1_MICROSTEPS  16
1396
+    #define E1_RSENSE    0.11
1388
   #endif
1397
   #endif
1389
 
1398
 
1390
   #if AXIS_IS_TMC(E2)
1399
   #if AXIS_IS_TMC(E2)
1391
     #define E2_CURRENT    800
1400
     #define E2_CURRENT    800
1392
     #define E2_MICROSTEPS  16
1401
     #define E2_MICROSTEPS  16
1402
+    #define E2_RSENSE    0.11
1393
   #endif
1403
   #endif
1394
 
1404
 
1395
   #if AXIS_IS_TMC(E3)
1405
   #if AXIS_IS_TMC(E3)
1396
     #define E3_CURRENT    800
1406
     #define E3_CURRENT    800
1397
     #define E3_MICROSTEPS  16
1407
     #define E3_MICROSTEPS  16
1408
+    #define E3_RSENSE    0.11
1398
   #endif
1409
   #endif
1399
 
1410
 
1400
   #if AXIS_IS_TMC(E4)
1411
   #if AXIS_IS_TMC(E4)
1401
     #define E4_CURRENT    800
1412
     #define E4_CURRENT    800
1402
     #define E4_MICROSTEPS  16
1413
     #define E4_MICROSTEPS  16
1414
+    #define E4_RSENSE    0.11
1403
   #endif
1415
   #endif
1404
 
1416
 
1405
   #if AXIS_IS_TMC(E5)
1417
   #if AXIS_IS_TMC(E5)
1406
     #define E5_CURRENT    800
1418
     #define E5_CURRENT    800
1407
     #define E5_MICROSTEPS  16
1419
     #define E5_MICROSTEPS  16
1420
+    #define E5_RSENSE    0.11
1408
   #endif
1421
   #endif
1409
 
1422
 
1410
   /**
1423
   /**
1411
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1424
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1412
    * The default pins can be found in your board's pins file.
1425
    * The default pins can be found in your board's pins file.
1413
    */
1426
    */
1414
   //#define X_CS_PIN          -1
1427
   //#define X_CS_PIN          -1
1427
 
1440
 
1428
   /**
1441
   /**
1429
    * Use software SPI for TMC2130.
1442
    * Use software SPI for TMC2130.
1443
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1430
    * The default SW SPI pins are defined the respective pins files,
1444
    * The default SW SPI pins are defined the respective pins files,
1431
    * but you can override or define them here.
1445
    * but you can override or define them here.
1432
    */
1446
    */
1444
   //#define SOFTWARE_DRIVER_ENABLE
1458
   //#define SOFTWARE_DRIVER_ENABLE
1445
 
1459
 
1446
   /**
1460
   /**
1461
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1447
    * Use Trinamic's ultra quiet stepping mode.
1462
    * Use Trinamic's ultra quiet stepping mode.
1448
    * When disabled, Marlin will use spreadCycle stepping mode.
1463
    * When disabled, Marlin will use spreadCycle stepping mode.
1449
    */
1464
    */
1468
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1483
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1469
 
1484
 
1470
   /**
1485
   /**
1471
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1486
+   * Monitor Trinamic drivers for error conditions,
1472
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1487
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1473
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1488
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1474
    * Other detected conditions can be used to stop the current print.
1489
    * Other detected conditions can be used to stop the current print.
1487
   #endif
1502
   #endif
1488
 
1503
 
1489
   /**
1504
   /**
1505
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1490
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1506
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1491
    * This mode allows for faster movements at the expense of higher noise levels.
1507
    * This mode allows for faster movements at the expense of higher noise levels.
1492
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1508
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1509
   #define E5_HYBRID_THRESHOLD     30
1525
   #define E5_HYBRID_THRESHOLD     30
1510
 
1526
 
1511
   /**
1527
   /**
1528
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1512
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1529
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1513
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1530
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1514
    * X, Y, and Z homing will always be done in spreadCycle mode.
1531
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/Cartesio/Configuration.h 查看文件

622
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
622
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
623
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
623
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
624
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
624
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
625
- *          TMC5130, TMC5130_STANDALONE
626
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
625
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
626
+ *          TMC5160, TMC5160_STANDALONE
627
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
627
  */
628
  */
628
 //#define X_DRIVER_TYPE  A4988
629
 //#define X_DRIVER_TYPE  A4988
629
 //#define Y_DRIVER_TYPE  A4988
630
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/Cartesio/Configuration_adv.h 查看文件

1322
 // @section tmc_smart
1322
 // @section tmc_smart
1323
 
1323
 
1324
 /**
1324
 /**
1325
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1326
- * the hardware SPI interface on your board and define the required CS pins
1327
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1325
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1326
+ * connect your SPI pins to the hardware SPI interface on your board and define
1327
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1328
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1328
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  *
1330
  *
1330
- * To use TMC2208 stepper UART-configurable stepper drivers
1331
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1332
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1333
- * to PDN_UART without a resistor.
1331
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1332
+ * to the driver side PDN_UART pin with a 1K resistor.
1333
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1334
+ * a resistor.
1334
  * The drivers can also be used with hardware serial.
1335
  * The drivers can also be used with hardware serial.
1335
  *
1336
  *
1336
- * TMCStepper library is required for connected TMC stepper drivers.
1337
+ * TMCStepper library is required to use TMC stepper drivers.
1337
  * https://github.com/teemuatlut/TMCStepper
1338
  * https://github.com/teemuatlut/TMCStepper
1338
  */
1339
  */
1339
 #if HAS_TRINAMIC
1340
 #if HAS_TRINAMIC
1340
 
1341
 
1341
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1344
 
1344
 
1345
   #if AXIS_IS_TMC(X)
1345
   #if AXIS_IS_TMC(X)
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1347
     #define X_MICROSTEPS   16  // 0..256
1347
     #define X_MICROSTEPS   16  // 0..256
1348
+    #define X_RSENSE     0.11
1348
   #endif
1349
   #endif
1349
 
1350
 
1350
   #if AXIS_IS_TMC(X2)
1351
   #if AXIS_IS_TMC(X2)
1351
     #define X2_CURRENT    800
1352
     #define X2_CURRENT    800
1352
     #define X2_MICROSTEPS  16
1353
     #define X2_MICROSTEPS  16
1354
+    #define X2_RSENSE    0.11
1353
   #endif
1355
   #endif
1354
 
1356
 
1355
   #if AXIS_IS_TMC(Y)
1357
   #if AXIS_IS_TMC(Y)
1356
     #define Y_CURRENT     800
1358
     #define Y_CURRENT     800
1357
     #define Y_MICROSTEPS   16
1359
     #define Y_MICROSTEPS   16
1360
+    #define Y_RSENSE     0.11
1358
   #endif
1361
   #endif
1359
 
1362
 
1360
   #if AXIS_IS_TMC(Y2)
1363
   #if AXIS_IS_TMC(Y2)
1361
     #define Y2_CURRENT    800
1364
     #define Y2_CURRENT    800
1362
     #define Y2_MICROSTEPS  16
1365
     #define Y2_MICROSTEPS  16
1366
+    #define Y2_RSENSE    0.11
1363
   #endif
1367
   #endif
1364
 
1368
 
1365
   #if AXIS_IS_TMC(Z)
1369
   #if AXIS_IS_TMC(Z)
1366
     #define Z_CURRENT     800
1370
     #define Z_CURRENT     800
1367
     #define Z_MICROSTEPS   16
1371
     #define Z_MICROSTEPS   16
1372
+    #define Z_RSENSE     0.11
1368
   #endif
1373
   #endif
1369
 
1374
 
1370
   #if AXIS_IS_TMC(Z2)
1375
   #if AXIS_IS_TMC(Z2)
1371
     #define Z2_CURRENT    800
1376
     #define Z2_CURRENT    800
1372
     #define Z2_MICROSTEPS  16
1377
     #define Z2_MICROSTEPS  16
1378
+    #define Z2_RSENSE    0.11
1373
   #endif
1379
   #endif
1374
 
1380
 
1375
   #if AXIS_IS_TMC(Z3)
1381
   #if AXIS_IS_TMC(Z3)
1376
     #define Z3_CURRENT    800
1382
     #define Z3_CURRENT    800
1377
     #define Z3_MICROSTEPS  16
1383
     #define Z3_MICROSTEPS  16
1384
+    #define Z3_RSENSE    0.11
1378
   #endif
1385
   #endif
1379
 
1386
 
1380
   #if AXIS_IS_TMC(E0)
1387
   #if AXIS_IS_TMC(E0)
1381
     #define E0_CURRENT    800
1388
     #define E0_CURRENT    800
1382
     #define E0_MICROSTEPS  16
1389
     #define E0_MICROSTEPS  16
1390
+    #define E0_RSENSE    0.11
1383
   #endif
1391
   #endif
1384
 
1392
 
1385
   #if AXIS_IS_TMC(E1)
1393
   #if AXIS_IS_TMC(E1)
1386
     #define E1_CURRENT    800
1394
     #define E1_CURRENT    800
1387
     #define E1_MICROSTEPS  16
1395
     #define E1_MICROSTEPS  16
1396
+    #define E1_RSENSE    0.11
1388
   #endif
1397
   #endif
1389
 
1398
 
1390
   #if AXIS_IS_TMC(E2)
1399
   #if AXIS_IS_TMC(E2)
1391
     #define E2_CURRENT    800
1400
     #define E2_CURRENT    800
1392
     #define E2_MICROSTEPS  16
1401
     #define E2_MICROSTEPS  16
1402
+    #define E2_RSENSE    0.11
1393
   #endif
1403
   #endif
1394
 
1404
 
1395
   #if AXIS_IS_TMC(E3)
1405
   #if AXIS_IS_TMC(E3)
1396
     #define E3_CURRENT    800
1406
     #define E3_CURRENT    800
1397
     #define E3_MICROSTEPS  16
1407
     #define E3_MICROSTEPS  16
1408
+    #define E3_RSENSE    0.11
1398
   #endif
1409
   #endif
1399
 
1410
 
1400
   #if AXIS_IS_TMC(E4)
1411
   #if AXIS_IS_TMC(E4)
1401
     #define E4_CURRENT    800
1412
     #define E4_CURRENT    800
1402
     #define E4_MICROSTEPS  16
1413
     #define E4_MICROSTEPS  16
1414
+    #define E4_RSENSE    0.11
1403
   #endif
1415
   #endif
1404
 
1416
 
1405
   #if AXIS_IS_TMC(E5)
1417
   #if AXIS_IS_TMC(E5)
1406
     #define E5_CURRENT    800
1418
     #define E5_CURRENT    800
1407
     #define E5_MICROSTEPS  16
1419
     #define E5_MICROSTEPS  16
1420
+    #define E5_RSENSE    0.11
1408
   #endif
1421
   #endif
1409
 
1422
 
1410
   /**
1423
   /**
1411
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1424
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1412
    * The default pins can be found in your board's pins file.
1425
    * The default pins can be found in your board's pins file.
1413
    */
1426
    */
1414
   //#define X_CS_PIN          -1
1427
   //#define X_CS_PIN          -1
1427
 
1440
 
1428
   /**
1441
   /**
1429
    * Use software SPI for TMC2130.
1442
    * Use software SPI for TMC2130.
1443
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1430
    * The default SW SPI pins are defined the respective pins files,
1444
    * The default SW SPI pins are defined the respective pins files,
1431
    * but you can override or define them here.
1445
    * but you can override or define them here.
1432
    */
1446
    */
1444
   //#define SOFTWARE_DRIVER_ENABLE
1458
   //#define SOFTWARE_DRIVER_ENABLE
1445
 
1459
 
1446
   /**
1460
   /**
1461
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1447
    * Use Trinamic's ultra quiet stepping mode.
1462
    * Use Trinamic's ultra quiet stepping mode.
1448
    * When disabled, Marlin will use spreadCycle stepping mode.
1463
    * When disabled, Marlin will use spreadCycle stepping mode.
1449
    */
1464
    */
1468
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1483
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1469
 
1484
 
1470
   /**
1485
   /**
1471
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1486
+   * Monitor Trinamic drivers for error conditions,
1472
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1487
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1473
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1488
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1474
    * Other detected conditions can be used to stop the current print.
1489
    * Other detected conditions can be used to stop the current print.
1487
   #endif
1502
   #endif
1488
 
1503
 
1489
   /**
1504
   /**
1505
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1490
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1506
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1491
    * This mode allows for faster movements at the expense of higher noise levels.
1507
    * This mode allows for faster movements at the expense of higher noise levels.
1492
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1508
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1509
   #define E5_HYBRID_THRESHOLD     30
1525
   #define E5_HYBRID_THRESHOLD     30
1510
 
1526
 
1511
   /**
1527
   /**
1528
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1512
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1529
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1513
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1530
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1514
    * X, Y, and Z homing will always be done in spreadCycle mode.
1531
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/Creality/CR-10/Configuration.h 查看文件

633
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
633
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
634
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
634
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
635
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
635
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
636
- *          TMC5130, TMC5130_STANDALONE
637
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
636
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
637
+ *          TMC5160, TMC5160_STANDALONE
638
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
638
  */
639
  */
639
 //#define X_DRIVER_TYPE  A4988
640
 //#define X_DRIVER_TYPE  A4988
640
 //#define Y_DRIVER_TYPE  A4988
641
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h 查看文件

1322
 // @section tmc_smart
1322
 // @section tmc_smart
1323
 
1323
 
1324
 /**
1324
 /**
1325
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1326
- * the hardware SPI interface on your board and define the required CS pins
1327
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1325
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1326
+ * connect your SPI pins to the hardware SPI interface on your board and define
1327
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1328
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1328
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  *
1330
  *
1330
- * To use TMC2208 stepper UART-configurable stepper drivers
1331
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1332
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1333
- * to PDN_UART without a resistor.
1331
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1332
+ * to the driver side PDN_UART pin with a 1K resistor.
1333
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1334
+ * a resistor.
1334
  * The drivers can also be used with hardware serial.
1335
  * The drivers can also be used with hardware serial.
1335
  *
1336
  *
1336
- * TMCStepper library is required for connected TMC stepper drivers.
1337
+ * TMCStepper library is required to use TMC stepper drivers.
1337
  * https://github.com/teemuatlut/TMCStepper
1338
  * https://github.com/teemuatlut/TMCStepper
1338
  */
1339
  */
1339
 #if HAS_TRINAMIC
1340
 #if HAS_TRINAMIC
1340
 
1341
 
1341
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1344
 
1344
 
1345
   #if AXIS_IS_TMC(X)
1345
   #if AXIS_IS_TMC(X)
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1347
     #define X_MICROSTEPS   16  // 0..256
1347
     #define X_MICROSTEPS   16  // 0..256
1348
+    #define X_RSENSE     0.11
1348
   #endif
1349
   #endif
1349
 
1350
 
1350
   #if AXIS_IS_TMC(X2)
1351
   #if AXIS_IS_TMC(X2)
1351
     #define X2_CURRENT    800
1352
     #define X2_CURRENT    800
1352
     #define X2_MICROSTEPS  16
1353
     #define X2_MICROSTEPS  16
1354
+    #define X2_RSENSE    0.11
1353
   #endif
1355
   #endif
1354
 
1356
 
1355
   #if AXIS_IS_TMC(Y)
1357
   #if AXIS_IS_TMC(Y)
1356
     #define Y_CURRENT     800
1358
     #define Y_CURRENT     800
1357
     #define Y_MICROSTEPS   16
1359
     #define Y_MICROSTEPS   16
1360
+    #define Y_RSENSE     0.11
1358
   #endif
1361
   #endif
1359
 
1362
 
1360
   #if AXIS_IS_TMC(Y2)
1363
   #if AXIS_IS_TMC(Y2)
1361
     #define Y2_CURRENT    800
1364
     #define Y2_CURRENT    800
1362
     #define Y2_MICROSTEPS  16
1365
     #define Y2_MICROSTEPS  16
1366
+    #define Y2_RSENSE    0.11
1363
   #endif
1367
   #endif
1364
 
1368
 
1365
   #if AXIS_IS_TMC(Z)
1369
   #if AXIS_IS_TMC(Z)
1366
     #define Z_CURRENT     800
1370
     #define Z_CURRENT     800
1367
     #define Z_MICROSTEPS   16
1371
     #define Z_MICROSTEPS   16
1372
+    #define Z_RSENSE     0.11
1368
   #endif
1373
   #endif
1369
 
1374
 
1370
   #if AXIS_IS_TMC(Z2)
1375
   #if AXIS_IS_TMC(Z2)
1371
     #define Z2_CURRENT    800
1376
     #define Z2_CURRENT    800
1372
     #define Z2_MICROSTEPS  16
1377
     #define Z2_MICROSTEPS  16
1378
+    #define Z2_RSENSE    0.11
1373
   #endif
1379
   #endif
1374
 
1380
 
1375
   #if AXIS_IS_TMC(Z3)
1381
   #if AXIS_IS_TMC(Z3)
1376
     #define Z3_CURRENT    800
1382
     #define Z3_CURRENT    800
1377
     #define Z3_MICROSTEPS  16
1383
     #define Z3_MICROSTEPS  16
1384
+    #define Z3_RSENSE    0.11
1378
   #endif
1385
   #endif
1379
 
1386
 
1380
   #if AXIS_IS_TMC(E0)
1387
   #if AXIS_IS_TMC(E0)
1381
     #define E0_CURRENT    800
1388
     #define E0_CURRENT    800
1382
     #define E0_MICROSTEPS  16
1389
     #define E0_MICROSTEPS  16
1390
+    #define E0_RSENSE    0.11
1383
   #endif
1391
   #endif
1384
 
1392
 
1385
   #if AXIS_IS_TMC(E1)
1393
   #if AXIS_IS_TMC(E1)
1386
     #define E1_CURRENT    800
1394
     #define E1_CURRENT    800
1387
     #define E1_MICROSTEPS  16
1395
     #define E1_MICROSTEPS  16
1396
+    #define E1_RSENSE    0.11
1388
   #endif
1397
   #endif
1389
 
1398
 
1390
   #if AXIS_IS_TMC(E2)
1399
   #if AXIS_IS_TMC(E2)
1391
     #define E2_CURRENT    800
1400
     #define E2_CURRENT    800
1392
     #define E2_MICROSTEPS  16
1401
     #define E2_MICROSTEPS  16
1402
+    #define E2_RSENSE    0.11
1393
   #endif
1403
   #endif
1394
 
1404
 
1395
   #if AXIS_IS_TMC(E3)
1405
   #if AXIS_IS_TMC(E3)
1396
     #define E3_CURRENT    800
1406
     #define E3_CURRENT    800
1397
     #define E3_MICROSTEPS  16
1407
     #define E3_MICROSTEPS  16
1408
+    #define E3_RSENSE    0.11
1398
   #endif
1409
   #endif
1399
 
1410
 
1400
   #if AXIS_IS_TMC(E4)
1411
   #if AXIS_IS_TMC(E4)
1401
     #define E4_CURRENT    800
1412
     #define E4_CURRENT    800
1402
     #define E4_MICROSTEPS  16
1413
     #define E4_MICROSTEPS  16
1414
+    #define E4_RSENSE    0.11
1403
   #endif
1415
   #endif
1404
 
1416
 
1405
   #if AXIS_IS_TMC(E5)
1417
   #if AXIS_IS_TMC(E5)
1406
     #define E5_CURRENT    800
1418
     #define E5_CURRENT    800
1407
     #define E5_MICROSTEPS  16
1419
     #define E5_MICROSTEPS  16
1420
+    #define E5_RSENSE    0.11
1408
   #endif
1421
   #endif
1409
 
1422
 
1410
   /**
1423
   /**
1411
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1424
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1412
    * The default pins can be found in your board's pins file.
1425
    * The default pins can be found in your board's pins file.
1413
    */
1426
    */
1414
   //#define X_CS_PIN          -1
1427
   //#define X_CS_PIN          -1
1427
 
1440
 
1428
   /**
1441
   /**
1429
    * Use software SPI for TMC2130.
1442
    * Use software SPI for TMC2130.
1443
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1430
    * The default SW SPI pins are defined the respective pins files,
1444
    * The default SW SPI pins are defined the respective pins files,
1431
    * but you can override or define them here.
1445
    * but you can override or define them here.
1432
    */
1446
    */
1444
   //#define SOFTWARE_DRIVER_ENABLE
1458
   //#define SOFTWARE_DRIVER_ENABLE
1445
 
1459
 
1446
   /**
1460
   /**
1461
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1447
    * Use Trinamic's ultra quiet stepping mode.
1462
    * Use Trinamic's ultra quiet stepping mode.
1448
    * When disabled, Marlin will use spreadCycle stepping mode.
1463
    * When disabled, Marlin will use spreadCycle stepping mode.
1449
    */
1464
    */
1468
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1483
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1469
 
1484
 
1470
   /**
1485
   /**
1471
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1486
+   * Monitor Trinamic drivers for error conditions,
1472
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1487
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1473
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1488
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1474
    * Other detected conditions can be used to stop the current print.
1489
    * Other detected conditions can be used to stop the current print.
1487
   #endif
1502
   #endif
1488
 
1503
 
1489
   /**
1504
   /**
1505
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1490
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1506
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1491
    * This mode allows for faster movements at the expense of higher noise levels.
1507
    * This mode allows for faster movements at the expense of higher noise levels.
1492
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1508
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1509
   #define E5_HYBRID_THRESHOLD     30
1525
   #define E5_HYBRID_THRESHOLD     30
1510
 
1526
 
1511
   /**
1527
   /**
1528
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1512
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1529
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1513
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1530
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1514
    * X, Y, and Z homing will always be done in spreadCycle mode.
1531
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/Creality/CR-10S/Configuration.h 查看文件

623
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
623
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
624
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
624
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
625
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
625
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
626
- *          TMC5130, TMC5130_STANDALONE
627
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
626
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
627
+ *          TMC5160, TMC5160_STANDALONE
628
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
628
  */
629
  */
629
 //#define X_DRIVER_TYPE  A4988
630
 //#define X_DRIVER_TYPE  A4988
630
 //#define Y_DRIVER_TYPE  A4988
631
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h 查看文件

1322
 // @section tmc_smart
1322
 // @section tmc_smart
1323
 
1323
 
1324
 /**
1324
 /**
1325
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1326
- * the hardware SPI interface on your board and define the required CS pins
1327
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1325
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1326
+ * connect your SPI pins to the hardware SPI interface on your board and define
1327
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1328
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1328
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  *
1330
  *
1330
- * To use TMC2208 stepper UART-configurable stepper drivers
1331
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1332
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1333
- * to PDN_UART without a resistor.
1331
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1332
+ * to the driver side PDN_UART pin with a 1K resistor.
1333
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1334
+ * a resistor.
1334
  * The drivers can also be used with hardware serial.
1335
  * The drivers can also be used with hardware serial.
1335
  *
1336
  *
1336
- * TMCStepper library is required for connected TMC stepper drivers.
1337
+ * TMCStepper library is required to use TMC stepper drivers.
1337
  * https://github.com/teemuatlut/TMCStepper
1338
  * https://github.com/teemuatlut/TMCStepper
1338
  */
1339
  */
1339
 #if HAS_TRINAMIC
1340
 #if HAS_TRINAMIC
1340
 
1341
 
1341
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1344
 
1344
 
1345
   #if AXIS_IS_TMC(X)
1345
   #if AXIS_IS_TMC(X)
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1347
     #define X_MICROSTEPS   16  // 0..256
1347
     #define X_MICROSTEPS   16  // 0..256
1348
+    #define X_RSENSE     0.11
1348
   #endif
1349
   #endif
1349
 
1350
 
1350
   #if AXIS_IS_TMC(X2)
1351
   #if AXIS_IS_TMC(X2)
1351
     #define X2_CURRENT    800
1352
     #define X2_CURRENT    800
1352
     #define X2_MICROSTEPS  16
1353
     #define X2_MICROSTEPS  16
1354
+    #define X2_RSENSE    0.11
1353
   #endif
1355
   #endif
1354
 
1356
 
1355
   #if AXIS_IS_TMC(Y)
1357
   #if AXIS_IS_TMC(Y)
1356
     #define Y_CURRENT     800
1358
     #define Y_CURRENT     800
1357
     #define Y_MICROSTEPS   16
1359
     #define Y_MICROSTEPS   16
1360
+    #define Y_RSENSE     0.11
1358
   #endif
1361
   #endif
1359
 
1362
 
1360
   #if AXIS_IS_TMC(Y2)
1363
   #if AXIS_IS_TMC(Y2)
1361
     #define Y2_CURRENT    800
1364
     #define Y2_CURRENT    800
1362
     #define Y2_MICROSTEPS  16
1365
     #define Y2_MICROSTEPS  16
1366
+    #define Y2_RSENSE    0.11
1363
   #endif
1367
   #endif
1364
 
1368
 
1365
   #if AXIS_IS_TMC(Z)
1369
   #if AXIS_IS_TMC(Z)
1366
     #define Z_CURRENT     800
1370
     #define Z_CURRENT     800
1367
     #define Z_MICROSTEPS   16
1371
     #define Z_MICROSTEPS   16
1372
+    #define Z_RSENSE     0.11
1368
   #endif
1373
   #endif
1369
 
1374
 
1370
   #if AXIS_IS_TMC(Z2)
1375
   #if AXIS_IS_TMC(Z2)
1371
     #define Z2_CURRENT    800
1376
     #define Z2_CURRENT    800
1372
     #define Z2_MICROSTEPS  16
1377
     #define Z2_MICROSTEPS  16
1378
+    #define Z2_RSENSE    0.11
1373
   #endif
1379
   #endif
1374
 
1380
 
1375
   #if AXIS_IS_TMC(Z3)
1381
   #if AXIS_IS_TMC(Z3)
1376
     #define Z3_CURRENT    800
1382
     #define Z3_CURRENT    800
1377
     #define Z3_MICROSTEPS  16
1383
     #define Z3_MICROSTEPS  16
1384
+    #define Z3_RSENSE    0.11
1378
   #endif
1385
   #endif
1379
 
1386
 
1380
   #if AXIS_IS_TMC(E0)
1387
   #if AXIS_IS_TMC(E0)
1381
     #define E0_CURRENT    800
1388
     #define E0_CURRENT    800
1382
     #define E0_MICROSTEPS  16
1389
     #define E0_MICROSTEPS  16
1390
+    #define E0_RSENSE    0.11
1383
   #endif
1391
   #endif
1384
 
1392
 
1385
   #if AXIS_IS_TMC(E1)
1393
   #if AXIS_IS_TMC(E1)
1386
     #define E1_CURRENT    800
1394
     #define E1_CURRENT    800
1387
     #define E1_MICROSTEPS  16
1395
     #define E1_MICROSTEPS  16
1396
+    #define E1_RSENSE    0.11
1388
   #endif
1397
   #endif
1389
 
1398
 
1390
   #if AXIS_IS_TMC(E2)
1399
   #if AXIS_IS_TMC(E2)
1391
     #define E2_CURRENT    800
1400
     #define E2_CURRENT    800
1392
     #define E2_MICROSTEPS  16
1401
     #define E2_MICROSTEPS  16
1402
+    #define E2_RSENSE    0.11
1393
   #endif
1403
   #endif
1394
 
1404
 
1395
   #if AXIS_IS_TMC(E3)
1405
   #if AXIS_IS_TMC(E3)
1396
     #define E3_CURRENT    800
1406
     #define E3_CURRENT    800
1397
     #define E3_MICROSTEPS  16
1407
     #define E3_MICROSTEPS  16
1408
+    #define E3_RSENSE    0.11
1398
   #endif
1409
   #endif
1399
 
1410
 
1400
   #if AXIS_IS_TMC(E4)
1411
   #if AXIS_IS_TMC(E4)
1401
     #define E4_CURRENT    800
1412
     #define E4_CURRENT    800
1402
     #define E4_MICROSTEPS  16
1413
     #define E4_MICROSTEPS  16
1414
+    #define E4_RSENSE    0.11
1403
   #endif
1415
   #endif
1404
 
1416
 
1405
   #if AXIS_IS_TMC(E5)
1417
   #if AXIS_IS_TMC(E5)
1406
     #define E5_CURRENT    800
1418
     #define E5_CURRENT    800
1407
     #define E5_MICROSTEPS  16
1419
     #define E5_MICROSTEPS  16
1420
+    #define E5_RSENSE    0.11
1408
   #endif
1421
   #endif
1409
 
1422
 
1410
   /**
1423
   /**
1411
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1424
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1412
    * The default pins can be found in your board's pins file.
1425
    * The default pins can be found in your board's pins file.
1413
    */
1426
    */
1414
   //#define X_CS_PIN          -1
1427
   //#define X_CS_PIN          -1
1427
 
1440
 
1428
   /**
1441
   /**
1429
    * Use software SPI for TMC2130.
1442
    * Use software SPI for TMC2130.
1443
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1430
    * The default SW SPI pins are defined the respective pins files,
1444
    * The default SW SPI pins are defined the respective pins files,
1431
    * but you can override or define them here.
1445
    * but you can override or define them here.
1432
    */
1446
    */
1444
   //#define SOFTWARE_DRIVER_ENABLE
1458
   //#define SOFTWARE_DRIVER_ENABLE
1445
 
1459
 
1446
   /**
1460
   /**
1461
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1447
    * Use Trinamic's ultra quiet stepping mode.
1462
    * Use Trinamic's ultra quiet stepping mode.
1448
    * When disabled, Marlin will use spreadCycle stepping mode.
1463
    * When disabled, Marlin will use spreadCycle stepping mode.
1449
    */
1464
    */
1468
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1483
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1469
 
1484
 
1470
   /**
1485
   /**
1471
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1486
+   * Monitor Trinamic drivers for error conditions,
1472
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1487
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1473
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1488
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1474
    * Other detected conditions can be used to stop the current print.
1489
    * Other detected conditions can be used to stop the current print.
1487
   #endif
1502
   #endif
1488
 
1503
 
1489
   /**
1504
   /**
1505
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1490
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1506
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1491
    * This mode allows for faster movements at the expense of higher noise levels.
1507
    * This mode allows for faster movements at the expense of higher noise levels.
1492
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1508
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1509
   #define E5_HYBRID_THRESHOLD     30
1525
   #define E5_HYBRID_THRESHOLD     30
1510
 
1526
 
1511
   /**
1527
   /**
1528
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1512
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1529
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1513
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1530
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1514
    * X, Y, and Z homing will always be done in spreadCycle mode.
1531
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/Creality/CR-10mini/Configuration.h 查看文件

642
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
642
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
643
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
643
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
644
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
644
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
645
- *          TMC5130, TMC5130_STANDALONE
646
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
645
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
646
+ *          TMC5160, TMC5160_STANDALONE
647
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
647
  */
648
  */
648
 //#define X_DRIVER_TYPE  A4988
649
 //#define X_DRIVER_TYPE  A4988
649
 //#define Y_DRIVER_TYPE  A4988
650
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h 查看文件

1322
 // @section tmc_smart
1322
 // @section tmc_smart
1323
 
1323
 
1324
 /**
1324
 /**
1325
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1326
- * the hardware SPI interface on your board and define the required CS pins
1327
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1325
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1326
+ * connect your SPI pins to the hardware SPI interface on your board and define
1327
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1328
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1328
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  *
1330
  *
1330
- * To use TMC2208 stepper UART-configurable stepper drivers
1331
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1332
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1333
- * to PDN_UART without a resistor.
1331
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1332
+ * to the driver side PDN_UART pin with a 1K resistor.
1333
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1334
+ * a resistor.
1334
  * The drivers can also be used with hardware serial.
1335
  * The drivers can also be used with hardware serial.
1335
  *
1336
  *
1336
- * TMCStepper library is required for connected TMC stepper drivers.
1337
+ * TMCStepper library is required to use TMC stepper drivers.
1337
  * https://github.com/teemuatlut/TMCStepper
1338
  * https://github.com/teemuatlut/TMCStepper
1338
  */
1339
  */
1339
 #if HAS_TRINAMIC
1340
 #if HAS_TRINAMIC
1340
 
1341
 
1341
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1344
 
1344
 
1345
   #if AXIS_IS_TMC(X)
1345
   #if AXIS_IS_TMC(X)
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1347
     #define X_MICROSTEPS   16  // 0..256
1347
     #define X_MICROSTEPS   16  // 0..256
1348
+    #define X_RSENSE     0.11
1348
   #endif
1349
   #endif
1349
 
1350
 
1350
   #if AXIS_IS_TMC(X2)
1351
   #if AXIS_IS_TMC(X2)
1351
     #define X2_CURRENT    800
1352
     #define X2_CURRENT    800
1352
     #define X2_MICROSTEPS  16
1353
     #define X2_MICROSTEPS  16
1354
+    #define X2_RSENSE    0.11
1353
   #endif
1355
   #endif
1354
 
1356
 
1355
   #if AXIS_IS_TMC(Y)
1357
   #if AXIS_IS_TMC(Y)
1356
     #define Y_CURRENT     800
1358
     #define Y_CURRENT     800
1357
     #define Y_MICROSTEPS   16
1359
     #define Y_MICROSTEPS   16
1360
+    #define Y_RSENSE     0.11
1358
   #endif
1361
   #endif
1359
 
1362
 
1360
   #if AXIS_IS_TMC(Y2)
1363
   #if AXIS_IS_TMC(Y2)
1361
     #define Y2_CURRENT    800
1364
     #define Y2_CURRENT    800
1362
     #define Y2_MICROSTEPS  16
1365
     #define Y2_MICROSTEPS  16
1366
+    #define Y2_RSENSE    0.11
1363
   #endif
1367
   #endif
1364
 
1368
 
1365
   #if AXIS_IS_TMC(Z)
1369
   #if AXIS_IS_TMC(Z)
1366
     #define Z_CURRENT     800
1370
     #define Z_CURRENT     800
1367
     #define Z_MICROSTEPS   16
1371
     #define Z_MICROSTEPS   16
1372
+    #define Z_RSENSE     0.11
1368
   #endif
1373
   #endif
1369
 
1374
 
1370
   #if AXIS_IS_TMC(Z2)
1375
   #if AXIS_IS_TMC(Z2)
1371
     #define Z2_CURRENT    800
1376
     #define Z2_CURRENT    800
1372
     #define Z2_MICROSTEPS  16
1377
     #define Z2_MICROSTEPS  16
1378
+    #define Z2_RSENSE    0.11
1373
   #endif
1379
   #endif
1374
 
1380
 
1375
   #if AXIS_IS_TMC(Z3)
1381
   #if AXIS_IS_TMC(Z3)
1376
     #define Z3_CURRENT    800
1382
     #define Z3_CURRENT    800
1377
     #define Z3_MICROSTEPS  16
1383
     #define Z3_MICROSTEPS  16
1384
+    #define Z3_RSENSE    0.11
1378
   #endif
1385
   #endif
1379
 
1386
 
1380
   #if AXIS_IS_TMC(E0)
1387
   #if AXIS_IS_TMC(E0)
1381
     #define E0_CURRENT    800
1388
     #define E0_CURRENT    800
1382
     #define E0_MICROSTEPS  16
1389
     #define E0_MICROSTEPS  16
1390
+    #define E0_RSENSE    0.11
1383
   #endif
1391
   #endif
1384
 
1392
 
1385
   #if AXIS_IS_TMC(E1)
1393
   #if AXIS_IS_TMC(E1)
1386
     #define E1_CURRENT    800
1394
     #define E1_CURRENT    800
1387
     #define E1_MICROSTEPS  16
1395
     #define E1_MICROSTEPS  16
1396
+    #define E1_RSENSE    0.11
1388
   #endif
1397
   #endif
1389
 
1398
 
1390
   #if AXIS_IS_TMC(E2)
1399
   #if AXIS_IS_TMC(E2)
1391
     #define E2_CURRENT    800
1400
     #define E2_CURRENT    800
1392
     #define E2_MICROSTEPS  16
1401
     #define E2_MICROSTEPS  16
1402
+    #define E2_RSENSE    0.11
1393
   #endif
1403
   #endif
1394
 
1404
 
1395
   #if AXIS_IS_TMC(E3)
1405
   #if AXIS_IS_TMC(E3)
1396
     #define E3_CURRENT    800
1406
     #define E3_CURRENT    800
1397
     #define E3_MICROSTEPS  16
1407
     #define E3_MICROSTEPS  16
1408
+    #define E3_RSENSE    0.11
1398
   #endif
1409
   #endif
1399
 
1410
 
1400
   #if AXIS_IS_TMC(E4)
1411
   #if AXIS_IS_TMC(E4)
1401
     #define E4_CURRENT    800
1412
     #define E4_CURRENT    800
1402
     #define E4_MICROSTEPS  16
1413
     #define E4_MICROSTEPS  16
1414
+    #define E4_RSENSE    0.11
1403
   #endif
1415
   #endif
1404
 
1416
 
1405
   #if AXIS_IS_TMC(E5)
1417
   #if AXIS_IS_TMC(E5)
1406
     #define E5_CURRENT    800
1418
     #define E5_CURRENT    800
1407
     #define E5_MICROSTEPS  16
1419
     #define E5_MICROSTEPS  16
1420
+    #define E5_RSENSE    0.11
1408
   #endif
1421
   #endif
1409
 
1422
 
1410
   /**
1423
   /**
1411
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1424
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1412
    * The default pins can be found in your board's pins file.
1425
    * The default pins can be found in your board's pins file.
1413
    */
1426
    */
1414
   //#define X_CS_PIN          -1
1427
   //#define X_CS_PIN          -1
1427
 
1440
 
1428
   /**
1441
   /**
1429
    * Use software SPI for TMC2130.
1442
    * Use software SPI for TMC2130.
1443
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1430
    * The default SW SPI pins are defined the respective pins files,
1444
    * The default SW SPI pins are defined the respective pins files,
1431
    * but you can override or define them here.
1445
    * but you can override or define them here.
1432
    */
1446
    */
1444
   //#define SOFTWARE_DRIVER_ENABLE
1458
   //#define SOFTWARE_DRIVER_ENABLE
1445
 
1459
 
1446
   /**
1460
   /**
1461
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1447
    * Use Trinamic's ultra quiet stepping mode.
1462
    * Use Trinamic's ultra quiet stepping mode.
1448
    * When disabled, Marlin will use spreadCycle stepping mode.
1463
    * When disabled, Marlin will use spreadCycle stepping mode.
1449
    */
1464
    */
1468
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1483
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1469
 
1484
 
1470
   /**
1485
   /**
1471
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1486
+   * Monitor Trinamic drivers for error conditions,
1472
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1487
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1473
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1488
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1474
    * Other detected conditions can be used to stop the current print.
1489
    * Other detected conditions can be used to stop the current print.
1487
   #endif
1502
   #endif
1488
 
1503
 
1489
   /**
1504
   /**
1505
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1490
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1506
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1491
    * This mode allows for faster movements at the expense of higher noise levels.
1507
    * This mode allows for faster movements at the expense of higher noise levels.
1492
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1508
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1509
   #define E5_HYBRID_THRESHOLD     30
1525
   #define E5_HYBRID_THRESHOLD     30
1510
 
1526
 
1511
   /**
1527
   /**
1528
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1512
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1529
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1513
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1530
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1514
    * X, Y, and Z homing will always be done in spreadCycle mode.
1531
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/Creality/CR-8/Configuration.h 查看文件

633
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
633
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
634
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
634
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
635
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
635
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
636
- *          TMC5130, TMC5130_STANDALONE
637
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
636
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
637
+ *          TMC5160, TMC5160_STANDALONE
638
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
638
  */
639
  */
639
 //#define X_DRIVER_TYPE  A4988
640
 //#define X_DRIVER_TYPE  A4988
640
 //#define Y_DRIVER_TYPE  A4988
641
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h 查看文件

1322
 // @section tmc_smart
1322
 // @section tmc_smart
1323
 
1323
 
1324
 /**
1324
 /**
1325
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1326
- * the hardware SPI interface on your board and define the required CS pins
1327
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1325
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1326
+ * connect your SPI pins to the hardware SPI interface on your board and define
1327
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1328
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1328
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  *
1330
  *
1330
- * To use TMC2208 stepper UART-configurable stepper drivers
1331
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1332
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1333
- * to PDN_UART without a resistor.
1331
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1332
+ * to the driver side PDN_UART pin with a 1K resistor.
1333
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1334
+ * a resistor.
1334
  * The drivers can also be used with hardware serial.
1335
  * The drivers can also be used with hardware serial.
1335
  *
1336
  *
1336
- * TMCStepper library is required for connected TMC stepper drivers.
1337
+ * TMCStepper library is required to use TMC stepper drivers.
1337
  * https://github.com/teemuatlut/TMCStepper
1338
  * https://github.com/teemuatlut/TMCStepper
1338
  */
1339
  */
1339
 #if HAS_TRINAMIC
1340
 #if HAS_TRINAMIC
1340
 
1341
 
1341
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1344
 
1344
 
1345
   #if AXIS_IS_TMC(X)
1345
   #if AXIS_IS_TMC(X)
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1347
     #define X_MICROSTEPS   16  // 0..256
1347
     #define X_MICROSTEPS   16  // 0..256
1348
+    #define X_RSENSE     0.11
1348
   #endif
1349
   #endif
1349
 
1350
 
1350
   #if AXIS_IS_TMC(X2)
1351
   #if AXIS_IS_TMC(X2)
1351
     #define X2_CURRENT    800
1352
     #define X2_CURRENT    800
1352
     #define X2_MICROSTEPS  16
1353
     #define X2_MICROSTEPS  16
1354
+    #define X2_RSENSE    0.11
1353
   #endif
1355
   #endif
1354
 
1356
 
1355
   #if AXIS_IS_TMC(Y)
1357
   #if AXIS_IS_TMC(Y)
1356
     #define Y_CURRENT     800
1358
     #define Y_CURRENT     800
1357
     #define Y_MICROSTEPS   16
1359
     #define Y_MICROSTEPS   16
1360
+    #define Y_RSENSE     0.11
1358
   #endif
1361
   #endif
1359
 
1362
 
1360
   #if AXIS_IS_TMC(Y2)
1363
   #if AXIS_IS_TMC(Y2)
1361
     #define Y2_CURRENT    800
1364
     #define Y2_CURRENT    800
1362
     #define Y2_MICROSTEPS  16
1365
     #define Y2_MICROSTEPS  16
1366
+    #define Y2_RSENSE    0.11
1363
   #endif
1367
   #endif
1364
 
1368
 
1365
   #if AXIS_IS_TMC(Z)
1369
   #if AXIS_IS_TMC(Z)
1366
     #define Z_CURRENT     800
1370
     #define Z_CURRENT     800
1367
     #define Z_MICROSTEPS   16
1371
     #define Z_MICROSTEPS   16
1372
+    #define Z_RSENSE     0.11
1368
   #endif
1373
   #endif
1369
 
1374
 
1370
   #if AXIS_IS_TMC(Z2)
1375
   #if AXIS_IS_TMC(Z2)
1371
     #define Z2_CURRENT    800
1376
     #define Z2_CURRENT    800
1372
     #define Z2_MICROSTEPS  16
1377
     #define Z2_MICROSTEPS  16
1378
+    #define Z2_RSENSE    0.11
1373
   #endif
1379
   #endif
1374
 
1380
 
1375
   #if AXIS_IS_TMC(Z3)
1381
   #if AXIS_IS_TMC(Z3)
1376
     #define Z3_CURRENT    800
1382
     #define Z3_CURRENT    800
1377
     #define Z3_MICROSTEPS  16
1383
     #define Z3_MICROSTEPS  16
1384
+    #define Z3_RSENSE    0.11
1378
   #endif
1385
   #endif
1379
 
1386
 
1380
   #if AXIS_IS_TMC(E0)
1387
   #if AXIS_IS_TMC(E0)
1381
     #define E0_CURRENT    800
1388
     #define E0_CURRENT    800
1382
     #define E0_MICROSTEPS  16
1389
     #define E0_MICROSTEPS  16
1390
+    #define E0_RSENSE    0.11
1383
   #endif
1391
   #endif
1384
 
1392
 
1385
   #if AXIS_IS_TMC(E1)
1393
   #if AXIS_IS_TMC(E1)
1386
     #define E1_CURRENT    800
1394
     #define E1_CURRENT    800
1387
     #define E1_MICROSTEPS  16
1395
     #define E1_MICROSTEPS  16
1396
+    #define E1_RSENSE    0.11
1388
   #endif
1397
   #endif
1389
 
1398
 
1390
   #if AXIS_IS_TMC(E2)
1399
   #if AXIS_IS_TMC(E2)
1391
     #define E2_CURRENT    800
1400
     #define E2_CURRENT    800
1392
     #define E2_MICROSTEPS  16
1401
     #define E2_MICROSTEPS  16
1402
+    #define E2_RSENSE    0.11
1393
   #endif
1403
   #endif
1394
 
1404
 
1395
   #if AXIS_IS_TMC(E3)
1405
   #if AXIS_IS_TMC(E3)
1396
     #define E3_CURRENT    800
1406
     #define E3_CURRENT    800
1397
     #define E3_MICROSTEPS  16
1407
     #define E3_MICROSTEPS  16
1408
+    #define E3_RSENSE    0.11
1398
   #endif
1409
   #endif
1399
 
1410
 
1400
   #if AXIS_IS_TMC(E4)
1411
   #if AXIS_IS_TMC(E4)
1401
     #define E4_CURRENT    800
1412
     #define E4_CURRENT    800
1402
     #define E4_MICROSTEPS  16
1413
     #define E4_MICROSTEPS  16
1414
+    #define E4_RSENSE    0.11
1403
   #endif
1415
   #endif
1404
 
1416
 
1405
   #if AXIS_IS_TMC(E5)
1417
   #if AXIS_IS_TMC(E5)
1406
     #define E5_CURRENT    800
1418
     #define E5_CURRENT    800
1407
     #define E5_MICROSTEPS  16
1419
     #define E5_MICROSTEPS  16
1420
+    #define E5_RSENSE    0.11
1408
   #endif
1421
   #endif
1409
 
1422
 
1410
   /**
1423
   /**
1411
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1424
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1412
    * The default pins can be found in your board's pins file.
1425
    * The default pins can be found in your board's pins file.
1413
    */
1426
    */
1414
   //#define X_CS_PIN          -1
1427
   //#define X_CS_PIN          -1
1427
 
1440
 
1428
   /**
1441
   /**
1429
    * Use software SPI for TMC2130.
1442
    * Use software SPI for TMC2130.
1443
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1430
    * The default SW SPI pins are defined the respective pins files,
1444
    * The default SW SPI pins are defined the respective pins files,
1431
    * but you can override or define them here.
1445
    * but you can override or define them here.
1432
    */
1446
    */
1444
   //#define SOFTWARE_DRIVER_ENABLE
1458
   //#define SOFTWARE_DRIVER_ENABLE
1445
 
1459
 
1446
   /**
1460
   /**
1461
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1447
    * Use Trinamic's ultra quiet stepping mode.
1462
    * Use Trinamic's ultra quiet stepping mode.
1448
    * When disabled, Marlin will use spreadCycle stepping mode.
1463
    * When disabled, Marlin will use spreadCycle stepping mode.
1449
    */
1464
    */
1468
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1483
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1469
 
1484
 
1470
   /**
1485
   /**
1471
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1486
+   * Monitor Trinamic drivers for error conditions,
1472
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1487
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1473
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1488
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1474
    * Other detected conditions can be used to stop the current print.
1489
    * Other detected conditions can be used to stop the current print.
1487
   #endif
1502
   #endif
1488
 
1503
 
1489
   /**
1504
   /**
1505
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1490
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1506
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1491
    * This mode allows for faster movements at the expense of higher noise levels.
1507
    * This mode allows for faster movements at the expense of higher noise levels.
1492
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1508
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1509
   #define E5_HYBRID_THRESHOLD     30
1525
   #define E5_HYBRID_THRESHOLD     30
1510
 
1526
 
1511
   /**
1527
   /**
1528
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1512
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1529
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1513
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1530
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1514
    * X, Y, and Z homing will always be done in spreadCycle mode.
1531
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/Creality/Ender-2/Configuration.h 查看文件

627
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
627
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
628
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
628
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
629
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
629
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
630
- *          TMC5130, TMC5130_STANDALONE
631
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
630
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
631
+ *          TMC5160, TMC5160_STANDALONE
632
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
632
  */
633
  */
633
 //#define X_DRIVER_TYPE  A4988
634
 //#define X_DRIVER_TYPE  A4988
634
 //#define Y_DRIVER_TYPE  A4988
635
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h 查看文件

1322
 // @section tmc_smart
1322
 // @section tmc_smart
1323
 
1323
 
1324
 /**
1324
 /**
1325
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1326
- * the hardware SPI interface on your board and define the required CS pins
1327
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1325
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1326
+ * connect your SPI pins to the hardware SPI interface on your board and define
1327
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1328
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1328
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  *
1330
  *
1330
- * To use TMC2208 stepper UART-configurable stepper drivers
1331
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1332
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1333
- * to PDN_UART without a resistor.
1331
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1332
+ * to the driver side PDN_UART pin with a 1K resistor.
1333
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1334
+ * a resistor.
1334
  * The drivers can also be used with hardware serial.
1335
  * The drivers can also be used with hardware serial.
1335
  *
1336
  *
1336
- * TMCStepper library is required for connected TMC stepper drivers.
1337
+ * TMCStepper library is required to use TMC stepper drivers.
1337
  * https://github.com/teemuatlut/TMCStepper
1338
  * https://github.com/teemuatlut/TMCStepper
1338
  */
1339
  */
1339
 #if HAS_TRINAMIC
1340
 #if HAS_TRINAMIC
1340
 
1341
 
1341
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1344
 
1344
 
1345
   #if AXIS_IS_TMC(X)
1345
   #if AXIS_IS_TMC(X)
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1347
     #define X_MICROSTEPS   16  // 0..256
1347
     #define X_MICROSTEPS   16  // 0..256
1348
+    #define X_RSENSE     0.11
1348
   #endif
1349
   #endif
1349
 
1350
 
1350
   #if AXIS_IS_TMC(X2)
1351
   #if AXIS_IS_TMC(X2)
1351
     #define X2_CURRENT    800
1352
     #define X2_CURRENT    800
1352
     #define X2_MICROSTEPS  16
1353
     #define X2_MICROSTEPS  16
1354
+    #define X2_RSENSE    0.11
1353
   #endif
1355
   #endif
1354
 
1356
 
1355
   #if AXIS_IS_TMC(Y)
1357
   #if AXIS_IS_TMC(Y)
1356
     #define Y_CURRENT     800
1358
     #define Y_CURRENT     800
1357
     #define Y_MICROSTEPS   16
1359
     #define Y_MICROSTEPS   16
1360
+    #define Y_RSENSE     0.11
1358
   #endif
1361
   #endif
1359
 
1362
 
1360
   #if AXIS_IS_TMC(Y2)
1363
   #if AXIS_IS_TMC(Y2)
1361
     #define Y2_CURRENT    800
1364
     #define Y2_CURRENT    800
1362
     #define Y2_MICROSTEPS  16
1365
     #define Y2_MICROSTEPS  16
1366
+    #define Y2_RSENSE    0.11
1363
   #endif
1367
   #endif
1364
 
1368
 
1365
   #if AXIS_IS_TMC(Z)
1369
   #if AXIS_IS_TMC(Z)
1366
     #define Z_CURRENT     800
1370
     #define Z_CURRENT     800
1367
     #define Z_MICROSTEPS   16
1371
     #define Z_MICROSTEPS   16
1372
+    #define Z_RSENSE     0.11
1368
   #endif
1373
   #endif
1369
 
1374
 
1370
   #if AXIS_IS_TMC(Z2)
1375
   #if AXIS_IS_TMC(Z2)
1371
     #define Z2_CURRENT    800
1376
     #define Z2_CURRENT    800
1372
     #define Z2_MICROSTEPS  16
1377
     #define Z2_MICROSTEPS  16
1378
+    #define Z2_RSENSE    0.11
1373
   #endif
1379
   #endif
1374
 
1380
 
1375
   #if AXIS_IS_TMC(Z3)
1381
   #if AXIS_IS_TMC(Z3)
1376
     #define Z3_CURRENT    800
1382
     #define Z3_CURRENT    800
1377
     #define Z3_MICROSTEPS  16
1383
     #define Z3_MICROSTEPS  16
1384
+    #define Z3_RSENSE    0.11
1378
   #endif
1385
   #endif
1379
 
1386
 
1380
   #if AXIS_IS_TMC(E0)
1387
   #if AXIS_IS_TMC(E0)
1381
     #define E0_CURRENT    800
1388
     #define E0_CURRENT    800
1382
     #define E0_MICROSTEPS  16
1389
     #define E0_MICROSTEPS  16
1390
+    #define E0_RSENSE    0.11
1383
   #endif
1391
   #endif
1384
 
1392
 
1385
   #if AXIS_IS_TMC(E1)
1393
   #if AXIS_IS_TMC(E1)
1386
     #define E1_CURRENT    800
1394
     #define E1_CURRENT    800
1387
     #define E1_MICROSTEPS  16
1395
     #define E1_MICROSTEPS  16
1396
+    #define E1_RSENSE    0.11
1388
   #endif
1397
   #endif
1389
 
1398
 
1390
   #if AXIS_IS_TMC(E2)
1399
   #if AXIS_IS_TMC(E2)
1391
     #define E2_CURRENT    800
1400
     #define E2_CURRENT    800
1392
     #define E2_MICROSTEPS  16
1401
     #define E2_MICROSTEPS  16
1402
+    #define E2_RSENSE    0.11
1393
   #endif
1403
   #endif
1394
 
1404
 
1395
   #if AXIS_IS_TMC(E3)
1405
   #if AXIS_IS_TMC(E3)
1396
     #define E3_CURRENT    800
1406
     #define E3_CURRENT    800
1397
     #define E3_MICROSTEPS  16
1407
     #define E3_MICROSTEPS  16
1408
+    #define E3_RSENSE    0.11
1398
   #endif
1409
   #endif
1399
 
1410
 
1400
   #if AXIS_IS_TMC(E4)
1411
   #if AXIS_IS_TMC(E4)
1401
     #define E4_CURRENT    800
1412
     #define E4_CURRENT    800
1402
     #define E4_MICROSTEPS  16
1413
     #define E4_MICROSTEPS  16
1414
+    #define E4_RSENSE    0.11
1403
   #endif
1415
   #endif
1404
 
1416
 
1405
   #if AXIS_IS_TMC(E5)
1417
   #if AXIS_IS_TMC(E5)
1406
     #define E5_CURRENT    800
1418
     #define E5_CURRENT    800
1407
     #define E5_MICROSTEPS  16
1419
     #define E5_MICROSTEPS  16
1420
+    #define E5_RSENSE    0.11
1408
   #endif
1421
   #endif
1409
 
1422
 
1410
   /**
1423
   /**
1411
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1424
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1412
    * The default pins can be found in your board's pins file.
1425
    * The default pins can be found in your board's pins file.
1413
    */
1426
    */
1414
   //#define X_CS_PIN          -1
1427
   //#define X_CS_PIN          -1
1427
 
1440
 
1428
   /**
1441
   /**
1429
    * Use software SPI for TMC2130.
1442
    * Use software SPI for TMC2130.
1443
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1430
    * The default SW SPI pins are defined the respective pins files,
1444
    * The default SW SPI pins are defined the respective pins files,
1431
    * but you can override or define them here.
1445
    * but you can override or define them here.
1432
    */
1446
    */
1444
   //#define SOFTWARE_DRIVER_ENABLE
1458
   //#define SOFTWARE_DRIVER_ENABLE
1445
 
1459
 
1446
   /**
1460
   /**
1461
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1447
    * Use Trinamic's ultra quiet stepping mode.
1462
    * Use Trinamic's ultra quiet stepping mode.
1448
    * When disabled, Marlin will use spreadCycle stepping mode.
1463
    * When disabled, Marlin will use spreadCycle stepping mode.
1449
    */
1464
    */
1468
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1483
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1469
 
1484
 
1470
   /**
1485
   /**
1471
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1486
+   * Monitor Trinamic drivers for error conditions,
1472
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1487
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1473
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1488
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1474
    * Other detected conditions can be used to stop the current print.
1489
    * Other detected conditions can be used to stop the current print.
1487
   #endif
1502
   #endif
1488
 
1503
 
1489
   /**
1504
   /**
1505
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1490
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1506
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1491
    * This mode allows for faster movements at the expense of higher noise levels.
1507
    * This mode allows for faster movements at the expense of higher noise levels.
1492
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1508
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1509
   #define E5_HYBRID_THRESHOLD     30
1525
   #define E5_HYBRID_THRESHOLD     30
1510
 
1526
 
1511
   /**
1527
   /**
1528
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1512
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1529
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1513
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1530
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1514
    * X, Y, and Z homing will always be done in spreadCycle mode.
1531
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/Creality/Ender-3/Configuration.h 查看文件

627
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
627
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
628
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
628
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
629
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
629
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
630
- *          TMC5130, TMC5130_STANDALONE
631
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
630
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
631
+ *          TMC5160, TMC5160_STANDALONE
632
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
632
  */
633
  */
633
 //#define X_DRIVER_TYPE  A4988
634
 //#define X_DRIVER_TYPE  A4988
634
 //#define Y_DRIVER_TYPE  A4988
635
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h 查看文件

1322
 // @section tmc_smart
1322
 // @section tmc_smart
1323
 
1323
 
1324
 /**
1324
 /**
1325
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1326
- * the hardware SPI interface on your board and define the required CS pins
1327
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1325
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1326
+ * connect your SPI pins to the hardware SPI interface on your board and define
1327
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1328
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1328
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  *
1330
  *
1330
- * To use TMC2208 stepper UART-configurable stepper drivers
1331
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1332
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1333
- * to PDN_UART without a resistor.
1331
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1332
+ * to the driver side PDN_UART pin with a 1K resistor.
1333
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1334
+ * a resistor.
1334
  * The drivers can also be used with hardware serial.
1335
  * The drivers can also be used with hardware serial.
1335
  *
1336
  *
1336
- * TMCStepper library is required for connected TMC stepper drivers.
1337
+ * TMCStepper library is required to use TMC stepper drivers.
1337
  * https://github.com/teemuatlut/TMCStepper
1338
  * https://github.com/teemuatlut/TMCStepper
1338
  */
1339
  */
1339
 #if HAS_TRINAMIC
1340
 #if HAS_TRINAMIC
1340
 
1341
 
1341
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1344
 
1344
 
1345
   #if AXIS_IS_TMC(X)
1345
   #if AXIS_IS_TMC(X)
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1347
     #define X_MICROSTEPS   16  // 0..256
1347
     #define X_MICROSTEPS   16  // 0..256
1348
+    #define X_RSENSE     0.11
1348
   #endif
1349
   #endif
1349
 
1350
 
1350
   #if AXIS_IS_TMC(X2)
1351
   #if AXIS_IS_TMC(X2)
1351
     #define X2_CURRENT    800
1352
     #define X2_CURRENT    800
1352
     #define X2_MICROSTEPS  16
1353
     #define X2_MICROSTEPS  16
1354
+    #define X2_RSENSE    0.11
1353
   #endif
1355
   #endif
1354
 
1356
 
1355
   #if AXIS_IS_TMC(Y)
1357
   #if AXIS_IS_TMC(Y)
1356
     #define Y_CURRENT     800
1358
     #define Y_CURRENT     800
1357
     #define Y_MICROSTEPS   16
1359
     #define Y_MICROSTEPS   16
1360
+    #define Y_RSENSE     0.11
1358
   #endif
1361
   #endif
1359
 
1362
 
1360
   #if AXIS_IS_TMC(Y2)
1363
   #if AXIS_IS_TMC(Y2)
1361
     #define Y2_CURRENT    800
1364
     #define Y2_CURRENT    800
1362
     #define Y2_MICROSTEPS  16
1365
     #define Y2_MICROSTEPS  16
1366
+    #define Y2_RSENSE    0.11
1363
   #endif
1367
   #endif
1364
 
1368
 
1365
   #if AXIS_IS_TMC(Z)
1369
   #if AXIS_IS_TMC(Z)
1366
     #define Z_CURRENT     800
1370
     #define Z_CURRENT     800
1367
     #define Z_MICROSTEPS   16
1371
     #define Z_MICROSTEPS   16
1372
+    #define Z_RSENSE     0.11
1368
   #endif
1373
   #endif
1369
 
1374
 
1370
   #if AXIS_IS_TMC(Z2)
1375
   #if AXIS_IS_TMC(Z2)
1371
     #define Z2_CURRENT    800
1376
     #define Z2_CURRENT    800
1372
     #define Z2_MICROSTEPS  16
1377
     #define Z2_MICROSTEPS  16
1378
+    #define Z2_RSENSE    0.11
1373
   #endif
1379
   #endif
1374
 
1380
 
1375
   #if AXIS_IS_TMC(Z3)
1381
   #if AXIS_IS_TMC(Z3)
1376
     #define Z3_CURRENT    800
1382
     #define Z3_CURRENT    800
1377
     #define Z3_MICROSTEPS  16
1383
     #define Z3_MICROSTEPS  16
1384
+    #define Z3_RSENSE    0.11
1378
   #endif
1385
   #endif
1379
 
1386
 
1380
   #if AXIS_IS_TMC(E0)
1387
   #if AXIS_IS_TMC(E0)
1381
     #define E0_CURRENT    800
1388
     #define E0_CURRENT    800
1382
     #define E0_MICROSTEPS  16
1389
     #define E0_MICROSTEPS  16
1390
+    #define E0_RSENSE    0.11
1383
   #endif
1391
   #endif
1384
 
1392
 
1385
   #if AXIS_IS_TMC(E1)
1393
   #if AXIS_IS_TMC(E1)
1386
     #define E1_CURRENT    800
1394
     #define E1_CURRENT    800
1387
     #define E1_MICROSTEPS  16
1395
     #define E1_MICROSTEPS  16
1396
+    #define E1_RSENSE    0.11
1388
   #endif
1397
   #endif
1389
 
1398
 
1390
   #if AXIS_IS_TMC(E2)
1399
   #if AXIS_IS_TMC(E2)
1391
     #define E2_CURRENT    800
1400
     #define E2_CURRENT    800
1392
     #define E2_MICROSTEPS  16
1401
     #define E2_MICROSTEPS  16
1402
+    #define E2_RSENSE    0.11
1393
   #endif
1403
   #endif
1394
 
1404
 
1395
   #if AXIS_IS_TMC(E3)
1405
   #if AXIS_IS_TMC(E3)
1396
     #define E3_CURRENT    800
1406
     #define E3_CURRENT    800
1397
     #define E3_MICROSTEPS  16
1407
     #define E3_MICROSTEPS  16
1408
+    #define E3_RSENSE    0.11
1398
   #endif
1409
   #endif
1399
 
1410
 
1400
   #if AXIS_IS_TMC(E4)
1411
   #if AXIS_IS_TMC(E4)
1401
     #define E4_CURRENT    800
1412
     #define E4_CURRENT    800
1402
     #define E4_MICROSTEPS  16
1413
     #define E4_MICROSTEPS  16
1414
+    #define E4_RSENSE    0.11
1403
   #endif
1415
   #endif
1404
 
1416
 
1405
   #if AXIS_IS_TMC(E5)
1417
   #if AXIS_IS_TMC(E5)
1406
     #define E5_CURRENT    800
1418
     #define E5_CURRENT    800
1407
     #define E5_MICROSTEPS  16
1419
     #define E5_MICROSTEPS  16
1420
+    #define E5_RSENSE    0.11
1408
   #endif
1421
   #endif
1409
 
1422
 
1410
   /**
1423
   /**
1411
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1424
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1412
    * The default pins can be found in your board's pins file.
1425
    * The default pins can be found in your board's pins file.
1413
    */
1426
    */
1414
   //#define X_CS_PIN          -1
1427
   //#define X_CS_PIN          -1
1427
 
1440
 
1428
   /**
1441
   /**
1429
    * Use software SPI for TMC2130.
1442
    * Use software SPI for TMC2130.
1443
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1430
    * The default SW SPI pins are defined the respective pins files,
1444
    * The default SW SPI pins are defined the respective pins files,
1431
    * but you can override or define them here.
1445
    * but you can override or define them here.
1432
    */
1446
    */
1444
   //#define SOFTWARE_DRIVER_ENABLE
1458
   //#define SOFTWARE_DRIVER_ENABLE
1445
 
1459
 
1446
   /**
1460
   /**
1461
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1447
    * Use Trinamic's ultra quiet stepping mode.
1462
    * Use Trinamic's ultra quiet stepping mode.
1448
    * When disabled, Marlin will use spreadCycle stepping mode.
1463
    * When disabled, Marlin will use spreadCycle stepping mode.
1449
    */
1464
    */
1468
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1483
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1469
 
1484
 
1470
   /**
1485
   /**
1471
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1486
+   * Monitor Trinamic drivers for error conditions,
1472
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1487
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1473
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1488
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1474
    * Other detected conditions can be used to stop the current print.
1489
    * Other detected conditions can be used to stop the current print.
1487
   #endif
1502
   #endif
1488
 
1503
 
1489
   /**
1504
   /**
1505
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1490
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1506
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1491
    * This mode allows for faster movements at the expense of higher noise levels.
1507
    * This mode allows for faster movements at the expense of higher noise levels.
1492
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1508
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1509
   #define E5_HYBRID_THRESHOLD     30
1525
   #define E5_HYBRID_THRESHOLD     30
1510
 
1526
 
1511
   /**
1527
   /**
1528
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1512
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1529
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1513
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1530
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1514
    * X, Y, and Z homing will always be done in spreadCycle mode.
1531
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/Creality/Ender-4/Configuration.h 查看文件

633
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
633
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
634
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
634
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
635
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
635
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
636
- *          TMC5130, TMC5130_STANDALONE
637
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
636
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
637
+ *          TMC5160, TMC5160_STANDALONE
638
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
638
  */
639
  */
639
 //#define X_DRIVER_TYPE  A4988
640
 //#define X_DRIVER_TYPE  A4988
640
 //#define Y_DRIVER_TYPE  A4988
641
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h 查看文件

1322
 // @section tmc_smart
1322
 // @section tmc_smart
1323
 
1323
 
1324
 /**
1324
 /**
1325
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1326
- * the hardware SPI interface on your board and define the required CS pins
1327
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1325
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1326
+ * connect your SPI pins to the hardware SPI interface on your board and define
1327
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1328
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1328
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  *
1330
  *
1330
- * To use TMC2208 stepper UART-configurable stepper drivers
1331
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1332
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1333
- * to PDN_UART without a resistor.
1331
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1332
+ * to the driver side PDN_UART pin with a 1K resistor.
1333
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1334
+ * a resistor.
1334
  * The drivers can also be used with hardware serial.
1335
  * The drivers can also be used with hardware serial.
1335
  *
1336
  *
1336
- * TMCStepper library is required for connected TMC stepper drivers.
1337
+ * TMCStepper library is required to use TMC stepper drivers.
1337
  * https://github.com/teemuatlut/TMCStepper
1338
  * https://github.com/teemuatlut/TMCStepper
1338
  */
1339
  */
1339
 #if HAS_TRINAMIC
1340
 #if HAS_TRINAMIC
1340
 
1341
 
1341
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1344
 
1344
 
1345
   #if AXIS_IS_TMC(X)
1345
   #if AXIS_IS_TMC(X)
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1347
     #define X_MICROSTEPS   16  // 0..256
1347
     #define X_MICROSTEPS   16  // 0..256
1348
+    #define X_RSENSE     0.11
1348
   #endif
1349
   #endif
1349
 
1350
 
1350
   #if AXIS_IS_TMC(X2)
1351
   #if AXIS_IS_TMC(X2)
1351
     #define X2_CURRENT    800
1352
     #define X2_CURRENT    800
1352
     #define X2_MICROSTEPS  16
1353
     #define X2_MICROSTEPS  16
1354
+    #define X2_RSENSE    0.11
1353
   #endif
1355
   #endif
1354
 
1356
 
1355
   #if AXIS_IS_TMC(Y)
1357
   #if AXIS_IS_TMC(Y)
1356
     #define Y_CURRENT     800
1358
     #define Y_CURRENT     800
1357
     #define Y_MICROSTEPS   16
1359
     #define Y_MICROSTEPS   16
1360
+    #define Y_RSENSE     0.11
1358
   #endif
1361
   #endif
1359
 
1362
 
1360
   #if AXIS_IS_TMC(Y2)
1363
   #if AXIS_IS_TMC(Y2)
1361
     #define Y2_CURRENT    800
1364
     #define Y2_CURRENT    800
1362
     #define Y2_MICROSTEPS  16
1365
     #define Y2_MICROSTEPS  16
1366
+    #define Y2_RSENSE    0.11
1363
   #endif
1367
   #endif
1364
 
1368
 
1365
   #if AXIS_IS_TMC(Z)
1369
   #if AXIS_IS_TMC(Z)
1366
     #define Z_CURRENT     800
1370
     #define Z_CURRENT     800
1367
     #define Z_MICROSTEPS   16
1371
     #define Z_MICROSTEPS   16
1372
+    #define Z_RSENSE     0.11
1368
   #endif
1373
   #endif
1369
 
1374
 
1370
   #if AXIS_IS_TMC(Z2)
1375
   #if AXIS_IS_TMC(Z2)
1371
     #define Z2_CURRENT    800
1376
     #define Z2_CURRENT    800
1372
     #define Z2_MICROSTEPS  16
1377
     #define Z2_MICROSTEPS  16
1378
+    #define Z2_RSENSE    0.11
1373
   #endif
1379
   #endif
1374
 
1380
 
1375
   #if AXIS_IS_TMC(Z3)
1381
   #if AXIS_IS_TMC(Z3)
1376
     #define Z3_CURRENT    800
1382
     #define Z3_CURRENT    800
1377
     #define Z3_MICROSTEPS  16
1383
     #define Z3_MICROSTEPS  16
1384
+    #define Z3_RSENSE    0.11
1378
   #endif
1385
   #endif
1379
 
1386
 
1380
   #if AXIS_IS_TMC(E0)
1387
   #if AXIS_IS_TMC(E0)
1381
     #define E0_CURRENT    800
1388
     #define E0_CURRENT    800
1382
     #define E0_MICROSTEPS  16
1389
     #define E0_MICROSTEPS  16
1390
+    #define E0_RSENSE    0.11
1383
   #endif
1391
   #endif
1384
 
1392
 
1385
   #if AXIS_IS_TMC(E1)
1393
   #if AXIS_IS_TMC(E1)
1386
     #define E1_CURRENT    800
1394
     #define E1_CURRENT    800
1387
     #define E1_MICROSTEPS  16
1395
     #define E1_MICROSTEPS  16
1396
+    #define E1_RSENSE    0.11
1388
   #endif
1397
   #endif
1389
 
1398
 
1390
   #if AXIS_IS_TMC(E2)
1399
   #if AXIS_IS_TMC(E2)
1391
     #define E2_CURRENT    800
1400
     #define E2_CURRENT    800
1392
     #define E2_MICROSTEPS  16
1401
     #define E2_MICROSTEPS  16
1402
+    #define E2_RSENSE    0.11
1393
   #endif
1403
   #endif
1394
 
1404
 
1395
   #if AXIS_IS_TMC(E3)
1405
   #if AXIS_IS_TMC(E3)
1396
     #define E3_CURRENT    800
1406
     #define E3_CURRENT    800
1397
     #define E3_MICROSTEPS  16
1407
     #define E3_MICROSTEPS  16
1408
+    #define E3_RSENSE    0.11
1398
   #endif
1409
   #endif
1399
 
1410
 
1400
   #if AXIS_IS_TMC(E4)
1411
   #if AXIS_IS_TMC(E4)
1401
     #define E4_CURRENT    800
1412
     #define E4_CURRENT    800
1402
     #define E4_MICROSTEPS  16
1413
     #define E4_MICROSTEPS  16
1414
+    #define E4_RSENSE    0.11
1403
   #endif
1415
   #endif
1404
 
1416
 
1405
   #if AXIS_IS_TMC(E5)
1417
   #if AXIS_IS_TMC(E5)
1406
     #define E5_CURRENT    800
1418
     #define E5_CURRENT    800
1407
     #define E5_MICROSTEPS  16
1419
     #define E5_MICROSTEPS  16
1420
+    #define E5_RSENSE    0.11
1408
   #endif
1421
   #endif
1409
 
1422
 
1410
   /**
1423
   /**
1411
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1424
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1412
    * The default pins can be found in your board's pins file.
1425
    * The default pins can be found in your board's pins file.
1413
    */
1426
    */
1414
   //#define X_CS_PIN          -1
1427
   //#define X_CS_PIN          -1
1427
 
1440
 
1428
   /**
1441
   /**
1429
    * Use software SPI for TMC2130.
1442
    * Use software SPI for TMC2130.
1443
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1430
    * The default SW SPI pins are defined the respective pins files,
1444
    * The default SW SPI pins are defined the respective pins files,
1431
    * but you can override or define them here.
1445
    * but you can override or define them here.
1432
    */
1446
    */
1444
   //#define SOFTWARE_DRIVER_ENABLE
1458
   //#define SOFTWARE_DRIVER_ENABLE
1445
 
1459
 
1446
   /**
1460
   /**
1461
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1447
    * Use Trinamic's ultra quiet stepping mode.
1462
    * Use Trinamic's ultra quiet stepping mode.
1448
    * When disabled, Marlin will use spreadCycle stepping mode.
1463
    * When disabled, Marlin will use spreadCycle stepping mode.
1449
    */
1464
    */
1468
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1483
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1469
 
1484
 
1470
   /**
1485
   /**
1471
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1486
+   * Monitor Trinamic drivers for error conditions,
1472
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1487
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1473
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1488
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1474
    * Other detected conditions can be used to stop the current print.
1489
    * Other detected conditions can be used to stop the current print.
1487
   #endif
1502
   #endif
1488
 
1503
 
1489
   /**
1504
   /**
1505
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1490
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1506
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1491
    * This mode allows for faster movements at the expense of higher noise levels.
1507
    * This mode allows for faster movements at the expense of higher noise levels.
1492
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1508
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1509
   #define E5_HYBRID_THRESHOLD     30
1525
   #define E5_HYBRID_THRESHOLD     30
1510
 
1526
 
1511
   /**
1527
   /**
1528
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1512
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1529
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1513
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1530
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1514
    * X, Y, and Z homing will always be done in spreadCycle mode.
1531
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/Einstart-S/Configuration.h 查看文件

635
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
635
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
636
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
636
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
637
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
637
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
638
- *          TMC5130, TMC5130_STANDALONE
639
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
638
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
639
+ *          TMC5160, TMC5160_STANDALONE
640
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
640
  */
641
  */
641
 //#define X_DRIVER_TYPE  A4988
642
 //#define X_DRIVER_TYPE  A4988
642
 //#define Y_DRIVER_TYPE  A4988
643
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/Einstart-S/Configuration_adv.h 查看文件

1322
 // @section tmc_smart
1322
 // @section tmc_smart
1323
 
1323
 
1324
 /**
1324
 /**
1325
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1326
- * the hardware SPI interface on your board and define the required CS pins
1327
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1325
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1326
+ * connect your SPI pins to the hardware SPI interface on your board and define
1327
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1328
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1328
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  *
1330
  *
1330
- * To use TMC2208 stepper UART-configurable stepper drivers
1331
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1332
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1333
- * to PDN_UART without a resistor.
1331
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1332
+ * to the driver side PDN_UART pin with a 1K resistor.
1333
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1334
+ * a resistor.
1334
  * The drivers can also be used with hardware serial.
1335
  * The drivers can also be used with hardware serial.
1335
  *
1336
  *
1336
- * TMCStepper library is required for connected TMC stepper drivers.
1337
+ * TMCStepper library is required to use TMC stepper drivers.
1337
  * https://github.com/teemuatlut/TMCStepper
1338
  * https://github.com/teemuatlut/TMCStepper
1338
  */
1339
  */
1339
 #if HAS_TRINAMIC
1340
 #if HAS_TRINAMIC
1340
 
1341
 
1341
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1344
 
1344
 
1345
   #if AXIS_IS_TMC(X)
1345
   #if AXIS_IS_TMC(X)
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1347
     #define X_MICROSTEPS   16  // 0..256
1347
     #define X_MICROSTEPS   16  // 0..256
1348
+    #define X_RSENSE     0.11
1348
   #endif
1349
   #endif
1349
 
1350
 
1350
   #if AXIS_IS_TMC(X2)
1351
   #if AXIS_IS_TMC(X2)
1351
     #define X2_CURRENT    800
1352
     #define X2_CURRENT    800
1352
     #define X2_MICROSTEPS  16
1353
     #define X2_MICROSTEPS  16
1354
+    #define X2_RSENSE    0.11
1353
   #endif
1355
   #endif
1354
 
1356
 
1355
   #if AXIS_IS_TMC(Y)
1357
   #if AXIS_IS_TMC(Y)
1356
     #define Y_CURRENT     800
1358
     #define Y_CURRENT     800
1357
     #define Y_MICROSTEPS   16
1359
     #define Y_MICROSTEPS   16
1360
+    #define Y_RSENSE     0.11
1358
   #endif
1361
   #endif
1359
 
1362
 
1360
   #if AXIS_IS_TMC(Y2)
1363
   #if AXIS_IS_TMC(Y2)
1361
     #define Y2_CURRENT    800
1364
     #define Y2_CURRENT    800
1362
     #define Y2_MICROSTEPS  16
1365
     #define Y2_MICROSTEPS  16
1366
+    #define Y2_RSENSE    0.11
1363
   #endif
1367
   #endif
1364
 
1368
 
1365
   #if AXIS_IS_TMC(Z)
1369
   #if AXIS_IS_TMC(Z)
1366
     #define Z_CURRENT     800
1370
     #define Z_CURRENT     800
1367
     #define Z_MICROSTEPS   16
1371
     #define Z_MICROSTEPS   16
1372
+    #define Z_RSENSE     0.11
1368
   #endif
1373
   #endif
1369
 
1374
 
1370
   #if AXIS_IS_TMC(Z2)
1375
   #if AXIS_IS_TMC(Z2)
1371
     #define Z2_CURRENT    800
1376
     #define Z2_CURRENT    800
1372
     #define Z2_MICROSTEPS  16
1377
     #define Z2_MICROSTEPS  16
1378
+    #define Z2_RSENSE    0.11
1373
   #endif
1379
   #endif
1374
 
1380
 
1375
   #if AXIS_IS_TMC(Z3)
1381
   #if AXIS_IS_TMC(Z3)
1376
     #define Z3_CURRENT    800
1382
     #define Z3_CURRENT    800
1377
     #define Z3_MICROSTEPS  16
1383
     #define Z3_MICROSTEPS  16
1384
+    #define Z3_RSENSE    0.11
1378
   #endif
1385
   #endif
1379
 
1386
 
1380
   #if AXIS_IS_TMC(E0)
1387
   #if AXIS_IS_TMC(E0)
1381
     #define E0_CURRENT    800
1388
     #define E0_CURRENT    800
1382
     #define E0_MICROSTEPS  16
1389
     #define E0_MICROSTEPS  16
1390
+    #define E0_RSENSE    0.11
1383
   #endif
1391
   #endif
1384
 
1392
 
1385
   #if AXIS_IS_TMC(E1)
1393
   #if AXIS_IS_TMC(E1)
1386
     #define E1_CURRENT    800
1394
     #define E1_CURRENT    800
1387
     #define E1_MICROSTEPS  16
1395
     #define E1_MICROSTEPS  16
1396
+    #define E1_RSENSE    0.11
1388
   #endif
1397
   #endif
1389
 
1398
 
1390
   #if AXIS_IS_TMC(E2)
1399
   #if AXIS_IS_TMC(E2)
1391
     #define E2_CURRENT    800
1400
     #define E2_CURRENT    800
1392
     #define E2_MICROSTEPS  16
1401
     #define E2_MICROSTEPS  16
1402
+    #define E2_RSENSE    0.11
1393
   #endif
1403
   #endif
1394
 
1404
 
1395
   #if AXIS_IS_TMC(E3)
1405
   #if AXIS_IS_TMC(E3)
1396
     #define E3_CURRENT    800
1406
     #define E3_CURRENT    800
1397
     #define E3_MICROSTEPS  16
1407
     #define E3_MICROSTEPS  16
1408
+    #define E3_RSENSE    0.11
1398
   #endif
1409
   #endif
1399
 
1410
 
1400
   #if AXIS_IS_TMC(E4)
1411
   #if AXIS_IS_TMC(E4)
1401
     #define E4_CURRENT    800
1412
     #define E4_CURRENT    800
1402
     #define E4_MICROSTEPS  16
1413
     #define E4_MICROSTEPS  16
1414
+    #define E4_RSENSE    0.11
1403
   #endif
1415
   #endif
1404
 
1416
 
1405
   #if AXIS_IS_TMC(E5)
1417
   #if AXIS_IS_TMC(E5)
1406
     #define E5_CURRENT    800
1418
     #define E5_CURRENT    800
1407
     #define E5_MICROSTEPS  16
1419
     #define E5_MICROSTEPS  16
1420
+    #define E5_RSENSE    0.11
1408
   #endif
1421
   #endif
1409
 
1422
 
1410
   /**
1423
   /**
1411
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1424
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1412
    * The default pins can be found in your board's pins file.
1425
    * The default pins can be found in your board's pins file.
1413
    */
1426
    */
1414
   //#define X_CS_PIN          -1
1427
   //#define X_CS_PIN          -1
1427
 
1440
 
1428
   /**
1441
   /**
1429
    * Use software SPI for TMC2130.
1442
    * Use software SPI for TMC2130.
1443
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1430
    * The default SW SPI pins are defined the respective pins files,
1444
    * The default SW SPI pins are defined the respective pins files,
1431
    * but you can override or define them here.
1445
    * but you can override or define them here.
1432
    */
1446
    */
1444
   //#define SOFTWARE_DRIVER_ENABLE
1458
   //#define SOFTWARE_DRIVER_ENABLE
1445
 
1459
 
1446
   /**
1460
   /**
1461
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1447
    * Use Trinamic's ultra quiet stepping mode.
1462
    * Use Trinamic's ultra quiet stepping mode.
1448
    * When disabled, Marlin will use spreadCycle stepping mode.
1463
    * When disabled, Marlin will use spreadCycle stepping mode.
1449
    */
1464
    */
1468
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1483
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1469
 
1484
 
1470
   /**
1485
   /**
1471
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1486
+   * Monitor Trinamic drivers for error conditions,
1472
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1487
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1473
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1488
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1474
    * Other detected conditions can be used to stop the current print.
1489
    * Other detected conditions can be used to stop the current print.
1487
   #endif
1502
   #endif
1488
 
1503
 
1489
   /**
1504
   /**
1505
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1490
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1506
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1491
    * This mode allows for faster movements at the expense of higher noise levels.
1507
    * This mode allows for faster movements at the expense of higher noise levels.
1492
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1508
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1509
   #define E5_HYBRID_THRESHOLD     30
1525
   #define E5_HYBRID_THRESHOLD     30
1510
 
1526
 
1511
   /**
1527
   /**
1528
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1512
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1529
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1513
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1530
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1514
    * X, Y, and Z homing will always be done in spreadCycle mode.
1531
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/Felix/Configuration.h 查看文件

604
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
604
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
605
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
605
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
606
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
606
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
607
- *          TMC5130, TMC5130_STANDALONE
608
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
607
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
608
+ *          TMC5160, TMC5160_STANDALONE
609
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
609
  */
610
  */
610
 //#define X_DRIVER_TYPE  A4988
611
 //#define X_DRIVER_TYPE  A4988
611
 //#define Y_DRIVER_TYPE  A4988
612
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/Felix/Configuration_adv.h 查看文件

1322
 // @section tmc_smart
1322
 // @section tmc_smart
1323
 
1323
 
1324
 /**
1324
 /**
1325
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1326
- * the hardware SPI interface on your board and define the required CS pins
1327
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1325
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1326
+ * connect your SPI pins to the hardware SPI interface on your board and define
1327
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1328
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1328
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  *
1330
  *
1330
- * To use TMC2208 stepper UART-configurable stepper drivers
1331
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1332
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1333
- * to PDN_UART without a resistor.
1331
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1332
+ * to the driver side PDN_UART pin with a 1K resistor.
1333
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1334
+ * a resistor.
1334
  * The drivers can also be used with hardware serial.
1335
  * The drivers can also be used with hardware serial.
1335
  *
1336
  *
1336
- * TMCStepper library is required for connected TMC stepper drivers.
1337
+ * TMCStepper library is required to use TMC stepper drivers.
1337
  * https://github.com/teemuatlut/TMCStepper
1338
  * https://github.com/teemuatlut/TMCStepper
1338
  */
1339
  */
1339
 #if HAS_TRINAMIC
1340
 #if HAS_TRINAMIC
1340
 
1341
 
1341
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1344
 
1344
 
1345
   #if AXIS_IS_TMC(X)
1345
   #if AXIS_IS_TMC(X)
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1347
     #define X_MICROSTEPS   16  // 0..256
1347
     #define X_MICROSTEPS   16  // 0..256
1348
+    #define X_RSENSE     0.11
1348
   #endif
1349
   #endif
1349
 
1350
 
1350
   #if AXIS_IS_TMC(X2)
1351
   #if AXIS_IS_TMC(X2)
1351
     #define X2_CURRENT    800
1352
     #define X2_CURRENT    800
1352
     #define X2_MICROSTEPS  16
1353
     #define X2_MICROSTEPS  16
1354
+    #define X2_RSENSE    0.11
1353
   #endif
1355
   #endif
1354
 
1356
 
1355
   #if AXIS_IS_TMC(Y)
1357
   #if AXIS_IS_TMC(Y)
1356
     #define Y_CURRENT     800
1358
     #define Y_CURRENT     800
1357
     #define Y_MICROSTEPS   16
1359
     #define Y_MICROSTEPS   16
1360
+    #define Y_RSENSE     0.11
1358
   #endif
1361
   #endif
1359
 
1362
 
1360
   #if AXIS_IS_TMC(Y2)
1363
   #if AXIS_IS_TMC(Y2)
1361
     #define Y2_CURRENT    800
1364
     #define Y2_CURRENT    800
1362
     #define Y2_MICROSTEPS  16
1365
     #define Y2_MICROSTEPS  16
1366
+    #define Y2_RSENSE    0.11
1363
   #endif
1367
   #endif
1364
 
1368
 
1365
   #if AXIS_IS_TMC(Z)
1369
   #if AXIS_IS_TMC(Z)
1366
     #define Z_CURRENT     800
1370
     #define Z_CURRENT     800
1367
     #define Z_MICROSTEPS   16
1371
     #define Z_MICROSTEPS   16
1372
+    #define Z_RSENSE     0.11
1368
   #endif
1373
   #endif
1369
 
1374
 
1370
   #if AXIS_IS_TMC(Z2)
1375
   #if AXIS_IS_TMC(Z2)
1371
     #define Z2_CURRENT    800
1376
     #define Z2_CURRENT    800
1372
     #define Z2_MICROSTEPS  16
1377
     #define Z2_MICROSTEPS  16
1378
+    #define Z2_RSENSE    0.11
1373
   #endif
1379
   #endif
1374
 
1380
 
1375
   #if AXIS_IS_TMC(Z3)
1381
   #if AXIS_IS_TMC(Z3)
1376
     #define Z3_CURRENT    800
1382
     #define Z3_CURRENT    800
1377
     #define Z3_MICROSTEPS  16
1383
     #define Z3_MICROSTEPS  16
1384
+    #define Z3_RSENSE    0.11
1378
   #endif
1385
   #endif
1379
 
1386
 
1380
   #if AXIS_IS_TMC(E0)
1387
   #if AXIS_IS_TMC(E0)
1381
     #define E0_CURRENT    800
1388
     #define E0_CURRENT    800
1382
     #define E0_MICROSTEPS  16
1389
     #define E0_MICROSTEPS  16
1390
+    #define E0_RSENSE    0.11
1383
   #endif
1391
   #endif
1384
 
1392
 
1385
   #if AXIS_IS_TMC(E1)
1393
   #if AXIS_IS_TMC(E1)
1386
     #define E1_CURRENT    800
1394
     #define E1_CURRENT    800
1387
     #define E1_MICROSTEPS  16
1395
     #define E1_MICROSTEPS  16
1396
+    #define E1_RSENSE    0.11
1388
   #endif
1397
   #endif
1389
 
1398
 
1390
   #if AXIS_IS_TMC(E2)
1399
   #if AXIS_IS_TMC(E2)
1391
     #define E2_CURRENT    800
1400
     #define E2_CURRENT    800
1392
     #define E2_MICROSTEPS  16
1401
     #define E2_MICROSTEPS  16
1402
+    #define E2_RSENSE    0.11
1393
   #endif
1403
   #endif
1394
 
1404
 
1395
   #if AXIS_IS_TMC(E3)
1405
   #if AXIS_IS_TMC(E3)
1396
     #define E3_CURRENT    800
1406
     #define E3_CURRENT    800
1397
     #define E3_MICROSTEPS  16
1407
     #define E3_MICROSTEPS  16
1408
+    #define E3_RSENSE    0.11
1398
   #endif
1409
   #endif
1399
 
1410
 
1400
   #if AXIS_IS_TMC(E4)
1411
   #if AXIS_IS_TMC(E4)
1401
     #define E4_CURRENT    800
1412
     #define E4_CURRENT    800
1402
     #define E4_MICROSTEPS  16
1413
     #define E4_MICROSTEPS  16
1414
+    #define E4_RSENSE    0.11
1403
   #endif
1415
   #endif
1404
 
1416
 
1405
   #if AXIS_IS_TMC(E5)
1417
   #if AXIS_IS_TMC(E5)
1406
     #define E5_CURRENT    800
1418
     #define E5_CURRENT    800
1407
     #define E5_MICROSTEPS  16
1419
     #define E5_MICROSTEPS  16
1420
+    #define E5_RSENSE    0.11
1408
   #endif
1421
   #endif
1409
 
1422
 
1410
   /**
1423
   /**
1411
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1424
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1412
    * The default pins can be found in your board's pins file.
1425
    * The default pins can be found in your board's pins file.
1413
    */
1426
    */
1414
   //#define X_CS_PIN          -1
1427
   //#define X_CS_PIN          -1
1427
 
1440
 
1428
   /**
1441
   /**
1429
    * Use software SPI for TMC2130.
1442
    * Use software SPI for TMC2130.
1443
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1430
    * The default SW SPI pins are defined the respective pins files,
1444
    * The default SW SPI pins are defined the respective pins files,
1431
    * but you can override or define them here.
1445
    * but you can override or define them here.
1432
    */
1446
    */
1444
   //#define SOFTWARE_DRIVER_ENABLE
1458
   //#define SOFTWARE_DRIVER_ENABLE
1445
 
1459
 
1446
   /**
1460
   /**
1461
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1447
    * Use Trinamic's ultra quiet stepping mode.
1462
    * Use Trinamic's ultra quiet stepping mode.
1448
    * When disabled, Marlin will use spreadCycle stepping mode.
1463
    * When disabled, Marlin will use spreadCycle stepping mode.
1449
    */
1464
    */
1468
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1483
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1469
 
1484
 
1470
   /**
1485
   /**
1471
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1486
+   * Monitor Trinamic drivers for error conditions,
1472
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1487
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1473
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1488
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1474
    * Other detected conditions can be used to stop the current print.
1489
    * Other detected conditions can be used to stop the current print.
1487
   #endif
1502
   #endif
1488
 
1503
 
1489
   /**
1504
   /**
1505
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1490
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1506
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1491
    * This mode allows for faster movements at the expense of higher noise levels.
1507
    * This mode allows for faster movements at the expense of higher noise levels.
1492
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1508
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1509
   #define E5_HYBRID_THRESHOLD     30
1525
   #define E5_HYBRID_THRESHOLD     30
1510
 
1526
 
1511
   /**
1527
   /**
1528
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1512
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1529
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1513
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1530
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1514
    * X, Y, and Z homing will always be done in spreadCycle mode.
1531
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/Felix/DUAL/Configuration.h 查看文件

604
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
604
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
605
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
605
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
606
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
606
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
607
- *          TMC5130, TMC5130_STANDALONE
608
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
607
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
608
+ *          TMC5160, TMC5160_STANDALONE
609
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
609
  */
610
  */
610
 //#define X_DRIVER_TYPE  A4988
611
 //#define X_DRIVER_TYPE  A4988
611
 //#define Y_DRIVER_TYPE  A4988
612
 //#define Y_DRIVER_TYPE  A4988

+ 3
- 2
Marlin/src/config/examples/FlashForge/CreatorPro/Configuration.h 查看文件

612
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
612
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
613
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
613
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
614
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
614
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
615
- *          TMC5130, TMC5130_STANDALONE
616
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
615
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
616
+ *          TMC5160, TMC5160_STANDALONE
617
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
617
  */
618
  */
618
 //#define X_DRIVER_TYPE  A4988
619
 //#define X_DRIVER_TYPE  A4988
619
 //#define Y_DRIVER_TYPE  A4988
620
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/FlashForge/CreatorPro/Configuration_adv.h 查看文件

1321
 // @section tmc_smart
1321
 // @section tmc_smart
1322
 
1322
 
1323
 /**
1323
 /**
1324
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1325
- * the hardware SPI interface on your board and define the required CS pins
1326
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1324
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1325
+ * connect your SPI pins to the hardware SPI interface on your board and define
1326
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1327
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1327
  * You may also use software SPI if you wish to use general purpose IO pins.
1328
  * You may also use software SPI if you wish to use general purpose IO pins.
1328
  *
1329
  *
1329
- * To use TMC2208 stepper UART-configurable stepper drivers
1330
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1331
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1332
- * to PDN_UART without a resistor.
1330
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1331
+ * to the driver side PDN_UART pin with a 1K resistor.
1332
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1333
+ * a resistor.
1333
  * The drivers can also be used with hardware serial.
1334
  * The drivers can also be used with hardware serial.
1334
  *
1335
  *
1335
- * TMCStepper library is required for connected TMC stepper drivers.
1336
+ * TMCStepper library is required to use TMC stepper drivers.
1336
  * https://github.com/teemuatlut/TMCStepper
1337
  * https://github.com/teemuatlut/TMCStepper
1337
  */
1338
  */
1338
 #if HAS_TRINAMIC
1339
 #if HAS_TRINAMIC
1339
 
1340
 
1340
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1341
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1341
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1342
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1342
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1343
 
1343
 
1344
   #if AXIS_IS_TMC(X)
1344
   #if AXIS_IS_TMC(X)
1345
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1345
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1346
     #define X_MICROSTEPS   16  // 0..256
1346
     #define X_MICROSTEPS   16  // 0..256
1347
+    #define X_RSENSE     0.11
1347
   #endif
1348
   #endif
1348
 
1349
 
1349
   #if AXIS_IS_TMC(X2)
1350
   #if AXIS_IS_TMC(X2)
1350
     #define X2_CURRENT    800
1351
     #define X2_CURRENT    800
1351
     #define X2_MICROSTEPS  16
1352
     #define X2_MICROSTEPS  16
1353
+    #define X2_RSENSE    0.11
1352
   #endif
1354
   #endif
1353
 
1355
 
1354
   #if AXIS_IS_TMC(Y)
1356
   #if AXIS_IS_TMC(Y)
1355
     #define Y_CURRENT     800
1357
     #define Y_CURRENT     800
1356
     #define Y_MICROSTEPS   16
1358
     #define Y_MICROSTEPS   16
1359
+    #define Y_RSENSE     0.11
1357
   #endif
1360
   #endif
1358
 
1361
 
1359
   #if AXIS_IS_TMC(Y2)
1362
   #if AXIS_IS_TMC(Y2)
1360
     #define Y2_CURRENT    800
1363
     #define Y2_CURRENT    800
1361
     #define Y2_MICROSTEPS  16
1364
     #define Y2_MICROSTEPS  16
1365
+    #define Y2_RSENSE    0.11
1362
   #endif
1366
   #endif
1363
 
1367
 
1364
   #if AXIS_IS_TMC(Z)
1368
   #if AXIS_IS_TMC(Z)
1365
     #define Z_CURRENT     800
1369
     #define Z_CURRENT     800
1366
     #define Z_MICROSTEPS   16
1370
     #define Z_MICROSTEPS   16
1371
+    #define Z_RSENSE     0.11
1367
   #endif
1372
   #endif
1368
 
1373
 
1369
   #if AXIS_IS_TMC(Z2)
1374
   #if AXIS_IS_TMC(Z2)
1370
     #define Z2_CURRENT    800
1375
     #define Z2_CURRENT    800
1371
     #define Z2_MICROSTEPS  16
1376
     #define Z2_MICROSTEPS  16
1377
+    #define Z2_RSENSE    0.11
1372
   #endif
1378
   #endif
1373
 
1379
 
1374
   #if AXIS_IS_TMC(Z3)
1380
   #if AXIS_IS_TMC(Z3)
1375
     #define Z3_CURRENT    800
1381
     #define Z3_CURRENT    800
1376
     #define Z3_MICROSTEPS  16
1382
     #define Z3_MICROSTEPS  16
1383
+    #define Z3_RSENSE    0.11
1377
   #endif
1384
   #endif
1378
 
1385
 
1379
   #if AXIS_IS_TMC(E0)
1386
   #if AXIS_IS_TMC(E0)
1380
     #define E0_CURRENT    800
1387
     #define E0_CURRENT    800
1381
     #define E0_MICROSTEPS  16
1388
     #define E0_MICROSTEPS  16
1389
+    #define E0_RSENSE    0.11
1382
   #endif
1390
   #endif
1383
 
1391
 
1384
   #if AXIS_IS_TMC(E1)
1392
   #if AXIS_IS_TMC(E1)
1385
     #define E1_CURRENT    800
1393
     #define E1_CURRENT    800
1386
     #define E1_MICROSTEPS  16
1394
     #define E1_MICROSTEPS  16
1395
+    #define E1_RSENSE    0.11
1387
   #endif
1396
   #endif
1388
 
1397
 
1389
   #if AXIS_IS_TMC(E2)
1398
   #if AXIS_IS_TMC(E2)
1390
     #define E2_CURRENT    800
1399
     #define E2_CURRENT    800
1391
     #define E2_MICROSTEPS  16
1400
     #define E2_MICROSTEPS  16
1401
+    #define E2_RSENSE    0.11
1392
   #endif
1402
   #endif
1393
 
1403
 
1394
   #if AXIS_IS_TMC(E3)
1404
   #if AXIS_IS_TMC(E3)
1395
     #define E3_CURRENT    800
1405
     #define E3_CURRENT    800
1396
     #define E3_MICROSTEPS  16
1406
     #define E3_MICROSTEPS  16
1407
+    #define E3_RSENSE    0.11
1397
   #endif
1408
   #endif
1398
 
1409
 
1399
   #if AXIS_IS_TMC(E4)
1410
   #if AXIS_IS_TMC(E4)
1400
     #define E4_CURRENT    800
1411
     #define E4_CURRENT    800
1401
     #define E4_MICROSTEPS  16
1412
     #define E4_MICROSTEPS  16
1413
+    #define E4_RSENSE    0.11
1402
   #endif
1414
   #endif
1403
 
1415
 
1404
   #if AXIS_IS_TMC(E5)
1416
   #if AXIS_IS_TMC(E5)
1405
     #define E5_CURRENT    800
1417
     #define E5_CURRENT    800
1406
     #define E5_MICROSTEPS  16
1418
     #define E5_MICROSTEPS  16
1419
+    #define E5_RSENSE    0.11
1407
   #endif
1420
   #endif
1408
 
1421
 
1409
   /**
1422
   /**
1410
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1423
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1411
    * The default pins can be found in your board's pins file.
1424
    * The default pins can be found in your board's pins file.
1412
    */
1425
    */
1413
   //#define X_CS_PIN          -1
1426
   //#define X_CS_PIN          -1
1426
 
1439
 
1427
   /**
1440
   /**
1428
    * Use software SPI for TMC2130.
1441
    * Use software SPI for TMC2130.
1442
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1429
    * The default SW SPI pins are defined the respective pins files,
1443
    * The default SW SPI pins are defined the respective pins files,
1430
    * but you can override or define them here.
1444
    * but you can override or define them here.
1431
    */
1445
    */
1443
   //#define SOFTWARE_DRIVER_ENABLE
1457
   //#define SOFTWARE_DRIVER_ENABLE
1444
 
1458
 
1445
   /**
1459
   /**
1460
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1446
    * Use Trinamic's ultra quiet stepping mode.
1461
    * Use Trinamic's ultra quiet stepping mode.
1447
    * When disabled, Marlin will use spreadCycle stepping mode.
1462
    * When disabled, Marlin will use spreadCycle stepping mode.
1448
    */
1463
    */
1467
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1482
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1468
 
1483
 
1469
   /**
1484
   /**
1470
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1485
+   * Monitor Trinamic drivers for error conditions,
1471
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1486
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1472
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1487
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1473
    * Other detected conditions can be used to stop the current print.
1488
    * Other detected conditions can be used to stop the current print.
1486
   #endif
1501
   #endif
1487
 
1502
 
1488
   /**
1503
   /**
1504
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1489
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1505
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1490
    * This mode allows for faster movements at the expense of higher noise levels.
1506
    * This mode allows for faster movements at the expense of higher noise levels.
1491
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1507
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1508
   #define E5_HYBRID_THRESHOLD     30
1524
   #define E5_HYBRID_THRESHOLD     30
1509
 
1525
 
1510
   /**
1526
   /**
1527
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1511
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1528
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1512
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1529
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1513
    * X, Y, and Z homing will always be done in spreadCycle mode.
1530
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h 查看文件

628
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
628
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
629
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
629
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
630
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
630
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
631
- *          TMC5130, TMC5130_STANDALONE
632
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
631
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
632
+ *          TMC5160, TMC5160_STANDALONE
633
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
633
  */
634
  */
634
 //#define X_DRIVER_TYPE  A4988
635
 //#define X_DRIVER_TYPE  A4988
635
 //#define Y_DRIVER_TYPE  A4988
636
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h 查看文件

1322
 // @section tmc_smart
1322
 // @section tmc_smart
1323
 
1323
 
1324
 /**
1324
 /**
1325
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1326
- * the hardware SPI interface on your board and define the required CS pins
1327
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1325
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1326
+ * connect your SPI pins to the hardware SPI interface on your board and define
1327
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1328
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1328
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  *
1330
  *
1330
- * To use TMC2208 stepper UART-configurable stepper drivers
1331
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1332
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1333
- * to PDN_UART without a resistor.
1331
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1332
+ * to the driver side PDN_UART pin with a 1K resistor.
1333
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1334
+ * a resistor.
1334
  * The drivers can also be used with hardware serial.
1335
  * The drivers can also be used with hardware serial.
1335
  *
1336
  *
1336
- * TMCStepper library is required for connected TMC stepper drivers.
1337
+ * TMCStepper library is required to use TMC stepper drivers.
1337
  * https://github.com/teemuatlut/TMCStepper
1338
  * https://github.com/teemuatlut/TMCStepper
1338
  */
1339
  */
1339
 #if HAS_TRINAMIC
1340
 #if HAS_TRINAMIC
1340
 
1341
 
1341
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1344
 
1344
 
1345
   #if AXIS_IS_TMC(X)
1345
   #if AXIS_IS_TMC(X)
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1347
     #define X_MICROSTEPS   16  // 0..256
1347
     #define X_MICROSTEPS   16  // 0..256
1348
+    #define X_RSENSE     0.11
1348
   #endif
1349
   #endif
1349
 
1350
 
1350
   #if AXIS_IS_TMC(X2)
1351
   #if AXIS_IS_TMC(X2)
1351
     #define X2_CURRENT    800
1352
     #define X2_CURRENT    800
1352
     #define X2_MICROSTEPS  16
1353
     #define X2_MICROSTEPS  16
1354
+    #define X2_RSENSE    0.11
1353
   #endif
1355
   #endif
1354
 
1356
 
1355
   #if AXIS_IS_TMC(Y)
1357
   #if AXIS_IS_TMC(Y)
1356
     #define Y_CURRENT     800
1358
     #define Y_CURRENT     800
1357
     #define Y_MICROSTEPS   16
1359
     #define Y_MICROSTEPS   16
1360
+    #define Y_RSENSE     0.11
1358
   #endif
1361
   #endif
1359
 
1362
 
1360
   #if AXIS_IS_TMC(Y2)
1363
   #if AXIS_IS_TMC(Y2)
1361
     #define Y2_CURRENT    800
1364
     #define Y2_CURRENT    800
1362
     #define Y2_MICROSTEPS  16
1365
     #define Y2_MICROSTEPS  16
1366
+    #define Y2_RSENSE    0.11
1363
   #endif
1367
   #endif
1364
 
1368
 
1365
   #if AXIS_IS_TMC(Z)
1369
   #if AXIS_IS_TMC(Z)
1366
     #define Z_CURRENT     800
1370
     #define Z_CURRENT     800
1367
     #define Z_MICROSTEPS   16
1371
     #define Z_MICROSTEPS   16
1372
+    #define Z_RSENSE     0.11
1368
   #endif
1373
   #endif
1369
 
1374
 
1370
   #if AXIS_IS_TMC(Z2)
1375
   #if AXIS_IS_TMC(Z2)
1371
     #define Z2_CURRENT    800
1376
     #define Z2_CURRENT    800
1372
     #define Z2_MICROSTEPS  16
1377
     #define Z2_MICROSTEPS  16
1378
+    #define Z2_RSENSE    0.11
1373
   #endif
1379
   #endif
1374
 
1380
 
1375
   #if AXIS_IS_TMC(Z3)
1381
   #if AXIS_IS_TMC(Z3)
1376
     #define Z3_CURRENT    800
1382
     #define Z3_CURRENT    800
1377
     #define Z3_MICROSTEPS  16
1383
     #define Z3_MICROSTEPS  16
1384
+    #define Z3_RSENSE    0.11
1378
   #endif
1385
   #endif
1379
 
1386
 
1380
   #if AXIS_IS_TMC(E0)
1387
   #if AXIS_IS_TMC(E0)
1381
     #define E0_CURRENT    800
1388
     #define E0_CURRENT    800
1382
     #define E0_MICROSTEPS  16
1389
     #define E0_MICROSTEPS  16
1390
+    #define E0_RSENSE    0.11
1383
   #endif
1391
   #endif
1384
 
1392
 
1385
   #if AXIS_IS_TMC(E1)
1393
   #if AXIS_IS_TMC(E1)
1386
     #define E1_CURRENT    800
1394
     #define E1_CURRENT    800
1387
     #define E1_MICROSTEPS  16
1395
     #define E1_MICROSTEPS  16
1396
+    #define E1_RSENSE    0.11
1388
   #endif
1397
   #endif
1389
 
1398
 
1390
   #if AXIS_IS_TMC(E2)
1399
   #if AXIS_IS_TMC(E2)
1391
     #define E2_CURRENT    800
1400
     #define E2_CURRENT    800
1392
     #define E2_MICROSTEPS  16
1401
     #define E2_MICROSTEPS  16
1402
+    #define E2_RSENSE    0.11
1393
   #endif
1403
   #endif
1394
 
1404
 
1395
   #if AXIS_IS_TMC(E3)
1405
   #if AXIS_IS_TMC(E3)
1396
     #define E3_CURRENT    800
1406
     #define E3_CURRENT    800
1397
     #define E3_MICROSTEPS  16
1407
     #define E3_MICROSTEPS  16
1408
+    #define E3_RSENSE    0.11
1398
   #endif
1409
   #endif
1399
 
1410
 
1400
   #if AXIS_IS_TMC(E4)
1411
   #if AXIS_IS_TMC(E4)
1401
     #define E4_CURRENT    800
1412
     #define E4_CURRENT    800
1402
     #define E4_MICROSTEPS  16
1413
     #define E4_MICROSTEPS  16
1414
+    #define E4_RSENSE    0.11
1403
   #endif
1415
   #endif
1404
 
1416
 
1405
   #if AXIS_IS_TMC(E5)
1417
   #if AXIS_IS_TMC(E5)
1406
     #define E5_CURRENT    800
1418
     #define E5_CURRENT    800
1407
     #define E5_MICROSTEPS  16
1419
     #define E5_MICROSTEPS  16
1420
+    #define E5_RSENSE    0.11
1408
   #endif
1421
   #endif
1409
 
1422
 
1410
   /**
1423
   /**
1411
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1424
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1412
    * The default pins can be found in your board's pins file.
1425
    * The default pins can be found in your board's pins file.
1413
    */
1426
    */
1414
   //#define X_CS_PIN          -1
1427
   //#define X_CS_PIN          -1
1427
 
1440
 
1428
   /**
1441
   /**
1429
    * Use software SPI for TMC2130.
1442
    * Use software SPI for TMC2130.
1443
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1430
    * The default SW SPI pins are defined the respective pins files,
1444
    * The default SW SPI pins are defined the respective pins files,
1431
    * but you can override or define them here.
1445
    * but you can override or define them here.
1432
    */
1446
    */
1444
   //#define SOFTWARE_DRIVER_ENABLE
1458
   //#define SOFTWARE_DRIVER_ENABLE
1445
 
1459
 
1446
   /**
1460
   /**
1461
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1447
    * Use Trinamic's ultra quiet stepping mode.
1462
    * Use Trinamic's ultra quiet stepping mode.
1448
    * When disabled, Marlin will use spreadCycle stepping mode.
1463
    * When disabled, Marlin will use spreadCycle stepping mode.
1449
    */
1464
    */
1468
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1483
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1469
 
1484
 
1470
   /**
1485
   /**
1471
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1486
+   * Monitor Trinamic drivers for error conditions,
1472
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1487
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1473
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1488
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1474
    * Other detected conditions can be used to stop the current print.
1489
    * Other detected conditions can be used to stop the current print.
1487
   #endif
1502
   #endif
1488
 
1503
 
1489
   /**
1504
   /**
1505
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1490
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1506
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1491
    * This mode allows for faster movements at the expense of higher noise levels.
1507
    * This mode allows for faster movements at the expense of higher noise levels.
1492
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1508
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1509
   #define E5_HYBRID_THRESHOLD     30
1525
   #define E5_HYBRID_THRESHOLD     30
1510
 
1526
 
1511
   /**
1527
   /**
1528
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1512
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1529
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1513
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1530
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1514
    * X, Y, and Z homing will always be done in spreadCycle mode.
1531
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/Formbot/Raptor/Configuration.h 查看文件

675
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
675
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
676
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
676
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
677
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
677
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
678
- *          TMC5130, TMC5130_STANDALONE
679
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
678
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
679
+ *          TMC5160, TMC5160_STANDALONE
680
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
680
  */
681
  */
681
 //#define X_DRIVER_TYPE  A4988
682
 //#define X_DRIVER_TYPE  A4988
682
 //#define Y_DRIVER_TYPE  A4988
683
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/Formbot/Raptor/Configuration_adv.h 查看文件

1324
 // @section tmc_smart
1324
 // @section tmc_smart
1325
 
1325
 
1326
 /**
1326
 /**
1327
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1328
- * the hardware SPI interface on your board and define the required CS pins
1329
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1327
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1328
+ * connect your SPI pins to the hardware SPI interface on your board and define
1329
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1330
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1330
  * You may also use software SPI if you wish to use general purpose IO pins.
1331
  * You may also use software SPI if you wish to use general purpose IO pins.
1331
  *
1332
  *
1332
- * To use TMC2208 stepper UART-configurable stepper drivers
1333
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1334
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1335
- * to PDN_UART without a resistor.
1333
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1334
+ * to the driver side PDN_UART pin with a 1K resistor.
1335
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1336
+ * a resistor.
1336
  * The drivers can also be used with hardware serial.
1337
  * The drivers can also be used with hardware serial.
1337
  *
1338
  *
1338
- * TMCStepper library is required for connected TMC stepper drivers.
1339
+ * TMCStepper library is required to use TMC stepper drivers.
1339
  * https://github.com/teemuatlut/TMCStepper
1340
  * https://github.com/teemuatlut/TMCStepper
1340
  */
1341
  */
1341
 #if HAS_TRINAMIC
1342
 #if HAS_TRINAMIC
1342
 
1343
 
1343
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1344
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1344
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1345
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1345
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1346
 
1346
 
1347
   #if AXIS_IS_TMC(X)
1347
   #if AXIS_IS_TMC(X)
1348
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1348
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1349
     #define X_MICROSTEPS   16  // 0..256
1349
     #define X_MICROSTEPS   16  // 0..256
1350
+    #define X_RSENSE     0.11
1350
   #endif
1351
   #endif
1351
 
1352
 
1352
   #if AXIS_IS_TMC(X2)
1353
   #if AXIS_IS_TMC(X2)
1353
     #define X2_CURRENT    800
1354
     #define X2_CURRENT    800
1354
     #define X2_MICROSTEPS  16
1355
     #define X2_MICROSTEPS  16
1356
+    #define X2_RSENSE    0.11
1355
   #endif
1357
   #endif
1356
 
1358
 
1357
   #if AXIS_IS_TMC(Y)
1359
   #if AXIS_IS_TMC(Y)
1358
     #define Y_CURRENT     800
1360
     #define Y_CURRENT     800
1359
     #define Y_MICROSTEPS   16
1361
     #define Y_MICROSTEPS   16
1362
+    #define Y_RSENSE     0.11
1360
   #endif
1363
   #endif
1361
 
1364
 
1362
   #if AXIS_IS_TMC(Y2)
1365
   #if AXIS_IS_TMC(Y2)
1363
     #define Y2_CURRENT    800
1366
     #define Y2_CURRENT    800
1364
     #define Y2_MICROSTEPS  16
1367
     #define Y2_MICROSTEPS  16
1368
+    #define Y2_RSENSE    0.11
1365
   #endif
1369
   #endif
1366
 
1370
 
1367
   #if AXIS_IS_TMC(Z)
1371
   #if AXIS_IS_TMC(Z)
1368
     #define Z_CURRENT     800
1372
     #define Z_CURRENT     800
1369
     #define Z_MICROSTEPS   16
1373
     #define Z_MICROSTEPS   16
1374
+    #define Z_RSENSE     0.11
1370
   #endif
1375
   #endif
1371
 
1376
 
1372
   #if AXIS_IS_TMC(Z2)
1377
   #if AXIS_IS_TMC(Z2)
1373
     #define Z2_CURRENT    800
1378
     #define Z2_CURRENT    800
1374
     #define Z2_MICROSTEPS  16
1379
     #define Z2_MICROSTEPS  16
1380
+    #define Z2_RSENSE    0.11
1375
   #endif
1381
   #endif
1376
 
1382
 
1377
   #if AXIS_IS_TMC(Z3)
1383
   #if AXIS_IS_TMC(Z3)
1378
     #define Z3_CURRENT    800
1384
     #define Z3_CURRENT    800
1379
     #define Z3_MICROSTEPS  16
1385
     #define Z3_MICROSTEPS  16
1386
+    #define Z3_RSENSE    0.11
1380
   #endif
1387
   #endif
1381
 
1388
 
1382
   #if AXIS_IS_TMC(E0)
1389
   #if AXIS_IS_TMC(E0)
1383
     #define E0_CURRENT    800
1390
     #define E0_CURRENT    800
1384
     #define E0_MICROSTEPS  16
1391
     #define E0_MICROSTEPS  16
1392
+    #define E0_RSENSE    0.11
1385
   #endif
1393
   #endif
1386
 
1394
 
1387
   #if AXIS_IS_TMC(E1)
1395
   #if AXIS_IS_TMC(E1)
1388
     #define E1_CURRENT    800
1396
     #define E1_CURRENT    800
1389
     #define E1_MICROSTEPS  16
1397
     #define E1_MICROSTEPS  16
1398
+    #define E1_RSENSE    0.11
1390
   #endif
1399
   #endif
1391
 
1400
 
1392
   #if AXIS_IS_TMC(E2)
1401
   #if AXIS_IS_TMC(E2)
1393
     #define E2_CURRENT    800
1402
     #define E2_CURRENT    800
1394
     #define E2_MICROSTEPS  16
1403
     #define E2_MICROSTEPS  16
1404
+    #define E2_RSENSE    0.11
1395
   #endif
1405
   #endif
1396
 
1406
 
1397
   #if AXIS_IS_TMC(E3)
1407
   #if AXIS_IS_TMC(E3)
1398
     #define E3_CURRENT    800
1408
     #define E3_CURRENT    800
1399
     #define E3_MICROSTEPS  16
1409
     #define E3_MICROSTEPS  16
1410
+    #define E3_RSENSE    0.11
1400
   #endif
1411
   #endif
1401
 
1412
 
1402
   #if AXIS_IS_TMC(E4)
1413
   #if AXIS_IS_TMC(E4)
1403
     #define E4_CURRENT    800
1414
     #define E4_CURRENT    800
1404
     #define E4_MICROSTEPS  16
1415
     #define E4_MICROSTEPS  16
1416
+    #define E4_RSENSE    0.11
1405
   #endif
1417
   #endif
1406
 
1418
 
1407
   #if AXIS_IS_TMC(E5)
1419
   #if AXIS_IS_TMC(E5)
1408
     #define E5_CURRENT    800
1420
     #define E5_CURRENT    800
1409
     #define E5_MICROSTEPS  16
1421
     #define E5_MICROSTEPS  16
1422
+    #define E5_RSENSE    0.11
1410
   #endif
1423
   #endif
1411
 
1424
 
1412
   /**
1425
   /**
1413
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1426
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1414
    * The default pins can be found in your board's pins file.
1427
    * The default pins can be found in your board's pins file.
1415
    */
1428
    */
1416
   //#define X_CS_PIN          -1
1429
   //#define X_CS_PIN          -1
1429
 
1442
 
1430
   /**
1443
   /**
1431
    * Use software SPI for TMC2130.
1444
    * Use software SPI for TMC2130.
1445
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1432
    * The default SW SPI pins are defined the respective pins files,
1446
    * The default SW SPI pins are defined the respective pins files,
1433
    * but you can override or define them here.
1447
    * but you can override or define them here.
1434
    */
1448
    */
1446
   //#define SOFTWARE_DRIVER_ENABLE
1460
   //#define SOFTWARE_DRIVER_ENABLE
1447
 
1461
 
1448
   /**
1462
   /**
1463
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1449
    * Use Trinamic's ultra quiet stepping mode.
1464
    * Use Trinamic's ultra quiet stepping mode.
1450
    * When disabled, Marlin will use spreadCycle stepping mode.
1465
    * When disabled, Marlin will use spreadCycle stepping mode.
1451
    */
1466
    */
1470
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1485
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1471
 
1486
 
1472
   /**
1487
   /**
1473
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1488
+   * Monitor Trinamic drivers for error conditions,
1474
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1489
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1475
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1490
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1476
    * Other detected conditions can be used to stop the current print.
1491
    * Other detected conditions can be used to stop the current print.
1489
   #endif
1504
   #endif
1490
 
1505
 
1491
   /**
1506
   /**
1507
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1492
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1508
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1493
    * This mode allows for faster movements at the expense of higher noise levels.
1509
    * This mode allows for faster movements at the expense of higher noise levels.
1494
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1510
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1511
   #define E5_HYBRID_THRESHOLD     30
1527
   #define E5_HYBRID_THRESHOLD     30
1512
 
1528
 
1513
   /**
1529
   /**
1530
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1514
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1531
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1515
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1532
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1516
    * X, Y, and Z homing will always be done in spreadCycle mode.
1533
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration.h 查看文件

652
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
652
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
653
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
653
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
654
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
654
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
655
- *          TMC5130, TMC5130_STANDALONE
656
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
655
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
656
+ *          TMC5160, TMC5160_STANDALONE
657
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
657
  */
658
  */
658
 //#define X_DRIVER_TYPE  A4988
659
 //#define X_DRIVER_TYPE  A4988
659
 //#define Y_DRIVER_TYPE  A4988
660
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration_adv.h 查看文件

1327
 // @section tmc_smart
1327
 // @section tmc_smart
1328
 
1328
 
1329
 /**
1329
 /**
1330
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1331
- * the hardware SPI interface on your board and define the required CS pins
1332
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1330
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1331
+ * connect your SPI pins to the hardware SPI interface on your board and define
1332
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1333
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1333
  * You may also use software SPI if you wish to use general purpose IO pins.
1334
  * You may also use software SPI if you wish to use general purpose IO pins.
1334
  *
1335
  *
1335
- * To use TMC2208 stepper UART-configurable stepper drivers
1336
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1337
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1338
- * to PDN_UART without a resistor.
1336
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1337
+ * to the driver side PDN_UART pin with a 1K resistor.
1338
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1339
+ * a resistor.
1339
  * The drivers can also be used with hardware serial.
1340
  * The drivers can also be used with hardware serial.
1340
  *
1341
  *
1341
- * TMCStepper library is required for connected TMC stepper drivers.
1342
+ * TMCStepper library is required to use TMC stepper drivers.
1342
  * https://github.com/teemuatlut/TMCStepper
1343
  * https://github.com/teemuatlut/TMCStepper
1343
  */
1344
  */
1344
 #if HAS_TRINAMIC
1345
 #if HAS_TRINAMIC
1345
 
1346
 
1346
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1347
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1347
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1348
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1348
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1349
 
1349
 
1350
   #if AXIS_IS_TMC(X)
1350
   #if AXIS_IS_TMC(X)
1351
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1351
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1352
     #define X_MICROSTEPS   16  // 0..256
1352
     #define X_MICROSTEPS   16  // 0..256
1353
+    #define X_RSENSE     0.11
1353
   #endif
1354
   #endif
1354
 
1355
 
1355
   #if AXIS_IS_TMC(X2)
1356
   #if AXIS_IS_TMC(X2)
1356
     #define X2_CURRENT    800
1357
     #define X2_CURRENT    800
1357
     #define X2_MICROSTEPS  16
1358
     #define X2_MICROSTEPS  16
1359
+    #define X2_RSENSE    0.11
1358
   #endif
1360
   #endif
1359
 
1361
 
1360
   #if AXIS_IS_TMC(Y)
1362
   #if AXIS_IS_TMC(Y)
1361
     #define Y_CURRENT     800
1363
     #define Y_CURRENT     800
1362
     #define Y_MICROSTEPS   16
1364
     #define Y_MICROSTEPS   16
1365
+    #define Y_RSENSE     0.11
1363
   #endif
1366
   #endif
1364
 
1367
 
1365
   #if AXIS_IS_TMC(Y2)
1368
   #if AXIS_IS_TMC(Y2)
1366
     #define Y2_CURRENT    800
1369
     #define Y2_CURRENT    800
1367
     #define Y2_MICROSTEPS  16
1370
     #define Y2_MICROSTEPS  16
1371
+    #define Y2_RSENSE    0.11
1368
   #endif
1372
   #endif
1369
 
1373
 
1370
   #if AXIS_IS_TMC(Z)
1374
   #if AXIS_IS_TMC(Z)
1371
     #define Z_CURRENT     800
1375
     #define Z_CURRENT     800
1372
     #define Z_MICROSTEPS   16
1376
     #define Z_MICROSTEPS   16
1377
+    #define Z_RSENSE     0.11
1373
   #endif
1378
   #endif
1374
 
1379
 
1375
   #if AXIS_IS_TMC(Z2)
1380
   #if AXIS_IS_TMC(Z2)
1376
     #define Z2_CURRENT    800
1381
     #define Z2_CURRENT    800
1377
     #define Z2_MICROSTEPS  16
1382
     #define Z2_MICROSTEPS  16
1383
+    #define Z2_RSENSE    0.11
1378
   #endif
1384
   #endif
1379
 
1385
 
1380
   #if AXIS_IS_TMC(Z3)
1386
   #if AXIS_IS_TMC(Z3)
1381
     #define Z3_CURRENT    800
1387
     #define Z3_CURRENT    800
1382
     #define Z3_MICROSTEPS  16
1388
     #define Z3_MICROSTEPS  16
1389
+    #define Z3_RSENSE    0.11
1383
   #endif
1390
   #endif
1384
 
1391
 
1385
   #if AXIS_IS_TMC(E0)
1392
   #if AXIS_IS_TMC(E0)
1386
     #define E0_CURRENT    800
1393
     #define E0_CURRENT    800
1387
     #define E0_MICROSTEPS  16
1394
     #define E0_MICROSTEPS  16
1395
+    #define E0_RSENSE    0.11
1388
   #endif
1396
   #endif
1389
 
1397
 
1390
   #if AXIS_IS_TMC(E1)
1398
   #if AXIS_IS_TMC(E1)
1391
     #define E1_CURRENT    800
1399
     #define E1_CURRENT    800
1392
     #define E1_MICROSTEPS  16
1400
     #define E1_MICROSTEPS  16
1401
+    #define E1_RSENSE    0.11
1393
   #endif
1402
   #endif
1394
 
1403
 
1395
   #if AXIS_IS_TMC(E2)
1404
   #if AXIS_IS_TMC(E2)
1396
     #define E2_CURRENT    800
1405
     #define E2_CURRENT    800
1397
     #define E2_MICROSTEPS  16
1406
     #define E2_MICROSTEPS  16
1407
+    #define E2_RSENSE    0.11
1398
   #endif
1408
   #endif
1399
 
1409
 
1400
   #if AXIS_IS_TMC(E3)
1410
   #if AXIS_IS_TMC(E3)
1401
     #define E3_CURRENT    800
1411
     #define E3_CURRENT    800
1402
     #define E3_MICROSTEPS  16
1412
     #define E3_MICROSTEPS  16
1413
+    #define E3_RSENSE    0.11
1403
   #endif
1414
   #endif
1404
 
1415
 
1405
   #if AXIS_IS_TMC(E4)
1416
   #if AXIS_IS_TMC(E4)
1406
     #define E4_CURRENT    800
1417
     #define E4_CURRENT    800
1407
     #define E4_MICROSTEPS  16
1418
     #define E4_MICROSTEPS  16
1419
+    #define E4_RSENSE    0.11
1408
   #endif
1420
   #endif
1409
 
1421
 
1410
   #if AXIS_IS_TMC(E5)
1422
   #if AXIS_IS_TMC(E5)
1411
     #define E5_CURRENT    800
1423
     #define E5_CURRENT    800
1412
     #define E5_MICROSTEPS  16
1424
     #define E5_MICROSTEPS  16
1425
+    #define E5_RSENSE    0.11
1413
   #endif
1426
   #endif
1414
 
1427
 
1415
   /**
1428
   /**
1416
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1429
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1417
    * The default pins can be found in your board's pins file.
1430
    * The default pins can be found in your board's pins file.
1418
    */
1431
    */
1419
   //#define X_CS_PIN          -1
1432
   //#define X_CS_PIN          -1
1432
 
1445
 
1433
   /**
1446
   /**
1434
    * Use software SPI for TMC2130.
1447
    * Use software SPI for TMC2130.
1448
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1435
    * The default SW SPI pins are defined the respective pins files,
1449
    * The default SW SPI pins are defined the respective pins files,
1436
    * but you can override or define them here.
1450
    * but you can override or define them here.
1437
    */
1451
    */
1449
   //#define SOFTWARE_DRIVER_ENABLE
1463
   //#define SOFTWARE_DRIVER_ENABLE
1450
 
1464
 
1451
   /**
1465
   /**
1466
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1452
    * Use Trinamic's ultra quiet stepping mode.
1467
    * Use Trinamic's ultra quiet stepping mode.
1453
    * When disabled, Marlin will use spreadCycle stepping mode.
1468
    * When disabled, Marlin will use spreadCycle stepping mode.
1454
    */
1469
    */
1473
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1488
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1474
 
1489
 
1475
   /**
1490
   /**
1476
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1491
+   * Monitor Trinamic drivers for error conditions,
1477
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1492
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1478
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1493
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1479
    * Other detected conditions can be used to stop the current print.
1494
    * Other detected conditions can be used to stop the current print.
1492
   #endif
1507
   #endif
1493
 
1508
 
1494
   /**
1509
   /**
1510
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1495
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1511
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1496
    * This mode allows for faster movements at the expense of higher noise levels.
1512
    * This mode allows for faster movements at the expense of higher noise levels.
1497
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1513
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1514
   #define E5_HYBRID_THRESHOLD     30
1530
   #define E5_HYBRID_THRESHOLD     30
1515
 
1531
 
1516
   /**
1532
   /**
1533
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1517
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1534
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1518
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1535
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1519
    * X, Y, and Z homing will always be done in spreadCycle mode.
1536
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/Formbot/T_Rex_3/Configuration.h 查看文件

632
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
632
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
633
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
633
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
634
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
634
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
635
- *          TMC5130, TMC5130_STANDALONE
636
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
635
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
636
+ *          TMC5160, TMC5160_STANDALONE
637
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
637
  */
638
  */
638
 //#define X_DRIVER_TYPE  A4988
639
 //#define X_DRIVER_TYPE  A4988
639
 //#define Y_DRIVER_TYPE  A4988
640
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/Formbot/T_Rex_3/Configuration_adv.h 查看文件

1327
 // @section tmc_smart
1327
 // @section tmc_smart
1328
 
1328
 
1329
 /**
1329
 /**
1330
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1331
- * the hardware SPI interface on your board and define the required CS pins
1332
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1330
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1331
+ * connect your SPI pins to the hardware SPI interface on your board and define
1332
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1333
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1333
  * You may also use software SPI if you wish to use general purpose IO pins.
1334
  * You may also use software SPI if you wish to use general purpose IO pins.
1334
  *
1335
  *
1335
- * To use TMC2208 stepper UART-configurable stepper drivers
1336
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1337
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1338
- * to PDN_UART without a resistor.
1336
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1337
+ * to the driver side PDN_UART pin with a 1K resistor.
1338
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1339
+ * a resistor.
1339
  * The drivers can also be used with hardware serial.
1340
  * The drivers can also be used with hardware serial.
1340
  *
1341
  *
1341
- * TMCStepper library is required for connected TMC stepper drivers.
1342
+ * TMCStepper library is required to use TMC stepper drivers.
1342
  * https://github.com/teemuatlut/TMCStepper
1343
  * https://github.com/teemuatlut/TMCStepper
1343
  */
1344
  */
1344
 #if HAS_TRINAMIC
1345
 #if HAS_TRINAMIC
1345
 
1346
 
1346
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1347
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1347
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1348
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1348
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1349
 
1349
 
1350
   #if AXIS_IS_TMC(X)
1350
   #if AXIS_IS_TMC(X)
1351
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1351
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1352
     #define X_MICROSTEPS   16  // 0..256
1352
     #define X_MICROSTEPS   16  // 0..256
1353
+    #define X_RSENSE     0.11
1353
   #endif
1354
   #endif
1354
 
1355
 
1355
   #if AXIS_IS_TMC(X2)
1356
   #if AXIS_IS_TMC(X2)
1356
     #define X2_CURRENT    800
1357
     #define X2_CURRENT    800
1357
     #define X2_MICROSTEPS  16
1358
     #define X2_MICROSTEPS  16
1359
+    #define X2_RSENSE    0.11
1358
   #endif
1360
   #endif
1359
 
1361
 
1360
   #if AXIS_IS_TMC(Y)
1362
   #if AXIS_IS_TMC(Y)
1361
     #define Y_CURRENT     800
1363
     #define Y_CURRENT     800
1362
     #define Y_MICROSTEPS   16
1364
     #define Y_MICROSTEPS   16
1365
+    #define Y_RSENSE     0.11
1363
   #endif
1366
   #endif
1364
 
1367
 
1365
   #if AXIS_IS_TMC(Y2)
1368
   #if AXIS_IS_TMC(Y2)
1366
     #define Y2_CURRENT    800
1369
     #define Y2_CURRENT    800
1367
     #define Y2_MICROSTEPS  16
1370
     #define Y2_MICROSTEPS  16
1371
+    #define Y2_RSENSE    0.11
1368
   #endif
1372
   #endif
1369
 
1373
 
1370
   #if AXIS_IS_TMC(Z)
1374
   #if AXIS_IS_TMC(Z)
1371
     #define Z_CURRENT     800
1375
     #define Z_CURRENT     800
1372
     #define Z_MICROSTEPS   16
1376
     #define Z_MICROSTEPS   16
1377
+    #define Z_RSENSE     0.11
1373
   #endif
1378
   #endif
1374
 
1379
 
1375
   #if AXIS_IS_TMC(Z2)
1380
   #if AXIS_IS_TMC(Z2)
1376
     #define Z2_CURRENT    800
1381
     #define Z2_CURRENT    800
1377
     #define Z2_MICROSTEPS  16
1382
     #define Z2_MICROSTEPS  16
1383
+    #define Z2_RSENSE    0.11
1378
   #endif
1384
   #endif
1379
 
1385
 
1380
   #if AXIS_IS_TMC(Z3)
1386
   #if AXIS_IS_TMC(Z3)
1381
     #define Z3_CURRENT    800
1387
     #define Z3_CURRENT    800
1382
     #define Z3_MICROSTEPS  16
1388
     #define Z3_MICROSTEPS  16
1389
+    #define Z3_RSENSE    0.11
1383
   #endif
1390
   #endif
1384
 
1391
 
1385
   #if AXIS_IS_TMC(E0)
1392
   #if AXIS_IS_TMC(E0)
1386
     #define E0_CURRENT    800
1393
     #define E0_CURRENT    800
1387
     #define E0_MICROSTEPS  16
1394
     #define E0_MICROSTEPS  16
1395
+    #define E0_RSENSE    0.11
1388
   #endif
1396
   #endif
1389
 
1397
 
1390
   #if AXIS_IS_TMC(E1)
1398
   #if AXIS_IS_TMC(E1)
1391
     #define E1_CURRENT    800
1399
     #define E1_CURRENT    800
1392
     #define E1_MICROSTEPS  16
1400
     #define E1_MICROSTEPS  16
1401
+    #define E1_RSENSE    0.11
1393
   #endif
1402
   #endif
1394
 
1403
 
1395
   #if AXIS_IS_TMC(E2)
1404
   #if AXIS_IS_TMC(E2)
1396
     #define E2_CURRENT    800
1405
     #define E2_CURRENT    800
1397
     #define E2_MICROSTEPS  16
1406
     #define E2_MICROSTEPS  16
1407
+    #define E2_RSENSE    0.11
1398
   #endif
1408
   #endif
1399
 
1409
 
1400
   #if AXIS_IS_TMC(E3)
1410
   #if AXIS_IS_TMC(E3)
1401
     #define E3_CURRENT    800
1411
     #define E3_CURRENT    800
1402
     #define E3_MICROSTEPS  16
1412
     #define E3_MICROSTEPS  16
1413
+    #define E3_RSENSE    0.11
1403
   #endif
1414
   #endif
1404
 
1415
 
1405
   #if AXIS_IS_TMC(E4)
1416
   #if AXIS_IS_TMC(E4)
1406
     #define E4_CURRENT    800
1417
     #define E4_CURRENT    800
1407
     #define E4_MICROSTEPS  16
1418
     #define E4_MICROSTEPS  16
1419
+    #define E4_RSENSE    0.11
1408
   #endif
1420
   #endif
1409
 
1421
 
1410
   #if AXIS_IS_TMC(E5)
1422
   #if AXIS_IS_TMC(E5)
1411
     #define E5_CURRENT    800
1423
     #define E5_CURRENT    800
1412
     #define E5_MICROSTEPS  16
1424
     #define E5_MICROSTEPS  16
1425
+    #define E5_RSENSE    0.11
1413
   #endif
1426
   #endif
1414
 
1427
 
1415
   /**
1428
   /**
1416
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1429
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1417
    * The default pins can be found in your board's pins file.
1430
    * The default pins can be found in your board's pins file.
1418
    */
1431
    */
1419
   //#define X_CS_PIN          -1
1432
   //#define X_CS_PIN          -1
1432
 
1445
 
1433
   /**
1446
   /**
1434
    * Use software SPI for TMC2130.
1447
    * Use software SPI for TMC2130.
1448
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1435
    * The default SW SPI pins are defined the respective pins files,
1449
    * The default SW SPI pins are defined the respective pins files,
1436
    * but you can override or define them here.
1450
    * but you can override or define them here.
1437
    */
1451
    */
1449
   //#define SOFTWARE_DRIVER_ENABLE
1463
   //#define SOFTWARE_DRIVER_ENABLE
1450
 
1464
 
1451
   /**
1465
   /**
1466
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1452
    * Use Trinamic's ultra quiet stepping mode.
1467
    * Use Trinamic's ultra quiet stepping mode.
1453
    * When disabled, Marlin will use spreadCycle stepping mode.
1468
    * When disabled, Marlin will use spreadCycle stepping mode.
1454
    */
1469
    */
1473
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1488
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1474
 
1489
 
1475
   /**
1490
   /**
1476
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1491
+   * Monitor Trinamic drivers for error conditions,
1477
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1492
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1478
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1493
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1479
    * Other detected conditions can be used to stop the current print.
1494
    * Other detected conditions can be used to stop the current print.
1492
   #endif
1507
   #endif
1493
 
1508
 
1494
   /**
1509
   /**
1510
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1495
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1511
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1496
    * This mode allows for faster movements at the expense of higher noise levels.
1512
    * This mode allows for faster movements at the expense of higher noise levels.
1497
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1513
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1514
   #define E5_HYBRID_THRESHOLD     30
1530
   #define E5_HYBRID_THRESHOLD     30
1515
 
1531
 
1516
   /**
1532
   /**
1533
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1517
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1534
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1518
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1535
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1519
    * X, Y, and Z homing will always be done in spreadCycle mode.
1536
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/Geeetech/GT2560/Configuration.h 查看文件

638
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
638
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
639
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
639
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
640
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
640
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
641
- *          TMC5130, TMC5130_STANDALONE
642
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
641
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
642
+ *          TMC5160, TMC5160_STANDALONE
643
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
643
  */
644
  */
644
 //#define X_DRIVER_TYPE  A4988
645
 //#define X_DRIVER_TYPE  A4988
645
 //#define Y_DRIVER_TYPE  A4988
646
 //#define Y_DRIVER_TYPE  A4988

+ 3
- 2
Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h 查看文件

623
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
623
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
624
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
624
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
625
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
625
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
626
- *          TMC5130, TMC5130_STANDALONE
627
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
626
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
627
+ *          TMC5160, TMC5160_STANDALONE
628
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
628
  */
629
  */
629
 //#define X_DRIVER_TYPE  A4988
630
 //#define X_DRIVER_TYPE  A4988
630
 //#define Y_DRIVER_TYPE  A4988
631
 //#define Y_DRIVER_TYPE  A4988

+ 3
- 2
Marlin/src/config/examples/Geeetech/MeCreator2/Configuration.h 查看文件

630
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
630
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
631
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
631
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
632
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
632
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
633
- *          TMC5130, TMC5130_STANDALONE
634
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
633
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
634
+ *          TMC5160, TMC5160_STANDALONE
635
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
635
  */
636
  */
636
 //#define X_DRIVER_TYPE  A4988
637
 //#define X_DRIVER_TYPE  A4988
637
 //#define Y_DRIVER_TYPE  A4988
638
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/Geeetech/MeCreator2/Configuration_adv.h 查看文件

1323
 // @section tmc_smart
1323
 // @section tmc_smart
1324
 
1324
 
1325
 /**
1325
 /**
1326
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1327
- * the hardware SPI interface on your board and define the required CS pins
1328
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1326
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1327
+ * connect your SPI pins to the hardware SPI interface on your board and define
1328
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1329
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1329
  * You may also use software SPI if you wish to use general purpose IO pins.
1330
  * You may also use software SPI if you wish to use general purpose IO pins.
1330
  *
1331
  *
1331
- * To use TMC2208 stepper UART-configurable stepper drivers
1332
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1333
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1334
- * to PDN_UART without a resistor.
1332
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1333
+ * to the driver side PDN_UART pin with a 1K resistor.
1334
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1335
+ * a resistor.
1335
  * The drivers can also be used with hardware serial.
1336
  * The drivers can also be used with hardware serial.
1336
  *
1337
  *
1337
- * TMCStepper library is required for connected TMC stepper drivers.
1338
+ * TMCStepper library is required to use TMC stepper drivers.
1338
  * https://github.com/teemuatlut/TMCStepper
1339
  * https://github.com/teemuatlut/TMCStepper
1339
  */
1340
  */
1340
 #if HAS_TRINAMIC
1341
 #if HAS_TRINAMIC
1341
 
1342
 
1342
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1343
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1343
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1344
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1344
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1345
 
1345
 
1346
   #if AXIS_IS_TMC(X)
1346
   #if AXIS_IS_TMC(X)
1347
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1347
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1348
     #define X_MICROSTEPS   16  // 0..256
1348
     #define X_MICROSTEPS   16  // 0..256
1349
+    #define X_RSENSE     0.11
1349
   #endif
1350
   #endif
1350
 
1351
 
1351
   #if AXIS_IS_TMC(X2)
1352
   #if AXIS_IS_TMC(X2)
1352
     #define X2_CURRENT    800
1353
     #define X2_CURRENT    800
1353
     #define X2_MICROSTEPS  16
1354
     #define X2_MICROSTEPS  16
1355
+    #define X2_RSENSE    0.11
1354
   #endif
1356
   #endif
1355
 
1357
 
1356
   #if AXIS_IS_TMC(Y)
1358
   #if AXIS_IS_TMC(Y)
1357
     #define Y_CURRENT     800
1359
     #define Y_CURRENT     800
1358
     #define Y_MICROSTEPS   16
1360
     #define Y_MICROSTEPS   16
1361
+    #define Y_RSENSE     0.11
1359
   #endif
1362
   #endif
1360
 
1363
 
1361
   #if AXIS_IS_TMC(Y2)
1364
   #if AXIS_IS_TMC(Y2)
1362
     #define Y2_CURRENT    800
1365
     #define Y2_CURRENT    800
1363
     #define Y2_MICROSTEPS  16
1366
     #define Y2_MICROSTEPS  16
1367
+    #define Y2_RSENSE    0.11
1364
   #endif
1368
   #endif
1365
 
1369
 
1366
   #if AXIS_IS_TMC(Z)
1370
   #if AXIS_IS_TMC(Z)
1367
     #define Z_CURRENT     800
1371
     #define Z_CURRENT     800
1368
     #define Z_MICROSTEPS   16
1372
     #define Z_MICROSTEPS   16
1373
+    #define Z_RSENSE     0.11
1369
   #endif
1374
   #endif
1370
 
1375
 
1371
   #if AXIS_IS_TMC(Z2)
1376
   #if AXIS_IS_TMC(Z2)
1372
     #define Z2_CURRENT    800
1377
     #define Z2_CURRENT    800
1373
     #define Z2_MICROSTEPS  16
1378
     #define Z2_MICROSTEPS  16
1379
+    #define Z2_RSENSE    0.11
1374
   #endif
1380
   #endif
1375
 
1381
 
1376
   #if AXIS_IS_TMC(Z3)
1382
   #if AXIS_IS_TMC(Z3)
1377
     #define Z3_CURRENT    800
1383
     #define Z3_CURRENT    800
1378
     #define Z3_MICROSTEPS  16
1384
     #define Z3_MICROSTEPS  16
1385
+    #define Z3_RSENSE    0.11
1379
   #endif
1386
   #endif
1380
 
1387
 
1381
   #if AXIS_IS_TMC(E0)
1388
   #if AXIS_IS_TMC(E0)
1382
     #define E0_CURRENT    800
1389
     #define E0_CURRENT    800
1383
     #define E0_MICROSTEPS  16
1390
     #define E0_MICROSTEPS  16
1391
+    #define E0_RSENSE    0.11
1384
   #endif
1392
   #endif
1385
 
1393
 
1386
   #if AXIS_IS_TMC(E1)
1394
   #if AXIS_IS_TMC(E1)
1387
     #define E1_CURRENT    800
1395
     #define E1_CURRENT    800
1388
     #define E1_MICROSTEPS  16
1396
     #define E1_MICROSTEPS  16
1397
+    #define E1_RSENSE    0.11
1389
   #endif
1398
   #endif
1390
 
1399
 
1391
   #if AXIS_IS_TMC(E2)
1400
   #if AXIS_IS_TMC(E2)
1392
     #define E2_CURRENT    800
1401
     #define E2_CURRENT    800
1393
     #define E2_MICROSTEPS  16
1402
     #define E2_MICROSTEPS  16
1403
+    #define E2_RSENSE    0.11
1394
   #endif
1404
   #endif
1395
 
1405
 
1396
   #if AXIS_IS_TMC(E3)
1406
   #if AXIS_IS_TMC(E3)
1397
     #define E3_CURRENT    800
1407
     #define E3_CURRENT    800
1398
     #define E3_MICROSTEPS  16
1408
     #define E3_MICROSTEPS  16
1409
+    #define E3_RSENSE    0.11
1399
   #endif
1410
   #endif
1400
 
1411
 
1401
   #if AXIS_IS_TMC(E4)
1412
   #if AXIS_IS_TMC(E4)
1402
     #define E4_CURRENT    800
1413
     #define E4_CURRENT    800
1403
     #define E4_MICROSTEPS  16
1414
     #define E4_MICROSTEPS  16
1415
+    #define E4_RSENSE    0.11
1404
   #endif
1416
   #endif
1405
 
1417
 
1406
   #if AXIS_IS_TMC(E5)
1418
   #if AXIS_IS_TMC(E5)
1407
     #define E5_CURRENT    800
1419
     #define E5_CURRENT    800
1408
     #define E5_MICROSTEPS  16
1420
     #define E5_MICROSTEPS  16
1421
+    #define E5_RSENSE    0.11
1409
   #endif
1422
   #endif
1410
 
1423
 
1411
   /**
1424
   /**
1412
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1425
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1413
    * The default pins can be found in your board's pins file.
1426
    * The default pins can be found in your board's pins file.
1414
    */
1427
    */
1415
   //#define X_CS_PIN          -1
1428
   //#define X_CS_PIN          -1
1428
 
1441
 
1429
   /**
1442
   /**
1430
    * Use software SPI for TMC2130.
1443
    * Use software SPI for TMC2130.
1444
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1431
    * The default SW SPI pins are defined the respective pins files,
1445
    * The default SW SPI pins are defined the respective pins files,
1432
    * but you can override or define them here.
1446
    * but you can override or define them here.
1433
    */
1447
    */
1445
   //#define SOFTWARE_DRIVER_ENABLE
1459
   //#define SOFTWARE_DRIVER_ENABLE
1446
 
1460
 
1447
   /**
1461
   /**
1462
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1448
    * Use Trinamic's ultra quiet stepping mode.
1463
    * Use Trinamic's ultra quiet stepping mode.
1449
    * When disabled, Marlin will use spreadCycle stepping mode.
1464
    * When disabled, Marlin will use spreadCycle stepping mode.
1450
    */
1465
    */
1469
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1484
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1470
 
1485
 
1471
   /**
1486
   /**
1472
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1487
+   * Monitor Trinamic drivers for error conditions,
1473
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1488
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1474
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1489
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1475
    * Other detected conditions can be used to stop the current print.
1490
    * Other detected conditions can be used to stop the current print.
1488
   #endif
1503
   #endif
1489
 
1504
 
1490
   /**
1505
   /**
1506
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1491
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1507
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1492
    * This mode allows for faster movements at the expense of higher noise levels.
1508
    * This mode allows for faster movements at the expense of higher noise levels.
1493
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1509
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1510
   #define E5_HYBRID_THRESHOLD     30
1526
   #define E5_HYBRID_THRESHOLD     30
1511
 
1527
 
1512
   /**
1528
   /**
1529
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1513
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1530
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1514
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1531
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1515
    * X, Y, and Z homing will always be done in spreadCycle mode.
1532
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h 查看文件

638
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
638
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
639
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
639
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
640
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
640
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
641
- *          TMC5130, TMC5130_STANDALONE
642
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
641
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
642
+ *          TMC5160, TMC5160_STANDALONE
643
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
643
  */
644
  */
644
 //#define X_DRIVER_TYPE  A4988
645
 //#define X_DRIVER_TYPE  A4988
645
 //#define Y_DRIVER_TYPE  A4988
646
 //#define Y_DRIVER_TYPE  A4988

+ 3
- 2
Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h 查看文件

638
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
638
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
639
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
639
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
640
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
640
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
641
- *          TMC5130, TMC5130_STANDALONE
642
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
641
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
642
+ *          TMC5160, TMC5160_STANDALONE
643
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
643
  */
644
  */
644
 //#define X_DRIVER_TYPE  A4988
645
 //#define X_DRIVER_TYPE  A4988
645
 //#define Y_DRIVER_TYPE  A4988
646
 //#define Y_DRIVER_TYPE  A4988

+ 3
- 2
Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h 查看文件

623
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
623
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
624
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
624
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
625
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
625
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
626
- *          TMC5130, TMC5130_STANDALONE
627
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
626
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
627
+ *          TMC5160, TMC5160_STANDALONE
628
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
628
  */
629
  */
629
 //#define X_DRIVER_TYPE  A4988
630
 //#define X_DRIVER_TYPE  A4988
630
 //#define Y_DRIVER_TYPE  A4988
631
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h 查看文件

1322
 // @section tmc_smart
1322
 // @section tmc_smart
1323
 
1323
 
1324
 /**
1324
 /**
1325
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1326
- * the hardware SPI interface on your board and define the required CS pins
1327
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1325
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1326
+ * connect your SPI pins to the hardware SPI interface on your board and define
1327
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1328
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1328
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  *
1330
  *
1330
- * To use TMC2208 stepper UART-configurable stepper drivers
1331
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1332
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1333
- * to PDN_UART without a resistor.
1331
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1332
+ * to the driver side PDN_UART pin with a 1K resistor.
1333
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1334
+ * a resistor.
1334
  * The drivers can also be used with hardware serial.
1335
  * The drivers can also be used with hardware serial.
1335
  *
1336
  *
1336
- * TMCStepper library is required for connected TMC stepper drivers.
1337
+ * TMCStepper library is required to use TMC stepper drivers.
1337
  * https://github.com/teemuatlut/TMCStepper
1338
  * https://github.com/teemuatlut/TMCStepper
1338
  */
1339
  */
1339
 #if HAS_TRINAMIC
1340
 #if HAS_TRINAMIC
1340
 
1341
 
1341
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1344
 
1344
 
1345
   #if AXIS_IS_TMC(X)
1345
   #if AXIS_IS_TMC(X)
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1347
     #define X_MICROSTEPS   16  // 0..256
1347
     #define X_MICROSTEPS   16  // 0..256
1348
+    #define X_RSENSE     0.11
1348
   #endif
1349
   #endif
1349
 
1350
 
1350
   #if AXIS_IS_TMC(X2)
1351
   #if AXIS_IS_TMC(X2)
1351
     #define X2_CURRENT    800
1352
     #define X2_CURRENT    800
1352
     #define X2_MICROSTEPS  16
1353
     #define X2_MICROSTEPS  16
1354
+    #define X2_RSENSE    0.11
1353
   #endif
1355
   #endif
1354
 
1356
 
1355
   #if AXIS_IS_TMC(Y)
1357
   #if AXIS_IS_TMC(Y)
1356
     #define Y_CURRENT     800
1358
     #define Y_CURRENT     800
1357
     #define Y_MICROSTEPS   16
1359
     #define Y_MICROSTEPS   16
1360
+    #define Y_RSENSE     0.11
1358
   #endif
1361
   #endif
1359
 
1362
 
1360
   #if AXIS_IS_TMC(Y2)
1363
   #if AXIS_IS_TMC(Y2)
1361
     #define Y2_CURRENT    800
1364
     #define Y2_CURRENT    800
1362
     #define Y2_MICROSTEPS  16
1365
     #define Y2_MICROSTEPS  16
1366
+    #define Y2_RSENSE    0.11
1363
   #endif
1367
   #endif
1364
 
1368
 
1365
   #if AXIS_IS_TMC(Z)
1369
   #if AXIS_IS_TMC(Z)
1366
     #define Z_CURRENT     800
1370
     #define Z_CURRENT     800
1367
     #define Z_MICROSTEPS   16
1371
     #define Z_MICROSTEPS   16
1372
+    #define Z_RSENSE     0.11
1368
   #endif
1373
   #endif
1369
 
1374
 
1370
   #if AXIS_IS_TMC(Z2)
1375
   #if AXIS_IS_TMC(Z2)
1371
     #define Z2_CURRENT    800
1376
     #define Z2_CURRENT    800
1372
     #define Z2_MICROSTEPS  16
1377
     #define Z2_MICROSTEPS  16
1378
+    #define Z2_RSENSE    0.11
1373
   #endif
1379
   #endif
1374
 
1380
 
1375
   #if AXIS_IS_TMC(Z3)
1381
   #if AXIS_IS_TMC(Z3)
1376
     #define Z3_CURRENT    800
1382
     #define Z3_CURRENT    800
1377
     #define Z3_MICROSTEPS  16
1383
     #define Z3_MICROSTEPS  16
1384
+    #define Z3_RSENSE    0.11
1378
   #endif
1385
   #endif
1379
 
1386
 
1380
   #if AXIS_IS_TMC(E0)
1387
   #if AXIS_IS_TMC(E0)
1381
     #define E0_CURRENT    800
1388
     #define E0_CURRENT    800
1382
     #define E0_MICROSTEPS  16
1389
     #define E0_MICROSTEPS  16
1390
+    #define E0_RSENSE    0.11
1383
   #endif
1391
   #endif
1384
 
1392
 
1385
   #if AXIS_IS_TMC(E1)
1393
   #if AXIS_IS_TMC(E1)
1386
     #define E1_CURRENT    800
1394
     #define E1_CURRENT    800
1387
     #define E1_MICROSTEPS  16
1395
     #define E1_MICROSTEPS  16
1396
+    #define E1_RSENSE    0.11
1388
   #endif
1397
   #endif
1389
 
1398
 
1390
   #if AXIS_IS_TMC(E2)
1399
   #if AXIS_IS_TMC(E2)
1391
     #define E2_CURRENT    800
1400
     #define E2_CURRENT    800
1392
     #define E2_MICROSTEPS  16
1401
     #define E2_MICROSTEPS  16
1402
+    #define E2_RSENSE    0.11
1393
   #endif
1403
   #endif
1394
 
1404
 
1395
   #if AXIS_IS_TMC(E3)
1405
   #if AXIS_IS_TMC(E3)
1396
     #define E3_CURRENT    800
1406
     #define E3_CURRENT    800
1397
     #define E3_MICROSTEPS  16
1407
     #define E3_MICROSTEPS  16
1408
+    #define E3_RSENSE    0.11
1398
   #endif
1409
   #endif
1399
 
1410
 
1400
   #if AXIS_IS_TMC(E4)
1411
   #if AXIS_IS_TMC(E4)
1401
     #define E4_CURRENT    800
1412
     #define E4_CURRENT    800
1402
     #define E4_MICROSTEPS  16
1413
     #define E4_MICROSTEPS  16
1414
+    #define E4_RSENSE    0.11
1403
   #endif
1415
   #endif
1404
 
1416
 
1405
   #if AXIS_IS_TMC(E5)
1417
   #if AXIS_IS_TMC(E5)
1406
     #define E5_CURRENT    800
1418
     #define E5_CURRENT    800
1407
     #define E5_MICROSTEPS  16
1419
     #define E5_MICROSTEPS  16
1420
+    #define E5_RSENSE    0.11
1408
   #endif
1421
   #endif
1409
 
1422
 
1410
   /**
1423
   /**
1411
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1424
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1412
    * The default pins can be found in your board's pins file.
1425
    * The default pins can be found in your board's pins file.
1413
    */
1426
    */
1414
   //#define X_CS_PIN          -1
1427
   //#define X_CS_PIN          -1
1427
 
1440
 
1428
   /**
1441
   /**
1429
    * Use software SPI for TMC2130.
1442
    * Use software SPI for TMC2130.
1443
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1430
    * The default SW SPI pins are defined the respective pins files,
1444
    * The default SW SPI pins are defined the respective pins files,
1431
    * but you can override or define them here.
1445
    * but you can override or define them here.
1432
    */
1446
    */
1444
   //#define SOFTWARE_DRIVER_ENABLE
1458
   //#define SOFTWARE_DRIVER_ENABLE
1445
 
1459
 
1446
   /**
1460
   /**
1461
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1447
    * Use Trinamic's ultra quiet stepping mode.
1462
    * Use Trinamic's ultra quiet stepping mode.
1448
    * When disabled, Marlin will use spreadCycle stepping mode.
1463
    * When disabled, Marlin will use spreadCycle stepping mode.
1449
    */
1464
    */
1468
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1483
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1469
 
1484
 
1470
   /**
1485
   /**
1471
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1486
+   * Monitor Trinamic drivers for error conditions,
1472
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1487
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1473
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1488
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1474
    * Other detected conditions can be used to stop the current print.
1489
    * Other detected conditions can be used to stop the current print.
1487
   #endif
1502
   #endif
1488
 
1503
 
1489
   /**
1504
   /**
1505
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1490
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1506
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1491
    * This mode allows for faster movements at the expense of higher noise levels.
1507
    * This mode allows for faster movements at the expense of higher noise levels.
1492
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1508
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1509
   #define E5_HYBRID_THRESHOLD     30
1525
   #define E5_HYBRID_THRESHOLD     30
1510
 
1526
 
1511
   /**
1527
   /**
1528
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1512
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1529
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1513
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1530
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1514
    * X, Y, and Z homing will always be done in spreadCycle mode.
1531
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h 查看文件

623
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
623
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
624
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
624
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
625
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
625
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
626
- *          TMC5130, TMC5130_STANDALONE
627
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
626
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
627
+ *          TMC5160, TMC5160_STANDALONE
628
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
628
  */
629
  */
629
 //#define X_DRIVER_TYPE  A4988
630
 //#define X_DRIVER_TYPE  A4988
630
 //#define Y_DRIVER_TYPE  A4988
631
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h 查看文件

1322
 // @section tmc_smart
1322
 // @section tmc_smart
1323
 
1323
 
1324
 /**
1324
 /**
1325
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1326
- * the hardware SPI interface on your board and define the required CS pins
1327
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1325
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1326
+ * connect your SPI pins to the hardware SPI interface on your board and define
1327
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1328
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1328
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  *
1330
  *
1330
- * To use TMC2208 stepper UART-configurable stepper drivers
1331
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1332
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1333
- * to PDN_UART without a resistor.
1331
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1332
+ * to the driver side PDN_UART pin with a 1K resistor.
1333
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1334
+ * a resistor.
1334
  * The drivers can also be used with hardware serial.
1335
  * The drivers can also be used with hardware serial.
1335
  *
1336
  *
1336
- * TMCStepper library is required for connected TMC stepper drivers.
1337
+ * TMCStepper library is required to use TMC stepper drivers.
1337
  * https://github.com/teemuatlut/TMCStepper
1338
  * https://github.com/teemuatlut/TMCStepper
1338
  */
1339
  */
1339
 #if HAS_TRINAMIC
1340
 #if HAS_TRINAMIC
1340
 
1341
 
1341
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1344
 
1344
 
1345
   #if AXIS_IS_TMC(X)
1345
   #if AXIS_IS_TMC(X)
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1347
     #define X_MICROSTEPS   16  // 0..256
1347
     #define X_MICROSTEPS   16  // 0..256
1348
+    #define X_RSENSE     0.11
1348
   #endif
1349
   #endif
1349
 
1350
 
1350
   #if AXIS_IS_TMC(X2)
1351
   #if AXIS_IS_TMC(X2)
1351
     #define X2_CURRENT    800
1352
     #define X2_CURRENT    800
1352
     #define X2_MICROSTEPS  16
1353
     #define X2_MICROSTEPS  16
1354
+    #define X2_RSENSE    0.11
1353
   #endif
1355
   #endif
1354
 
1356
 
1355
   #if AXIS_IS_TMC(Y)
1357
   #if AXIS_IS_TMC(Y)
1356
     #define Y_CURRENT     800
1358
     #define Y_CURRENT     800
1357
     #define Y_MICROSTEPS   16
1359
     #define Y_MICROSTEPS   16
1360
+    #define Y_RSENSE     0.11
1358
   #endif
1361
   #endif
1359
 
1362
 
1360
   #if AXIS_IS_TMC(Y2)
1363
   #if AXIS_IS_TMC(Y2)
1361
     #define Y2_CURRENT    800
1364
     #define Y2_CURRENT    800
1362
     #define Y2_MICROSTEPS  16
1365
     #define Y2_MICROSTEPS  16
1366
+    #define Y2_RSENSE    0.11
1363
   #endif
1367
   #endif
1364
 
1368
 
1365
   #if AXIS_IS_TMC(Z)
1369
   #if AXIS_IS_TMC(Z)
1366
     #define Z_CURRENT     800
1370
     #define Z_CURRENT     800
1367
     #define Z_MICROSTEPS   16
1371
     #define Z_MICROSTEPS   16
1372
+    #define Z_RSENSE     0.11
1368
   #endif
1373
   #endif
1369
 
1374
 
1370
   #if AXIS_IS_TMC(Z2)
1375
   #if AXIS_IS_TMC(Z2)
1371
     #define Z2_CURRENT    800
1376
     #define Z2_CURRENT    800
1372
     #define Z2_MICROSTEPS  16
1377
     #define Z2_MICROSTEPS  16
1378
+    #define Z2_RSENSE    0.11
1373
   #endif
1379
   #endif
1374
 
1380
 
1375
   #if AXIS_IS_TMC(Z3)
1381
   #if AXIS_IS_TMC(Z3)
1376
     #define Z3_CURRENT    800
1382
     #define Z3_CURRENT    800
1377
     #define Z3_MICROSTEPS  16
1383
     #define Z3_MICROSTEPS  16
1384
+    #define Z3_RSENSE    0.11
1378
   #endif
1385
   #endif
1379
 
1386
 
1380
   #if AXIS_IS_TMC(E0)
1387
   #if AXIS_IS_TMC(E0)
1381
     #define E0_CURRENT    800
1388
     #define E0_CURRENT    800
1382
     #define E0_MICROSTEPS  16
1389
     #define E0_MICROSTEPS  16
1390
+    #define E0_RSENSE    0.11
1383
   #endif
1391
   #endif
1384
 
1392
 
1385
   #if AXIS_IS_TMC(E1)
1393
   #if AXIS_IS_TMC(E1)
1386
     #define E1_CURRENT    800
1394
     #define E1_CURRENT    800
1387
     #define E1_MICROSTEPS  16
1395
     #define E1_MICROSTEPS  16
1396
+    #define E1_RSENSE    0.11
1388
   #endif
1397
   #endif
1389
 
1398
 
1390
   #if AXIS_IS_TMC(E2)
1399
   #if AXIS_IS_TMC(E2)
1391
     #define E2_CURRENT    800
1400
     #define E2_CURRENT    800
1392
     #define E2_MICROSTEPS  16
1401
     #define E2_MICROSTEPS  16
1402
+    #define E2_RSENSE    0.11
1393
   #endif
1403
   #endif
1394
 
1404
 
1395
   #if AXIS_IS_TMC(E3)
1405
   #if AXIS_IS_TMC(E3)
1396
     #define E3_CURRENT    800
1406
     #define E3_CURRENT    800
1397
     #define E3_MICROSTEPS  16
1407
     #define E3_MICROSTEPS  16
1408
+    #define E3_RSENSE    0.11
1398
   #endif
1409
   #endif
1399
 
1410
 
1400
   #if AXIS_IS_TMC(E4)
1411
   #if AXIS_IS_TMC(E4)
1401
     #define E4_CURRENT    800
1412
     #define E4_CURRENT    800
1402
     #define E4_MICROSTEPS  16
1413
     #define E4_MICROSTEPS  16
1414
+    #define E4_RSENSE    0.11
1403
   #endif
1415
   #endif
1404
 
1416
 
1405
   #if AXIS_IS_TMC(E5)
1417
   #if AXIS_IS_TMC(E5)
1406
     #define E5_CURRENT    800
1418
     #define E5_CURRENT    800
1407
     #define E5_MICROSTEPS  16
1419
     #define E5_MICROSTEPS  16
1420
+    #define E5_RSENSE    0.11
1408
   #endif
1421
   #endif
1409
 
1422
 
1410
   /**
1423
   /**
1411
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1424
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1412
    * The default pins can be found in your board's pins file.
1425
    * The default pins can be found in your board's pins file.
1413
    */
1426
    */
1414
   //#define X_CS_PIN          -1
1427
   //#define X_CS_PIN          -1
1427
 
1440
 
1428
   /**
1441
   /**
1429
    * Use software SPI for TMC2130.
1442
    * Use software SPI for TMC2130.
1443
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1430
    * The default SW SPI pins are defined the respective pins files,
1444
    * The default SW SPI pins are defined the respective pins files,
1431
    * but you can override or define them here.
1445
    * but you can override or define them here.
1432
    */
1446
    */
1444
   //#define SOFTWARE_DRIVER_ENABLE
1458
   //#define SOFTWARE_DRIVER_ENABLE
1445
 
1459
 
1446
   /**
1460
   /**
1461
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1447
    * Use Trinamic's ultra quiet stepping mode.
1462
    * Use Trinamic's ultra quiet stepping mode.
1448
    * When disabled, Marlin will use spreadCycle stepping mode.
1463
    * When disabled, Marlin will use spreadCycle stepping mode.
1449
    */
1464
    */
1468
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1483
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1469
 
1484
 
1470
   /**
1485
   /**
1471
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1486
+   * Monitor Trinamic drivers for error conditions,
1472
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1487
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1473
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1488
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1474
    * Other detected conditions can be used to stop the current print.
1489
    * Other detected conditions can be used to stop the current print.
1487
   #endif
1502
   #endif
1488
 
1503
 
1489
   /**
1504
   /**
1505
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1490
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1506
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1491
    * This mode allows for faster movements at the expense of higher noise levels.
1507
    * This mode allows for faster movements at the expense of higher noise levels.
1492
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1508
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1509
   #define E5_HYBRID_THRESHOLD     30
1525
   #define E5_HYBRID_THRESHOLD     30
1510
 
1526
 
1511
   /**
1527
   /**
1528
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1512
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1529
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1513
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1530
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1514
    * X, Y, and Z homing will always be done in spreadCycle mode.
1531
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/Infitary/i3-M508/Configuration.h 查看文件

627
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
627
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
628
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
628
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
629
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
629
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
630
- *          TMC5130, TMC5130_STANDALONE
631
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
630
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
631
+ *          TMC5160, TMC5160_STANDALONE
632
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
632
  */
633
  */
633
 //#define X_DRIVER_TYPE  A4988
634
 //#define X_DRIVER_TYPE  A4988
634
 //#define Y_DRIVER_TYPE  A4988
635
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h 查看文件

1322
 // @section tmc_smart
1322
 // @section tmc_smart
1323
 
1323
 
1324
 /**
1324
 /**
1325
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1326
- * the hardware SPI interface on your board and define the required CS pins
1327
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1325
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1326
+ * connect your SPI pins to the hardware SPI interface on your board and define
1327
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1328
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1328
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  *
1330
  *
1330
- * To use TMC2208 stepper UART-configurable stepper drivers
1331
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1332
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1333
- * to PDN_UART without a resistor.
1331
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1332
+ * to the driver side PDN_UART pin with a 1K resistor.
1333
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1334
+ * a resistor.
1334
  * The drivers can also be used with hardware serial.
1335
  * The drivers can also be used with hardware serial.
1335
  *
1336
  *
1336
- * TMCStepper library is required for connected TMC stepper drivers.
1337
+ * TMCStepper library is required to use TMC stepper drivers.
1337
  * https://github.com/teemuatlut/TMCStepper
1338
  * https://github.com/teemuatlut/TMCStepper
1338
  */
1339
  */
1339
 #if HAS_TRINAMIC
1340
 #if HAS_TRINAMIC
1340
 
1341
 
1341
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1344
 
1344
 
1345
   #if AXIS_IS_TMC(X)
1345
   #if AXIS_IS_TMC(X)
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1347
     #define X_MICROSTEPS   16  // 0..256
1347
     #define X_MICROSTEPS   16  // 0..256
1348
+    #define X_RSENSE     0.11
1348
   #endif
1349
   #endif
1349
 
1350
 
1350
   #if AXIS_IS_TMC(X2)
1351
   #if AXIS_IS_TMC(X2)
1351
     #define X2_CURRENT    800
1352
     #define X2_CURRENT    800
1352
     #define X2_MICROSTEPS  16
1353
     #define X2_MICROSTEPS  16
1354
+    #define X2_RSENSE    0.11
1353
   #endif
1355
   #endif
1354
 
1356
 
1355
   #if AXIS_IS_TMC(Y)
1357
   #if AXIS_IS_TMC(Y)
1356
     #define Y_CURRENT     800
1358
     #define Y_CURRENT     800
1357
     #define Y_MICROSTEPS   16
1359
     #define Y_MICROSTEPS   16
1360
+    #define Y_RSENSE     0.11
1358
   #endif
1361
   #endif
1359
 
1362
 
1360
   #if AXIS_IS_TMC(Y2)
1363
   #if AXIS_IS_TMC(Y2)
1361
     #define Y2_CURRENT    800
1364
     #define Y2_CURRENT    800
1362
     #define Y2_MICROSTEPS  16
1365
     #define Y2_MICROSTEPS  16
1366
+    #define Y2_RSENSE    0.11
1363
   #endif
1367
   #endif
1364
 
1368
 
1365
   #if AXIS_IS_TMC(Z)
1369
   #if AXIS_IS_TMC(Z)
1366
     #define Z_CURRENT     800
1370
     #define Z_CURRENT     800
1367
     #define Z_MICROSTEPS   16
1371
     #define Z_MICROSTEPS   16
1372
+    #define Z_RSENSE     0.11
1368
   #endif
1373
   #endif
1369
 
1374
 
1370
   #if AXIS_IS_TMC(Z2)
1375
   #if AXIS_IS_TMC(Z2)
1371
     #define Z2_CURRENT    800
1376
     #define Z2_CURRENT    800
1372
     #define Z2_MICROSTEPS  16
1377
     #define Z2_MICROSTEPS  16
1378
+    #define Z2_RSENSE    0.11
1373
   #endif
1379
   #endif
1374
 
1380
 
1375
   #if AXIS_IS_TMC(Z3)
1381
   #if AXIS_IS_TMC(Z3)
1376
     #define Z3_CURRENT    800
1382
     #define Z3_CURRENT    800
1377
     #define Z3_MICROSTEPS  16
1383
     #define Z3_MICROSTEPS  16
1384
+    #define Z3_RSENSE    0.11
1378
   #endif
1385
   #endif
1379
 
1386
 
1380
   #if AXIS_IS_TMC(E0)
1387
   #if AXIS_IS_TMC(E0)
1381
     #define E0_CURRENT    800
1388
     #define E0_CURRENT    800
1382
     #define E0_MICROSTEPS  16
1389
     #define E0_MICROSTEPS  16
1390
+    #define E0_RSENSE    0.11
1383
   #endif
1391
   #endif
1384
 
1392
 
1385
   #if AXIS_IS_TMC(E1)
1393
   #if AXIS_IS_TMC(E1)
1386
     #define E1_CURRENT    800
1394
     #define E1_CURRENT    800
1387
     #define E1_MICROSTEPS  16
1395
     #define E1_MICROSTEPS  16
1396
+    #define E1_RSENSE    0.11
1388
   #endif
1397
   #endif
1389
 
1398
 
1390
   #if AXIS_IS_TMC(E2)
1399
   #if AXIS_IS_TMC(E2)
1391
     #define E2_CURRENT    800
1400
     #define E2_CURRENT    800
1392
     #define E2_MICROSTEPS  16
1401
     #define E2_MICROSTEPS  16
1402
+    #define E2_RSENSE    0.11
1393
   #endif
1403
   #endif
1394
 
1404
 
1395
   #if AXIS_IS_TMC(E3)
1405
   #if AXIS_IS_TMC(E3)
1396
     #define E3_CURRENT    800
1406
     #define E3_CURRENT    800
1397
     #define E3_MICROSTEPS  16
1407
     #define E3_MICROSTEPS  16
1408
+    #define E3_RSENSE    0.11
1398
   #endif
1409
   #endif
1399
 
1410
 
1400
   #if AXIS_IS_TMC(E4)
1411
   #if AXIS_IS_TMC(E4)
1401
     #define E4_CURRENT    800
1412
     #define E4_CURRENT    800
1402
     #define E4_MICROSTEPS  16
1413
     #define E4_MICROSTEPS  16
1414
+    #define E4_RSENSE    0.11
1403
   #endif
1415
   #endif
1404
 
1416
 
1405
   #if AXIS_IS_TMC(E5)
1417
   #if AXIS_IS_TMC(E5)
1406
     #define E5_CURRENT    800
1418
     #define E5_CURRENT    800
1407
     #define E5_MICROSTEPS  16
1419
     #define E5_MICROSTEPS  16
1420
+    #define E5_RSENSE    0.11
1408
   #endif
1421
   #endif
1409
 
1422
 
1410
   /**
1423
   /**
1411
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1424
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1412
    * The default pins can be found in your board's pins file.
1425
    * The default pins can be found in your board's pins file.
1413
    */
1426
    */
1414
   //#define X_CS_PIN          -1
1427
   //#define X_CS_PIN          -1
1427
 
1440
 
1428
   /**
1441
   /**
1429
    * Use software SPI for TMC2130.
1442
    * Use software SPI for TMC2130.
1443
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1430
    * The default SW SPI pins are defined the respective pins files,
1444
    * The default SW SPI pins are defined the respective pins files,
1431
    * but you can override or define them here.
1445
    * but you can override or define them here.
1432
    */
1446
    */
1444
   //#define SOFTWARE_DRIVER_ENABLE
1458
   //#define SOFTWARE_DRIVER_ENABLE
1445
 
1459
 
1446
   /**
1460
   /**
1461
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1447
    * Use Trinamic's ultra quiet stepping mode.
1462
    * Use Trinamic's ultra quiet stepping mode.
1448
    * When disabled, Marlin will use spreadCycle stepping mode.
1463
    * When disabled, Marlin will use spreadCycle stepping mode.
1449
    */
1464
    */
1468
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1483
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1469
 
1484
 
1470
   /**
1485
   /**
1471
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1486
+   * Monitor Trinamic drivers for error conditions,
1472
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1487
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1473
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1488
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1474
    * Other detected conditions can be used to stop the current print.
1489
    * Other detected conditions can be used to stop the current print.
1487
   #endif
1502
   #endif
1488
 
1503
 
1489
   /**
1504
   /**
1505
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1490
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1506
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1491
    * This mode allows for faster movements at the expense of higher noise levels.
1507
    * This mode allows for faster movements at the expense of higher noise levels.
1492
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1508
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1509
   #define E5_HYBRID_THRESHOLD     30
1525
   #define E5_HYBRID_THRESHOLD     30
1510
 
1526
 
1511
   /**
1527
   /**
1528
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1512
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1529
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1513
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1530
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1514
    * X, Y, and Z homing will always be done in spreadCycle mode.
1531
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/JGAurora/A5/Configuration.h 查看文件

635
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
635
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
636
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
636
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
637
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
637
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
638
- *          TMC5130, TMC5130_STANDALONE
639
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
638
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
639
+ *          TMC5160, TMC5160_STANDALONE
640
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
640
  */
641
  */
641
 //#define X_DRIVER_TYPE  A4988
642
 //#define X_DRIVER_TYPE  A4988
642
 //#define Y_DRIVER_TYPE  A4988
643
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h 查看文件

1322
 // @section tmc_smart
1322
 // @section tmc_smart
1323
 
1323
 
1324
 /**
1324
 /**
1325
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1326
- * the hardware SPI interface on your board and define the required CS pins
1327
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1325
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1326
+ * connect your SPI pins to the hardware SPI interface on your board and define
1327
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1328
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1328
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  *
1330
  *
1330
- * To use TMC2208 stepper UART-configurable stepper drivers
1331
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1332
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1333
- * to PDN_UART without a resistor.
1331
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1332
+ * to the driver side PDN_UART pin with a 1K resistor.
1333
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1334
+ * a resistor.
1334
  * The drivers can also be used with hardware serial.
1335
  * The drivers can also be used with hardware serial.
1335
  *
1336
  *
1336
- * TMCStepper library is required for connected TMC stepper drivers.
1337
+ * TMCStepper library is required to use TMC stepper drivers.
1337
  * https://github.com/teemuatlut/TMCStepper
1338
  * https://github.com/teemuatlut/TMCStepper
1338
  */
1339
  */
1339
 #if HAS_TRINAMIC
1340
 #if HAS_TRINAMIC
1340
 
1341
 
1341
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1344
 
1344
 
1345
   #if AXIS_IS_TMC(X)
1345
   #if AXIS_IS_TMC(X)
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1347
     #define X_MICROSTEPS   16  // 0..256
1347
     #define X_MICROSTEPS   16  // 0..256
1348
+    #define X_RSENSE     0.11
1348
   #endif
1349
   #endif
1349
 
1350
 
1350
   #if AXIS_IS_TMC(X2)
1351
   #if AXIS_IS_TMC(X2)
1351
     #define X2_CURRENT    800
1352
     #define X2_CURRENT    800
1352
     #define X2_MICROSTEPS  16
1353
     #define X2_MICROSTEPS  16
1354
+    #define X2_RSENSE    0.11
1353
   #endif
1355
   #endif
1354
 
1356
 
1355
   #if AXIS_IS_TMC(Y)
1357
   #if AXIS_IS_TMC(Y)
1356
     #define Y_CURRENT     800
1358
     #define Y_CURRENT     800
1357
     #define Y_MICROSTEPS   16
1359
     #define Y_MICROSTEPS   16
1360
+    #define Y_RSENSE     0.11
1358
   #endif
1361
   #endif
1359
 
1362
 
1360
   #if AXIS_IS_TMC(Y2)
1363
   #if AXIS_IS_TMC(Y2)
1361
     #define Y2_CURRENT    800
1364
     #define Y2_CURRENT    800
1362
     #define Y2_MICROSTEPS  16
1365
     #define Y2_MICROSTEPS  16
1366
+    #define Y2_RSENSE    0.11
1363
   #endif
1367
   #endif
1364
 
1368
 
1365
   #if AXIS_IS_TMC(Z)
1369
   #if AXIS_IS_TMC(Z)
1366
     #define Z_CURRENT     800
1370
     #define Z_CURRENT     800
1367
     #define Z_MICROSTEPS   16
1371
     #define Z_MICROSTEPS   16
1372
+    #define Z_RSENSE     0.11
1368
   #endif
1373
   #endif
1369
 
1374
 
1370
   #if AXIS_IS_TMC(Z2)
1375
   #if AXIS_IS_TMC(Z2)
1371
     #define Z2_CURRENT    800
1376
     #define Z2_CURRENT    800
1372
     #define Z2_MICROSTEPS  16
1377
     #define Z2_MICROSTEPS  16
1378
+    #define Z2_RSENSE    0.11
1373
   #endif
1379
   #endif
1374
 
1380
 
1375
   #if AXIS_IS_TMC(Z3)
1381
   #if AXIS_IS_TMC(Z3)
1376
     #define Z3_CURRENT    800
1382
     #define Z3_CURRENT    800
1377
     #define Z3_MICROSTEPS  16
1383
     #define Z3_MICROSTEPS  16
1384
+    #define Z3_RSENSE    0.11
1378
   #endif
1385
   #endif
1379
 
1386
 
1380
   #if AXIS_IS_TMC(E0)
1387
   #if AXIS_IS_TMC(E0)
1381
     #define E0_CURRENT    800
1388
     #define E0_CURRENT    800
1382
     #define E0_MICROSTEPS  16
1389
     #define E0_MICROSTEPS  16
1390
+    #define E0_RSENSE    0.11
1383
   #endif
1391
   #endif
1384
 
1392
 
1385
   #if AXIS_IS_TMC(E1)
1393
   #if AXIS_IS_TMC(E1)
1386
     #define E1_CURRENT    800
1394
     #define E1_CURRENT    800
1387
     #define E1_MICROSTEPS  16
1395
     #define E1_MICROSTEPS  16
1396
+    #define E1_RSENSE    0.11
1388
   #endif
1397
   #endif
1389
 
1398
 
1390
   #if AXIS_IS_TMC(E2)
1399
   #if AXIS_IS_TMC(E2)
1391
     #define E2_CURRENT    800
1400
     #define E2_CURRENT    800
1392
     #define E2_MICROSTEPS  16
1401
     #define E2_MICROSTEPS  16
1402
+    #define E2_RSENSE    0.11
1393
   #endif
1403
   #endif
1394
 
1404
 
1395
   #if AXIS_IS_TMC(E3)
1405
   #if AXIS_IS_TMC(E3)
1396
     #define E3_CURRENT    800
1406
     #define E3_CURRENT    800
1397
     #define E3_MICROSTEPS  16
1407
     #define E3_MICROSTEPS  16
1408
+    #define E3_RSENSE    0.11
1398
   #endif
1409
   #endif
1399
 
1410
 
1400
   #if AXIS_IS_TMC(E4)
1411
   #if AXIS_IS_TMC(E4)
1401
     #define E4_CURRENT    800
1412
     #define E4_CURRENT    800
1402
     #define E4_MICROSTEPS  16
1413
     #define E4_MICROSTEPS  16
1414
+    #define E4_RSENSE    0.11
1403
   #endif
1415
   #endif
1404
 
1416
 
1405
   #if AXIS_IS_TMC(E5)
1417
   #if AXIS_IS_TMC(E5)
1406
     #define E5_CURRENT    800
1418
     #define E5_CURRENT    800
1407
     #define E5_MICROSTEPS  16
1419
     #define E5_MICROSTEPS  16
1420
+    #define E5_RSENSE    0.11
1408
   #endif
1421
   #endif
1409
 
1422
 
1410
   /**
1423
   /**
1411
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1424
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1412
    * The default pins can be found in your board's pins file.
1425
    * The default pins can be found in your board's pins file.
1413
    */
1426
    */
1414
   //#define X_CS_PIN          -1
1427
   //#define X_CS_PIN          -1
1427
 
1440
 
1428
   /**
1441
   /**
1429
    * Use software SPI for TMC2130.
1442
    * Use software SPI for TMC2130.
1443
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1430
    * The default SW SPI pins are defined the respective pins files,
1444
    * The default SW SPI pins are defined the respective pins files,
1431
    * but you can override or define them here.
1445
    * but you can override or define them here.
1432
    */
1446
    */
1444
   //#define SOFTWARE_DRIVER_ENABLE
1458
   //#define SOFTWARE_DRIVER_ENABLE
1445
 
1459
 
1446
   /**
1460
   /**
1461
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1447
    * Use Trinamic's ultra quiet stepping mode.
1462
    * Use Trinamic's ultra quiet stepping mode.
1448
    * When disabled, Marlin will use spreadCycle stepping mode.
1463
    * When disabled, Marlin will use spreadCycle stepping mode.
1449
    */
1464
    */
1468
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1483
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1469
 
1484
 
1470
   /**
1485
   /**
1471
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1486
+   * Monitor Trinamic drivers for error conditions,
1472
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1487
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1473
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1488
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1474
    * Other detected conditions can be used to stop the current print.
1489
    * Other detected conditions can be used to stop the current print.
1487
   #endif
1502
   #endif
1488
 
1503
 
1489
   /**
1504
   /**
1505
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1490
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1506
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1491
    * This mode allows for faster movements at the expense of higher noise levels.
1507
    * This mode allows for faster movements at the expense of higher noise levels.
1492
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1508
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1509
   #define E5_HYBRID_THRESHOLD     30
1525
   #define E5_HYBRID_THRESHOLD     30
1510
 
1526
 
1511
   /**
1527
   /**
1528
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1512
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1529
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1513
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1530
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1514
    * X, Y, and Z homing will always be done in spreadCycle mode.
1531
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/MakerParts/Configuration.h 查看文件

643
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
643
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
644
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
644
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
645
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
645
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
646
- *          TMC5130, TMC5130_STANDALONE
647
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
646
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
647
+ *          TMC5160, TMC5160_STANDALONE
648
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
648
  */
649
  */
649
 //#define X_DRIVER_TYPE  A4988
650
 //#define X_DRIVER_TYPE  A4988
650
 //#define Y_DRIVER_TYPE  A4988
651
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/MakerParts/Configuration_adv.h 查看文件

1322
 // @section tmc_smart
1322
 // @section tmc_smart
1323
 
1323
 
1324
 /**
1324
 /**
1325
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1326
- * the hardware SPI interface on your board and define the required CS pins
1327
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1325
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1326
+ * connect your SPI pins to the hardware SPI interface on your board and define
1327
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1328
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1328
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  *
1330
  *
1330
- * To use TMC2208 stepper UART-configurable stepper drivers
1331
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1332
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1333
- * to PDN_UART without a resistor.
1331
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1332
+ * to the driver side PDN_UART pin with a 1K resistor.
1333
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1334
+ * a resistor.
1334
  * The drivers can also be used with hardware serial.
1335
  * The drivers can also be used with hardware serial.
1335
  *
1336
  *
1336
- * TMCStepper library is required for connected TMC stepper drivers.
1337
+ * TMCStepper library is required to use TMC stepper drivers.
1337
  * https://github.com/teemuatlut/TMCStepper
1338
  * https://github.com/teemuatlut/TMCStepper
1338
  */
1339
  */
1339
 #if HAS_TRINAMIC
1340
 #if HAS_TRINAMIC
1340
 
1341
 
1341
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1344
 
1344
 
1345
   #if AXIS_IS_TMC(X)
1345
   #if AXIS_IS_TMC(X)
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1347
     #define X_MICROSTEPS   16  // 0..256
1347
     #define X_MICROSTEPS   16  // 0..256
1348
+    #define X_RSENSE     0.11
1348
   #endif
1349
   #endif
1349
 
1350
 
1350
   #if AXIS_IS_TMC(X2)
1351
   #if AXIS_IS_TMC(X2)
1351
     #define X2_CURRENT    800
1352
     #define X2_CURRENT    800
1352
     #define X2_MICROSTEPS  16
1353
     #define X2_MICROSTEPS  16
1354
+    #define X2_RSENSE    0.11
1353
   #endif
1355
   #endif
1354
 
1356
 
1355
   #if AXIS_IS_TMC(Y)
1357
   #if AXIS_IS_TMC(Y)
1356
     #define Y_CURRENT     800
1358
     #define Y_CURRENT     800
1357
     #define Y_MICROSTEPS   16
1359
     #define Y_MICROSTEPS   16
1360
+    #define Y_RSENSE     0.11
1358
   #endif
1361
   #endif
1359
 
1362
 
1360
   #if AXIS_IS_TMC(Y2)
1363
   #if AXIS_IS_TMC(Y2)
1361
     #define Y2_CURRENT    800
1364
     #define Y2_CURRENT    800
1362
     #define Y2_MICROSTEPS  16
1365
     #define Y2_MICROSTEPS  16
1366
+    #define Y2_RSENSE    0.11
1363
   #endif
1367
   #endif
1364
 
1368
 
1365
   #if AXIS_IS_TMC(Z)
1369
   #if AXIS_IS_TMC(Z)
1366
     #define Z_CURRENT     800
1370
     #define Z_CURRENT     800
1367
     #define Z_MICROSTEPS   16
1371
     #define Z_MICROSTEPS   16
1372
+    #define Z_RSENSE     0.11
1368
   #endif
1373
   #endif
1369
 
1374
 
1370
   #if AXIS_IS_TMC(Z2)
1375
   #if AXIS_IS_TMC(Z2)
1371
     #define Z2_CURRENT    800
1376
     #define Z2_CURRENT    800
1372
     #define Z2_MICROSTEPS  16
1377
     #define Z2_MICROSTEPS  16
1378
+    #define Z2_RSENSE    0.11
1373
   #endif
1379
   #endif
1374
 
1380
 
1375
   #if AXIS_IS_TMC(Z3)
1381
   #if AXIS_IS_TMC(Z3)
1376
     #define Z3_CURRENT    800
1382
     #define Z3_CURRENT    800
1377
     #define Z3_MICROSTEPS  16
1383
     #define Z3_MICROSTEPS  16
1384
+    #define Z3_RSENSE    0.11
1378
   #endif
1385
   #endif
1379
 
1386
 
1380
   #if AXIS_IS_TMC(E0)
1387
   #if AXIS_IS_TMC(E0)
1381
     #define E0_CURRENT    800
1388
     #define E0_CURRENT    800
1382
     #define E0_MICROSTEPS  16
1389
     #define E0_MICROSTEPS  16
1390
+    #define E0_RSENSE    0.11
1383
   #endif
1391
   #endif
1384
 
1392
 
1385
   #if AXIS_IS_TMC(E1)
1393
   #if AXIS_IS_TMC(E1)
1386
     #define E1_CURRENT    800
1394
     #define E1_CURRENT    800
1387
     #define E1_MICROSTEPS  16
1395
     #define E1_MICROSTEPS  16
1396
+    #define E1_RSENSE    0.11
1388
   #endif
1397
   #endif
1389
 
1398
 
1390
   #if AXIS_IS_TMC(E2)
1399
   #if AXIS_IS_TMC(E2)
1391
     #define E2_CURRENT    800
1400
     #define E2_CURRENT    800
1392
     #define E2_MICROSTEPS  16
1401
     #define E2_MICROSTEPS  16
1402
+    #define E2_RSENSE    0.11
1393
   #endif
1403
   #endif
1394
 
1404
 
1395
   #if AXIS_IS_TMC(E3)
1405
   #if AXIS_IS_TMC(E3)
1396
     #define E3_CURRENT    800
1406
     #define E3_CURRENT    800
1397
     #define E3_MICROSTEPS  16
1407
     #define E3_MICROSTEPS  16
1408
+    #define E3_RSENSE    0.11
1398
   #endif
1409
   #endif
1399
 
1410
 
1400
   #if AXIS_IS_TMC(E4)
1411
   #if AXIS_IS_TMC(E4)
1401
     #define E4_CURRENT    800
1412
     #define E4_CURRENT    800
1402
     #define E4_MICROSTEPS  16
1413
     #define E4_MICROSTEPS  16
1414
+    #define E4_RSENSE    0.11
1403
   #endif
1415
   #endif
1404
 
1416
 
1405
   #if AXIS_IS_TMC(E5)
1417
   #if AXIS_IS_TMC(E5)
1406
     #define E5_CURRENT    800
1418
     #define E5_CURRENT    800
1407
     #define E5_MICROSTEPS  16
1419
     #define E5_MICROSTEPS  16
1420
+    #define E5_RSENSE    0.11
1408
   #endif
1421
   #endif
1409
 
1422
 
1410
   /**
1423
   /**
1411
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1424
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1412
    * The default pins can be found in your board's pins file.
1425
    * The default pins can be found in your board's pins file.
1413
    */
1426
    */
1414
   //#define X_CS_PIN          -1
1427
   //#define X_CS_PIN          -1
1427
 
1440
 
1428
   /**
1441
   /**
1429
    * Use software SPI for TMC2130.
1442
    * Use software SPI for TMC2130.
1443
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1430
    * The default SW SPI pins are defined the respective pins files,
1444
    * The default SW SPI pins are defined the respective pins files,
1431
    * but you can override or define them here.
1445
    * but you can override or define them here.
1432
    */
1446
    */
1444
   //#define SOFTWARE_DRIVER_ENABLE
1458
   //#define SOFTWARE_DRIVER_ENABLE
1445
 
1459
 
1446
   /**
1460
   /**
1461
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1447
    * Use Trinamic's ultra quiet stepping mode.
1462
    * Use Trinamic's ultra quiet stepping mode.
1448
    * When disabled, Marlin will use spreadCycle stepping mode.
1463
    * When disabled, Marlin will use spreadCycle stepping mode.
1449
    */
1464
    */
1468
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1483
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1469
 
1484
 
1470
   /**
1485
   /**
1471
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1486
+   * Monitor Trinamic drivers for error conditions,
1472
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1487
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1473
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1488
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1474
    * Other detected conditions can be used to stop the current print.
1489
    * Other detected conditions can be used to stop the current print.
1487
   #endif
1502
   #endif
1488
 
1503
 
1489
   /**
1504
   /**
1505
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1490
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1506
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1491
    * This mode allows for faster movements at the expense of higher noise levels.
1507
    * This mode allows for faster movements at the expense of higher noise levels.
1492
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1508
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1509
   #define E5_HYBRID_THRESHOLD     30
1525
   #define E5_HYBRID_THRESHOLD     30
1510
 
1526
 
1511
   /**
1527
   /**
1528
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1512
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1529
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1513
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1530
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1514
    * X, Y, and Z homing will always be done in spreadCycle mode.
1531
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/Malyan/M150/Configuration.h 查看文件

632
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
632
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
633
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
633
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
634
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
634
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
635
- *          TMC5130, TMC5130_STANDALONE
636
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
635
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
636
+ *          TMC5160, TMC5160_STANDALONE
637
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
637
  */
638
  */
638
 //#define X_DRIVER_TYPE  A4988
639
 //#define X_DRIVER_TYPE  A4988
639
 //#define Y_DRIVER_TYPE  A4988
640
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/Malyan/M150/Configuration_adv.h 查看文件

1322
 // @section tmc_smart
1322
 // @section tmc_smart
1323
 
1323
 
1324
 /**
1324
 /**
1325
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1326
- * the hardware SPI interface on your board and define the required CS pins
1327
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1325
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1326
+ * connect your SPI pins to the hardware SPI interface on your board and define
1327
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1328
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1328
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  *
1330
  *
1330
- * To use TMC2208 stepper UART-configurable stepper drivers
1331
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1332
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1333
- * to PDN_UART without a resistor.
1331
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1332
+ * to the driver side PDN_UART pin with a 1K resistor.
1333
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1334
+ * a resistor.
1334
  * The drivers can also be used with hardware serial.
1335
  * The drivers can also be used with hardware serial.
1335
  *
1336
  *
1336
- * TMCStepper library is required for connected TMC stepper drivers.
1337
+ * TMCStepper library is required to use TMC stepper drivers.
1337
  * https://github.com/teemuatlut/TMCStepper
1338
  * https://github.com/teemuatlut/TMCStepper
1338
  */
1339
  */
1339
 #if HAS_TRINAMIC
1340
 #if HAS_TRINAMIC
1340
 
1341
 
1341
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1344
 
1344
 
1345
   #if AXIS_IS_TMC(X)
1345
   #if AXIS_IS_TMC(X)
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1347
     #define X_MICROSTEPS   16  // 0..256
1347
     #define X_MICROSTEPS   16  // 0..256
1348
+    #define X_RSENSE     0.11
1348
   #endif
1349
   #endif
1349
 
1350
 
1350
   #if AXIS_IS_TMC(X2)
1351
   #if AXIS_IS_TMC(X2)
1351
     #define X2_CURRENT    800
1352
     #define X2_CURRENT    800
1352
     #define X2_MICROSTEPS  16
1353
     #define X2_MICROSTEPS  16
1354
+    #define X2_RSENSE    0.11
1353
   #endif
1355
   #endif
1354
 
1356
 
1355
   #if AXIS_IS_TMC(Y)
1357
   #if AXIS_IS_TMC(Y)
1356
     #define Y_CURRENT     800
1358
     #define Y_CURRENT     800
1357
     #define Y_MICROSTEPS   16
1359
     #define Y_MICROSTEPS   16
1360
+    #define Y_RSENSE     0.11
1358
   #endif
1361
   #endif
1359
 
1362
 
1360
   #if AXIS_IS_TMC(Y2)
1363
   #if AXIS_IS_TMC(Y2)
1361
     #define Y2_CURRENT    800
1364
     #define Y2_CURRENT    800
1362
     #define Y2_MICROSTEPS  16
1365
     #define Y2_MICROSTEPS  16
1366
+    #define Y2_RSENSE    0.11
1363
   #endif
1367
   #endif
1364
 
1368
 
1365
   #if AXIS_IS_TMC(Z)
1369
   #if AXIS_IS_TMC(Z)
1366
     #define Z_CURRENT     800
1370
     #define Z_CURRENT     800
1367
     #define Z_MICROSTEPS   16
1371
     #define Z_MICROSTEPS   16
1372
+    #define Z_RSENSE     0.11
1368
   #endif
1373
   #endif
1369
 
1374
 
1370
   #if AXIS_IS_TMC(Z2)
1375
   #if AXIS_IS_TMC(Z2)
1371
     #define Z2_CURRENT    800
1376
     #define Z2_CURRENT    800
1372
     #define Z2_MICROSTEPS  16
1377
     #define Z2_MICROSTEPS  16
1378
+    #define Z2_RSENSE    0.11
1373
   #endif
1379
   #endif
1374
 
1380
 
1375
   #if AXIS_IS_TMC(Z3)
1381
   #if AXIS_IS_TMC(Z3)
1376
     #define Z3_CURRENT    800
1382
     #define Z3_CURRENT    800
1377
     #define Z3_MICROSTEPS  16
1383
     #define Z3_MICROSTEPS  16
1384
+    #define Z3_RSENSE    0.11
1378
   #endif
1385
   #endif
1379
 
1386
 
1380
   #if AXIS_IS_TMC(E0)
1387
   #if AXIS_IS_TMC(E0)
1381
     #define E0_CURRENT    800
1388
     #define E0_CURRENT    800
1382
     #define E0_MICROSTEPS  16
1389
     #define E0_MICROSTEPS  16
1390
+    #define E0_RSENSE    0.11
1383
   #endif
1391
   #endif
1384
 
1392
 
1385
   #if AXIS_IS_TMC(E1)
1393
   #if AXIS_IS_TMC(E1)
1386
     #define E1_CURRENT    800
1394
     #define E1_CURRENT    800
1387
     #define E1_MICROSTEPS  16
1395
     #define E1_MICROSTEPS  16
1396
+    #define E1_RSENSE    0.11
1388
   #endif
1397
   #endif
1389
 
1398
 
1390
   #if AXIS_IS_TMC(E2)
1399
   #if AXIS_IS_TMC(E2)
1391
     #define E2_CURRENT    800
1400
     #define E2_CURRENT    800
1392
     #define E2_MICROSTEPS  16
1401
     #define E2_MICROSTEPS  16
1402
+    #define E2_RSENSE    0.11
1393
   #endif
1403
   #endif
1394
 
1404
 
1395
   #if AXIS_IS_TMC(E3)
1405
   #if AXIS_IS_TMC(E3)
1396
     #define E3_CURRENT    800
1406
     #define E3_CURRENT    800
1397
     #define E3_MICROSTEPS  16
1407
     #define E3_MICROSTEPS  16
1408
+    #define E3_RSENSE    0.11
1398
   #endif
1409
   #endif
1399
 
1410
 
1400
   #if AXIS_IS_TMC(E4)
1411
   #if AXIS_IS_TMC(E4)
1401
     #define E4_CURRENT    800
1412
     #define E4_CURRENT    800
1402
     #define E4_MICROSTEPS  16
1413
     #define E4_MICROSTEPS  16
1414
+    #define E4_RSENSE    0.11
1403
   #endif
1415
   #endif
1404
 
1416
 
1405
   #if AXIS_IS_TMC(E5)
1417
   #if AXIS_IS_TMC(E5)
1406
     #define E5_CURRENT    800
1418
     #define E5_CURRENT    800
1407
     #define E5_MICROSTEPS  16
1419
     #define E5_MICROSTEPS  16
1420
+    #define E5_RSENSE    0.11
1408
   #endif
1421
   #endif
1409
 
1422
 
1410
   /**
1423
   /**
1411
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1424
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1412
    * The default pins can be found in your board's pins file.
1425
    * The default pins can be found in your board's pins file.
1413
    */
1426
    */
1414
   //#define X_CS_PIN          -1
1427
   //#define X_CS_PIN          -1
1427
 
1440
 
1428
   /**
1441
   /**
1429
    * Use software SPI for TMC2130.
1442
    * Use software SPI for TMC2130.
1443
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1430
    * The default SW SPI pins are defined the respective pins files,
1444
    * The default SW SPI pins are defined the respective pins files,
1431
    * but you can override or define them here.
1445
    * but you can override or define them here.
1432
    */
1446
    */
1444
   //#define SOFTWARE_DRIVER_ENABLE
1458
   //#define SOFTWARE_DRIVER_ENABLE
1445
 
1459
 
1446
   /**
1460
   /**
1461
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1447
    * Use Trinamic's ultra quiet stepping mode.
1462
    * Use Trinamic's ultra quiet stepping mode.
1448
    * When disabled, Marlin will use spreadCycle stepping mode.
1463
    * When disabled, Marlin will use spreadCycle stepping mode.
1449
    */
1464
    */
1468
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1483
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1469
 
1484
 
1470
   /**
1485
   /**
1471
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1486
+   * Monitor Trinamic drivers for error conditions,
1472
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1487
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1473
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1488
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1474
    * Other detected conditions can be used to stop the current print.
1489
    * Other detected conditions can be used to stop the current print.
1487
   #endif
1502
   #endif
1488
 
1503
 
1489
   /**
1504
   /**
1505
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1490
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1506
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1491
    * This mode allows for faster movements at the expense of higher noise levels.
1507
    * This mode allows for faster movements at the expense of higher noise levels.
1492
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1508
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1509
   #define E5_HYBRID_THRESHOLD     30
1525
   #define E5_HYBRID_THRESHOLD     30
1510
 
1526
 
1511
   /**
1527
   /**
1528
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1512
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1529
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1513
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1530
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1514
    * X, Y, and Z homing will always be done in spreadCycle mode.
1531
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/Malyan/M200/Configuration.h 查看文件

622
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
622
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
623
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
623
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
624
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
624
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
625
- *          TMC5130, TMC5130_STANDALONE
626
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
625
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
626
+ *          TMC5160, TMC5160_STANDALONE
627
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
627
  */
628
  */
628
 //#define X_DRIVER_TYPE  A4988
629
 //#define X_DRIVER_TYPE  A4988
629
 //#define Y_DRIVER_TYPE  A4988
630
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/Malyan/M200/Configuration_adv.h 查看文件

1322
 // @section tmc_smart
1322
 // @section tmc_smart
1323
 
1323
 
1324
 /**
1324
 /**
1325
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1326
- * the hardware SPI interface on your board and define the required CS pins
1327
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1325
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1326
+ * connect your SPI pins to the hardware SPI interface on your board and define
1327
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1328
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1328
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  *
1330
  *
1330
- * To use TMC2208 stepper UART-configurable stepper drivers
1331
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1332
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1333
- * to PDN_UART without a resistor.
1331
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1332
+ * to the driver side PDN_UART pin with a 1K resistor.
1333
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1334
+ * a resistor.
1334
  * The drivers can also be used with hardware serial.
1335
  * The drivers can also be used with hardware serial.
1335
  *
1336
  *
1336
- * TMCStepper library is required for connected TMC stepper drivers.
1337
+ * TMCStepper library is required to use TMC stepper drivers.
1337
  * https://github.com/teemuatlut/TMCStepper
1338
  * https://github.com/teemuatlut/TMCStepper
1338
  */
1339
  */
1339
 #if HAS_TRINAMIC
1340
 #if HAS_TRINAMIC
1340
 
1341
 
1341
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1344
 
1344
 
1345
   #if AXIS_IS_TMC(X)
1345
   #if AXIS_IS_TMC(X)
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1347
     #define X_MICROSTEPS   16  // 0..256
1347
     #define X_MICROSTEPS   16  // 0..256
1348
+    #define X_RSENSE     0.11
1348
   #endif
1349
   #endif
1349
 
1350
 
1350
   #if AXIS_IS_TMC(X2)
1351
   #if AXIS_IS_TMC(X2)
1351
     #define X2_CURRENT    800
1352
     #define X2_CURRENT    800
1352
     #define X2_MICROSTEPS  16
1353
     #define X2_MICROSTEPS  16
1354
+    #define X2_RSENSE    0.11
1353
   #endif
1355
   #endif
1354
 
1356
 
1355
   #if AXIS_IS_TMC(Y)
1357
   #if AXIS_IS_TMC(Y)
1356
     #define Y_CURRENT     800
1358
     #define Y_CURRENT     800
1357
     #define Y_MICROSTEPS   16
1359
     #define Y_MICROSTEPS   16
1360
+    #define Y_RSENSE     0.11
1358
   #endif
1361
   #endif
1359
 
1362
 
1360
   #if AXIS_IS_TMC(Y2)
1363
   #if AXIS_IS_TMC(Y2)
1361
     #define Y2_CURRENT    800
1364
     #define Y2_CURRENT    800
1362
     #define Y2_MICROSTEPS  16
1365
     #define Y2_MICROSTEPS  16
1366
+    #define Y2_RSENSE    0.11
1363
   #endif
1367
   #endif
1364
 
1368
 
1365
   #if AXIS_IS_TMC(Z)
1369
   #if AXIS_IS_TMC(Z)
1366
     #define Z_CURRENT     800
1370
     #define Z_CURRENT     800
1367
     #define Z_MICROSTEPS   16
1371
     #define Z_MICROSTEPS   16
1372
+    #define Z_RSENSE     0.11
1368
   #endif
1373
   #endif
1369
 
1374
 
1370
   #if AXIS_IS_TMC(Z2)
1375
   #if AXIS_IS_TMC(Z2)
1371
     #define Z2_CURRENT    800
1376
     #define Z2_CURRENT    800
1372
     #define Z2_MICROSTEPS  16
1377
     #define Z2_MICROSTEPS  16
1378
+    #define Z2_RSENSE    0.11
1373
   #endif
1379
   #endif
1374
 
1380
 
1375
   #if AXIS_IS_TMC(Z3)
1381
   #if AXIS_IS_TMC(Z3)
1376
     #define Z3_CURRENT    800
1382
     #define Z3_CURRENT    800
1377
     #define Z3_MICROSTEPS  16
1383
     #define Z3_MICROSTEPS  16
1384
+    #define Z3_RSENSE    0.11
1378
   #endif
1385
   #endif
1379
 
1386
 
1380
   #if AXIS_IS_TMC(E0)
1387
   #if AXIS_IS_TMC(E0)
1381
     #define E0_CURRENT    800
1388
     #define E0_CURRENT    800
1382
     #define E0_MICROSTEPS  16
1389
     #define E0_MICROSTEPS  16
1390
+    #define E0_RSENSE    0.11
1383
   #endif
1391
   #endif
1384
 
1392
 
1385
   #if AXIS_IS_TMC(E1)
1393
   #if AXIS_IS_TMC(E1)
1386
     #define E1_CURRENT    800
1394
     #define E1_CURRENT    800
1387
     #define E1_MICROSTEPS  16
1395
     #define E1_MICROSTEPS  16
1396
+    #define E1_RSENSE    0.11
1388
   #endif
1397
   #endif
1389
 
1398
 
1390
   #if AXIS_IS_TMC(E2)
1399
   #if AXIS_IS_TMC(E2)
1391
     #define E2_CURRENT    800
1400
     #define E2_CURRENT    800
1392
     #define E2_MICROSTEPS  16
1401
     #define E2_MICROSTEPS  16
1402
+    #define E2_RSENSE    0.11
1393
   #endif
1403
   #endif
1394
 
1404
 
1395
   #if AXIS_IS_TMC(E3)
1405
   #if AXIS_IS_TMC(E3)
1396
     #define E3_CURRENT    800
1406
     #define E3_CURRENT    800
1397
     #define E3_MICROSTEPS  16
1407
     #define E3_MICROSTEPS  16
1408
+    #define E3_RSENSE    0.11
1398
   #endif
1409
   #endif
1399
 
1410
 
1400
   #if AXIS_IS_TMC(E4)
1411
   #if AXIS_IS_TMC(E4)
1401
     #define E4_CURRENT    800
1412
     #define E4_CURRENT    800
1402
     #define E4_MICROSTEPS  16
1413
     #define E4_MICROSTEPS  16
1414
+    #define E4_RSENSE    0.11
1403
   #endif
1415
   #endif
1404
 
1416
 
1405
   #if AXIS_IS_TMC(E5)
1417
   #if AXIS_IS_TMC(E5)
1406
     #define E5_CURRENT    800
1418
     #define E5_CURRENT    800
1407
     #define E5_MICROSTEPS  16
1419
     #define E5_MICROSTEPS  16
1420
+    #define E5_RSENSE    0.11
1408
   #endif
1421
   #endif
1409
 
1422
 
1410
   /**
1423
   /**
1411
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1424
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1412
    * The default pins can be found in your board's pins file.
1425
    * The default pins can be found in your board's pins file.
1413
    */
1426
    */
1414
   //#define X_CS_PIN          -1
1427
   //#define X_CS_PIN          -1
1427
 
1440
 
1428
   /**
1441
   /**
1429
    * Use software SPI for TMC2130.
1442
    * Use software SPI for TMC2130.
1443
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1430
    * The default SW SPI pins are defined the respective pins files,
1444
    * The default SW SPI pins are defined the respective pins files,
1431
    * but you can override or define them here.
1445
    * but you can override or define them here.
1432
    */
1446
    */
1444
   //#define SOFTWARE_DRIVER_ENABLE
1458
   //#define SOFTWARE_DRIVER_ENABLE
1445
 
1459
 
1446
   /**
1460
   /**
1461
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1447
    * Use Trinamic's ultra quiet stepping mode.
1462
    * Use Trinamic's ultra quiet stepping mode.
1448
    * When disabled, Marlin will use spreadCycle stepping mode.
1463
    * When disabled, Marlin will use spreadCycle stepping mode.
1449
    */
1464
    */
1468
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1483
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1469
 
1484
 
1470
   /**
1485
   /**
1471
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1486
+   * Monitor Trinamic drivers for error conditions,
1472
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1487
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1473
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1488
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1474
    * Other detected conditions can be used to stop the current print.
1489
    * Other detected conditions can be used to stop the current print.
1487
   #endif
1502
   #endif
1488
 
1503
 
1489
   /**
1504
   /**
1505
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1490
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1506
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1491
    * This mode allows for faster movements at the expense of higher noise levels.
1507
    * This mode allows for faster movements at the expense of higher noise levels.
1492
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1508
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1509
   #define E5_HYBRID_THRESHOLD     30
1525
   #define E5_HYBRID_THRESHOLD     30
1510
 
1526
 
1511
   /**
1527
   /**
1528
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1512
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1529
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1513
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1530
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1514
    * X, Y, and Z homing will always be done in spreadCycle mode.
1531
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/Micromake/C1/basic/Configuration.h 查看文件

623
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
623
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
624
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
624
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
625
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
625
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
626
- *          TMC5130, TMC5130_STANDALONE
627
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
626
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
627
+ *          TMC5160, TMC5160_STANDALONE
628
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
628
  */
629
  */
629
 //#define X_DRIVER_TYPE  A4988
630
 //#define X_DRIVER_TYPE  A4988
630
 //#define Y_DRIVER_TYPE  A4988
631
 //#define Y_DRIVER_TYPE  A4988

+ 3
- 2
Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h 查看文件

623
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
623
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
624
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
624
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
625
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
625
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
626
- *          TMC5130, TMC5130_STANDALONE
627
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
626
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
627
+ *          TMC5160, TMC5160_STANDALONE
628
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
628
  */
629
  */
629
 //#define X_DRIVER_TYPE  A4988
630
 //#define X_DRIVER_TYPE  A4988
630
 //#define Y_DRIVER_TYPE  A4988
631
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h 查看文件

1322
 // @section tmc_smart
1322
 // @section tmc_smart
1323
 
1323
 
1324
 /**
1324
 /**
1325
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1326
- * the hardware SPI interface on your board and define the required CS pins
1327
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1325
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1326
+ * connect your SPI pins to the hardware SPI interface on your board and define
1327
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1328
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1328
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  *
1330
  *
1330
- * To use TMC2208 stepper UART-configurable stepper drivers
1331
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1332
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1333
- * to PDN_UART without a resistor.
1331
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1332
+ * to the driver side PDN_UART pin with a 1K resistor.
1333
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1334
+ * a resistor.
1334
  * The drivers can also be used with hardware serial.
1335
  * The drivers can also be used with hardware serial.
1335
  *
1336
  *
1336
- * TMCStepper library is required for connected TMC stepper drivers.
1337
+ * TMCStepper library is required to use TMC stepper drivers.
1337
  * https://github.com/teemuatlut/TMCStepper
1338
  * https://github.com/teemuatlut/TMCStepper
1338
  */
1339
  */
1339
 #if HAS_TRINAMIC
1340
 #if HAS_TRINAMIC
1340
 
1341
 
1341
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1344
 
1344
 
1345
   #if AXIS_IS_TMC(X)
1345
   #if AXIS_IS_TMC(X)
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1347
     #define X_MICROSTEPS   16  // 0..256
1347
     #define X_MICROSTEPS   16  // 0..256
1348
+    #define X_RSENSE     0.11
1348
   #endif
1349
   #endif
1349
 
1350
 
1350
   #if AXIS_IS_TMC(X2)
1351
   #if AXIS_IS_TMC(X2)
1351
     #define X2_CURRENT    800
1352
     #define X2_CURRENT    800
1352
     #define X2_MICROSTEPS  16
1353
     #define X2_MICROSTEPS  16
1354
+    #define X2_RSENSE    0.11
1353
   #endif
1355
   #endif
1354
 
1356
 
1355
   #if AXIS_IS_TMC(Y)
1357
   #if AXIS_IS_TMC(Y)
1356
     #define Y_CURRENT     800
1358
     #define Y_CURRENT     800
1357
     #define Y_MICROSTEPS   16
1359
     #define Y_MICROSTEPS   16
1360
+    #define Y_RSENSE     0.11
1358
   #endif
1361
   #endif
1359
 
1362
 
1360
   #if AXIS_IS_TMC(Y2)
1363
   #if AXIS_IS_TMC(Y2)
1361
     #define Y2_CURRENT    800
1364
     #define Y2_CURRENT    800
1362
     #define Y2_MICROSTEPS  16
1365
     #define Y2_MICROSTEPS  16
1366
+    #define Y2_RSENSE    0.11
1363
   #endif
1367
   #endif
1364
 
1368
 
1365
   #if AXIS_IS_TMC(Z)
1369
   #if AXIS_IS_TMC(Z)
1366
     #define Z_CURRENT     800
1370
     #define Z_CURRENT     800
1367
     #define Z_MICROSTEPS   16
1371
     #define Z_MICROSTEPS   16
1372
+    #define Z_RSENSE     0.11
1368
   #endif
1373
   #endif
1369
 
1374
 
1370
   #if AXIS_IS_TMC(Z2)
1375
   #if AXIS_IS_TMC(Z2)
1371
     #define Z2_CURRENT    800
1376
     #define Z2_CURRENT    800
1372
     #define Z2_MICROSTEPS  16
1377
     #define Z2_MICROSTEPS  16
1378
+    #define Z2_RSENSE    0.11
1373
   #endif
1379
   #endif
1374
 
1380
 
1375
   #if AXIS_IS_TMC(Z3)
1381
   #if AXIS_IS_TMC(Z3)
1376
     #define Z3_CURRENT    800
1382
     #define Z3_CURRENT    800
1377
     #define Z3_MICROSTEPS  16
1383
     #define Z3_MICROSTEPS  16
1384
+    #define Z3_RSENSE    0.11
1378
   #endif
1385
   #endif
1379
 
1386
 
1380
   #if AXIS_IS_TMC(E0)
1387
   #if AXIS_IS_TMC(E0)
1381
     #define E0_CURRENT    800
1388
     #define E0_CURRENT    800
1382
     #define E0_MICROSTEPS  16
1389
     #define E0_MICROSTEPS  16
1390
+    #define E0_RSENSE    0.11
1383
   #endif
1391
   #endif
1384
 
1392
 
1385
   #if AXIS_IS_TMC(E1)
1393
   #if AXIS_IS_TMC(E1)
1386
     #define E1_CURRENT    800
1394
     #define E1_CURRENT    800
1387
     #define E1_MICROSTEPS  16
1395
     #define E1_MICROSTEPS  16
1396
+    #define E1_RSENSE    0.11
1388
   #endif
1397
   #endif
1389
 
1398
 
1390
   #if AXIS_IS_TMC(E2)
1399
   #if AXIS_IS_TMC(E2)
1391
     #define E2_CURRENT    800
1400
     #define E2_CURRENT    800
1392
     #define E2_MICROSTEPS  16
1401
     #define E2_MICROSTEPS  16
1402
+    #define E2_RSENSE    0.11
1393
   #endif
1403
   #endif
1394
 
1404
 
1395
   #if AXIS_IS_TMC(E3)
1405
   #if AXIS_IS_TMC(E3)
1396
     #define E3_CURRENT    800
1406
     #define E3_CURRENT    800
1397
     #define E3_MICROSTEPS  16
1407
     #define E3_MICROSTEPS  16
1408
+    #define E3_RSENSE    0.11
1398
   #endif
1409
   #endif
1399
 
1410
 
1400
   #if AXIS_IS_TMC(E4)
1411
   #if AXIS_IS_TMC(E4)
1401
     #define E4_CURRENT    800
1412
     #define E4_CURRENT    800
1402
     #define E4_MICROSTEPS  16
1413
     #define E4_MICROSTEPS  16
1414
+    #define E4_RSENSE    0.11
1403
   #endif
1415
   #endif
1404
 
1416
 
1405
   #if AXIS_IS_TMC(E5)
1417
   #if AXIS_IS_TMC(E5)
1406
     #define E5_CURRENT    800
1418
     #define E5_CURRENT    800
1407
     #define E5_MICROSTEPS  16
1419
     #define E5_MICROSTEPS  16
1420
+    #define E5_RSENSE    0.11
1408
   #endif
1421
   #endif
1409
 
1422
 
1410
   /**
1423
   /**
1411
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1424
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1412
    * The default pins can be found in your board's pins file.
1425
    * The default pins can be found in your board's pins file.
1413
    */
1426
    */
1414
   //#define X_CS_PIN          -1
1427
   //#define X_CS_PIN          -1
1427
 
1440
 
1428
   /**
1441
   /**
1429
    * Use software SPI for TMC2130.
1442
    * Use software SPI for TMC2130.
1443
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1430
    * The default SW SPI pins are defined the respective pins files,
1444
    * The default SW SPI pins are defined the respective pins files,
1431
    * but you can override or define them here.
1445
    * but you can override or define them here.
1432
    */
1446
    */
1444
   //#define SOFTWARE_DRIVER_ENABLE
1458
   //#define SOFTWARE_DRIVER_ENABLE
1445
 
1459
 
1446
   /**
1460
   /**
1461
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1447
    * Use Trinamic's ultra quiet stepping mode.
1462
    * Use Trinamic's ultra quiet stepping mode.
1448
    * When disabled, Marlin will use spreadCycle stepping mode.
1463
    * When disabled, Marlin will use spreadCycle stepping mode.
1449
    */
1464
    */
1468
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1483
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1469
 
1484
 
1470
   /**
1485
   /**
1471
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1486
+   * Monitor Trinamic drivers for error conditions,
1472
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1487
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1473
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1488
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1474
    * Other detected conditions can be used to stop the current print.
1489
    * Other detected conditions can be used to stop the current print.
1487
   #endif
1502
   #endif
1488
 
1503
 
1489
   /**
1504
   /**
1505
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1490
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1506
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1491
    * This mode allows for faster movements at the expense of higher noise levels.
1507
    * This mode allows for faster movements at the expense of higher noise levels.
1492
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1508
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1509
   #define E5_HYBRID_THRESHOLD     30
1525
   #define E5_HYBRID_THRESHOLD     30
1510
 
1526
 
1511
   /**
1527
   /**
1528
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1512
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1529
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1513
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1530
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1514
    * X, Y, and Z homing will always be done in spreadCycle mode.
1531
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/Mks/Robin/Configuration.h 查看文件

623
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
623
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
624
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
624
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
625
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
625
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
626
- *          TMC5130, TMC5130_STANDALONE
627
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
626
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
627
+ *          TMC5160, TMC5160_STANDALONE
628
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
628
  */
629
  */
629
 //#define X_DRIVER_TYPE  A4988
630
 //#define X_DRIVER_TYPE  A4988
630
 //#define Y_DRIVER_TYPE  A4988
631
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/Mks/Robin/Configuration_adv.h 查看文件

1323
 // @section tmc_smart
1323
 // @section tmc_smart
1324
 
1324
 
1325
 /**
1325
 /**
1326
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1327
- * the hardware SPI interface on your board and define the required CS pins
1328
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1326
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1327
+ * connect your SPI pins to the hardware SPI interface on your board and define
1328
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1329
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1329
  * You may also use software SPI if you wish to use general purpose IO pins.
1330
  * You may also use software SPI if you wish to use general purpose IO pins.
1330
  *
1331
  *
1331
- * To use TMC2208 stepper UART-configurable stepper drivers
1332
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1333
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1334
- * to PDN_UART without a resistor.
1332
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1333
+ * to the driver side PDN_UART pin with a 1K resistor.
1334
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1335
+ * a resistor.
1335
  * The drivers can also be used with hardware serial.
1336
  * The drivers can also be used with hardware serial.
1336
  *
1337
  *
1337
- * TMCStepper library is required for connected TMC stepper drivers.
1338
+ * TMCStepper library is required to use TMC stepper drivers.
1338
  * https://github.com/teemuatlut/TMCStepper
1339
  * https://github.com/teemuatlut/TMCStepper
1339
  */
1340
  */
1340
 #if HAS_TRINAMIC
1341
 #if HAS_TRINAMIC
1341
 
1342
 
1342
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1343
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1343
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1344
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1344
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1345
 
1345
 
1346
   #if AXIS_IS_TMC(X)
1346
   #if AXIS_IS_TMC(X)
1347
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1347
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1348
     #define X_MICROSTEPS   16  // 0..256
1348
     #define X_MICROSTEPS   16  // 0..256
1349
+    #define X_RSENSE     0.11
1349
   #endif
1350
   #endif
1350
 
1351
 
1351
   #if AXIS_IS_TMC(X2)
1352
   #if AXIS_IS_TMC(X2)
1352
     #define X2_CURRENT    800
1353
     #define X2_CURRENT    800
1353
     #define X2_MICROSTEPS  16
1354
     #define X2_MICROSTEPS  16
1355
+    #define X2_RSENSE    0.11
1354
   #endif
1356
   #endif
1355
 
1357
 
1356
   #if AXIS_IS_TMC(Y)
1358
   #if AXIS_IS_TMC(Y)
1357
     #define Y_CURRENT     800
1359
     #define Y_CURRENT     800
1358
     #define Y_MICROSTEPS   16
1360
     #define Y_MICROSTEPS   16
1361
+    #define Y_RSENSE     0.11
1359
   #endif
1362
   #endif
1360
 
1363
 
1361
   #if AXIS_IS_TMC(Y2)
1364
   #if AXIS_IS_TMC(Y2)
1362
     #define Y2_CURRENT    800
1365
     #define Y2_CURRENT    800
1363
     #define Y2_MICROSTEPS  16
1366
     #define Y2_MICROSTEPS  16
1367
+    #define Y2_RSENSE    0.11
1364
   #endif
1368
   #endif
1365
 
1369
 
1366
   #if AXIS_IS_TMC(Z)
1370
   #if AXIS_IS_TMC(Z)
1367
     #define Z_CURRENT     800
1371
     #define Z_CURRENT     800
1368
     #define Z_MICROSTEPS   16
1372
     #define Z_MICROSTEPS   16
1373
+    #define Z_RSENSE     0.11
1369
   #endif
1374
   #endif
1370
 
1375
 
1371
   #if AXIS_IS_TMC(Z2)
1376
   #if AXIS_IS_TMC(Z2)
1372
     #define Z2_CURRENT    800
1377
     #define Z2_CURRENT    800
1373
     #define Z2_MICROSTEPS  16
1378
     #define Z2_MICROSTEPS  16
1379
+    #define Z2_RSENSE    0.11
1374
   #endif
1380
   #endif
1375
 
1381
 
1376
   #if AXIS_IS_TMC(Z3)
1382
   #if AXIS_IS_TMC(Z3)
1377
     #define Z3_CURRENT    800
1383
     #define Z3_CURRENT    800
1378
     #define Z3_MICROSTEPS  16
1384
     #define Z3_MICROSTEPS  16
1385
+    #define Z3_RSENSE    0.11
1379
   #endif
1386
   #endif
1380
 
1387
 
1381
   #if AXIS_IS_TMC(E0)
1388
   #if AXIS_IS_TMC(E0)
1382
     #define E0_CURRENT    800
1389
     #define E0_CURRENT    800
1383
     #define E0_MICROSTEPS  16
1390
     #define E0_MICROSTEPS  16
1391
+    #define E0_RSENSE    0.11
1384
   #endif
1392
   #endif
1385
 
1393
 
1386
   #if AXIS_IS_TMC(E1)
1394
   #if AXIS_IS_TMC(E1)
1387
     #define E1_CURRENT    800
1395
     #define E1_CURRENT    800
1388
     #define E1_MICROSTEPS  16
1396
     #define E1_MICROSTEPS  16
1397
+    #define E1_RSENSE    0.11
1389
   #endif
1398
   #endif
1390
 
1399
 
1391
   #if AXIS_IS_TMC(E2)
1400
   #if AXIS_IS_TMC(E2)
1392
     #define E2_CURRENT    800
1401
     #define E2_CURRENT    800
1393
     #define E2_MICROSTEPS  16
1402
     #define E2_MICROSTEPS  16
1403
+    #define E2_RSENSE    0.11
1394
   #endif
1404
   #endif
1395
 
1405
 
1396
   #if AXIS_IS_TMC(E3)
1406
   #if AXIS_IS_TMC(E3)
1397
     #define E3_CURRENT    800
1407
     #define E3_CURRENT    800
1398
     #define E3_MICROSTEPS  16
1408
     #define E3_MICROSTEPS  16
1409
+    #define E3_RSENSE    0.11
1399
   #endif
1410
   #endif
1400
 
1411
 
1401
   #if AXIS_IS_TMC(E4)
1412
   #if AXIS_IS_TMC(E4)
1402
     #define E4_CURRENT    800
1413
     #define E4_CURRENT    800
1403
     #define E4_MICROSTEPS  16
1414
     #define E4_MICROSTEPS  16
1415
+    #define E4_RSENSE    0.11
1404
   #endif
1416
   #endif
1405
 
1417
 
1406
   #if AXIS_IS_TMC(E5)
1418
   #if AXIS_IS_TMC(E5)
1407
     #define E5_CURRENT    800
1419
     #define E5_CURRENT    800
1408
     #define E5_MICROSTEPS  16
1420
     #define E5_MICROSTEPS  16
1421
+    #define E5_RSENSE    0.11
1409
   #endif
1422
   #endif
1410
 
1423
 
1411
   /**
1424
   /**
1412
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1425
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1413
    * The default pins can be found in your board's pins file.
1426
    * The default pins can be found in your board's pins file.
1414
    */
1427
    */
1415
   //#define X_CS_PIN          -1
1428
   //#define X_CS_PIN          -1
1428
 
1441
 
1429
   /**
1442
   /**
1430
    * Use software SPI for TMC2130.
1443
    * Use software SPI for TMC2130.
1444
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1431
    * The default SW SPI pins are defined the respective pins files,
1445
    * The default SW SPI pins are defined the respective pins files,
1432
    * but you can override or define them here.
1446
    * but you can override or define them here.
1433
    */
1447
    */
1445
   //#define SOFTWARE_DRIVER_ENABLE
1459
   //#define SOFTWARE_DRIVER_ENABLE
1446
 
1460
 
1447
   /**
1461
   /**
1462
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1448
    * Use Trinamic's ultra quiet stepping mode.
1463
    * Use Trinamic's ultra quiet stepping mode.
1449
    * When disabled, Marlin will use spreadCycle stepping mode.
1464
    * When disabled, Marlin will use spreadCycle stepping mode.
1450
    */
1465
    */
1469
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1484
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1470
 
1485
 
1471
   /**
1486
   /**
1472
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1487
+   * Monitor Trinamic drivers for error conditions,
1473
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1488
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1474
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1489
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1475
    * Other detected conditions can be used to stop the current print.
1490
    * Other detected conditions can be used to stop the current print.
1488
   #endif
1503
   #endif
1489
 
1504
 
1490
   /**
1505
   /**
1506
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1491
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1507
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1492
    * This mode allows for faster movements at the expense of higher noise levels.
1508
    * This mode allows for faster movements at the expense of higher noise levels.
1493
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1509
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1510
   #define E5_HYBRID_THRESHOLD     30
1526
   #define E5_HYBRID_THRESHOLD     30
1511
 
1527
 
1512
   /**
1528
   /**
1529
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1513
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1530
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1514
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1531
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1515
    * X, Y, and Z homing will always be done in spreadCycle mode.
1532
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/Mks/Sbase/Configuration.h 查看文件

623
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
623
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
624
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
624
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
625
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
625
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
626
- *          TMC5130, TMC5130_STANDALONE
627
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
626
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
627
+ *          TMC5160, TMC5160_STANDALONE
628
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
628
  */
629
  */
629
 #define X_DRIVER_TYPE  DRV8825
630
 #define X_DRIVER_TYPE  DRV8825
630
 #define Y_DRIVER_TYPE  DRV8825
631
 #define Y_DRIVER_TYPE  DRV8825

+ 28
- 11
Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h 查看文件

1330
 // @section tmc_smart
1330
 // @section tmc_smart
1331
 
1331
 
1332
 /**
1332
 /**
1333
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1334
- * the hardware SPI interface on your board and define the required CS pins
1335
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1333
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1334
+ * connect your SPI pins to the hardware SPI interface on your board and define
1335
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1336
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1336
  * You may also use software SPI if you wish to use general purpose IO pins.
1337
  * You may also use software SPI if you wish to use general purpose IO pins.
1337
  *
1338
  *
1338
- * To use TMC2208 stepper UART-configurable stepper drivers
1339
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1340
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1341
- * to PDN_UART without a resistor.
1339
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1340
+ * to the driver side PDN_UART pin with a 1K resistor.
1341
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1342
+ * a resistor.
1342
  * The drivers can also be used with hardware serial.
1343
  * The drivers can also be used with hardware serial.
1343
  *
1344
  *
1344
- * TMCStepper library is required for connected TMC stepper drivers.
1345
+ * TMCStepper library is required to use TMC stepper drivers.
1345
  * https://github.com/teemuatlut/TMCStepper
1346
  * https://github.com/teemuatlut/TMCStepper
1346
  */
1347
  */
1347
 #if HAS_TRINAMIC
1348
 #if HAS_TRINAMIC
1348
 
1349
 
1349
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1350
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1350
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1351
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1351
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1352
 
1352
 
1353
   #if AXIS_IS_TMC(X)
1353
   #if AXIS_IS_TMC(X)
1354
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1354
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1355
     #define X_MICROSTEPS   16  // 0..256
1355
     #define X_MICROSTEPS   16  // 0..256
1356
+    #define X_RSENSE     0.11
1356
   #endif
1357
   #endif
1357
 
1358
 
1358
   #if AXIS_IS_TMC(X2)
1359
   #if AXIS_IS_TMC(X2)
1359
     #define X2_CURRENT    800
1360
     #define X2_CURRENT    800
1360
     #define X2_MICROSTEPS  16
1361
     #define X2_MICROSTEPS  16
1362
+    #define X2_RSENSE    0.11
1361
   #endif
1363
   #endif
1362
 
1364
 
1363
   #if AXIS_IS_TMC(Y)
1365
   #if AXIS_IS_TMC(Y)
1364
     #define Y_CURRENT     800
1366
     #define Y_CURRENT     800
1365
     #define Y_MICROSTEPS   16
1367
     #define Y_MICROSTEPS   16
1368
+    #define Y_RSENSE     0.11
1366
   #endif
1369
   #endif
1367
 
1370
 
1368
   #if AXIS_IS_TMC(Y2)
1371
   #if AXIS_IS_TMC(Y2)
1369
     #define Y2_CURRENT    800
1372
     #define Y2_CURRENT    800
1370
     #define Y2_MICROSTEPS  16
1373
     #define Y2_MICROSTEPS  16
1374
+    #define Y2_RSENSE    0.11
1371
   #endif
1375
   #endif
1372
 
1376
 
1373
   #if AXIS_IS_TMC(Z)
1377
   #if AXIS_IS_TMC(Z)
1374
     #define Z_CURRENT     800
1378
     #define Z_CURRENT     800
1375
     #define Z_MICROSTEPS   16
1379
     #define Z_MICROSTEPS   16
1380
+    #define Z_RSENSE     0.11
1376
   #endif
1381
   #endif
1377
 
1382
 
1378
   #if AXIS_IS_TMC(Z2)
1383
   #if AXIS_IS_TMC(Z2)
1379
     #define Z2_CURRENT    800
1384
     #define Z2_CURRENT    800
1380
     #define Z2_MICROSTEPS  16
1385
     #define Z2_MICROSTEPS  16
1386
+    #define Z2_RSENSE    0.11
1381
   #endif
1387
   #endif
1382
 
1388
 
1383
   #if AXIS_IS_TMC(Z3)
1389
   #if AXIS_IS_TMC(Z3)
1384
     #define Z3_CURRENT    800
1390
     #define Z3_CURRENT    800
1385
     #define Z3_MICROSTEPS  16
1391
     #define Z3_MICROSTEPS  16
1392
+    #define Z3_RSENSE    0.11
1386
   #endif
1393
   #endif
1387
 
1394
 
1388
   #if AXIS_IS_TMC(E0)
1395
   #if AXIS_IS_TMC(E0)
1389
     #define E0_CURRENT    800
1396
     #define E0_CURRENT    800
1390
     #define E0_MICROSTEPS  16
1397
     #define E0_MICROSTEPS  16
1398
+    #define E0_RSENSE    0.11
1391
   #endif
1399
   #endif
1392
 
1400
 
1393
   #if AXIS_IS_TMC(E1)
1401
   #if AXIS_IS_TMC(E1)
1394
     #define E1_CURRENT    800
1402
     #define E1_CURRENT    800
1395
     #define E1_MICROSTEPS  16
1403
     #define E1_MICROSTEPS  16
1404
+    #define E1_RSENSE    0.11
1396
   #endif
1405
   #endif
1397
 
1406
 
1398
   #if AXIS_IS_TMC(E2)
1407
   #if AXIS_IS_TMC(E2)
1399
     #define E2_CURRENT    800
1408
     #define E2_CURRENT    800
1400
     #define E2_MICROSTEPS  16
1409
     #define E2_MICROSTEPS  16
1410
+    #define E2_RSENSE    0.11
1401
   #endif
1411
   #endif
1402
 
1412
 
1403
   #if AXIS_IS_TMC(E3)
1413
   #if AXIS_IS_TMC(E3)
1404
     #define E3_CURRENT    800
1414
     #define E3_CURRENT    800
1405
     #define E3_MICROSTEPS  16
1415
     #define E3_MICROSTEPS  16
1416
+    #define E3_RSENSE    0.11
1406
   #endif
1417
   #endif
1407
 
1418
 
1408
   #if AXIS_IS_TMC(E4)
1419
   #if AXIS_IS_TMC(E4)
1409
     #define E4_CURRENT    800
1420
     #define E4_CURRENT    800
1410
     #define E4_MICROSTEPS  16
1421
     #define E4_MICROSTEPS  16
1422
+    #define E4_RSENSE    0.11
1411
   #endif
1423
   #endif
1412
 
1424
 
1413
   #if AXIS_IS_TMC(E5)
1425
   #if AXIS_IS_TMC(E5)
1414
     #define E5_CURRENT    800
1426
     #define E5_CURRENT    800
1415
     #define E5_MICROSTEPS  16
1427
     #define E5_MICROSTEPS  16
1428
+    #define E5_RSENSE    0.11
1416
   #endif
1429
   #endif
1417
 
1430
 
1418
   /**
1431
   /**
1419
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1432
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1420
    * The default pins can be found in your board's pins file.
1433
    * The default pins can be found in your board's pins file.
1421
    */
1434
    */
1422
   //#define X_CS_PIN          -1
1435
   //#define X_CS_PIN          -1
1435
 
1448
 
1436
   /**
1449
   /**
1437
    * Use software SPI for TMC2130.
1450
    * Use software SPI for TMC2130.
1451
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1438
    * The default SW SPI pins are defined the respective pins files,
1452
    * The default SW SPI pins are defined the respective pins files,
1439
    * but you can override or define them here.
1453
    * but you can override or define them here.
1440
    */
1454
    */
1452
   //#define SOFTWARE_DRIVER_ENABLE
1466
   //#define SOFTWARE_DRIVER_ENABLE
1453
 
1467
 
1454
   /**
1468
   /**
1469
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1455
    * Use Trinamic's ultra quiet stepping mode.
1470
    * Use Trinamic's ultra quiet stepping mode.
1456
    * When disabled, Marlin will use spreadCycle stepping mode.
1471
    * When disabled, Marlin will use spreadCycle stepping mode.
1457
    */
1472
    */
1476
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1491
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1477
 
1492
 
1478
   /**
1493
   /**
1479
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1494
+   * Monitor Trinamic drivers for error conditions,
1480
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1495
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1481
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1496
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1482
    * Other detected conditions can be used to stop the current print.
1497
    * Other detected conditions can be used to stop the current print.
1495
   #endif
1510
   #endif
1496
 
1511
 
1497
   /**
1512
   /**
1513
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1498
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1514
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1499
    * This mode allows for faster movements at the expense of higher noise levels.
1515
    * This mode allows for faster movements at the expense of higher noise levels.
1500
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1516
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1517
   #define E5_HYBRID_THRESHOLD     30
1533
   #define E5_HYBRID_THRESHOLD     30
1518
 
1534
 
1519
   /**
1535
   /**
1536
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1520
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1537
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1521
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1538
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1522
    * X, Y, and Z homing will always be done in spreadCycle mode.
1539
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/RapideLite/RL200/Configuration.h 查看文件

622
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
622
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
623
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
623
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
624
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
624
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
625
- *          TMC5130, TMC5130_STANDALONE
626
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
625
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
626
+ *          TMC5160, TMC5160_STANDALONE
627
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
627
  */
628
  */
628
 #define X_DRIVER_TYPE  DRV8825
629
 #define X_DRIVER_TYPE  DRV8825
629
 #define Y_DRIVER_TYPE  DRV8825
630
 #define Y_DRIVER_TYPE  DRV8825

+ 28
- 11
Marlin/src/config/examples/RapideLite/RL200/Configuration_adv.h 查看文件

1323
 // @section tmc_smart
1323
 // @section tmc_smart
1324
 
1324
 
1325
 /**
1325
 /**
1326
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1327
- * the hardware SPI interface on your board and define the required CS pins
1328
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1326
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1327
+ * connect your SPI pins to the hardware SPI interface on your board and define
1328
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1329
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1329
  * You may also use software SPI if you wish to use general purpose IO pins.
1330
  * You may also use software SPI if you wish to use general purpose IO pins.
1330
  *
1331
  *
1331
- * To use TMC2208 stepper UART-configurable stepper drivers
1332
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1333
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1334
- * to PDN_UART without a resistor.
1332
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1333
+ * to the driver side PDN_UART pin with a 1K resistor.
1334
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1335
+ * a resistor.
1335
  * The drivers can also be used with hardware serial.
1336
  * The drivers can also be used with hardware serial.
1336
  *
1337
  *
1337
- * TMCStepper library is required for connected TMC stepper drivers.
1338
+ * TMCStepper library is required to use TMC stepper drivers.
1338
  * https://github.com/teemuatlut/TMCStepper
1339
  * https://github.com/teemuatlut/TMCStepper
1339
  */
1340
  */
1340
 #if HAS_TRINAMIC
1341
 #if HAS_TRINAMIC
1341
 
1342
 
1342
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1343
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1343
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1344
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1344
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1345
 
1345
 
1346
   #if AXIS_IS_TMC(X)
1346
   #if AXIS_IS_TMC(X)
1347
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1347
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1348
     #define X_MICROSTEPS   16  // 0..256
1348
     #define X_MICROSTEPS   16  // 0..256
1349
+    #define X_RSENSE     0.11
1349
   #endif
1350
   #endif
1350
 
1351
 
1351
   #if AXIS_IS_TMC(X2)
1352
   #if AXIS_IS_TMC(X2)
1352
     #define X2_CURRENT    800
1353
     #define X2_CURRENT    800
1353
     #define X2_MICROSTEPS  16
1354
     #define X2_MICROSTEPS  16
1355
+    #define X2_RSENSE    0.11
1354
   #endif
1356
   #endif
1355
 
1357
 
1356
   #if AXIS_IS_TMC(Y)
1358
   #if AXIS_IS_TMC(Y)
1357
     #define Y_CURRENT     800
1359
     #define Y_CURRENT     800
1358
     #define Y_MICROSTEPS   16
1360
     #define Y_MICROSTEPS   16
1361
+    #define Y_RSENSE     0.11
1359
   #endif
1362
   #endif
1360
 
1363
 
1361
   #if AXIS_IS_TMC(Y2)
1364
   #if AXIS_IS_TMC(Y2)
1362
     #define Y2_CURRENT    800
1365
     #define Y2_CURRENT    800
1363
     #define Y2_MICROSTEPS  16
1366
     #define Y2_MICROSTEPS  16
1367
+    #define Y2_RSENSE    0.11
1364
   #endif
1368
   #endif
1365
 
1369
 
1366
   #if AXIS_IS_TMC(Z)
1370
   #if AXIS_IS_TMC(Z)
1367
     #define Z_CURRENT     800
1371
     #define Z_CURRENT     800
1368
     #define Z_MICROSTEPS   16
1372
     #define Z_MICROSTEPS   16
1373
+    #define Z_RSENSE     0.11
1369
   #endif
1374
   #endif
1370
 
1375
 
1371
   #if AXIS_IS_TMC(Z2)
1376
   #if AXIS_IS_TMC(Z2)
1372
     #define Z2_CURRENT    800
1377
     #define Z2_CURRENT    800
1373
     #define Z2_MICROSTEPS  16
1378
     #define Z2_MICROSTEPS  16
1379
+    #define Z2_RSENSE    0.11
1374
   #endif
1380
   #endif
1375
 
1381
 
1376
   #if AXIS_IS_TMC(Z3)
1382
   #if AXIS_IS_TMC(Z3)
1377
     #define Z3_CURRENT    800
1383
     #define Z3_CURRENT    800
1378
     #define Z3_MICROSTEPS  16
1384
     #define Z3_MICROSTEPS  16
1385
+    #define Z3_RSENSE    0.11
1379
   #endif
1386
   #endif
1380
 
1387
 
1381
   #if AXIS_IS_TMC(E0)
1388
   #if AXIS_IS_TMC(E0)
1382
     #define E0_CURRENT    800
1389
     #define E0_CURRENT    800
1383
     #define E0_MICROSTEPS  16
1390
     #define E0_MICROSTEPS  16
1391
+    #define E0_RSENSE    0.11
1384
   #endif
1392
   #endif
1385
 
1393
 
1386
   #if AXIS_IS_TMC(E1)
1394
   #if AXIS_IS_TMC(E1)
1387
     #define E1_CURRENT    800
1395
     #define E1_CURRENT    800
1388
     #define E1_MICROSTEPS  16
1396
     #define E1_MICROSTEPS  16
1397
+    #define E1_RSENSE    0.11
1389
   #endif
1398
   #endif
1390
 
1399
 
1391
   #if AXIS_IS_TMC(E2)
1400
   #if AXIS_IS_TMC(E2)
1392
     #define E2_CURRENT    800
1401
     #define E2_CURRENT    800
1393
     #define E2_MICROSTEPS  16
1402
     #define E2_MICROSTEPS  16
1403
+    #define E2_RSENSE    0.11
1394
   #endif
1404
   #endif
1395
 
1405
 
1396
   #if AXIS_IS_TMC(E3)
1406
   #if AXIS_IS_TMC(E3)
1397
     #define E3_CURRENT    800
1407
     #define E3_CURRENT    800
1398
     #define E3_MICROSTEPS  16
1408
     #define E3_MICROSTEPS  16
1409
+    #define E3_RSENSE    0.11
1399
   #endif
1410
   #endif
1400
 
1411
 
1401
   #if AXIS_IS_TMC(E4)
1412
   #if AXIS_IS_TMC(E4)
1402
     #define E4_CURRENT    800
1413
     #define E4_CURRENT    800
1403
     #define E4_MICROSTEPS  16
1414
     #define E4_MICROSTEPS  16
1415
+    #define E4_RSENSE    0.11
1404
   #endif
1416
   #endif
1405
 
1417
 
1406
   #if AXIS_IS_TMC(E5)
1418
   #if AXIS_IS_TMC(E5)
1407
     #define E5_CURRENT    800
1419
     #define E5_CURRENT    800
1408
     #define E5_MICROSTEPS  16
1420
     #define E5_MICROSTEPS  16
1421
+    #define E5_RSENSE    0.11
1409
   #endif
1422
   #endif
1410
 
1423
 
1411
   /**
1424
   /**
1412
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1425
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1413
    * The default pins can be found in your board's pins file.
1426
    * The default pins can be found in your board's pins file.
1414
    */
1427
    */
1415
   //#define X_CS_PIN          -1
1428
   //#define X_CS_PIN          -1
1428
 
1441
 
1429
   /**
1442
   /**
1430
    * Use software SPI for TMC2130.
1443
    * Use software SPI for TMC2130.
1444
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1431
    * The default SW SPI pins are defined the respective pins files,
1445
    * The default SW SPI pins are defined the respective pins files,
1432
    * but you can override or define them here.
1446
    * but you can override or define them here.
1433
    */
1447
    */
1445
   //#define SOFTWARE_DRIVER_ENABLE
1459
   //#define SOFTWARE_DRIVER_ENABLE
1446
 
1460
 
1447
   /**
1461
   /**
1462
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1448
    * Use Trinamic's ultra quiet stepping mode.
1463
    * Use Trinamic's ultra quiet stepping mode.
1449
    * When disabled, Marlin will use spreadCycle stepping mode.
1464
    * When disabled, Marlin will use spreadCycle stepping mode.
1450
    */
1465
    */
1469
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1484
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1470
 
1485
 
1471
   /**
1486
   /**
1472
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1487
+   * Monitor Trinamic drivers for error conditions,
1473
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1488
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1474
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1489
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1475
    * Other detected conditions can be used to stop the current print.
1490
    * Other detected conditions can be used to stop the current print.
1488
   #endif
1503
   #endif
1489
 
1504
 
1490
   /**
1505
   /**
1506
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1491
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1507
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1492
    * This mode allows for faster movements at the expense of higher noise levels.
1508
    * This mode allows for faster movements at the expense of higher noise levels.
1493
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1509
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1510
   #define E5_HYBRID_THRESHOLD     30
1526
   #define E5_HYBRID_THRESHOLD     30
1511
 
1527
 
1512
   /**
1528
   /**
1529
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1513
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1530
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1514
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1531
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1515
    * X, Y, and Z homing will always be done in spreadCycle mode.
1532
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h 查看文件

623
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
623
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
624
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
624
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
625
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
625
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
626
- *          TMC5130, TMC5130_STANDALONE
627
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
626
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
627
+ *          TMC5160, TMC5160_STANDALONE
628
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
628
  */
629
  */
629
 //#define X_DRIVER_TYPE  A4988
630
 //#define X_DRIVER_TYPE  A4988
630
 //#define Y_DRIVER_TYPE  A4988
631
 //#define Y_DRIVER_TYPE  A4988

+ 3
- 2
Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h 查看文件

623
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
623
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
624
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
624
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
625
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
625
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
626
- *          TMC5130, TMC5130_STANDALONE
627
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
626
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
627
+ *          TMC5160, TMC5160_STANDALONE
628
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
628
  */
629
  */
629
 //#define X_DRIVER_TYPE  A4988
630
 //#define X_DRIVER_TYPE  A4988
630
 //#define Y_DRIVER_TYPE  A4988
631
 //#define Y_DRIVER_TYPE  A4988

+ 3
- 2
Marlin/src/config/examples/RigidBot/Configuration.h 查看文件

619
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
619
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
620
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
620
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
621
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
621
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
622
- *          TMC5130, TMC5130_STANDALONE
623
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
622
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
623
+ *          TMC5160, TMC5160_STANDALONE
624
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
624
  */
625
  */
625
 //#define X_DRIVER_TYPE  A4988
626
 //#define X_DRIVER_TYPE  A4988
626
 //#define Y_DRIVER_TYPE  A4988
627
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/RigidBot/Configuration_adv.h 查看文件

1322
 // @section tmc_smart
1322
 // @section tmc_smart
1323
 
1323
 
1324
 /**
1324
 /**
1325
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1326
- * the hardware SPI interface on your board and define the required CS pins
1327
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1325
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1326
+ * connect your SPI pins to the hardware SPI interface on your board and define
1327
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1328
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1328
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  *
1330
  *
1330
- * To use TMC2208 stepper UART-configurable stepper drivers
1331
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1332
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1333
- * to PDN_UART without a resistor.
1331
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1332
+ * to the driver side PDN_UART pin with a 1K resistor.
1333
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1334
+ * a resistor.
1334
  * The drivers can also be used with hardware serial.
1335
  * The drivers can also be used with hardware serial.
1335
  *
1336
  *
1336
- * TMCStepper library is required for connected TMC stepper drivers.
1337
+ * TMCStepper library is required to use TMC stepper drivers.
1337
  * https://github.com/teemuatlut/TMCStepper
1338
  * https://github.com/teemuatlut/TMCStepper
1338
  */
1339
  */
1339
 #if HAS_TRINAMIC
1340
 #if HAS_TRINAMIC
1340
 
1341
 
1341
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1344
 
1344
 
1345
   #if AXIS_IS_TMC(X)
1345
   #if AXIS_IS_TMC(X)
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1347
     #define X_MICROSTEPS   16  // 0..256
1347
     #define X_MICROSTEPS   16  // 0..256
1348
+    #define X_RSENSE     0.11
1348
   #endif
1349
   #endif
1349
 
1350
 
1350
   #if AXIS_IS_TMC(X2)
1351
   #if AXIS_IS_TMC(X2)
1351
     #define X2_CURRENT    800
1352
     #define X2_CURRENT    800
1352
     #define X2_MICROSTEPS  16
1353
     #define X2_MICROSTEPS  16
1354
+    #define X2_RSENSE    0.11
1353
   #endif
1355
   #endif
1354
 
1356
 
1355
   #if AXIS_IS_TMC(Y)
1357
   #if AXIS_IS_TMC(Y)
1356
     #define Y_CURRENT     800
1358
     #define Y_CURRENT     800
1357
     #define Y_MICROSTEPS   16
1359
     #define Y_MICROSTEPS   16
1360
+    #define Y_RSENSE     0.11
1358
   #endif
1361
   #endif
1359
 
1362
 
1360
   #if AXIS_IS_TMC(Y2)
1363
   #if AXIS_IS_TMC(Y2)
1361
     #define Y2_CURRENT    800
1364
     #define Y2_CURRENT    800
1362
     #define Y2_MICROSTEPS  16
1365
     #define Y2_MICROSTEPS  16
1366
+    #define Y2_RSENSE    0.11
1363
   #endif
1367
   #endif
1364
 
1368
 
1365
   #if AXIS_IS_TMC(Z)
1369
   #if AXIS_IS_TMC(Z)
1366
     #define Z_CURRENT     800
1370
     #define Z_CURRENT     800
1367
     #define Z_MICROSTEPS   16
1371
     #define Z_MICROSTEPS   16
1372
+    #define Z_RSENSE     0.11
1368
   #endif
1373
   #endif
1369
 
1374
 
1370
   #if AXIS_IS_TMC(Z2)
1375
   #if AXIS_IS_TMC(Z2)
1371
     #define Z2_CURRENT    800
1376
     #define Z2_CURRENT    800
1372
     #define Z2_MICROSTEPS  16
1377
     #define Z2_MICROSTEPS  16
1378
+    #define Z2_RSENSE    0.11
1373
   #endif
1379
   #endif
1374
 
1380
 
1375
   #if AXIS_IS_TMC(Z3)
1381
   #if AXIS_IS_TMC(Z3)
1376
     #define Z3_CURRENT    800
1382
     #define Z3_CURRENT    800
1377
     #define Z3_MICROSTEPS  16
1383
     #define Z3_MICROSTEPS  16
1384
+    #define Z3_RSENSE    0.11
1378
   #endif
1385
   #endif
1379
 
1386
 
1380
   #if AXIS_IS_TMC(E0)
1387
   #if AXIS_IS_TMC(E0)
1381
     #define E0_CURRENT    800
1388
     #define E0_CURRENT    800
1382
     #define E0_MICROSTEPS  16
1389
     #define E0_MICROSTEPS  16
1390
+    #define E0_RSENSE    0.11
1383
   #endif
1391
   #endif
1384
 
1392
 
1385
   #if AXIS_IS_TMC(E1)
1393
   #if AXIS_IS_TMC(E1)
1386
     #define E1_CURRENT    800
1394
     #define E1_CURRENT    800
1387
     #define E1_MICROSTEPS  16
1395
     #define E1_MICROSTEPS  16
1396
+    #define E1_RSENSE    0.11
1388
   #endif
1397
   #endif
1389
 
1398
 
1390
   #if AXIS_IS_TMC(E2)
1399
   #if AXIS_IS_TMC(E2)
1391
     #define E2_CURRENT    800
1400
     #define E2_CURRENT    800
1392
     #define E2_MICROSTEPS  16
1401
     #define E2_MICROSTEPS  16
1402
+    #define E2_RSENSE    0.11
1393
   #endif
1403
   #endif
1394
 
1404
 
1395
   #if AXIS_IS_TMC(E3)
1405
   #if AXIS_IS_TMC(E3)
1396
     #define E3_CURRENT    800
1406
     #define E3_CURRENT    800
1397
     #define E3_MICROSTEPS  16
1407
     #define E3_MICROSTEPS  16
1408
+    #define E3_RSENSE    0.11
1398
   #endif
1409
   #endif
1399
 
1410
 
1400
   #if AXIS_IS_TMC(E4)
1411
   #if AXIS_IS_TMC(E4)
1401
     #define E4_CURRENT    800
1412
     #define E4_CURRENT    800
1402
     #define E4_MICROSTEPS  16
1413
     #define E4_MICROSTEPS  16
1414
+    #define E4_RSENSE    0.11
1403
   #endif
1415
   #endif
1404
 
1416
 
1405
   #if AXIS_IS_TMC(E5)
1417
   #if AXIS_IS_TMC(E5)
1406
     #define E5_CURRENT    800
1418
     #define E5_CURRENT    800
1407
     #define E5_MICROSTEPS  16
1419
     #define E5_MICROSTEPS  16
1420
+    #define E5_RSENSE    0.11
1408
   #endif
1421
   #endif
1409
 
1422
 
1410
   /**
1423
   /**
1411
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1424
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1412
    * The default pins can be found in your board's pins file.
1425
    * The default pins can be found in your board's pins file.
1413
    */
1426
    */
1414
   //#define X_CS_PIN          -1
1427
   //#define X_CS_PIN          -1
1427
 
1440
 
1428
   /**
1441
   /**
1429
    * Use software SPI for TMC2130.
1442
    * Use software SPI for TMC2130.
1443
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1430
    * The default SW SPI pins are defined the respective pins files,
1444
    * The default SW SPI pins are defined the respective pins files,
1431
    * but you can override or define them here.
1445
    * but you can override or define them here.
1432
    */
1446
    */
1444
   //#define SOFTWARE_DRIVER_ENABLE
1458
   //#define SOFTWARE_DRIVER_ENABLE
1445
 
1459
 
1446
   /**
1460
   /**
1461
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1447
    * Use Trinamic's ultra quiet stepping mode.
1462
    * Use Trinamic's ultra quiet stepping mode.
1448
    * When disabled, Marlin will use spreadCycle stepping mode.
1463
    * When disabled, Marlin will use spreadCycle stepping mode.
1449
    */
1464
    */
1468
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1483
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1469
 
1484
 
1470
   /**
1485
   /**
1471
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1486
+   * Monitor Trinamic drivers for error conditions,
1472
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1487
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1473
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1488
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1474
    * Other detected conditions can be used to stop the current print.
1489
    * Other detected conditions can be used to stop the current print.
1487
   #endif
1502
   #endif
1488
 
1503
 
1489
   /**
1504
   /**
1505
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1490
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1506
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1491
    * This mode allows for faster movements at the expense of higher noise levels.
1507
    * This mode allows for faster movements at the expense of higher noise levels.
1492
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1508
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1509
   #define E5_HYBRID_THRESHOLD     30
1525
   #define E5_HYBRID_THRESHOLD     30
1510
 
1526
 
1511
   /**
1527
   /**
1528
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1512
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1529
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1513
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1530
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1514
    * X, Y, and Z homing will always be done in spreadCycle mode.
1531
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/SCARA/Configuration.h 查看文件

636
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
636
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
637
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
637
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
638
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
638
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
639
- *          TMC5130, TMC5130_STANDALONE
640
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
639
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
640
+ *          TMC5160, TMC5160_STANDALONE
641
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
641
  */
642
  */
642
 //#define X_DRIVER_TYPE  A4988
643
 //#define X_DRIVER_TYPE  A4988
643
 //#define Y_DRIVER_TYPE  A4988
644
 //#define Y_DRIVER_TYPE  A4988

+ 28
- 11
Marlin/src/config/examples/SCARA/Configuration_adv.h 查看文件

1322
 // @section tmc_smart
1322
 // @section tmc_smart
1323
 
1323
 
1324
 /**
1324
 /**
1325
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
1326
- * the hardware SPI interface on your board and define the required CS pins
1327
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1325
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
1326
+ * connect your SPI pins to the hardware SPI interface on your board and define
1327
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
1328
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
1328
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  * You may also use software SPI if you wish to use general purpose IO pins.
1329
  *
1330
  *
1330
- * To use TMC2208 stepper UART-configurable stepper drivers
1331
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
1332
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
1333
- * to PDN_UART without a resistor.
1331
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
1332
+ * to the driver side PDN_UART pin with a 1K resistor.
1333
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
1334
+ * a resistor.
1334
  * The drivers can also be used with hardware serial.
1335
  * The drivers can also be used with hardware serial.
1335
  *
1336
  *
1336
- * TMCStepper library is required for connected TMC stepper drivers.
1337
+ * TMCStepper library is required to use TMC stepper drivers.
1337
  * https://github.com/teemuatlut/TMCStepper
1338
  * https://github.com/teemuatlut/TMCStepper
1338
  */
1339
  */
1339
 #if HAS_TRINAMIC
1340
 #if HAS_TRINAMIC
1340
 
1341
 
1341
-  #define R_SENSE           0.11  // R_sense resistor for SilentStepStick2130
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1342
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1343
   #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
1344
 
1344
 
1345
   #if AXIS_IS_TMC(X)
1345
   #if AXIS_IS_TMC(X)
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1346
     #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
1347
     #define X_MICROSTEPS   16  // 0..256
1347
     #define X_MICROSTEPS   16  // 0..256
1348
+    #define X_RSENSE     0.11
1348
   #endif
1349
   #endif
1349
 
1350
 
1350
   #if AXIS_IS_TMC(X2)
1351
   #if AXIS_IS_TMC(X2)
1351
     #define X2_CURRENT    800
1352
     #define X2_CURRENT    800
1352
     #define X2_MICROSTEPS  16
1353
     #define X2_MICROSTEPS  16
1354
+    #define X2_RSENSE    0.11
1353
   #endif
1355
   #endif
1354
 
1356
 
1355
   #if AXIS_IS_TMC(Y)
1357
   #if AXIS_IS_TMC(Y)
1356
     #define Y_CURRENT     800
1358
     #define Y_CURRENT     800
1357
     #define Y_MICROSTEPS   16
1359
     #define Y_MICROSTEPS   16
1360
+    #define Y_RSENSE     0.11
1358
   #endif
1361
   #endif
1359
 
1362
 
1360
   #if AXIS_IS_TMC(Y2)
1363
   #if AXIS_IS_TMC(Y2)
1361
     #define Y2_CURRENT    800
1364
     #define Y2_CURRENT    800
1362
     #define Y2_MICROSTEPS  16
1365
     #define Y2_MICROSTEPS  16
1366
+    #define Y2_RSENSE    0.11
1363
   #endif
1367
   #endif
1364
 
1368
 
1365
   #if AXIS_IS_TMC(Z)
1369
   #if AXIS_IS_TMC(Z)
1366
     #define Z_CURRENT     800
1370
     #define Z_CURRENT     800
1367
     #define Z_MICROSTEPS   16
1371
     #define Z_MICROSTEPS   16
1372
+    #define Z_RSENSE     0.11
1368
   #endif
1373
   #endif
1369
 
1374
 
1370
   #if AXIS_IS_TMC(Z2)
1375
   #if AXIS_IS_TMC(Z2)
1371
     #define Z2_CURRENT    800
1376
     #define Z2_CURRENT    800
1372
     #define Z2_MICROSTEPS  16
1377
     #define Z2_MICROSTEPS  16
1378
+    #define Z2_RSENSE    0.11
1373
   #endif
1379
   #endif
1374
 
1380
 
1375
   #if AXIS_IS_TMC(Z3)
1381
   #if AXIS_IS_TMC(Z3)
1376
     #define Z3_CURRENT    800
1382
     #define Z3_CURRENT    800
1377
     #define Z3_MICROSTEPS  16
1383
     #define Z3_MICROSTEPS  16
1384
+    #define Z3_RSENSE    0.11
1378
   #endif
1385
   #endif
1379
 
1386
 
1380
   #if AXIS_IS_TMC(E0)
1387
   #if AXIS_IS_TMC(E0)
1381
     #define E0_CURRENT    800
1388
     #define E0_CURRENT    800
1382
     #define E0_MICROSTEPS  16
1389
     #define E0_MICROSTEPS  16
1390
+    #define E0_RSENSE    0.11
1383
   #endif
1391
   #endif
1384
 
1392
 
1385
   #if AXIS_IS_TMC(E1)
1393
   #if AXIS_IS_TMC(E1)
1386
     #define E1_CURRENT    800
1394
     #define E1_CURRENT    800
1387
     #define E1_MICROSTEPS  16
1395
     #define E1_MICROSTEPS  16
1396
+    #define E1_RSENSE    0.11
1388
   #endif
1397
   #endif
1389
 
1398
 
1390
   #if AXIS_IS_TMC(E2)
1399
   #if AXIS_IS_TMC(E2)
1391
     #define E2_CURRENT    800
1400
     #define E2_CURRENT    800
1392
     #define E2_MICROSTEPS  16
1401
     #define E2_MICROSTEPS  16
1402
+    #define E2_RSENSE    0.11
1393
   #endif
1403
   #endif
1394
 
1404
 
1395
   #if AXIS_IS_TMC(E3)
1405
   #if AXIS_IS_TMC(E3)
1396
     #define E3_CURRENT    800
1406
     #define E3_CURRENT    800
1397
     #define E3_MICROSTEPS  16
1407
     #define E3_MICROSTEPS  16
1408
+    #define E3_RSENSE    0.11
1398
   #endif
1409
   #endif
1399
 
1410
 
1400
   #if AXIS_IS_TMC(E4)
1411
   #if AXIS_IS_TMC(E4)
1401
     #define E4_CURRENT    800
1412
     #define E4_CURRENT    800
1402
     #define E4_MICROSTEPS  16
1413
     #define E4_MICROSTEPS  16
1414
+    #define E4_RSENSE    0.11
1403
   #endif
1415
   #endif
1404
 
1416
 
1405
   #if AXIS_IS_TMC(E5)
1417
   #if AXIS_IS_TMC(E5)
1406
     #define E5_CURRENT    800
1418
     #define E5_CURRENT    800
1407
     #define E5_MICROSTEPS  16
1419
     #define E5_MICROSTEPS  16
1420
+    #define E5_RSENSE    0.11
1408
   #endif
1421
   #endif
1409
 
1422
 
1410
   /**
1423
   /**
1411
-   * Override default SPI pins for TMC2130 and TMC2660 drivers here.
1424
+   * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
1412
    * The default pins can be found in your board's pins file.
1425
    * The default pins can be found in your board's pins file.
1413
    */
1426
    */
1414
   //#define X_CS_PIN          -1
1427
   //#define X_CS_PIN          -1
1427
 
1440
 
1428
   /**
1441
   /**
1429
    * Use software SPI for TMC2130.
1442
    * Use software SPI for TMC2130.
1443
+   * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
1430
    * The default SW SPI pins are defined the respective pins files,
1444
    * The default SW SPI pins are defined the respective pins files,
1431
    * but you can override or define them here.
1445
    * but you can override or define them here.
1432
    */
1446
    */
1444
   //#define SOFTWARE_DRIVER_ENABLE
1458
   //#define SOFTWARE_DRIVER_ENABLE
1445
 
1459
 
1446
   /**
1460
   /**
1461
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1447
    * Use Trinamic's ultra quiet stepping mode.
1462
    * Use Trinamic's ultra quiet stepping mode.
1448
    * When disabled, Marlin will use spreadCycle stepping mode.
1463
    * When disabled, Marlin will use spreadCycle stepping mode.
1449
    */
1464
    */
1468
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1483
   #define CHOPPER_TIMING CHOPPER_DEFAULT_12V
1469
 
1484
 
1470
   /**
1485
   /**
1471
-   * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
1486
+   * Monitor Trinamic drivers for error conditions,
1472
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1487
    * like overtemperature and short to ground. TMC2208 requires hardware serial.
1473
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1488
    * In the case of overtemperature Marlin can decrease the driver current until error condition clears.
1474
    * Other detected conditions can be used to stop the current print.
1489
    * Other detected conditions can be used to stop the current print.
1487
   #endif
1502
   #endif
1488
 
1503
 
1489
   /**
1504
   /**
1505
+   * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only
1490
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1506
    * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
1491
    * This mode allows for faster movements at the expense of higher noise levels.
1507
    * This mode allows for faster movements at the expense of higher noise levels.
1492
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1508
    * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
1509
   #define E5_HYBRID_THRESHOLD     30
1525
   #define E5_HYBRID_THRESHOLD     30
1510
 
1526
 
1511
   /**
1527
   /**
1528
+   * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only
1512
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1529
    * Use StallGuard2 to sense an obstacle and trigger an endstop.
1513
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1530
    * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
1514
    * X, Y, and Z homing will always be done in spreadCycle mode.
1531
    * X, Y, and Z homing will always be done in spreadCycle mode.

+ 3
- 2
Marlin/src/config/examples/STM32F10/Configuration.h 查看文件

625
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
625
  * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
626
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
626
  *          TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
627
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
627
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
628
- *          TMC5130, TMC5130_STANDALONE
629
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE']
628
+ *          TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE,
629
+ *          TMC5160, TMC5160_STANDALONE
630
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
630
  */
631
  */
631
 //#define X_DRIVER_TYPE  A4988
632
 //#define X_DRIVER_TYPE  A4988
632
 //#define Y_DRIVER_TYPE  A4988
633
 //#define Y_DRIVER_TYPE  A4988

+ 0
- 0
Marlin/src/config/examples/STM32F4/Configuration.h 查看文件


部分文件因为文件数量过多而无法显示

正在加载...
取消
保存