-
Notifications
You must be signed in to change notification settings - Fork 165
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
prevent I2C from hanging on lost interrupt #1657
Merged
Merged
Conversation
This file contains 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
hawkw
reviewed
Mar 14, 2024
mkeeter
reviewed
Mar 14, 2024
hawkw
reviewed
Mar 14, 2024
mkeeter
approved these changes
Mar 14, 2024
hawkw
added a commit
that referenced
this pull request
Mar 14, 2024
The `ringbuf` crate has a `"disabled` feature flag, which disables ring buffers, intended for use on memory-constrained targets. Currently, setting the `"disabled"` feature flag still enables counters for ring buffers declared using the `counted_ringbuf!` macro, because counters generally require less RAM than full ringbufs. However, on some targets, even counters are too large, especially when a ringbuf's entry type has too many variants (e.g. see [this comment][1] from @bcantrill --- the `i2c_driver` ringbuf must disable counters in order to fit in Donglet's RAM). Therefore, this commit adds an additional `"counters-disabled"` feature flag to the `ringbuf` crate, to allow disabling counters as well as ring buffers. [1]: #1657 (comment)
hawkw
added a commit
that referenced
this pull request
Mar 14, 2024
The `ringbuf` crate has a `"disabled` feature flag, which disables ring buffers, intended for use on memory-constrained targets. Currently, setting the `"disabled"` feature flag still enables counters for ring buffers declared using the `counted_ringbuf!` macro, because counters generally require less RAM than full ringbufs. However, on some targets, even counters are too large, especially when a ringbuf's entry type has too many variants (e.g. see [this comment][1] from @bcantrill --- the `i2c_driver` ringbuf must disable counters in order to fit in Donglet's RAM). Therefore, this commit adds an additional `"counters-disabled"` feature flag to the `ringbuf` crate, to allow disabling counters as well as ring buffers. [1]: #1657 (comment)
hawkw
added a commit
that referenced
this pull request
Mar 19, 2024
Using the `irq_status` system call I added in #1661, we can extend the panic function added to `stm32xx-i2c` in #1657 to also include the state of any IRQs currently mapped to its notification mask. This way, if an I2C driver panics, we can also include the kernel's understanding of its IRQ state in the dump.
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.
Draft commit message: