[1.1.x] Configure stepper drivers per axis#11361
Merged
thinkyhead merged 2 commits intoMarlinFirmware:bugfix-1.1.xfrom Jul 25, 2018
Merged
[1.1.x] Configure stepper drivers per axis#11361thinkyhead merged 2 commits intoMarlinFirmware:bugfix-1.1.xfrom
thinkyhead merged 2 commits intoMarlinFirmware:bugfix-1.1.xfrom
Conversation
skarcha
reviewed
Jul 26, 2018
| * Override the default value based on the driver type set in Configuration.h. | ||
| */ | ||
| #define MINIMUM_STEPPER_DIR_DELAY 0 | ||
| //#define MINIMUM_STEPPER_DIR_DELAY 650 |
Contributor
There was a problem hiding this comment.
If you are assuming A4988 drivers as default, MINIMUM_STEPPER_DIR_DELAY should be 200 as default too, doesn't it? And the same for the rest of related parameters.
Member
Author
There was a problem hiding this comment.
I think it's alright. This is consistent with the previous arrangement, with A4988 (or no tuning) as the default, but DRV8825 (a very common driver) as the example for overrides.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on #11264 (and #11133)
Configuration_adv.hto override the parsed driver IC defaults.TMC5130. However this PR doesn't yet move Marlin to the library that supports the driver.TMC2130andTMC2130_STANDALONE. The way I see it, the default use case for that driver is in configured mode and using standalone mode is a special case. In standalone mode only the stepper timings are affected and they pretty much act the same asTMC2100as far as Marlin is concerned.I decided to use the Allegro drivers as the default to match what is the most common configuration in the user base. Specifying any drivers is not forced but will default to DRV8825 configuration, except for DIR delay. This could be improved, or force defining at least one driver (unless overriden in _adv.h).
I think the main question is if we know the parameters different drivers require, which should be used as the default? I think we should not use 0 delays as there is no driver compatible with such timings.
However, this doesn't take into account the natural delay there is no matter what we do.
This also leads to a more general configuration change that affects the stepper ISR. Perhaps we should no longer check if
MINIMUM_STEPPER_PULSEis defined, because from hereon it always is, and rather check if the defined pulse width is greater than 20 for example. @ejtagle ?The compile time driver IC macros:
AXIS_DRIVER_TYPE(A, T)Check if an axis
Ahas a driver typeTassociated with it.HAS_DRIVER(T)Check if the user has driver type
Tin any of the axis enabled.HAS_TRINAMICCheck if any supported Trinamic drivers are enabled in any axis.
AXIS_IS_TMC(A)Check if the specified axis
Ahas a supported Trinamic driver enabled.