[atm90e32] Only read 1 register per SPI transaction per datasheet. - #10258
Merged
Conversation
This reverts the addition of read16_transaction_ from pr#10143, folds it back into read16_, and switches read32_ back to making 2 transactions. According to the datasheet (section 4.2.2 / page 31), we're only allowed to read a single register per SPI transaction: "The SPI read/write transaction is CS-low defined. Each transaction can only access one register." This corrects incorrect power register readings for me (which use read32_).
Contributor
|
👋 Hi there! This PR modifies 2 file(s) with codeowners. @CircuitSetup, @descipher - As codeowner(s) of the affected files, your review would be appreciated! 🙏 Note: Automatic review request may have failed, but you're still welcome to review. |
Contributor
|
To use the changes from this PR as an external component, add the following to your ESPHome configuration YAML file: external_components:
- source: github://pr#10258
components: [atm90e32]
refresh: 1h(Added by the PR bot) |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #10258 +/- ##
=======================================
Coverage 60.45% 60.45%
=======================================
Files 51 51
Lines 10417 10417
Branches 1388 1388
=======================================
Hits 6298 6298
Misses 3760 3760
Partials 359 359 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
|
@raineth thanks for catching this! I should have noticed that detail in the datasheet. |
jesserockz
approved these changes
Aug 19, 2025
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What does this implement/fix?
This reverts the addition of read16_transaction_ from #10143, folds it back into read16_, and switches read32_ back to making 2 transactions.
According to the datasheet (section 4.2.2 / page 31), we're only allowed to read a single register per SPI transaction: "The SPI read/write transaction is CS-low defined. Each transaction can only access one register."
This corrects incorrect power register readings for me (which use read32_).
@CircuitSetup FYI
Types of changes
Related issue or feature (if applicable):
Pull request in esphome-docs with documentation (if applicable):
Test Environment
Example entry for
config.yaml:Checklist:
tests/folder).If user exposed functionality or configuration variables are added/changed: