-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Labels
Component: I2CRegarding the I2C componentRegarding the I2C componentbugSomething isn't workingSomething isn't workingneeds testingAdditional testing requiredAdditional testing required
Description
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.
This should be investigated and fixed.
Metadata
Metadata
Assignees
Labels
Component: I2CRegarding the I2C componentRegarding the I2C componentbugSomething isn't workingSomething isn't workingneeds testingAdditional testing requiredAdditional testing required
Type
Projects
Milestone
Relationships
Development
Select code repository
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