-
Notifications
You must be signed in to change notification settings - Fork 638
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
Display corruption when using both ESP32 cores? #326
Comments
Probably connected to #299 |
As I understand you run the code on both cores without managing the access. So it works as expected and you corrupt the memory. |
Thanks for the suggestion @Rotzbua. Was running into same issue and pinning the task to a different core fixed the oled corruption. |
@Rotzbua thanks. I did the same as @thijstriemstra and basically now I have a core which does scheduled activities (incl the OLED refresh) and another for realtime callback based stuff, with some variables read by one core and written by the other to keep a shared state. |
Added to Heltec board display code logic to reduce corruption of messages on the display Two piece of defensive code were added - Only display messages to the display when operating on Core 1 ( Default Arduino ESP32 CONFIG_ARDUINO_RUNNING_CORE ) - Only display one character/string at a time In the event of failure, default to Serial output. PS SSD1306 driver similar issues ThingPulse/esp8266-oled-ssd1306#326 ThingPulse/esp8266-oled-ssd1306#352
Added to Heltec board display code logic to reduce corruption of messages on the display Two piece of defensive code were added - Only display messages to the display when operating on Core 1 ( Default Arduino ESP32 CONFIG_ARDUINO_RUNNING_CORE ) - Only display one character/string at a time In the event of failure, default to Serial output. PS SSD1306 driver similar issues ThingPulse/esp8266-oled-ssd1306#326 ThingPulse/esp8266-oled-ssd1306#352
Hi,
I have changed a sketch in which the SSD1306 worked fine to use both cores. At that point, "garbage" started appearing on the screen. Here's the minimal sketch showcasing the issue. I am running the sketch on a ttgo lolin esp32 with an integrated SSD1306 display.
Expected behavior: first line of text on display stays the same, 2nd and 3rd line swap between them (see displayText call in loop() and in core0synchronousOps(), where the order of operands 2 and 3 are swapped)
Actual behavior: garbled pixels on display
compiling sketch on PlatformIO
The text was updated successfully, but these errors were encountered: