Feature request - Stallguard on extruder_stepper sections

You can manually set it without too much difficulty.

[tmc2209 extruder]
#stealthchop_threshold: 999999 ; StealthChop always enabled. (TPWMTHRS = 0)
#coolstep_threshold: 0.002 ; Coolstep almost always enabled
driver_SGTHRS: 1 ; 0 means disabled.
# DIAG is pulsed by StallGuard when SGTHRS * 2 > SG_RESULT. It is only enabled in StealthChop mode, and when TCOOLTHRS ≥ TSTEP > TPWMTHRS

[gcode_button MOTOR_DIAG]
pin: ...
press_gcode:
  M118 Extruder Stall!

However, as @nefelim4ag noted it’s probably not going to work correctly. I tried, and saw too many false triggers.

Beyond that StallGuard4 only works when in StealthChop mode, and there’s some potential issues with that.

However, “stealthChop” mode may produce lower motor torque and/or produce higher motor heat. It may or may not be an adequate mode for your particular printer.