Datasheet

TMC2209 DATASHEET (Rev. 1.03 / 2019-JUN-26) 64
www.trinamic.com
14 Internal Step Pulse Generator
The TMC2209 family integrates a high-resolution step pulse generator, allowing motor motion via the
UART interface. However, no velocity ramping is provided. Ramping is not required, if the target
motion velocity is smaller than the start & stop frequency of the motor. For higher velocities, ramp up
the frequency in small steps to accelerate the motor, and ramp down again to decelerate the motor.
Figure 14.1 shows an example motion profile ramping up the motion velocity in discrete steps.
Choose the ramp velocity steps considerably smaller than the maximum start velocity of the motor,
because motor torque drops at higher velocity, and motor load at higher velocity typically increases.
v
t
acceleration deceleration
motor
stop
Stop velocity
Start velocity
0
Target Velocity
Theoretical profile
VACTUAL
constant velocity
Figure 14.1 Software generated motion profile
PARAMETER VS. UNITS
Parameter / Symbol
Unit
calculation / description / comment
f
CLK
[Hz]
[Hz]
clock frequency of the TMC2209 in [Hz]
µstep velocity v[Hz]
µsteps / s
v[Hz] = VACTUAL[2209] * ( f
CLK
[Hz]/2 / 2^23 )
With internal oscillator:
v[Hz] = VACTUAL[2209] * 0.715Hz
USC microstep count
counts
microstep resolution in number of microsteps
(i.e. the number of microsteps between two
fullsteps normally 256)
rotations per second v[rps]
rotations / s
v[rps] = v[Hz] / USC / FSC
FSC: motor fullsteps per rotation, e.g. 200
TSTEP, TPWMTHRS
-
TSTEP = f
CLK
/ f
STEP
The time reference for velocity threshold is
referred to the actual microstep frequency of
the step input respectively velocity v[Hz].
VACTUAL
Two’s complement
signed internal
velocity
VACTUAL[2209] = ( f
CLK
[Hz]/2 / 2^23 ) / v[Hz]
With internal oscillator:
VACTUAL[2209] = 0.715Hz / v[Hz]
Hint
To monitor internal step pulse execution, program the INDEX output to provide step pulses
(GCONF.index_step). It toggles upon each step. Use a timer input on your CPU to count pulses.
Alternatively, regularly poll MSCNT to grasp steps done in the previous polling interval. It wraps
around from 1023 to 0.
UART