-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
Flickers when using double-buffered i8080 lcd on ESP32-S3 while Wi-Fi performs time-consuming tasks (IDFGH-6569) #8212
Comments
The |
Yes, I have noticed that already. But everything works fine when Wi-Fi is not turn on. This transmission issue only happens when Wi-Fi is performing time-consuming jobs, which is confusing. |
I patched the code with mutex. The same issue still happen. https://gist.github.com/wangyz1997/0cc05904443d0bd7f16321044d1d42e0 |
@wangyz1997 Hi, sorry for the late response, we can reproduce this issue now. Thanks for your detailed report and your code that helps us a lot. The issue is that, after we start the DMA engine, DMA speed can't match the peripheral requirement, thus it can't fill itself with transfer data immediately, so the peripheral's FIFO might contain garbage data. This is also explained why slowing down the PCLK frequency can somehow do the help. |
Thank you for your detailed explaination. Issue fixed with provided method. |
Environment
ESP32-S3-WROOM-1
(D3N8R2).git describe --tags
to find it):v4.4-beta1-284-gd83021a6e8
xtensa-esp32-elf-gcc --version
to find it):Problem Description
Hi. I am using the lateet ESP32-S3 to drive a Intel 8080 LCD Panel. Everything seems quite normal when I port the driver without enabling Wi-Fi, with or without lvgl. But after I enable Wi-Fi, I can see flickers on screen frequently when Wi-Fi performs time-consuming tasks (connecting, https request, etc). The display buffer is correctly flushed to screen, but on the wrong place (which can be seen in images below).
Lower the PCLK helps reducing the frequency of the bug, but it still happens.
I guess this is due to interrupt not handled timely. Wi-Fi functions have many critical sections, and the LCD DMA uses interrupt to notify the driver when transfer is done. When Wi-Fi stack enters critical section, if LCD DMA generates an interrupt, the interrupt will not be handled timely. This may cause mistakes in command transferring, so the buffer is flushed to the wrong place.
Expected Behavior
The LCD displays correct content.
Actual Behavior
With LVGL:
With the code provided:
IMG_1438.mp4
Steps to reproduce
Code to reproduce this issue
Minimal code to reproduce this issue is uploaded below.
https://gist.github.com/wangyz1997/a0fde61e4a212d72dcd964ec9346a9fc
Debug Logs
Other items if possible
everything is left default, and wifi ssid and password is set to a wrong one.
build
folder (note this may contain all the code details and symbols of your project.)esp32s3-8080lcd-bugreport.elf.zip
The text was updated successfully, but these errors were encountered: