Possible bug. Stallguard not functioning without pwm_autoscale on tmc2209
wakass opened this issue · comments
Stallguard does not function properly (or as expected?) on a 2209 driver. The following line is relevant, and setting autoscale to true recovers proper stallguard behaviour on my system:
Line 162 in 9eae92b
I'm not sure how this works in other driver modules, but I can't find any reference on stallguard requiring disabling pwm_autoscaling. Just tcoolthrs < tstep < tpwmthres
@wakass I tend to agree, in fact it seems the drivers will operate in open loop with velocity based current scaling (requiring motor specific settings) with pwm_autoscale set to false. In this context the motors will stall during jogging regardless of stallguard threshold. On the other hand when pwm_autoscale is set to true stalling is only occurring during homing with reasonable stallguard threshold settings that work with my motors.
👀 I've been trying to get stallguard working for days! I'll give this a try too.
Otherwise I'm having trouble with are setting the tCoolThrs and TPWMThrs to any value other than 0, and the driver status is always reporting stealth as 0 (meaning spreadcycle and not stealthchop)