Skip to content
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

Fix I2C Master hang when communicating with bad I2C slaves. #591

Merged
merged 1 commit into from
Oct 20, 2021

Conversation

agprimatic
Copy link
Contributor

Added check for ARBLOST in sendDataMasterWIRE so misbehaving I2C slaves don't cause the Zero to get stuck in an endless loop.
I had a case where an I2C slave would just pull SDA low and never allow the transaction to complete. While this is definitely bad behavior on the I2C slave, it would cause the Zero I2C master to get stuck in the while loop with no chance to exit. In this case, ARBLOST was set (due to the low SDA and the first high I2C address bit mismatching), so I could use that to prematurely exit the loop.

Added check for ARBLOST in sendDataMasterWIRE so misbehaving I2C slaves don't cause the Zero to get stuck in an endless loop.
@CLAassistant
Copy link

CLAassistant commented Apr 9, 2021

CLA assistant check
All committers have signed the CLA.

@facchinm facchinm merged commit a38aba7 into arduino:master Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants