DMA on ESP32-S3 is working #2233
Replies: 9 comments 23 replies
-
Thanks for taking the time to post this. I will see if I can incorporate. |
Beta Was this translation helpful? Give feedback.
-
No problem. I would assume step 4 has to do with SPI_DMA_RX/TX_ENA and that my resetting the whole register just happened to also clear these bits. The reason I think this is the case is the following from the ref. manual: When I had my logic analyzer connected I could see that all transactions were in fact taking place as expected - but there was no data (MISO line was kept low), which would be explained by the aforementioned statement. Let me know if you need/want help with testing, since I have everything hooked up (for the next week or so). |
Beta Was this translation helpful? Give feedback.
-
Please write where to enter these changes |
Beta Was this translation helpful? Give feedback.
-
I have updated the latest Github master (2.5.2) to add DMA for the ESP32 S3 (@stg thanks for the pointers). This has been tested with the examples provided. Note that this is for SPI displays only and DMA is NOT supported for the ESP32 S3 with parallel interface displays. |
Beta Was this translation helpful? Give feedback.
-
DMA using HSPI and setting MISO to the same pin as TFT_CS works just fine. But it seems that dma with FSPI / SPI2 doesn't work. Are there other settings required for FSPI to work? |
Beta Was this translation helpful? Give feedback.
-
If you are using a round display from WaveShare, here is a quick solution (Add a new .h file in User_Setups and fill these codes and include this file in User_Setup_Select.h). #define USER_SETUP_ID 305 #ifdef ILI9341_DRIVER #define GC9A01_DRIVER #define TFT_WIDTH 240 #define TFT_MOSI 11 #define LOAD_GLCD #define SMOOTH_FONT #define SPI_FREQUENCY 80000000 // related to DMA (direct memory allocation) |
Beta Was this translation helpful? Give feedback.
-
I am having the same issue on S3 as the previous recent reports, even with HSPI and MISO defined. The first DMA update works, but successive updates do nothing, although all seems to be executing. This exact DMA code works fine on ESP32E. If I switch to non-DMA pushSprite() everything works fine as well. This sounds the same as the previous reports that also suggest first display works, but all further updates fail: "But only image can be shown, animation is not working". "when running the DMA cube example source, a single initial yellow rect is shown on the display and it is frozen --it never moves" |
Beta Was this translation helpful? Give feedback.
-
After the first DMA transfer, even this does not recover the SPI communication: tft.deInitDMA(); (in fact, CS, DC and SCLK works as it should, but not MOSI. Stays at low level) - My board is ESP32-S3-Zero |
Beta Was this translation helpful? Give feedback.
-
I'm having similar issues. Using #define TFT_CS 10 // Chip Select control pin
#define TFT_RST 9 // Reset pin
#define TFT_DC 14 // Data/Command control pin (LCD_RS)
#define TFT_MOSI 11 // Master Out Slave In (SPI data line / SDI)
#define TFT_SCLK 12 // Clock pin for SPI
#define TFT_MISO 13 // Master In Slave Out (optional)
...
#define USE_HSPI_PORT One transfer goes through, and then the whole thing immediately dies. |
Beta Was this translation helpful? Give feedback.
-
Not so much an issue as a potential solution.
I got DMA on ESP32-S3 working just fine, with some minor adjustments.
Since I am only using this library as a reference for writing a low-level implementation, I do not have a proper fix to share - but figured it might be worth something to you to know what I did to get it working.
I am doing step 4 in TFT_WRITE_BITS, which isn't a clean solution at all but works just fine, with HSPI at least.
Beta Was this translation helpful? Give feedback.
All reactions