Sensorless Homing on Manta M4P not working

FWIW,
It could be tricky if done blindly and without at least knowing the motor characteristics.
Also, Klipper literally enables and disables diag pins on homing, which adds confusion on top of that.
And because it generally works, it is really hard to redo this thing, I suspect there will be no functional changes until homing is reimplemented in Klipper.

There is a PR with the Stallguard monitoring tool which could shine light on the actually SG values while motor is spinning.

From a configuration tuning perspective, it is more or less straightforward.
You first need to get the diag pin working, it could be hard, but it should start to at least trigger on high sensitivity, and it does not trigger on low.

Then, the only problem that you would have is literally the sensitivity configuration.
You generally want to have backEMF not zero, around 1V is already nice.

You generally want to understand how your SG value behaves.
Because, as stated in the PR and in the initial topic, it is tricky and speed-dependent, obviously.

Also, you have to be aware that Stallgurad4 used in TMC2209 is different to Stallguard2 used in TMC5160/2130, so they works and tunes slightly differently.

Also, because SG4 uses the StealthChop, there could be a minimum current limitation.
Like, with high probability, your low current settings have zero effect.

So, for example, with current defaults, where PWM_FREQ==0 (2/1024) and TBL == 2 (32).

Vm / VoHm * PWM_FREQ * TBL = Imin
24 / 2 * 2/1024 * 32 = 0.75A 

(I don’t know your motor parameters or supply voltages, so you could verify it for your installation).

Also, there is a trick, like with high motor inductance and high acceleration, the motor could trigger early. It could be workarounded by decreasing current, by setting the COOLSTEP threshold >20mm/s as is done on some Prusas.

Hope that helps a little.


BTW, it obviously should be generally easier to do on the Cartesian machines where the 1 motor drives one axis.