From 29afd11cbff20240eb69b4f7cb9374b290f1bbaa Mon Sep 17 00:00:00 2001 From: teemuatlut Date: Fri, 14 Jun 2019 07:16:10 +0300 Subject: [PATCH] Updates for TMC2660 init (#14245) --- Marlin/src/module/stepper_indirection.cpp | 7 ++++--- Marlin/src/module/stepper_indirection.h | 4 ++-- buildroot/share/tests/megaatmega2560-tests | 6 +++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Marlin/src/module/stepper_indirection.cpp b/Marlin/src/module/stepper_indirection.cpp index b50383a1cf..dd40457949 100644 --- a/Marlin/src/module/stepper_indirection.cpp +++ b/Marlin/src/module/stepper_indirection.cpp @@ -565,13 +565,14 @@ chopconf.toff = chopper_timing.toff; chopconf.hend = chopper_timing.hend + 3; chopconf.hstrt = chopper_timing.hstrt - 1; - #if ENABLED(SQUARE_WAVE_STEPPING) - chopconf.dedge = true; - #endif st.CHOPCONF(chopconf.sr); + st.sdoff(0); st.rms_current(mA); st.microsteps(microsteps); + #if ENABLED(SQUARE_WAVE_STEPPING) + st.dedge(true); + #endif st.intpol(INTERPOLATE); st.diss2g(true); // Disable short to ground protection. Too many false readings? diff --git a/Marlin/src/module/stepper_indirection.h b/Marlin/src/module/stepper_indirection.h index 7f2bbd93fa..734ac1b00a 100644 --- a/Marlin/src/module/stepper_indirection.h +++ b/Marlin/src/module/stepper_indirection.h @@ -58,8 +58,8 @@ #if HAS_TRINAMIC #include #include "../feature/tmc_util.h" - #if TMCSTEPPER_VERSION < 0x000202 - #error "Update TMCStepper library to 0.2.2 or newer." + #if TMCSTEPPER_VERSION < 0x000401 + #error "Update TMCStepper library to 0.4.1 or newer." #endif #define ____TMC_CLASS(MODEL, A, I, E) TMCMarlin diff --git a/buildroot/share/tests/megaatmega2560-tests b/buildroot/share/tests/megaatmega2560-tests index 7d94677662..6ad3e9c24a 100755 --- a/buildroot/share/tests/megaatmega2560-tests +++ b/buildroot/share/tests/megaatmega2560-tests @@ -297,12 +297,12 @@ exec_test $1 $2 "Delta Config (FLSUN AC because it's complex)" use_example_configs SCARA opt_enable USE_ZMIN_PLUG FIX_MOUNTED_PROBE AUTO_BED_LEVELING_BILINEAR PAUSE_BEFORE_DEPLOY_STOW \ EEPROM_SETTINGS EEPROM_CHITCHAT ULTIMAKERCONTROLLER \ - MONITOR_DRIVER_STATUS STEALTHCHOP_XY STEALTHCHOP_Z STEALTHCHOP_E HYBRID_THRESHOLD SENSORLESS_HOMING + MONITOR_DRIVER_STATUS STEALTHCHOP_XY STEALTHCHOP_Z STEALTHCHOP_E HYBRID_THRESHOLD SENSORLESS_HOMING SQUARE_WAVE_STEPPING opt_set X_DRIVER_TYPE TMC2130 opt_set Y_DRIVER_TYPE TMC2130 opt_set Z_DRIVER_TYPE TMC2130 -opt_set E0_DRIVER_TYPE TMC2130 -exec_test $1 $2 "SCARA with TMC2130" +opt_set E0_DRIVER_TYPE TMC2660 +exec_test $1 $2 "SCARA with TMC2130 and TMC2660" # # Test mixed TMC config #