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

nrf: prevent I2C hangs #8094

Merged
merged 3 commits into from
Jun 23, 2023
Merged

nrf: prevent I2C hangs #8094

merged 3 commits into from
Jun 23, 2023

Conversation

furbrain
Copy link

This adds a check to make sure that SDA and SCL are in a sane condition before starting any I2C operation. If they are not it tries to rectify it, and then returns an error code if unable to do so.

furbrain added 2 commits June 19, 2023 22:20
This adds a check to make sure that SDA and SCL are in a sane condition
before starting any I2C operation. If they are not it tries to rectify it,
and then returns an error code if unable to do so.
Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for figuring this out! Some refactoring suggestions.

ports/nrf/common-hal/busio/I2C.c Outdated Show resolved Hide resolved
ports/nrf/common-hal/busio/I2C.c Show resolved Hide resolved
@dhalbert
Copy link
Collaborator

@furbrain Before I approve, I just want to check that you have tried this on hardware after the latest round of changes.

@furbrain
Copy link
Author

furbrain commented Jun 20, 2023 via email

Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@dhalbert dhalbert merged commit ffebb5a into adafruit:main Jun 23, 2023
@dhalbert dhalbert changed the title Fix for #8093 nrf: prevent I2C hangs Jun 23, 2023
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.

2 participants