I'm using two TMC5130 breakout boards with STM32F4 board. I control each with separate SPI channels, which works fine. I can get them to move, change settings, etc.

StallGuard is used as sensorless homing.

I can also get stallguard to work with either of them, but there is a problem;

TMC drivers are identical and stepper motors are also identical. But same settings don't work the same on the drivers, it would seem. For example; if I spin both motors with 20k steps/min, the StallGuard treshold (SG_VALUE ) value is not the same (for one stepper is 100 and for the other 400). I have to use 3 (SGT) for one stepper and 4 (SGT) for other stepper. Also, if I choose the value too low, the stepper ramps up for few degrees and then stops. (?) How is it possible that identical settings (current, and other parameters) cause the StallGuard to behave differently?

Any info would be appreciated!

  • \$\begingroup\$ You have referenced several commercial devices but have supplied datasheet links for none of them. Hit the edit link. There's a button that helps you insert nicely formatted links. \$\endgroup\$
    – Transistor
    Feb 4, 2021 at 13:38
  • \$\begingroup\$ What load is on the motors? Is it identical between them all? \$\endgroup\$ Feb 4, 2021 at 13:59
  • \$\begingroup\$ There is no load on the motors.Uh, I forgot to mention that I'm using StallGuard for sensorless homing. \$\endgroup\$
    – KristjanB
    Feb 4, 2021 at 14:18

1 Answer 1


I got it to work by tuning current for each of the steppers. One gets 200mA, other 230mA and StallGuard then works within the same range.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.