Stop listening after starting SoftwareSerial #101
Merged
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.
Some platforms such as LPC176x call listen() inside their begin() function. This is done due to precedent from the original AVR implementation.
This causes problems for single-pin half-duplex, because it causes the pin mode to switch to input after each write command, even if the TMC will not send a response. This can leave the line in an indeterminate state, preventing the TMC from recognizing the start bit of the next command.
To resolve this, we can call stopListening() immediately after calling begin(). This prevents the automatic transition to input after the write completes.
Captures of Z and E drivers on an SKR 1.3, prior to the change. This issue only impacts only the last driver, because only one SoftwareSerial instance can listen at a time. These are the first interactions with the drivers after power-on.
Same capture with this change: