Datasheet
TMC429 DATASHEET (v. 1.07 / 2012-AUG-01) 23
Copyright © 2010-2012, TRINAMIC Motion Control GmbH & Co. KG
If the proportionality factor p is set too small, this results in a slow approach to the target position. If set
too large, it causes overshooting and even oscillations around the target position. The calculation of
the proportionality factor is simple:
The representation of the proportionality factor p by the two parameters p_mul and p_div is some kind
of a fixed point representation. It is
p = p_mul / p_div
with
p_mul = {128, 128+1, 128+2, 128+3, ..., 128+127}
and
p_div = {2
3
, 2
4
, 2
5
, ..., 2
14
, 2
15
, 2
16
}.
Instead of direct storage of the parameters p_mul and p_div, the TMC429 stores two parameters
called pmul and pdiv, with
p_mul = 128 + pmul and p_div = 2
3+pdiv
= 2^(3+pdiv)
where
pmul = {0, 1, 2, 3, ..., 127} and pdiv = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}.
The reason why p_mul ranges from 128 to 255 is, that p is divided by p_div which is a power of two
ranging from 8 to 65536. So, values of p less than 128 can be achieved by increasing p_div.
Note: The parameters pmul and pdiv share a single address (IDX=%1001, see Table 8-2, page 18).
The MSB of p_mul pmul internally sets p_mul = 128 + pmul. In other
words, %10000000 = 128 is ORed as bit vector with the content of the register pmul.
v_max
RAMP GENERATOR PULSE GENERATOR (micro) step pulses
v_target
x_target
x_actual
pdivpmul a_maxv_min
pulse_divramp_div
clk32
clock_div32clk
Figure 9-2: Ramp generator and pulse generator
The parameter p has to be calculated for a given acceleration. This calculation is not done by the
TMC429 itself, because this task has to be done only once for a given acceleration limit. The
acceleration limit is a stepper motor parameter, which is usually fixed in most applications. If the
acceleration limit has to be changed nevertheless, the microcontroller could calculate on demand a
pair of p_mul and p_div for each acceleration limit a_max and given ramp_div and pulse_div. Also,
pre-calculated pairs of p_mul and p_div read from a table maybe sufficient.