You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Firmware hangup in i2c_stop() and other I2C functions #3
I observed it multiple times in a hardware configuration with a SSD1306 I2C OLED display that reflashing the firmware at specific points would cause the new firmware to hangup in the i2c_stop() function (as I observed in the debugger).
This code does not have timeouts (as opposed to other I2C functions) and in case the I2C peripherhal wants to assert a STOP condition but the bus just doesn't let it be driven that way (some other device is interfering?) this hangs up forever.
The Wire library needs an overhaul regarding error / timeout checking and I2C bus resetting.
I can reproduce most lock-ups very determinstically when I flash the I2C OLED benchmark demo and reflash it in the middle of when it's writing to the screen.
Activity
maxgerhardt commentedon Oct 2, 2021
A timeout has been added in a72b50c and 51a22bf, further improvements in PR #45 #46
a backtrace of a lockup is also e.g.
So really the lockup can happen at any time.
The Wire library needs an overhaul regarding error / timeout checking and I2C bus resetting.
I can reproduce most lock-ups very determinstically when I flash the I2C OLED benchmark demo and reflash it in the middle of when it's writing to the screen.
[-]Firmware hangup in `i2c_stop()`[/-][+]Firmware hangup in `i2c_stop()` and other I2C functions[/+]Merge pull request #3 from keyboardio/jesse/usb-config-fallback