Commit Graph

13 Commits

Author SHA1 Message Date
Kevin O'Connor f759df3cd7 endstop_phase: Convert to using tmc mcu_phase_offset
Now that the TMC drivers track the phase offset, use that to implement
endstop phase.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-08 22:28:10 -04:00
Kevin O'Connor c2bfeb60aa tmc: Move stepper phase reading code to TMCCommandHelper class
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-06 13:12:49 -04:00
Kevin O'Connor 33dcb38297 tmc: Consistently use lower case for all TMC field names
The Trinamic specs aren't consistent with upper vs lower case, which
can be confusing.  Improve clarity by using lower case names
consistently in the code.  Register names will continue to use all
upper case naming in the code.

Update the SET_TMC_FIELD command to automatically convert field names
to lower case.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-08-06 13:12:49 -04:00
Kevin O'Connor b4fec8502c tmc2209: Set SENDDELAY=2 to avoid uart rx/tx errors
It looks like the tmc2209 chips have increased uart errors with the
default SENDDELAY of zero.  Increasing the SENDDELAY to two seems to
work around this issue.

Reported by @ReXT3D.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-07-23 13:37:20 -04:00
Kevin O'Connor 6e4270fa79 tmc: Move SET_TMC_CURRENT command to TMCCommandHelper()
Refactor the tmc driver implementations so that there is a single
implementation of the SET_TMC_CURRENT command.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-02-27 10:39:46 -05:00
Trevor Jones efebbb9a2f
tmc5160: diag0 support (#3159)
Allow for diag0 only hardware to use sensorless homing.

Signed-off-by:  Trevor Jones <trevorjones141@gmail.com>
2020-08-09 08:17:51 -04:00
Kevin O'Connor f931da1b87 extras: Use "from . import module" for relative imports
Use alternate import syntax to improve Python3 compatibility.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-15 17:15:53 -04:00
Kevin O'Connor a482ddf582 tmc2209: Add support for sensorless homing
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-08-19 12:05:09 -04:00
Kevin O'Connor a730aec8bc tmc_uart: Add support for configuring the uart address on tmc2209 chips
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-07-31 13:02:27 -04:00
Kevin O'Connor 4df78cd843 tmc: Configure "intpol" field from TMCMicrostepHelper
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-06-28 16:59:26 -04:00
Kevin O'Connor 7702f0a027 tmc: Add support for virtual enable pins
Add support for enabling the stepper via the communication channel.
This improves support for boards with a shared enable line.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-06-28 16:59:26 -04:00
Kevin O'Connor 52b5ca182c tmc: Simplify internal DUMP_TMC interface
Only the tmc2208 driver needs special read register translation logic.
Rework the code so a default implementation is available for all the
other drivers.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-06-25 11:40:15 -04:00
Stephan Oelze ec9fad758a tmc2209: Initial support for tmc2209 stepper driver
Signed-off-by: Stephan Oelze <stephan.oelze@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-06-23 11:26:20 -04:00