Datasheet

TMC429 DATASHEET (v. 1.07 / 2012-AUG-01) 29
Copyright © 2010-2012, TRINAMIC Motion Control GmbH & Co. KG
switch changes from high to low and if the interrupt mask bit MASK_STOP_LEFT_LOW is set. The
interrupt flag INT_STOP_RIGHT_LOW is similar to INT_STOP_LEFT_LOW but for the right reference
switch. The INT_STOP_LEFT_HIGH indicates that the left reference switch input changes from low to
high if the mask MASK_STOP_LEFT_HIGH is set. The INT_STOP_RIGHT_HIGH indicates it for the
right reference switch if the mask MASK_STOP_LEFT_HIGH is set.
9.14 pulse_div & ramp_div & usrs (IDX=%1100)
The frequency of the external clock signal (see Figure 5-1, page 8, pin CLK) is divided by 32 (see
Figure 9-2, page 23, block clk_div32). This clock drives two programmable clock dividers for the ramp
generator and for the pulse generator. The pulse generator clock defining the maximum step pulse
rate is determined by the parameter pulse_div. The pulse rate R is given by
R[Hz] = f_clk[Hz] * velocity / ( 2^pulse_div * 2048 * 32 )
where f_clk[Hz] is the frequency of the external clock signal. The parameter velocity is in range 0 to
2047 and represents parameters v_min, v_max and absolute values of v_target and v_actual. So,
the pulse generator of the TMC429 would generate one step pulse with each pulse generator clock
pulse if the velocity could be set to 2048. The full step frequency R
FS
[Hz] = R[Hz] / 2^usrs. The
change R in the pulse rate per time unit (pulse frequency change per second the acceleration) is
given by
R[Hz/s] = f_clk[Hz] * f_clk[Hz] * a_max / ( 2^(pulse_div+ramp_div+29) ).
The constant 29 within the exponent is because 2^29 = 2^5 * 2^5 * 2^8 * 2^11 = 32*32*256*2048,
where 32 comes from fixed clock pre-dividers, 256 comes from velocity accumulation clock pre-divider,
and 2048 comes from velocity accumulation clock divider programmed by a_max. The parameter
a_max is in range 0 to 2047. So, the parameter ramp_div scales the acceleration parameter a_max,
where the parameter pulse_div scales the velocity parameters. R
FS
[Hz] = R[Hz] / 2^usrs.
usrs
[microsteps /
full step]
significant DAC bits
(controlling current
amplitude)
comment
0
0
0
1
-
full step (constant current amplitude)
0
0
1
2
5 (MSB)
half step
0
1
0
4
5 (MSB), 4
microstepping
0
1
1
8
5 (MSB), 4, 3
1
0
0
16
5 (MSB), 4, 3, 2
1
0
1
32
5 (MSB), 4, 3, 2, 1
1
1
0
64
5 (MSB), 4, 3, 2, 1, 0 (LSB)
1
1
1
Table 9-8: micro step resolution selection (usrs) parameter
The angular velocity of a stepper motor can be calculated based on the full step frequency R
fs
[Hz] for
a given number of full steps per rotation. Similar, the angular acceleration of a stepper motor can be
calculated based on the change of full step frequency per second R
FS
[Hz]. The three bit wide
parameter usrs (micro (µ) step resolution selection, where u represents µ) determines the micro step
resolution for its associated stepper motor according to Table 9-8. There is an individual set of 6 DAC
bits provided for each of the two phases (coils) for current control to provide up to 64 micro steps per
full step. Depending on the micro step resolution, a subset of 6 DAC bits is significant. Using full
stepping, the current amplitude is constant for both phases (coils) of a stepper motor and the polarity of
one phase (coil) changes with each full step. The micro step counters are initialized to 0 during power-
on reset. With each micro step an associated counter accumulates the programmed micro step
resolution value usrs.
Generally, the number of steps S during linear acceleration a to a velocity v is given by S = ½ * v^2 / a.
With v = R[Hz] and a = R[Hz/s] one gets S = ½ * velocity^2 / a_max * 2^ramp_div / 2^pulse_div /
2^3. The number of full steps S
FS
is S
FS
= S / 2^usrs
.