M915 - TMC Z axis calibration

control Align ends of the Z axis and test torque HAVE_TMC2130 TMC_Z_CALIBRATION

The command aims to align the ends of the X gantry (for a Průša i3-style printer). Here’s a video demonstration.

Using the given current, Marlin will move the Z axis (at homing speed) to the top plus a given extra distance. Since this intentionally stalls the Z steppers, you should use the minimum current required to move the axis.

Z is then re-homed to correct the position.


M915 [S<mA>] [Z<linear>]

Argument Description

Current value to use for the raise move. (Default: CALIBRATION_CURRENT)


Extra distance past Z_MAX_POS to move the Z axis. (Default: CALIBRATION_EXTRA_HEIGHT)


Requires TMC_Z_CALIBRATION and at least one TMC driver for Z axis.

If Z_DUAL_STEPPER_DRIVERS is used, both should be TMC drivers.


Set the current to 300mA and press the steppers against the top for an extra 5mm.

G21 ; Units to mm
M915 S300 Z5