TMC2130Stepper icon indicating copy to clipboard operation
TMC2130Stepper copied to clipboard

StallGuard can't seems to work while in TMCL-IDE the same config works

Open jonnydman opened this issue 2 years ago • 1 comments

hi,

I have an ESP32 with SPI communication to TMC2130 (connected to their dev board).

I'm using the driver to run the motor, with FastAccelStepper for stepping abilities. however, no matter what configuration I write, the following happens:

  1. when I try to read DRV_STATUS, the SG_Result is always 0.
  2. the StallGuard flag is always off.

it does however display the Actual CS correctly.

on the other, when I configure the same params at TMCL-IDE I have a dynamic value of SG_Result and the StallGuard flag detects the stall.

this is my setup:

        _driver.begin();
        _driver.shaft(1);
        _driver.microsteps(2);
        // setup from TMCL IDE
        _driver.ihold(3);
        _driver.irun(23);
        _driver.iholddelay(7);
        _driver.pwm_ampl(200);
        _driver.diag1_stall(1);
        _driver.diag1_active_high(1);
        _driver.coolstep_min_speed(300);
        _driver.stealthChop(false);
        _driver.semin(0);
        _driver.semax(0);
        _driver.sedn(0);
        _driver.tbl(2);
        _driver.hstrt(5);
        _driver.hend(3);
        _driver.toff(5);

do you have any ideas?

jonnydman avatar Jun 20 '22 12:06 jonnydman

oh man.. I just understood that DCEN_CFG4 leg must be tied to GND for not working with DcStep.

now I get SG_Result values

jonnydman avatar Jun 20 '22 13:06 jonnydman