I am investigating the behavior of the TMC2208 microstep counter (MSCNT) when using different microstep resolutions.
According to the datasheet, MSCNT is a read-only counter, but it does not explain how the valid MSCNT positions relate to the selected MRES.
For example, with MRES = 6 (1/4 microstepping), after power-up or after changing to this resolution, I observe the following sequence when applying STEP pulses:
32, 96, 160, 224, ...
instead of
0, 64, 128, 192, ...
Therefore, MSCNT never reaches 0 in 1/4-step mode.
I also found a reply from Bernhard Dwersteg on EngineerZone stating that full-step positions are at:
MSCNT = 128 + 256 × n
This suggests that the internal microstep positions are intentionally shifted by half of the step interval.
Based on my measurements, I suspect that this rule applies to all microstep resolutions:
Microsteps| Valid MSCNT values
1| 128
2| 64, 192
4| 32, 96, 160, 224
8| 16, 48, 80, ...
16| 8, 24, 40, ...
32| 4, 12, 20, ...
64| 2, 6, 10, ...
128| 1, 3, 5, ...
256| 0, 1, 2, 3, ...
In other words, the valid MSCNT positions appear to be shifted by half of the microstep interval for every MRES except 256 microsteps.
Could someone from Analog Devices confirm whether this is indeed the intended behavior of the Trinamic microstep indexer?
If so, what is the reason for this design? Is it done to center the current vectors within each microstep interval, or is there another explanation?
Finally, is there any supported way (other than generating STEP pulses) to align MSCNT to zero when operating at resolutions lower than 256 microsteps?