adi,tmc522x-stepper-driver

Description

collection of properties for stepper drivers.

Properties

Properties not inherited from the base binding file.

Name

Type

Details

idx

int

Motor index (0-based). For TMC522x with single motor, use 0.

This property is required.

irundelay

int

IHOLD_IRUN register bits 27:24.
Controls the number of clock cycles for motor power up before a motion
is started. The smooth transition avoids a motor jerk upon power up.
When powering up at standstill, IRUNDELAY will be used until IHOLD is
reached in case IHOLDDELAY != 0.

0:    Instant jump to IRUN on start of a motion
1-15: Delay per current increase step = IRUNDELAY x 512 x t_clk

Example at 16 MHz clock (t_clk = 62.5 ns):
  4 = 2048 x 62.5 ns = 128 us per current increment step

Default value: 4

toff

int

Chopper off-time (CRITICAL parameter - must be non-zero!).
Duration of slow decay phase. Determines chopper frequency.
0 = driver disabled
1 = shortest off-time, highest frequency
15 = longest off-time, lowest frequency
Default: 5 (balanced performance)
Chopper freq ≈ f_clk / (32 * toff)

Default value: 5

tbl

int

Comparator blank time (noise filter).
Blanking time to prevent false current measurements due to switching noise.
0 = 16 clocks (shortest)
1 = 24 clocks
2 = 36 clocks (default)
3 = 54 clocks (longest)

Default value: 2

hstrt

int

Hysteresis start value (chopper tuning parameter).
Controls the hysteresis start value for the current regulation.
In standard mode (CHM=0): TFD[2:0] offset (0-7)
Higher values = faster current regulation response
Default: 4 (balanced performance)

Default value: 4

hend

int

Hysteresis end offset (chopper tuning parameter).
Controls the width of the hysteresis window.
Range: -3 to +12 (encoded as 0-15 in register)
Lower values = narrower hysteresis, lower current ripple
Higher values = wider hysteresis, higher current ripple
Default: 0 (narrowest hysteresis)

Default value: 0

fs-gain

int

Full-scale current sense resistor gain setting.
Adjusts the amplifier gain for current sensing.
0 = normal gain (default)
1-3 = increased gain settings

Default value: 0

fs-sense

int

Full-scale current sense resistor selection.
Configures the reference resistor value for current measurement.
0 = default setting
1-3 = alternative settings

Default value: 0

global-scaler

int

Global current scaler (8-bit value: 0-255).
Scales the motor current globally. Can be used for dynamic
current adjustment without changing IRUN/IHOLD.
0 = motor disabled, 255 = maximum current.
Formula: I_actual = (global-scaler / 256) * I_configured
Default 231 ≈ 90% of configured current.

Default value: 231

micro-step-res

int

micro-step resolution to be set while initializing the device driver.

Default value: 1

Legal values: 1, 2, 4, 8, 16, 32, 64, 128, 256

en-gpios

phandle-array

GPIO pins used to control the enable signal of the motor driver.

m0-gpios

phandle-array

Microstep configuration pin 0.

m1-gpios

phandle-array

Microstep configuration pin 1.

stallguard2-threshold

int

This signed value controls StallGuard2 level for stall  output and sets the
optimum measurement range for readout. A lower value gives a higher sensitivity.
Zero is the starting value working with most motors.

-64 to +63: A higher value makes StallGuard2 less sensitive and requires more torque
to indicate a stall.

Default value: 0

Value range: -64 to 63

ihold

int

Hold current in % of run current (0-100)
Standstill current (0=1/32…31=32/32)
In combination with StealthChop mode, setting IHOLD=0 allows to choose freewheeling or coil
short circuit for motor stand still

Default value: 0

Value range: 0 to 0x1f

irun

int

Motor run current (0=1/32…31=32/32)
Hint: Choose sense resistors in a way, that normal
IRUN is 16 to 31 for best microstep performance.

Default value: 0

Value range: 0 to 0x1f

iholddelay

int

Controls the number of clock cycles for motor power down after a motion as soon as TZEROWAIT
has expired. The smooth transition avoids a motor jerk upon power down.
0: instant power down
1..15: Delay per current reduction step in multiple of 2^18 clocks

Default value: 0

Value range: 0 to 0xf

tpowerdown

int

TPOWERDOWN sets the delay time after stand still (stst) of the
motor to motor current power down. Time range is about 0 to
4 seconds.
Attention: A minimum setting of 2 is required to allow
automatic tuning of StealthChop PWM_OFS_AUTO.
Reset Default = 10
0…((2^8)-1) * 2^18 tCLK

Default value: 10

Value range: 0 to 0xff