esp32 spi 64kBytes transaction and dma question

brebisson
Posts: 13
Joined: Fri Dec 22, 2023 9:44 am

esp32 spi 64kBytes transaction and dma question

Postby brebisson » Wed Oct 30, 2024 3:06 pm

Hello,

I am using a TTGO board with a LCD, no PSRAM, and I want to use the SPI to send a full LCD frame (64KBytes) to the LCD.

I am using the spi API described here:
https://docs.espressif.com/projects/esp ... on-example

The data is 64KB frame buffer which is a global variable (in DRAM I assume as there is nothing else on this chip).

Can I create a single transaction to send these 64KB at once?
Will it use the DMA to send the data (the spi_bus_initialize call did specify SPI_DMA_CH_AUTO).

Thanks,
Cyrille

ESP_Sprite
Posts: 9757
Joined: Thu Nov 26, 2015 4:08 am

Re: esp32 spi 64kBytes transaction and dma question

Postby ESP_Sprite » Thu Oct 31, 2024 12:02 am

Yes you can and yes it will. Just make sure to set max_transfer_sz in your spi bus config accordingly.

brebisson
Posts: 13
Joined: Fri Dec 22, 2023 9:44 am

Re: esp32 spi 64kBytes transaction and dma question

Postby brebisson » Thu Oct 31, 2024 12:59 pm

hello,

What does the max_transfer_sz parameter do exactly?

does it mean that the driver will allocate a buffer of that size? or will it use my buffer?

Cyrille

ESP_Sprite
Posts: 9757
Joined: Thu Nov 26, 2015 4:08 am

Re: esp32 spi 64kBytes transaction and dma question

Postby ESP_Sprite » Fri Nov 01, 2024 12:28 am

brebisson wrote:
Thu Oct 31, 2024 12:59 pm
What does the max_transfer_sz parameter do exactly?

does it mean that the driver will allocate a buffer of that size? or will it use my buffer?
It will make sure enough DMA descriptors are allocated so your buffer can be DMA'ed out successfully.

Who is online

Users browsing this forum: No registered users and 205 guests