teemuatlut / TMC2130Stepper

Arduino library for Trinamic TMC2130 Stepper driver
MIT License
158 stars 50 forks source link

Read TSTEP register, but the value is small #76

Closed ziyangwang007 closed 5 years ago

ziyangwang007 commented 5 years ago

Hi,

I just have a problem.

When I read the data from TSTEP registers, the value is quite small and it usually be 0. I tried to set the delay time between the "steppin" high and low, and also I tried to set the microsteps 0 2 4 8 ..128 256. The TSTEP always be 0 1 2 3 and never a double-digit show to me.

The TSTEP is an important value for me to set threshold for coolStep, stealchop, spreadCycle, and as data sheet told us, its range should be 0 to 1048575 = (2^20)-1.

The value is really small.

do you have any idea for that?

Thanks!

teemuatlut commented 5 years ago

Not sure if you figured it out but you should try stepping inside an interrupt for more consistent step pulses.