TFT full frame buffer possible? SPI DMA?

Hello!

I would like to make an analog gauge using a round TFT display. I've got something that works, but since I am drawing so many lines at weird angles I'm not efficiently using SPI transfers to get data on the screen. Even using selective blanking to prevent full screen writes will leave the display flickering, I've still got to make 2 commands per pixel, before even sending the pixel.

To fix this I would like to try and implement a full single frame buffer for a 240x240 SPI TFT display. I would like to use a ATSAME51J20 with 256KB of SRAM, so I think I have the overhead to do so if my math is right. (240x240 pixels, 16bpp, 115200 bytes of RAM!)

I think the full display update should be able to take place in under ~40ms over SPI at 24MHz, so if the changes I'd like to make in the display are fast enough I think a reasonable refresh rate is possible, maybe 20Hz? I know 24MHz SPI is iffy, but it seems to be working alright for me at the moment.

I think I should be able to do this with SPI DMA, but I am unsure how to go about setting it up, mainly linking DMA transfers. Before I go and try and make something work I figured I would ask here.

Basically, I'll init the display without DMA and config the display to automatically wrap at the extents of the displayable screen (LCD controller is 320x240 capable.) From there I will use callbacks to manipulate the pin IO, and a "writing" flag so I am not changing RAM while it's being shifted into the screen. I don't think I can double buffer, much as I'd like to!

TL:DR, can DMA be used to shift 115,200 bytes of ram?

Thank you!!