Hello,
recently i bought a few TMC2130 drivers for my corexy printer. I've managed to made them run, but I'm having some troubles with the sensorless homing function. I've connected diag1 to x_min and y_min(I'm using negative homing, also the sensors are defined as existing in the configuration), so when I initiate a homing command for X or Y, the axis moves to x/y_min and the grinding noise of the motors starts, it takes 10 or more seconds to acknowledge the homing and then it homes. I've tried tweaking the TMC2130_TCOOLTHRS and TMC2130_STALLGUARD but nothing changes no matter what values I set. So I wouldn't mind any suggestions, and thanks in advance.
P.S. here is my config.
#define DRV_TMC2130
// Uncomment if you use the stall guard for homing. Only for cartesian printers and xy direction
#define SENSORLESS_HOMING
// The drivers with set CS pin will be used, all others are normal step/dir/enable drivers
#define TMC2130_X_CS_PIN 44
#define TMC2130_Y_CS_PIN 64
#define TMC2130_Z_CS_PIN 40
#define TMC2130_EXT0_CS_PIN 42
#define TMC2130_EXT1_CS_PIN -1
#define TMC2130_EXT2_CS_PIN -1
// Per-axis current setting in mA { X, Y, Z, E0, E1, E2}
#define MOTOR_CURRENT { 1000,1000,1000,1000,1000,1000 }
/** Global settings - these apply to all configured drivers
Per-axis values will override these
*/
#define TMC2130_STEALTHCHOP 1 // Enable extremely quiet stepping
#define TMC2130_INTERPOLATE_256 1 // Enable internal driver microstep interpolation
#define TMC2130_STALLGUARD 0 // Sensorless homing sensitivity (between -63 and +64)
/** PWM values for chopper tuning
only change if you know what you're doing
*/
#define TMC2130_PWM_AMPL 255
#define TMC2130_PWM_GRAD 1
#define TMC2130_PWM_AUTOSCALE 1
#define TMC2130_PWM_FREQ 2
/** Per-axis parameters
To define different values for certain parameters on each axis,
append either _X, _Y, _Z, _EXT0, _EXT1 or _EXT2
to the name of the global parameter.
Examples for the X axis:
#define TMC2130_STEALTHCHOP_X 1
#define TMC2130_INTERPOLATE_256_X true
*/
/** Minimum speeds for stall detection.
These values may need to be adjusted if SENSORLESS_HOMING is enabled,
but endstops trigger prematurely or don't trigger at all.
The exact value is dependent on the duration of one microstep,
but good approximations can be determined by experimentation.
*/
#define TMC2130_TCOOLTHRS_X 300
#define TMC2130_TCOOLTHRS_Y 300
#define TMC2130_TCOOLTHRS_Z 300
........................................................................
// ################ Endstop configuration #####################
#define MULTI_ZENDSTOP_HOMING 0
#define ENDSTOP_PULLUP_X_MIN true
#define ENDSTOP_X_MIN_INVERTING true
#define MIN_HARDWARE_ENDSTOP_X true
#define ENDSTOP_PULLUP_Y_MIN true
#define ENDSTOP_Y_MIN_INVERTING true
#define MIN_HARDWARE_ENDSTOP_Y true
#define ENDSTOP_PULLUP_Z_MIN true
#define ENDSTOP_Z_MIN_INVERTING true
#define MIN_HARDWARE_ENDSTOP_Z true
#define ENDSTOP_PULLUP_Z2_MINMAX true
#define ENDSTOP_Z2_MINMAX_INVERTING false
#define MINMAX_HARDWARE_ENDSTOP_Z2 false
#define ENDSTOP_PULLUP_X_MAX true
#define ENDSTOP_X_MAX_INVERTING false
#define MAX_HARDWARE_ENDSTOP_X false
#define ENDSTOP_PULLUP_Y_MAX true
#define ENDSTOP_Y_MAX_INVERTING false
#define MAX_HARDWARE_ENDSTOP_Y false
#define ENDSTOP_PULLUP_Z_MAX true
#define ENDSTOP_Z_MAX_INVERTING false
#define MAX_HARDWARE_ENDSTOP_Z false
#define ENDSTOP_PULLUP_X2_MIN true
#define ENDSTOP_PULLUP_Y2_MIN true
#define ENDSTOP_PULLUP_Z2_MINMAX true
#define ENDSTOP_PULLUP_X2_MAX true
#define ENDSTOP_PULLUP_Y2_MAX true
#define ENDSTOP_X2_MIN_INVERTING false
#define ENDSTOP_Y2_MIN_INVERTING false
#define ENDSTOP_X2_MAX_INVERTING false
#define ENDSTOP_Y2_MAX_INVERTING false
#define MIN_HARDWARE_ENDSTOP_X2 false
#define MIN_HARDWARE_ENDSTOP_Y2 false
#define MAX_HARDWARE_ENDSTOP_X2 false
#define MAX_HARDWARE_ENDSTOP_Y2 false
#define X2_MIN_PIN -1
#define X2_MAX_PIN -1
#define Y2_MIN_PIN -1
#define Y2_MAX_PIN -1
#define Z2_MINMAX_PIN -1
#define max_software_endstop_r true
#define min_software_endstop_x false
#define min_software_endstop_y false
#define min_software_endstop_z false
#define max_software_endstop_x true
#define max_software_endstop_y true
#define max_software_endstop_z true
#define DOOR_PIN -1
#define DOOR_PULLUP 1
#define DOOR_INVERTING 1
#define ENDSTOP_X_BACK_MOVE 5
#define ENDSTOP_Y_BACK_MOVE 5
#define ENDSTOP_Z_BACK_MOVE 2
#define ENDSTOP_X_RETEST_REDUCTION_FACTOR 3
#define ENDSTOP_Y_RETEST_REDUCTION_FACTOR 3
#define ENDSTOP_Z_RETEST_REDUCTION_FACTOR 3
#define ENDSTOP_X_BACK_ON_HOME 3
#define ENDSTOP_Y_BACK_ON_HOME 3
#define ENDSTOP_Z_BACK_ON_HOME 0
#define ALWAYS_CHECK_ENDSTOPS 0
#define MOVE_X_WHEN_HOMED 0
#define MOVE_Y_WHEN_HOMED 0
#define MOVE_Z_WHEN_HOMED 0
// ################# XYZ movements ###################
#define X_ENABLE_ON 0
#define Y_ENABLE_ON 0
#define Z_ENABLE_ON 0
#define DISABLE_X 0
#define DISABLE_Y 0
#define DISABLE_Z 0
#define DISABLE_E 0
#define INVERT_X_DIR 1
#define INVERT_X2_DIR 0
#define INVERT_Y_DIR 1
#define INVERT_Y2_DIR 0
#define INVERT_Z_DIR 1
#define INVERT_Z2_DIR 0
#define INVERT_Z3_DIR 0
#define INVERT_Z4_DIR 0
#define X_HOME_DIR -1
#define Y_HOME_DIR -1
#define Z_HOME_DIR -1
#define X_MAX_LENGTH 220
#define Y_MAX_LENGTH 220
#define Z_MAX_LENGTH 250
#define X_MIN_POS 0
#define Y_MIN_POS 0
#define Z_MIN_POS 0
#define PARK_POSITION_X 0
#define PARK_POSITION_Y 10
#define PARK_POSITION_Z_RAISE 10