-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Implement Thread-Safe I2C based on ESP-IDF API #5683
Conversation
@marcboon please also post the part of the code that crashes :) |
|
@marcboon took a sec to figure it out, but you are trying to set a frequency of 4MHz instead of 400KHz :) |
Me No Dev schreef op 21-09-2021 13:40:
@marcboon [1] took a sec to figure it out, but you are trying to set a frequency of 4MHz instead of 400KHz :)
Yes, I also just discovered this typo, that's why I deleted my bug
report :/
Still, it should not trigger the RTC watchdog, should it?
marc
Links:
------
[1] https://github.com/marcboon
|
that happens inside IDF's I2C driver. We can ask there why that is so. |
I will just limit the frequency on our end to prevent it. |
@marcboon seems Adafruit disabled the clock adjustment for their Feather ESP32, but not for other ESP32 based boards. In any case, I limited the clock to 1MHz and that seem to not trigger WDT anymore. |
Works 👍 |
@me-no-dev you can re-enable feather esp32 clock adjustment, we dont even know what that is (?) |
@ladyada here is the offending line :) https://github.com/adafruit/Adafruit_SSD1306/blob/master/Adafruit_SSD1306.cpp#L91 |
hi, its unclear what is wrong with that line - we offer an optional way to speed up writes and it is enabled on the ESP32 (only disabled on STM32) for when we burst-write to the OLED. |
@ladyada ahh so sorry... it's |
Summary
This PR is a complete refactoring of Wire Library and I2C HAL in order to use IDF instead of current Register manipulation approach.
It implements Thread-safe Arduino Wire.
Fix #5478
Fix #5635
Fix #5636
Fix #4729
Fix #5470
Impact
It solves many reported issues related to I2C.