瀏覽代碼

Configure TMC interpolation per driver (#19828)

ManuelMcLure 4 年之前
父節點
當前提交
4fccb92e07
沒有連結到貢獻者的電子郵件帳戶。
共有 4 個檔案被更改,包括 99 行新增19 行删除
  1. 24
    3
      Marlin/Configuration_adv.h
  2. 12
    1
      Marlin/src/feature/tmc_util.cpp
  3. 48
    0
      Marlin/src/inc/Conditionals_post.h
  4. 15
    15
      Marlin/src/module/stepper/trinamic.cpp

+ 24
- 3
Marlin/Configuration_adv.h 查看文件

@@ -2261,14 +2261,20 @@
2261 2261
 #if HAS_TRINAMIC_CONFIG
2262 2262
 
2263 2263
   #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
2264
-  #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256
2264
+
2265
+  /**
2266
+   * Interpolate microsteps to 256
2267
+   * Override for each driver with <driver>_INTERPOLATE settings below
2268
+   */
2269
+  #define INTERPOLATE      true
2265 2270
 
2266 2271
   #if AXIS_IS_TMC(X)
2267 2272
     #define X_CURRENT       800        // (mA) RMS current. Multiply by 1.414 for peak current.
2268 2273
     #define X_CURRENT_HOME  X_CURRENT  // (mA) RMS current for sensorless homing
2269
-    #define X_MICROSTEPS     16    // 0..256
2274
+    #define X_MICROSTEPS     16        // 0..256
2270 2275
     #define X_RSENSE          0.11
2271
-    #define X_CHAIN_POS      -1    // <=0 : Not chained. 1 : MCU MOSI connected. 2 : Next in chain, ...
2276
+    #define X_CHAIN_POS      -1        // -1..0: Not chained. 1: MCU MOSI connected. 2: Next in chain, ...
2277
+    //#define X_INTERPOLATE  true      // Enable to override 'INTERPOLATE' for the X axis
2272 2278
   #endif
2273 2279
 
2274 2280
   #if AXIS_IS_TMC(X2)
@@ -2277,6 +2283,7 @@
2277 2283
     #define X2_MICROSTEPS    16
2278 2284
     #define X2_RSENSE         0.11
2279 2285
     #define X2_CHAIN_POS     -1
2286
+    //#define X2_INTERPOLATE true
2280 2287
   #endif
2281 2288
 
2282 2289
   #if AXIS_IS_TMC(Y)
@@ -2285,6 +2292,7 @@
2285 2292
     #define Y_MICROSTEPS     16
2286 2293
     #define Y_RSENSE          0.11
2287 2294
     #define Y_CHAIN_POS      -1
2295
+    //#define Y_INTERPOLATE  true
2288 2296
   #endif
2289 2297
 
2290 2298
   #if AXIS_IS_TMC(Y2)
@@ -2293,6 +2301,7 @@
2293 2301
     #define Y2_MICROSTEPS    16
2294 2302
     #define Y2_RSENSE         0.11
2295 2303
     #define Y2_CHAIN_POS     -1
2304
+    //#define Y2_INTERPOLATE true
2296 2305
   #endif
2297 2306
 
2298 2307
   #if AXIS_IS_TMC(Z)
@@ -2301,6 +2310,7 @@
2301 2310
     #define Z_MICROSTEPS     16
2302 2311
     #define Z_RSENSE          0.11
2303 2312
     #define Z_CHAIN_POS      -1
2313
+    //#define Z_INTERPOLATE  true
2304 2314
   #endif
2305 2315
 
2306 2316
   #if AXIS_IS_TMC(Z2)
@@ -2309,6 +2319,7 @@
2309 2319
     #define Z2_MICROSTEPS    16
2310 2320
     #define Z2_RSENSE         0.11
2311 2321
     #define Z2_CHAIN_POS     -1
2322
+    //#define Z2_INTERPOLATE true
2312 2323
   #endif
2313 2324
 
2314 2325
   #if AXIS_IS_TMC(Z3)
@@ -2317,6 +2328,7 @@
2317 2328
     #define Z3_MICROSTEPS    16
2318 2329
     #define Z3_RSENSE         0.11
2319 2330
     #define Z3_CHAIN_POS     -1
2331
+    //#define Z3_INTERPOLATE true
2320 2332
   #endif
2321 2333
 
2322 2334
   #if AXIS_IS_TMC(Z4)
@@ -2325,6 +2337,7 @@
2325 2337
     #define Z4_MICROSTEPS    16
2326 2338
     #define Z4_RSENSE         0.11
2327 2339
     #define Z4_CHAIN_POS     -1
2340
+    //#define Z4_INTERPOLATE true
2328 2341
   #endif
2329 2342
 
2330 2343
   #if AXIS_IS_TMC(E0)
@@ -2332,6 +2345,7 @@
2332 2345
     #define E0_MICROSTEPS    16
2333 2346
     #define E0_RSENSE         0.11
2334 2347
     #define E0_CHAIN_POS     -1
2348
+    //#define E0_INTERPOLATE true
2335 2349
   #endif
2336 2350
 
2337 2351
   #if AXIS_IS_TMC(E1)
@@ -2339,6 +2353,7 @@
2339 2353
     #define E1_MICROSTEPS    16
2340 2354
     #define E1_RSENSE         0.11
2341 2355
     #define E1_CHAIN_POS     -1
2356
+    //#define E1_INTERPOLATE true
2342 2357
   #endif
2343 2358
 
2344 2359
   #if AXIS_IS_TMC(E2)
@@ -2346,6 +2361,7 @@
2346 2361
     #define E2_MICROSTEPS    16
2347 2362
     #define E2_RSENSE         0.11
2348 2363
     #define E2_CHAIN_POS     -1
2364
+    //#define E2_INTERPOLATE true
2349 2365
   #endif
2350 2366
 
2351 2367
   #if AXIS_IS_TMC(E3)
@@ -2353,6 +2369,7 @@
2353 2369
     #define E3_MICROSTEPS    16
2354 2370
     #define E3_RSENSE         0.11
2355 2371
     #define E3_CHAIN_POS     -1
2372
+    //#define E3_INTERPOLATE true
2356 2373
   #endif
2357 2374
 
2358 2375
   #if AXIS_IS_TMC(E4)
@@ -2360,6 +2377,7 @@
2360 2377
     #define E4_MICROSTEPS    16
2361 2378
     #define E4_RSENSE         0.11
2362 2379
     #define E4_CHAIN_POS     -1
2380
+    //#define E4_INTERPOLATE true
2363 2381
   #endif
2364 2382
 
2365 2383
   #if AXIS_IS_TMC(E5)
@@ -2367,6 +2385,7 @@
2367 2385
     #define E5_MICROSTEPS    16
2368 2386
     #define E5_RSENSE         0.11
2369 2387
     #define E5_CHAIN_POS     -1
2388
+    //#define E5_INTERPOLATE true
2370 2389
   #endif
2371 2390
 
2372 2391
   #if AXIS_IS_TMC(E6)
@@ -2374,6 +2393,7 @@
2374 2393
     #define E6_MICROSTEPS    16
2375 2394
     #define E6_RSENSE         0.11
2376 2395
     #define E6_CHAIN_POS     -1
2396
+    //#define E6_INTERPOLATE true
2377 2397
   #endif
2378 2398
 
2379 2399
   #if AXIS_IS_TMC(E7)
@@ -2381,6 +2401,7 @@
2381 2401
     #define E7_MICROSTEPS    16
2382 2402
     #define E7_RSENSE         0.11
2383 2403
     #define E7_CHAIN_POS     -1
2404
+    //#define E7_INTERPOLATE true
2384 2405
   #endif
2385 2406
 
2386 2407
   /**

+ 12
- 1
Marlin/src/feature/tmc_util.cpp 查看文件

@@ -497,7 +497,8 @@
497 497
     TMC_HEND,
498 498
     TMC_HSTRT,
499 499
     TMC_SGT,
500
-    TMC_MSCNT
500
+    TMC_MSCNT,
501
+    TMC_INTERPOLATE
501 502
   };
502 503
   enum TMC_drv_status_enum : char {
503 504
     TMC_DRV_CODES,
@@ -553,6 +554,7 @@
553 554
         case TMC_PWM_SCALE: SERIAL_PRINT(st.PWM_SCALE(), DEC); break;
554 555
         case TMC_SGT: SERIAL_PRINT(st.sgt(), DEC); break;
555 556
         case TMC_STEALTHCHOP: serialprint_truefalse(st.en_pwm_mode()); break;
557
+        case TMC_INTERPOLATE: serialprint_truefalse(st.intpol()); break;
556 558
         default: break;
557 559
       }
558 560
     }
@@ -588,6 +590,7 @@
588 590
             SERIAL_ECHOPGM("/256");
589 591
           }
590 592
           break;
593
+        case TMC_INTERPOLATE: serialprint_truefalse(st.intpol()); break;
591 594
         default: break;
592 595
       }
593 596
     }
@@ -603,6 +606,7 @@
603 606
         case TMC_STEALTHCHOP: serialprint_truefalse(st.stealth()); break;
604 607
         case TMC_S2VSA: if (st.s2vsa()) SERIAL_CHAR('*'); break;
605 608
         case TMC_S2VSB: if (st.s2vsb()) SERIAL_CHAR('*'); break;
609
+        case TMC_INTERPOLATE: serialprint_truefalse(st.intpol()); break;
606 610
         default: break;
607 611
       }
608 612
     }
@@ -644,6 +648,12 @@
644 648
 
645 649
   #if HAS_DRIVER(TMC2660)
646 650
     static void _tmc_parse_drv_status(TMC2660Stepper, const TMC_drv_status_enum) { }
651
+    static void _tmc_status(TMC2660Stepper &st, const TMC_debug_enum i) {
652
+      switch (i) {
653
+        case TMC_INTERPOLATE: serialprint_truefalse(st.intpol()); break;
654
+        default: break;
655
+      }
656
+    }
647 657
   #endif
648 658
 
649 659
   template <typename TMC>
@@ -902,6 +912,7 @@
902 912
     #endif
903 913
     TMC_REPORT("stealthChop",        TMC_STEALTHCHOP);
904 914
     TMC_REPORT("msteps\t",           TMC_MICROSTEPS);
915
+    TMC_REPORT("interp\t",           TMC_INTERPOLATE);
905 916
     TMC_REPORT("tstep\t",            TMC_TSTEP);
906 917
     TMC_REPORT("PWM thresh.",        TMC_TPWMTHRS);
907 918
     TMC_REPORT("[mm/s]\t",           TMC_TPWMTHRS_MMS);

+ 48
- 0
Marlin/src/inc/Conditionals_post.h 查看文件

@@ -1608,6 +1608,54 @@
1608 1608
     #define Y_SPI_SENSORLESS Y_SENSORLESS
1609 1609
     #define Z_SPI_SENSORLESS Z_SENSORLESS
1610 1610
   #endif
1611
+  #ifndef X_INTERPOLATE
1612
+    #define X_INTERPOLATE INTERPOLATE
1613
+  #endif
1614
+  #ifndef X2_INTERPOLATE
1615
+    #define X2_INTERPOLATE INTERPOLATE
1616
+  #endif
1617
+  #ifndef Y_INTERPOLATE
1618
+    #define Y_INTERPOLATE INTERPOLATE
1619
+  #endif
1620
+  #ifndef Y2_INTERPOLATE
1621
+    #define Y2_INTERPOLATE INTERPOLATE
1622
+  #endif
1623
+  #ifndef Z_INTERPOLATE
1624
+    #define Z_INTERPOLATE INTERPOLATE
1625
+  #endif
1626
+  #ifndef Z2_INTERPOLATE
1627
+    #define Z2_INTERPOLATE INTERPOLATE
1628
+  #endif
1629
+  #ifndef Z3_INTERPOLATE
1630
+    #define Z3_INTERPOLATE INTERPOLATE
1631
+  #endif
1632
+  #ifndef Z4_INTERPOLATE
1633
+    #define Z4_INTERPOLATE INTERPOLATE
1634
+  #endif
1635
+  #ifndef E0_INTERPOLATE
1636
+    #define E0_INTERPOLATE INTERPOLATE
1637
+  #endif
1638
+  #ifndef E1_INTERPOLATE
1639
+    #define E1_INTERPOLATE INTERPOLATE
1640
+  #endif
1641
+  #ifndef E2_INTERPOLATE
1642
+    #define E2_INTERPOLATE INTERPOLATE
1643
+  #endif
1644
+  #ifndef E3_INTERPOLATE
1645
+    #define E3_INTERPOLATE INTERPOLATE
1646
+  #endif
1647
+  #ifndef E4_INTERPOLATE
1648
+    #define E4_INTERPOLATE INTERPOLATE
1649
+  #endif
1650
+  #ifndef E5_INTERPOLATE
1651
+    #define E5_INTERPOLATE INTERPOLATE
1652
+  #endif
1653
+  #ifndef E6_INTERPOLATE
1654
+    #define E6_INTERPOLATE INTERPOLATE
1655
+  #endif
1656
+  #ifndef E7_INTERPOLATE
1657
+    #define E7_INTERPOLATE INTERPOLATE
1658
+  #endif
1611 1659
 #endif
1612 1660
 
1613 1661
 #if (HAS_E_DRIVER(TMC2660) \

+ 15
- 15
Marlin/src/module/stepper/trinamic.cpp 查看文件

@@ -36,7 +36,7 @@
36 36
 #include <SPI.h>
37 37
 
38 38
 enum StealthIndex : uint8_t { STEALTH_AXIS_XY, STEALTH_AXIS_Z, STEALTH_AXIS_E };
39
-#define TMC_INIT(ST, STEALTH_INDEX) tmc_init(stepper##ST, ST##_CURRENT, ST##_MICROSTEPS, ST##_HYBRID_THRESHOLD, stealthchop_by_axis[STEALTH_INDEX], chopper_timing_##ST)
39
+#define TMC_INIT(ST, STEALTH_INDEX) tmc_init(stepper##ST, ST##_CURRENT, ST##_MICROSTEPS, ST##_HYBRID_THRESHOLD, stealthchop_by_axis[STEALTH_INDEX], chopper_timing_##ST, ST##_INTERPOLATE)
40 40
 
41 41
 //   IC = TMC model number
42 42
 //   ST = Stepper object letter
@@ -131,13 +131,13 @@ enum StealthIndex : uint8_t { STEALTH_AXIS_XY, STEALTH_AXIS_Z, STEALTH_AXIS_E };
131 131
 
132 132
 #if HAS_DRIVER(TMC2130)
133 133
   template<char AXIS_LETTER, char DRIVER_ID, AxisEnum AXIS_ID>
134
-  void tmc_init(TMCMarlin<TMC2130Stepper, AXIS_LETTER, DRIVER_ID, AXIS_ID> &st, const uint16_t mA, const uint16_t microsteps, const uint32_t hyb_thrs, const bool stealth, const chopper_timing_t &chop_init) {
134
+  void tmc_init(TMCMarlin<TMC2130Stepper, AXIS_LETTER, DRIVER_ID, AXIS_ID> &st, const uint16_t mA, const uint16_t microsteps, const uint32_t hyb_thrs, const bool stealth, const chopper_timing_t &chop_init, const bool interpolate) {
135 135
     st.begin();
136 136
 
137 137
     CHOPCONF_t chopconf{0};
138 138
     chopconf.tbl = 0b01;
139 139
     chopconf.toff = chop_init.toff;
140
-    chopconf.intpol = INTERPOLATE;
140
+    chopconf.intpol = interpolate;
141 141
     chopconf.hend = chop_init.hend + 3;
142 142
     chopconf.hstrt = chop_init.hstrt - 1;
143 143
     TERN_(SQUARE_WAVE_STEPPING, chopconf.dedge = true);
@@ -166,13 +166,13 @@ enum StealthIndex : uint8_t { STEALTH_AXIS_XY, STEALTH_AXIS_Z, STEALTH_AXIS_E };
166 166
 
167 167
 #if HAS_DRIVER(TMC2160)
168 168
   template<char AXIS_LETTER, char DRIVER_ID, AxisEnum AXIS_ID>
169
-  void tmc_init(TMCMarlin<TMC2160Stepper, AXIS_LETTER, DRIVER_ID, AXIS_ID> &st, const uint16_t mA, const uint16_t microsteps, const uint32_t hyb_thrs, const bool stealth, const chopper_timing_t &chop_init) {
169
+  void tmc_init(TMCMarlin<TMC2160Stepper, AXIS_LETTER, DRIVER_ID, AXIS_ID> &st, const uint16_t mA, const uint16_t microsteps, const uint32_t hyb_thrs, const bool stealth, const chopper_timing_t &chop_init, const bool interpolate) {
170 170
     st.begin();
171 171
 
172 172
     CHOPCONF_t chopconf{0};
173 173
     chopconf.tbl = 0b01;
174 174
     chopconf.toff = chop_init.toff;
175
-    chopconf.intpol = INTERPOLATE;
175
+    chopconf.intpol = interpolate;
176 176
     chopconf.hend = chop_init.hend + 3;
177 177
     chopconf.hstrt = chop_init.hstrt - 1;
178 178
     TERN_(SQUARE_WAVE_STEPPING, chopconf.dedge = true);
@@ -484,7 +484,7 @@ enum StealthIndex : uint8_t { STEALTH_AXIS_XY, STEALTH_AXIS_Z, STEALTH_AXIS_E };
484 484
 
485 485
 #if HAS_DRIVER(TMC2208)
486 486
   template<char AXIS_LETTER, char DRIVER_ID, AxisEnum AXIS_ID>
487
-  void tmc_init(TMCMarlin<TMC2208Stepper, AXIS_LETTER, DRIVER_ID, AXIS_ID> &st, const uint16_t mA, const uint16_t microsteps, const uint32_t hyb_thrs, const bool stealth, const chopper_timing_t &chop_init) {
487
+  void tmc_init(TMCMarlin<TMC2208Stepper, AXIS_LETTER, DRIVER_ID, AXIS_ID> &st, const uint16_t mA, const uint16_t microsteps, const uint32_t hyb_thrs, const bool stealth, const chopper_timing_t &chop_init, const bool interpolate) {
488 488
     TMC2208_n::GCONF_t gconf{0};
489 489
     gconf.pdn_disable = true; // Use UART
490 490
     gconf.mstep_reg_select = true; // Select microsteps with UART
@@ -496,7 +496,7 @@ enum StealthIndex : uint8_t { STEALTH_AXIS_XY, STEALTH_AXIS_Z, STEALTH_AXIS_E };
496 496
     TMC2208_n::CHOPCONF_t chopconf{0};
497 497
     chopconf.tbl = 0b01; // blank_time = 24
498 498
     chopconf.toff = chop_init.toff;
499
-    chopconf.intpol = INTERPOLATE;
499
+    chopconf.intpol = interpolate;
500 500
     chopconf.hend = chop_init.hend + 3;
501 501
     chopconf.hstrt = chop_init.hstrt - 1;
502 502
     TERN_(SQUARE_WAVE_STEPPING, chopconf.dedge = true);
@@ -526,7 +526,7 @@ enum StealthIndex : uint8_t { STEALTH_AXIS_XY, STEALTH_AXIS_Z, STEALTH_AXIS_E };
526 526
 
527 527
 #if HAS_DRIVER(TMC2209)
528 528
   template<char AXIS_LETTER, char DRIVER_ID, AxisEnum AXIS_ID>
529
-  void tmc_init(TMCMarlin<TMC2209Stepper, AXIS_LETTER, DRIVER_ID, AXIS_ID> &st, const uint16_t mA, const uint16_t microsteps, const uint32_t hyb_thrs, const bool stealth, const chopper_timing_t &chop_init) {
529
+  void tmc_init(TMCMarlin<TMC2209Stepper, AXIS_LETTER, DRIVER_ID, AXIS_ID> &st, const uint16_t mA, const uint16_t microsteps, const uint32_t hyb_thrs, const bool stealth, const chopper_timing_t &chop_init, const bool interpolate) {
530 530
     TMC2208_n::GCONF_t gconf{0};
531 531
     gconf.pdn_disable = true; // Use UART
532 532
     gconf.mstep_reg_select = true; // Select microsteps with UART
@@ -538,7 +538,7 @@ enum StealthIndex : uint8_t { STEALTH_AXIS_XY, STEALTH_AXIS_Z, STEALTH_AXIS_E };
538 538
     TMC2208_n::CHOPCONF_t chopconf{0};
539 539
     chopconf.tbl = 0b01; // blank_time = 24
540 540
     chopconf.toff = chop_init.toff;
541
-    chopconf.intpol = INTERPOLATE;
541
+    chopconf.intpol = interpolate;
542 542
     chopconf.hend = chop_init.hend + 3;
543 543
     chopconf.hstrt = chop_init.hstrt - 1;
544 544
     TERN_(SQUARE_WAVE_STEPPING, chopconf.dedge = true);
@@ -568,7 +568,7 @@ enum StealthIndex : uint8_t { STEALTH_AXIS_XY, STEALTH_AXIS_Z, STEALTH_AXIS_E };
568 568
 
569 569
 #if HAS_DRIVER(TMC2660)
570 570
   template<char AXIS_LETTER, char DRIVER_ID, AxisEnum AXIS_ID>
571
-  void tmc_init(TMCMarlin<TMC2660Stepper, AXIS_LETTER, DRIVER_ID, AXIS_ID> &st, const uint16_t mA, const uint16_t microsteps, const uint32_t, const bool, const chopper_timing_t &chop_init) {
571
+  void tmc_init(TMCMarlin<TMC2660Stepper, AXIS_LETTER, DRIVER_ID, AXIS_ID> &st, const uint16_t mA, const uint16_t microsteps, const uint32_t, const bool, const chopper_timing_t &chop_init, const bool interpolate) {
572 572
     st.begin();
573 573
 
574 574
     TMC2660_n::CHOPCONF_t chopconf{0};
@@ -582,7 +582,7 @@ enum StealthIndex : uint8_t { STEALTH_AXIS_XY, STEALTH_AXIS_Z, STEALTH_AXIS_E };
582 582
     st.rms_current(mA);
583 583
     st.microsteps(microsteps);
584 584
     TERN_(SQUARE_WAVE_STEPPING, st.dedge(true));
585
-    st.intpol(INTERPOLATE);
585
+    st.intpol(interpolate);
586 586
     st.diss2g(true); // Disable short to ground protection. Too many false readings?
587 587
     TERN_(TMC_DEBUG, st.rdsel(0b01));
588 588
   }
@@ -590,13 +590,13 @@ enum StealthIndex : uint8_t { STEALTH_AXIS_XY, STEALTH_AXIS_Z, STEALTH_AXIS_E };
590 590
 
591 591
 #if HAS_DRIVER(TMC5130)
592 592
   template<char AXIS_LETTER, char DRIVER_ID, AxisEnum AXIS_ID>
593
-  void tmc_init(TMCMarlin<TMC5130Stepper, AXIS_LETTER, DRIVER_ID, AXIS_ID> &st, const uint16_t mA, const uint16_t microsteps, const uint32_t hyb_thrs, const bool stealth, const chopper_timing_t &chop_init) {
593
+  void tmc_init(TMCMarlin<TMC5130Stepper, AXIS_LETTER, DRIVER_ID, AXIS_ID> &st, const uint16_t mA, const uint16_t microsteps, const uint32_t hyb_thrs, const bool stealth, const chopper_timing_t &chop_init, const bool interpolate) {
594 594
     st.begin();
595 595
 
596 596
     CHOPCONF_t chopconf{0};
597 597
     chopconf.tbl = 0b01;
598 598
     chopconf.toff = chop_init.toff;
599
-    chopconf.intpol = INTERPOLATE;
599
+    chopconf.intpol = interpolate;
600 600
     chopconf.hend = chop_init.hend + 3;
601 601
     chopconf.hstrt = chop_init.hstrt - 1;
602 602
     TERN_(SQUARE_WAVE_STEPPING, chopconf.dedge = true);
@@ -625,13 +625,13 @@ enum StealthIndex : uint8_t { STEALTH_AXIS_XY, STEALTH_AXIS_Z, STEALTH_AXIS_E };
625 625
 
626 626
 #if HAS_DRIVER(TMC5160)
627 627
   template<char AXIS_LETTER, char DRIVER_ID, AxisEnum AXIS_ID>
628
-  void tmc_init(TMCMarlin<TMC5160Stepper, AXIS_LETTER, DRIVER_ID, AXIS_ID> &st, const uint16_t mA, const uint16_t microsteps, const uint32_t hyb_thrs, const bool stealth, const chopper_timing_t &chop_init) {
628
+  void tmc_init(TMCMarlin<TMC5160Stepper, AXIS_LETTER, DRIVER_ID, AXIS_ID> &st, const uint16_t mA, const uint16_t microsteps, const uint32_t hyb_thrs, const bool stealth, const chopper_timing_t &chop_init, const bool interpolate) {
629 629
     st.begin();
630 630
 
631 631
     CHOPCONF_t chopconf{0};
632 632
     chopconf.tbl = 0b01;
633 633
     chopconf.toff = chop_init.toff;
634
-    chopconf.intpol = INTERPOLATE;
634
+    chopconf.intpol = interpolate;
635 635
     chopconf.hend = chop_init.hend + 3;
636 636
     chopconf.hstrt = chop_init.hstrt - 1;
637 637
     TERN_(SQUARE_WAVE_STEPPING, chopconf.dedge = true);

Loading…
取消
儲存