-
Notifications
You must be signed in to change notification settings - Fork 967
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_write_blocking() hanging on SDK 2.1.0 #2128
Comments
@peterharperuk , I reverted the change 68778b1 and that fixed the hang as well. I have two devices on the I2C bus: 0x38 AHT21 (Temperature/Pressure sensor) I also noticed that if I only have the OLED panel connected, I don't see the 'hang'... |
Thanks. Do you know if the lockup occurs if you just have the AHT21 connected? |
No, since lockup happens in the ss_oled library, and when there is no panel found in the bus it won't get far enough to initialize it... I noticed that the sensor library uses 'non-blocking' functions (i2c_write_timeout_us(), i2c_read_timeout_us()), so new SDK didn't cause any issues with it. I'm initializing I2C sensors first, before trying to initialize the OLED panel, maybe the condition is triggered by first accessing another device with "non-blocking" read/write calls and then trying to initialize OLED panel, where the library is using the "blocking" read/write calls... |
After switching from SDK 2.0.0 to 2.1.0, I noticed that ss_oled OLED panel library stopped working (it hangs when initializing the OLED panel).
This issue was clearly introduced in SDK 2.1.0, as issue is not present in 2.0.0 or 1.5.0.
I traced the hang to i2c_write_blocking() call:
ss_oled/BitBang_I2C.c(322):
(at least on Pico W the i2c_write_blocking() call never returns)
Curiously, after I changed this line to following, that fixed the problem:
(also its not timing out but succeeding normally, so blocking write should not hang either?)
The text was updated successfully, but these errors were encountered: