aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/tmc2660.py
Commit message (Collapse)AuthorAgeFilesLines
* tmc: Configure "intpol" field from TMCMicrostepHelperKevin O'Connor2019-06-281-4/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc: Add support for virtual enable pinsKevin O'Connor2019-06-281-3/+5
| | | | | | | 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>
* tmc2660: Hold a mutex during MCU_TMC2660_SPI get/set_register()Kevin O'Connor2019-06-281-5/+10
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc: It's not valid to schedule messages with print_time=0Kevin O'Connor2019-06-251-7/+10
| | | | | | | | A print_time of zero may translate to a negative clock on a secondary micro-controller, which would cause an internal error. Change the code to pass a real print_time or None if it is not needed. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc: Simplify internal DUMP_TMC interfaceKevin O'Connor2019-06-251-5/+1
| | | | | | | | 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>
* tmc2660: Set SDOFF=0 before accessing DRVCTRLKevin O'Connor2019-06-181-2/+1
| | | | | | | Make sure to configure DRVCONF with SDOFF=0 prior to writing DRVCTRL as that field controls access to that register. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2660: Don't allow configuration of DEDGEKevin O'Connor2019-06-181-1/+0
| | | | | | Setting DEDGE would just break the code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc: Move common TMC stepper driver code to new file tmc.pyKevin O'Connor2019-06-101-5/+5
| | | | | | Move common code from tmc2130.py to tmc.py. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2130: Rework remaining config helpers to use mcu_tmc interfaceKevin O'Connor2019-06-101-15/+4
| | | | | | | | Introduce TMCMicrostepHelper and TMCStealthchopHelper helper code that uses the mcu_tmc interface. Update the callers to use these new helpers. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2660: Move current setting code to its own helper classKevin O'Connor2019-06-101-66/+78
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2130: Transmit register initialization during connect callbackKevin O'Connor2019-06-101-3/+0
| | | | | | | | Perform the register initialization directly from TMCCommandHelper and perform it during the "connect" phase. This unifies the register setup for the TMC2130, TMC2208, TMC2660, and TMC5160. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2660: Use TMCCommandHelperKevin O'Connor2019-06-101-50/+7
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2660: Move get/set_register functions to new MCU_TMC2660_SPI classKevin O'Connor2019-06-101-29/+48
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2660: Define get_register() methodKevin O'Connor2019-06-101-13/+14
| | | | | | | | | | Use a get_register() method instead of get_response(). This makes the tmc2660 class more similar to other TMC drivers. It also enables DUMP_TMC to dump all the readable content. Also, use the tmc2130.get_config_microsteps() helper. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* test: Add test cases for tmc driversKevin O'Connor2019-06-101-0/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2130: Check field name validity. (#1697)Artem Belevich2019-06-021-1/+3
| | | | | This avoids crashing Klipper if user entered invalid field name. Signed-off-by: Artem Belevich <artemb@gmail.com>
* tmc2130: Add support for two's complement signed fields to FieldHelperKevin O'Connor2019-05-291-2/+4
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2660: Automate VSENSE computationFlorian Heilmann2019-03-221-21/+32
| | | | | | Adjust the HEND default, which was faulty after the the fields update, remove disallowance of setting CS Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
* tmc2660: Minor indentation fixKevin O'Connor2019-03-081-2/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2660: Add INIT_TMC and SET_TMC_FIELD gcodesFlorian Heilmann2019-03-081-2/+31
| | | | Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
* tmc2660: Raise SPI speed to 4 MhzFlorian Heilmann2019-03-081-1/+1
| | | | Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
* tmc2660: Use helper functions for register access and simplify TMC2660 ↵Florian Heilmann2019-03-081-193/+174
| | | | | | | | parameters sense_resistor is now a mandatory parameter for tmc2660 blocks. Duet2 users should use a value of 0.051 Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
* tmc2660: Add vsense_resistor config parameterFlorian Heilmann2019-03-081-18/+18
| | | | Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
* tmc2660: Wrap code to 80 columnsKevin O'Connor2019-02-271-26/+56
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2660: error and whitespace fixesPetri Honkala2018-12-271-4/+4
| | | | | | | | - redundant parentheses removed - parameter reference fixed - raise error fixed Signed-off-by: Petri Honkala <cruwaller@gmail.com>
* tmc2660: Use bus.py helper code for spiKevin O'Connor2018-11-211-31/+8
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2660: Fix typo in TMC2660 extra (#830)Florian Heilmann2018-10-291-1/+1
| | | Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
* Add DUMP_TMC capabilities to the TMC2660 extraFlorian Heilmann2018-10-281-1/+19
| | | | Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
* Implement idle event support in the TMC2660 extraFlorian Heilmann2018-10-281-48/+25
| | | | Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
* tmc2660: Add endstop phase detection functionality to TMC2660 extra (#816)Florian Heilmann2018-10-241-1/+12
| | | Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
* docs: Update Features.md document with tmc2660 supportKevin O'Connor2018-10-021-0/+0
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc2660: Implementation of TMC2660 extra (#621)Florian Heilmann2018-09-111-0/+269
Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>