-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
DMA stops writing after the first frame #3367
Comments
I'm unfortunately having the same issues (and I posted about this in a Discussion thread yesterday) I am using an ESP32-S3 "Zero" (this is a waveshare "mini" form factor of an ESP32-S3FH4R2) and the very same GC9A01 1.28" circular LCDs, from the same vendor. Everything works fine without DMA (e.g., I have adjusted my pin connections to match the HSPI description of standard pins found in several repos:
In my own code, I've tried any number of things include allocating buffer memory specifically for DMA usage ( |
you said you are also setting specifically which pins are used for hspi? |
Yes. I adjusted my SPI pins to match the table found here: |
I read that any pin could be used for spi so I updated the library for spi (since it was saying there were no defaults for hspi) to use the pins I wanted. The weird part is that DMA write was working about a month ago and now it isnt. I have no idea what could have changed, specially since its able to write the first frame, hopefully someone can provide some insight |
I had read the same about HSPI pin number flexibility, but since DMA was not working and there was specific information given about using specific pins, I thought the specific pins may matter after all. Interesting that it had been working for you a month ago. I just got my esp32s3, so I haven't tried it before this past week. I just tried rolling back the tft_espi library to the 2.5.34 release but there was no improvement. Leaving tft_espi at 2.5.34, I also tried rolling back esp32 board definitions back down to 3.0.0 and 2.0.17 but neither resolved the issue. |
A slight change to the "pushImageDMA" function
|
At the risk of stating the obvious: your modification there inserts (essentially) the ESP32_S3 definition of |
You are right, I didnt notice that. I think more specifically though what made a difference was the free() call. I need to look into it more to see if I can get more information/a better fix |
I'm having the same issue, no updates after the first frame with DMA enabled, but everything works fine using I'm using an ESP32-S3-DevKitC-1 (not official) with platformio with a round LCD using GC9A01 (not the waveshare version). If I set the MISO pin to the same as CS, which I saw as a suggestion in a discussion about this issue, then some corrupted updates are continuously made to the upper portion of the screen. Varying the SPI frequency causes different kinds of corruption, but only with DMA enabled. Platform espressif32@6.6.0 |
You said with DMA, no updates after the first frame, but then also 5 fps increase with DMA, but partial corruption? |
@JordanKlaers Yes. I was only able to know there was a 5 fps increase using DMA because I was sending the fps over serial. |
Small update after more troubleshooting, turns out it wasn't actually drawing the first frame at all, just the random corruption as seen at the top. What I was seeing was the last contents of the graphics ram persistent between builds. When I power cycle the display then try again, it shows colored snow with the corruption at the top. |
I am having the same issue with a ESP32-S3 board. After pushImageDMA() function, there is no MOSI activity. |
That's quite odd, unfortunately I don't know how to trouble shoot this one further so I'm at the mercy of anyone who might be able to resolve the |
Hi! I'm afraid that I'm fighting against the same problem. Initial DMA write worked, then the image is borked. I want to run LVGL and everything works with
PS. I know that Init (LVGL v9):
@Bodmer Maybe you have an idea if I missed something? |
Hey, |
Just to chime in, have exactly the same issue - it seemed to happen around the time a bunch of things updated. I think something has changed in the underlying Arduino/ESP code. |
Updated ESP32 board library to 3.0.5 hoping a fix but sadly still the same |
Only raise issues for problems with the library and/or provided examples. Post questions, comments and useful tips etc in the "Discussions" section.
To minimise effort to resolve issues the following should be provided as a minimum:
I am using an esp32-s3 with platformio. I have had DMA writing working before but now it just stops writing after the first frame. I have tested all of the demos for DMA as well as the previous code of mine that used DMA, all stop writing after the first frame.
version=2.5.43
lcd screen
Plus further information as appropriate to the problem:
hwspi._spi->begin(4, -1, 5, 15);
I see its using
void TFT_eSPI::pushImageDMA(int32_t x, int32_t y, int32_t w, int32_t h, uint16_t* image, uint16_t* buffer)
from the "processors/TFT_eSPI_ESP32_S3.c file. Ive added some Serial.print's in there but it doesnt get caught up.
Im not sure how to debug this one, or why it stop writing after the first frame. Please let me know what additional information I need to provide or how I can look into this more myself
The text was updated successfully, but these errors were encountered: