-
Notifications
You must be signed in to change notification settings - Fork 67
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
I2C can run into deadlock / has no timeout #119
Comments
Sorry for the late answer. How far have you come with your problem? For more responsive answer to questions like these I would like to point you to the official rust-embedded matrix channel. :) But it seems like our i2c does block, if the slave does not answer. The This is the part, where we need a timeout capability. The reference manual RM0316 rev8 at I can only think of really hacky interrupt-trickery to work around this issue, so clearly, this is an oversight on the current implementation. |
I've labeled this as bug and reworded the issue title, to make it more clear, that there is some modification of the current code needed to cover your usecase. |
I started looking into ways of solving this since async/ await doesn't rely on std anymore since 1.44, and then ran into issues getting an executor to run on cortex-m; is adding a dependency on an a crate providing an executor even an option if I wanted to explore the async/ await option? |
Maybe simple counter based timeout (decrement the timeout counter value in At least this is what ARM Mbed OS does. |
NRF-HAL has a |
I struggle to use this crate to execute basic I2C requests with timeouts.
Can you provide an example on how to use the I2C abstraction with timeouts to ie scan the I2C bus for available addresses?
I'm using v0.4.3.
Thanks
The text was updated successfully, but these errors were encountered: