-
-
Notifications
You must be signed in to change notification settings - Fork 19.5k
[1.1.x] TMC driver update #8712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[1.1.x] TMC driver update #8712
Conversation
This is epic, and looks good overall. Can we make a PR for the 2.0 branch to match? I might hold off on merging this till after the 1.1.7 release, since that is long overdue. (The 1.1.8 release will be more on-time, probably around 30 days after 1.1.7.) |
c36539c
to
429e2d3
Compare
I've got a 2.0 based branch ready but I'll go over it tomorrow. |
@teemuatlut Sounds good to me! Theoretically, the 1.1.7 release could be the last release that gets new features, and we could move all development to 2.0.x starting this week. The 1.1.x branch has only been waiting for a point where 2.0.x could build reliably for AVR and DUE, and though the jury is still out, I think it's acceptable if some components of the 2.0 official release are labeled as still being in beta, or even alpha…. Leaving 1.1.x behind should help to streamline all our development efforts. |
88e1629
to
13efb69
Compare
13efb69
to
736bfd1
Compare
I'm going to revert your changes regarding the macros. Otherwise we're going to end up with a situation where we have |
Why the increment to the EEPROM version? |
The main general-purpose Another option would be to create a separate |
😄 I moved the tmc macros to their own file. It looks a bit silly as there's nothing else in there but maybe there will be use for it in the future as well. I know TRAMS is going to add a lot of things.
I've added EEPROM support for the |
38898fa
to
7c1adff
Compare
❤️ ❤️ ❤️
This 💯 % -=dave |
At this point I would only break out settings that are rare, so that we don't have to duplicate them in every example configuration. Also there's the issue of having settings at hand. Even breaking out a |
I'd actually argue the other way that because the configuration files are getting so massive I find it harder to find a particular setting. How do you approach updating all the config files? The way I've done it for these two PRs is using the replace method in sublime text. A regex like |
The best solution I could think of to the example config issue was to have a json (or any other preferred structure) of the settings required for each example, then regenerate the example config files from the current default config. It actually worked quite well in my python proof of concept, (I generated the diffs from the current examples) .. the obvious extension of this was to always generate the default config from a json data structure too and use that as the master.. which would be preferred method. |
Maybe the example configuration sets can be handled by the configurator that may be coming in the far far future. |
I hope most users will use Find in their text editor. Of course, the first time configuring you may scan the first file, reading each option in turn, but once you've done a config or two, you just search for the options you want. For more obscure features, we provide web pages and point out the advanced options there, so users who want to know about them can Google for them. Or, enterprising users can search The debate over whether to split up the configurations further has been had before, and the consensus that developed last time was that adding more files simply adds more headaches, while two files (our minimum) are relatively easy to maintain and keep in sync. A "configurator" can hide most options and then array the rest in 2D space. A Configurator can also include presets and other helpful shortcuts and cues about which options are relevant or important. A configurator can include audio-visual guidance. The configurator by @akaJes is pretty much what we would like to have as a web-based utility, but unfortunately it was written with total dependency on Windows. |
… into bugfix-1.1.x-HD-CR10 * 'bugfix-1.1.x' of https://github.com/MarlinFirmware/Marlin: [1.1.x] TMC driver update (MarlinFirmware#8712) Correct unskew, after all Missing HAS_HEAT_BED conditional
I wonder if it's possible to add support for TMC2208 when using single shared UART interface and analog commutator like 77hc4066 (scheme can be taken from 2208 datasheet) ? The main concern is that there is no SoftwareSerial library for some boards, for example Arduino Due. And amount of available hardware serials is rather limited (4 total for Due). This will require, as I understand, some sort of CS pin (for use with commutator) along with shared RX/TX pins. |
@thinkyhead Was this PR completely left out on the v1.1.7 release notes? |
@byebyedizzy I'd actually rather see the software serial library improved with support for DUE. |
* origin/1.1.x: (346 commits) Version 1.1.7 Update README.md for bugfix Adding support for the Tronxy and Zonestar LCD Apply ZONESTAR_LCD to example configs More externs and functions in Marlin.h Add NANODLP_ALL_AXIS to config examples Extended NanoDLP_Z_Move_Sync feature to G4 and G28, Added optional move_sync for all axis. [1.1.x] TMC driver update (MarlinFirmware#8712) Correct unskew, after all Missing HAS_HEAT_BED conditional Reduce code with no heated bed General code/bitmaps cleanup Fix Planner::unskew parity with skew Comment, improve filament width sensor Separate Dual X un-park from movement Skew should apply per-segment Extend Skew Correction to UBL Travis Test for non-segmented UBL One or the other? UBL devel debugging flag ...
Well, I could not find any suitable replacement. Actually there are too few software serial implementations for Due. One that I found (https://github.com/antodom/soft_uart/blob/master/README.md) has too much limitations to be used in Marlin code. So shared UART with commutator is rather attractive - simple schematic and (I hope) not too complex to implement ... |
@teemuatlut It appears that some of this PR and #8769 are out of sync, especially |
Both 1.1.x and 2.0.x should be Did you find something else as well? |
Nope. Everything else is perrrrrrfectly ok. e0d487e |
why was automatic current control removed? |
It didn't work as intended so I reworked it into current state but kept the current step down feature. |
My son just had got a printer halt due to overtemp with that feature turned on. He's going to debug it this evening. |
Hey, My Y driver is acting weird. It seems to be moving as if it is set for 8 micro steps instead of 16. When I pull the debug info, the Y has a different vsense. Do you have any ideas what might be causing this and how to fix it? M122 ok |
Your microsteps are reported correctly so I can see three possibilities.
#9230 Perhaps this issue is related? Y has different vsense bit because of your current setting. |
Another question arises. When using TMC2130 steppers, I assume it is required to define |
I know that at least when using any Ramps based boards, those pin are already defined in the pin_ramps.h file. So maybe changing it so they are defined in the config file and adding a sanity check would be a good thing, as I know I have to redefine them to run the SD card at the same time on my setup. |
@thinkyhead We have the predefined default pins in pins_ramps.h. Sean is correct that Automatic increased the stepper current until OTPW was triggered and then back down a bit. When I get to it, I'll add support for coolStep which further improves the current management capabilities making the stepper current react to load and not just temperature. |
Right, so sanity check would handle the case where TMC2130 is selected with non-RAMPS. |
Well the compiler would tell you that much but I guess having a sanity check would be more descriptive for the end user. |
Yes. The aim of sanity check is to catch what would otherwise be indecipherable compiler errors.
A PR is in to allow them to be overridable. This is probably not an uncommon need. |
The CS pins likely need to be moved to AUX2 as the |
|
||
#if ENABLED(HAVE_TMC2208) | ||
delay(100); | ||
tmc2208_init(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@teemuatlut — Re-init not needed in M80
?
New gcode commands:
Features:
Default configuration:
This is actually a much bigger update that I'm comfortable with and I feel it might be a bit error prone. But I have been using this fork for quite a while now and it should work ok. Mostly I wanted to stop telling people to use my fork to solve their problems.