Fix: TWAI transmit hangs on empty bus - #6070
Open
bjoernQ wants to merge 2 commits into
Open
Conversation
bugadani
reviewed
Aug 7, 2026
Comment on lines
+1527
to
+1531
| #[cfg(any(esp32, esp32c3, esp32s2, esp32s3))] | ||
| let w = w.err_warn_int_ena().bit(enable); | ||
| #[cfg(any(esp32c6, esp32h2))] | ||
| let w = w.ext_err_warning_int_ena().bit(enable); | ||
| w |
Contributor
Author
There was a problem hiding this comment.
yes - we should align things
bugadani
reviewed
Aug 7, 2026
| // status is still set. Gating on both ensures the bus-off state is | ||
| // signalled only once per entry, instead of on every error warning | ||
| // interrupt while the state persists. | ||
| if int_raw.bits() & 0b100 > 0 { |
Contributor
There was a problem hiding this comment.
This should be a specific .bit_name().bit_is_set() IMO.
Contributor
Author
There was a problem hiding this comment.
ok - then I probably should align SVD/PACs first instead of unleash even more cfg hell here
Contributor
Author
|
/hil full --test misc_drivers |
|
Triggered full HIL run for #6070. Run: https://github.com/esp-rs/esp-hal/actions/runs/31190456962 Status update: ✅ HIL (full) run succeeded. |
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.
Fixes #5307
We already had an (ignored) HIL test for this issue prepared.
This also restores the async TWAI example we had before - while having non-async and async examples seems redundant, in cases like this it's useful. (i.e. the non-async example didn't show the problem)
Happy to remove one of them if requested. (ideally the non-async)
Changelog
esp-hal