-
-
Notifications
You must be signed in to change notification settings - Fork 695
I2C Interrupt problem since uprade espressif32 core to v1.1.0 #107
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
Comments
Some more error information, gathered in log level debug:
|
this should be reported against arduino-esp32 instead of platformio-espressif32. With the new arduino code picked up in 1.1.0 there is new i2c code which it appears you are hitting an issue with, @stickbreaker would be able to decipher the log statements you have above and point you in the right direction of a solution. |
@cyberman54 update to the latest core, The timeout Recovery is just a debug message, either updated to the newest core or reduce your Core Debug level to ERROR. The Injection Error is triggering because an I2c Interrupt was triggered without the ISR being configured. This has only been caused by multi-threading The slowdown you are noticing is because of the delay caused by the debug output. Chuck. |
Thanks for explanation. The same display code performed without issues with former version 1.0.3. |
@cyberman54 Please post a capture of the error log with Core Debug Level at DEBUG. Have you checked for multi-tasking of Every time one of those injection Errors are seen, an i2c transmission has been aborted. I would suspect that is the genesis of the reduced performance. Chuck. |
Chuck, thanks for your support here! Below you find my error log. These errors repeat a lot, no doubt this will be the reason why the display speed slows down. I'm using u8g2 Library, which depends, as far as i see, one I'm using RTos for parallel tasking in an ESP32 arduino framework. The display (and so, the I2c) control is centralized in one task, but this tasks sure gets interrupts by other RTos tasks. So i assume i run in that multi-tasking problem with But how could i solve this? Again, with arduino-espressif32 v1.0.3 the i2c ran smooth. --
|
@cyberman54 This error log you just posted is from a prior version of the Arduino Core, This message is not in the current core. me-no-dev merged this pr 1574 two days ago. Updating to the current core will prevent this debug message from being emitted. It was just code to see if the ISR correctly handled a SCL stretching event. Your debug output shows that it was delayed 2ms, probably by interrupt latency, WiFi has higher priority.
As long as
This debug output is causing the performance issue you are seeing. By updating to the newest core, this penalty will no longer be incurred. This debug message was removed 07/04/2018 Chuck. |
Chuck, thanks for the explanation. I switched my PlatformIO IDE to the staging version of arduino-espressif32, but it seems your pull request has not yet arrived there. So i now will wait some days. |
I still get the error, after i switched to arduino staging environment and did a pio update. |
Is it fixed in master branch? |
Did you try to clean project? |
yes, and i several times installed and uninstalled Espressif32 platform. |
Try to remove ~/.platformio/packages/framework-arduinoesp32.... |
I did that. Then did a install via library manager, Espressif32 v1.1.2, but after this i found in |
Let's wait for @stickbreaker comment. |
I think it's some problem with my local PlatformIO installation. |
Does it work now? |
I got the actual arduino-espressif32 core installed, and as Chuck pointed out, the debug messages are gone. But the primary problem with missed i2c interrupts [E][esp32-hal-i2c.c:594] i2c_isr_handler_default(): eject int=0x0, ena=0x0 still persist and performance of OLED display is very low. The same code runs with espressif32 core 1.0.3 without issues. Something with i2c must have been changed? |
@ivankravets if @cyberman54 is still seeing 'timeout recovery' he is using stale code. Chuck. |
We don't develop ESP32 Core for Arduino. Please report all issues to https://github.com/espressif/arduino-esp32/issues and inform us here when we will need to make a new release. |
For the PlatformIO part: for me it looks like platformio cannot handle different arduino-espressif32 cores in path packages? |
Please share a content of your |
Are you sure that |
@ivankravets it seems to work now, after i had some sort of trouble with different versions of arduino-espressif32 on my disk. Let us focus on the i2c problem here now, this is the basic issue. |
I'm using u8x8 on ESP32 boards, programmed with Arduino Espressif32 core.
I2C display handling using driver U8X8_SSD1306_128X64_NONAME_HW_I2C
This worked perfectly until last days the espressif32 core was updated from v1.0.3 to v1.1.0.
Since then i get this error during runtime:
[E][esp32-hal-i2c.c:594] i2c_isr_handler_default(): eject int=0x0, ena=0x0
And the display write speed is significantly reduced.
I'm not sure if this is a problem with u8x8 or the Espressif32 core. I'm not using any other I2C communication on the board.
Cross reference to u8x8:
olikraus/u8g2#646 (comment)
The text was updated successfully, but these errors were encountered: