You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a project using a single ESP32 to drive 2 GC9A01 screens (see my previous post).
At first I was using the 2 screens on VSPI which worked fine, except I wanted to optimize the performance.
For that I put screen 0 on VSPI and screen 1 on HSPI. I wrote a function refreshMyScreen(x) that refreshes the specified screen with a refresh rate that I can specify for each screen (screenDelay=0 => refresh as fast as possible.)
This works if I call refreshMyScreen(0) and refreshMyScreen(1) within loop(), although with no performance benefit (as expected).
Since the ESP32 has a dual core cpu, I then moved the refreshMyScreen(1) to run on cpu core 0, refreshMyScreen(0) remains in loop() which runs on cpu core 1. The framerate improved but a lot of artifacts are being shown on the screen. I then suspected the DMA channel of the bus instance to be the culprit. Basically using DMA channel 1 on both screens, or using DMA channel 1 & 2, results in artifacts when running on two cores. Using DMA 1 on screen 0 and DMA 0 (=disabled) on screen 1, improves the performance of screen 0 but (as expected) not on screen 1.
I suppose it's not possible to use different DMA channels which get called at the same time by a process running on a dedicated cpu core and avoid the artifacts?
Any other way I could improve performance? lovyandualcore-dualscreen.zip
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I'm working on a project using a single ESP32 to drive 2 GC9A01 screens (see my previous post).
At first I was using the 2 screens on VSPI which worked fine, except I wanted to optimize the performance.
For that I put screen 0 on VSPI and screen 1 on HSPI. I wrote a function refreshMyScreen(x) that refreshes the specified screen with a refresh rate that I can specify for each screen (screenDelay=0 => refresh as fast as possible.)
This works if I call refreshMyScreen(0) and refreshMyScreen(1) within loop(), although with no performance benefit (as expected).
Since the ESP32 has a dual core cpu, I then moved the refreshMyScreen(1) to run on cpu core 0, refreshMyScreen(0) remains in loop() which runs on cpu core 1. The framerate improved but a lot of artifacts are being shown on the screen. I then suspected the DMA channel of the bus instance to be the culprit. Basically using DMA channel 1 on both screens, or using DMA channel 1 & 2, results in artifacts when running on two cores. Using DMA 1 on screen 0 and DMA 0 (=disabled) on screen 1, improves the performance of screen 0 but (as expected) not on screen 1.
Summarized:
On 2 cores
DMA FPS1 FPS2 result
1,1 463 432 *Artifacts
1,2 463 432 *Artifacts https://www.youtube.com/shorts/mffwnWgIuXs
1,0 464 232 OK, different speed https://www.youtube.com/shorts/AQ8_XQLOAlk
On one core
1,2 233 233 OK https://www.youtube.com/shorts/uawKLMwyr3U
1,1 233 233 OK
1,0 229 229 OK
I suppose it's not possible to use different DMA channels which get called at the same time by a process running on a dedicated cpu core and avoid the artifacts?
Any other way I could improve performance?
lovyandualcore-dualscreen.zip
Best regards,
Jan
Beta Was this translation helpful? Give feedback.
All reactions