I've got four TMC2130 drivers on my board, all configured as standalone except for the Z one, which I configured (solder pads and bridges) and wired to be used with SPI. This is new for me, I wanted to try sensorless homing and probing for the fun of it. To my dissappointment though, I can't even reach the fun part of testing and tuning, since compiling Marlin fails almost immediately with this error:
This surprised me, because I definitely enabled TMC drivers with StallGuard both in configuration and configuration_adv, my changes highlighted:
I'm seeking help from you guys, I haven't got a ton of experience in configuring Marlin, especially the 2.0 version, and I hope you can find something I missed.
In file included from sketch\src\inc\marlinconfig.h:41:0, from sketch\src\HAL\HAL_AVR\HAL.cpp:29: sketch\src\inc\SanityCheck.h:1868:4: error: #error "SENSORLESS_HOMING requires a TMC stepper driver with StallGuard on X, Y, or Z axes." #error "SENSORLESS_HOMING requires a TMC stepper driver with StallGuard on X, Y, or Z axes." ^ exit status 1
This surprised me, because I definitely enabled TMC drivers with StallGuard both in configuration and configuration_adv, my changes highlighted:
/** * Stepper Drivers * * These settings allow [...], 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] */ #define X_DRIVER_TYPE TMC2130_STANDALONE #define Y_DRIVER_TYPE TMC2130_STANDALONE #define Z_DRIVER_TYPE TMC2130 //#define X2_DRIVER_TYPE A4988 //#define Y2_DRIVER_TYPE A4988 //#define Z2_DRIVER_TYPE A4988 //#define Z3_DRIVER_TYPE A4988 #define E0_DRIVER_TYPE TMC2130_STANDALONE //#define E1_DRIVER_TYPE A4988 //#define E2_DRIVER_TYPE A4988 //#define E3_DRIVER_TYPE A4988 //#define E4_DRIVER_TYPE A4988 //#define E5_DRIVER_TYPE A4988
// @section tmc_smart /** * To use TMC2130 stepper drivers in SPI mode [...] */ #if HAS_TRINAMIC #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130 #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current #define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256 [[ default current and microsteps which I left untouched, only cut here to save screen space ]] /** * Override default SPI pins for TMC2130 and TMC2660 drivers here. * The default pins can be found in your board's pins file. */ //#define X_CS_PIN -1 //#define Y_CS_PIN -1 #define Z_CS_PIN 40 //#define X2_CS_PIN -1 //#define Y2_CS_PIN -1 //#define Z2_CS_PIN -1 //#define Z3_CS_PIN -1 //#define E0_CS_PIN -1 //#define E1_CS_PIN -1 //#define E2_CS_PIN -1 //#define E3_CS_PIN -1 //#define E4_CS_PIN -1 //#define E5_CS_PIN -1 /** * Use software SPI for TMC2130. * The default SW SPI pins are defined the respective pins files, * but you can override or define them here. */ #define TMC_USE_SW_SPI #define TMC_SW_MOSI 66 #define TMC_SW_MISO 44 #define TMC_SW_SCK 64 /** * Use Trinamic's ultra quiet stepping mode. * When disabled, Marlin will use spreadCycle stepping mode. */ //#define STEALTHCHOP_XY #define STEALTHCHOP_Z //#define STEALTHCHOP_E /** * Optimize spreadCycle chopper parameters by [...] hysteresis_start[1..8] } */ #define CHOPPER_TIMING CHOPPER_DEFAULT_24V /** * Monitor Trinamic TMC2130 and TMC2208 drivers [...] Report driver parameters (Requires TMC_DEBUG) */ #define MONITOR_DRIVER_STATUS #if ENABLED(MONITOR_DRIVER_STATUS) //#define CURRENT_STEP_DOWN 50 // [mA] #define REPORT_CURRENT_CHANGE //#define STOP_ON_ERROR #endif /** * The driver will switch to spreadCycle [...] to live tune the setting */ //#define HYBRID_THRESHOLD [[ thresholds left untouched ]] /** * Use StallGuard2 to sense [...] to live tune the setting */ #define SENSORLESS_HOMING // TMC2130 only /** * Use StallGuard2 to [...] to enable this feature. */ #define SENSORLESS_PROBING // TMC2130 only #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 #define Z_STALL_SENSITIVITY 1 #endif /** * Enable M122 debugging command for TMC stepper drivers. * M122 S0/1 will enable continous reporting. */ #define TMC_DEBUG /** * M915 Z Axis Calibration [...] add extra Z height to Z_MAX_POS. */ #define TMC_Z_CALIBRATION #if ENABLED(TMC_Z_CALIBRATION) #define CALIBRATION_CURRENT 250 #define CALIBRATION_EXTRA_HEIGHT 10 #endif /** * You can set your [...] * stepperY.interpolate(0); \ * } */ #define TMC_ADV() { } #endif // HAS_TRINAMIC
I'm seeking help from you guys, I haven't got a ton of experience in configuring Marlin, especially the 2.0 version, and I hope you can find something I missed.