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

[BUG] I2C connection is unstable #51

Open
Sgw32 opened this issue Feb 12, 2020 · 0 comments
Open

[BUG] I2C connection is unstable #51

Sgw32 opened this issue Feb 12, 2020 · 0 comments
Labels

Comments

@Sgw32
Copy link

Sgw32 commented Feb 12, 2020

The bug

Just connect STM32 blue pill with MPU6050 sensor. It will work pretty good, but sometimes, after some small shakes, or SteamVR lags it just hangs. Reboot causes USB device disconnect(which is an another issue), but still, after the reboot the connection is not established.

To Reproduce
Steps to reproduce the behavior:

  1. Start any SteamVR game with a headset and a high load
  2. Shake the headset and rotate it
  3. The orientation will hang.
  4. Exit SteamVR and OSVR driver
  5. Test Serial connection by opening the corresponding port
  6. If it opens, but there is no data it means I2C hang.

Proposed solution

Check I2C for timeout errors, and if timeout happen, reset the I2C bus. You can find the implementation of this algorithm in Ardupilot repository, as an example. I have a PoC code which resets the bus at reset, can share it.

@Sgw32 Sgw32 added the bug label Feb 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant