Datasheet
TMC429 DATASHEET (v. 1.07 / 2012-AUG-01) 25
Copyright © 2010-2012, TRINAMIC Motion Control GmbH & Co. KG
p = a_max / ( 128 * 2^( ramp_div-pulse_div ) )
and
p’ = p_mul / p_div = (128+pmul) / 2^(3+pdiv)
and
q = p’ / p
for each pair (pmul , pdiv) and select one of the pairs satisfying the condition 0.95 < q < 1.0. So, the
value q interpreted as a function q(a_max, ramp_div, pulse_div, pmul, pdiv) gives the quality
criterion required. Although q = 1.0 indicates that (pmul , pdiv) perfectly represents the desired p for a
given a_max, this could cause overshooting because of finite numerical precision. In case of high
resolution microstepping, overshooting of one micro step is negligible in most applications. To avoid
overshooting, use pmul-1 instead of the selected pmul or select a pair (pmul, pdiv) with q = 0.95. The
force approach. Some conversions of the base present equations help to reduce the calculation effort
drastically.
9.11.1 Optimized Calculation of p_mul and p_div
With the equations above, one can simplify the calculation of the parameters pmul and pdiv using the
expression
pmul = p * 2^3 * 2^pdiv – 128
with
p = a_max / ( 128 * 2^( ramp_div – pulse_div) ).
To avoid overshooting, use
p_reduced = p * ( 1 – p_reduction[%])
with p_reduction approximately 5% instead of unreduced p. With this, one gets
pmul = p_reduced * 2^3 * 2^pdiv – 128 = 0.95 * p * 2^3 * 2^pdiv – 128.
With this, pmul becomes a function of the parameter pdiv. To find a valid pair {pmul, pdiv} one just
has to choose that pair {pmul, pdiv} out of 14 pairs for pdiv = {0, 1, 2, 3, ..., 13} with pmul within the
valid range 0 pmul g in C language can be
found on page 60. This source code can directly be copied from the PDF datasheet file.
9.12 lp & ref_conf & ramp_mode (rm) (IDX=%1010)
The bit called lp (latched position) is a read only status bit. The configuration words ref_conf and
ramp_mode are accessed via a common address, because these parameters normally are initialized
only once. The configuration bits ref_conf select the behavior of the reference switches, while the two
bits ramp_mode (rm) select one of the four possible stepping modes.
ramp_mode
mode
Function
%00
RAMP_MODE
default mode for positioning applications with trapezoidal ramp
%01
SOFT_MODE
similar to RAMP_MODE, but with soft target position approaching
%10
VELOCITY_MODE
mode for velocity control applications, change of velocities with linear ramps
%11
HOLD_MODE
velocity is controlled by the microcontroller, motion parameter limits are ignored
Table 9-3 – Outline of TMC429 motion modes