mbuc

M122 - TMC Debugging

1.1.7 debug Get TMC Debug Info TMC2130|TMC2208|TMC2209

Description

Do a communication check for configured TMC drivers.

With no parameters, this command returns the current settings for all installed Trinamic TMC2130, TMC2208, and TMC2209 stepper motor drivers. The S[0|1] parameter enables/disables continuous debugging output.

Notes

TMC_DEBUG is no longer needed in Marlin 2.0.x, but enabling it produces an extended report.

Responses of all LOW (00:00:00:00) or all HIGH (FF:FF:FF:FF) are signs of a communication problem.
See TMC Troubleshooting for further information.

Usage

M122 [E] [S] [V] [X] [Y] [Z]

Parameters

[E]

Target E driver(s) only.

[S]

Flag to enable/disable continuous debug reporting.

[V]

Report raw register data. Refer to the datasheet to decypher.

[X]

Target X driver(s) only.

[Y]

Target Y driver(s) only.

[Z]

Target Z driver(s) only.

Examples

Get all TMC2130, TMC2208, TMC2209 states

SENDING:M122
                  X       Y
Enabled           false   false
Set current       850     850
RMS current       826     826
MAX current       1165    1165
Run current       26/31   26/31
Hold current      13/31   13/31
CS actual         13/31   13/31
PWM scale 41      41
vsense            1=.18   1=.18
stealthChop       true    true
msteps            16      16
tstep             1048575 1048575
pwm
threshold         0       0
[mm/s]            -       -
OT prewarn        false   false
OT prewarn has
been triggered    false   false
off time          5       5
blank time        24      24
hysterisis
-end              2       2
-start            3       3
Stallguard thrs   0       0
DRVSTATUS X       Y
stallguard
sg_result         0       0
fsactive
stst              X       X
olb
ola
s2gb
s2ga
otpw
ot
'Driver registers:'
  X = 0x80:0D:00:00
  Y = 0x80:0D:00:00