Datasheet

TMC5041 DATASHEET (Rev. 1.13 / 2017-MAY-16) 67
www.trinamic.com
When the microstep sequencer advances within the table, it calculates the actual current values for
the motor coils with each microstep and stores them to the registers CUR_A and CUR_B. However the
incremental coding requires an absolute initialization, especially when the microstep table becomes
modified. Therefore CUR_A and CUR_B become initialized whenever MSCNT passes zero.
Two registers control the starting values of the tables:
- As the starting value at zero is not necessarily 0 (it might be 1 or 2), it can be programmed
into the starting point register START_SIN.
- In the same way, the start of the second wave for the second motor coil needs to be stored
in START_SIN90. This register stores the resulting table entry for a phase shift of 90° for a 2-
phase motor.
Hint
Refer chapter 5.3 for the register set and for the default table function stored in the drivers. The
default table is a good base for realizing an own table.
The TMC5041-EVAL comes with a calculation tool for own waves.
Initialization example for the default microstep table:
MSLUT[0]= %10101010101010101011010101010100 = 0xAAAAB554
MSLUT[1]= %01001010100101010101010010101010 = 0x4A9554AA
MSLUT[2]= %00100100010010010010100100101001 = 0x24492929
MSLUT[3]= %00010000000100000100001000100010 = 0x10104222
MSLUT[4]= %11111011111111111111111111111111 = 0xFBFFFFFF
MSLUT[5]= %10110101101110110111011101111101 = 0xB5BB777D
MSLUT[6]= %01001001001010010101010101010110 = 0x49295556
MSLUT[7]= %00000000010000000100001000100010 = 0x00404222
MSLUTSEL= 0xFFFF8056:
X1=128, X2=255, X3=255
W3=%01, W2=%01, W1=%01, W0=%10
MSLUTSTART= 0x00F70000:
START_SIN_0= 0, START_SIN90= 247
13.3 Changing Resolution
Reduced microstep resolution might be desired in some cases, e.g. for testing purpose or to increase
the effective acceleration or position range. The internal microstep table uses 1024 sine wave entries
to generate the wave. The step width taken within the table depends on the microstep resolution
setting. Depending on the motion direction, the microstep counter is increased or decreased with
each internal step pulse by the step width. In principle, the microstep resolution can be changed at
any time. The microstep resolution determines the increment respectively the decrement, the TMC5041
uses for advancing in the microstep table. At maximum resolution, it advances one step for each step
pulse. At half resolution, it advances two steps and so on. This way, a change of resolution is
possible transparently at each time. When switching to a low resolution, the effective current wave
may become asymmetrical. This will be avoided when first moving to a certain position before
switching. E.g., when switching to 16 microsteps, it is optimum to first position to MSCNT=8. This way,
the microsteps -7 and +8 are more or less symmetrical to the current zero crossing.