Conversation
Contributor
|
I don't think there's any downside to always enabling this feature. Then if the user leaves out the diag pin, we register stall guard using SPI, and otherwise we keep the old functionality. Over time, we should deprecate pin polling, as SPI is strictly better and makes auto configuration of stall guard sensitivity much easier to implement. /Lasse |
rogerlz
force-pushed
the
rogerlz/spi-sensorless
branch
from
October 5, 2026 07:59
de25d89 to
fcf8bd6
Compare
When no diag pin is configured on an SPI driver, the virtual_endstop makes the mcu poll the stallguard flag from the SPI status byte during homing and trigger trsync directly, for boards without the DIAG line wired. Signed-off-by: Rogerio Goncalves <rogerlz@gmail.com>
rogerlz
force-pushed
the
rogerlz/spi-sensorless
branch
from
October 5, 2026 12:29
fcf8bd6 to
113e33a
Compare
This branch has not been deployed
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.
Summary
diag0_pin/diag1_pinis set on an SPI TMC driver (2130, 2240, 5160/2160), sensorless homing polls the stallguard flag over SPI instead of a DIAG pin. The MCU polls the stallguard flag (sg2 bit of the SPI status byte) at 1kHz during homing and triggers trsync directly.Test plan
test/test_tmc_homing.py)tmc.testwith no diag pin on the tmc5160, run locally with a freshly built atmega2560 dict. Not added to CI because the CI image dicts lack the new command.