Merged
Conversation
cparata
approved these changes
Apr 14, 2026
Contributor
|
Hi @rpocklin , |
Author
|
Thanks, I just upgraded to it now - appreciate you merging it so quickly 🚀 You may have to do a separate publish for the new library version to reach the PlatformIO registry: |
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
This is an issue I was facing using this sensor on ESP32 and was recently raised by another person also: (#19)
On platforms where
beginTransaction()acquires a mutex (e.g. ESP32), failing to callendTransaction()causes the second SPI call to deadlock.IO_ReadandIO_Writeboth calledbeginTransaction()but never released the bus, causing the MCU to freeze during init() firmware upload.STM32 is unaffected as
beginTransaction()is a no-op (ie. this is a non-breaking aka backwards compatible change).This PR fixes/implements the following:
endTransaction()is called when using SPIMotivation
This library works perfectly on esp32 once this issue is fixed, without it, it hangs on the second transaction due to the mutex.
Validation
Tested with demo sketch in both PlatformIO v6.1.19 and Arduino IDE v2.3.8.
Closing issues
Closes #19