wdalmut / rp2040-st7789

MIT License
1 stars 0 forks source link

How to avoid tearing? #3

Open hasaranga opened 4 months ago

hasaranga commented 4 months ago

Hi, I used fill screen with dma and I see tearing. Is there any solution for that? Thanks!

wdalmut commented 4 months ago

hi

do you have set the st7789_set_dma_irq_handler callback? if you call the st7789_dma_write multiple times without receiving the callback before calling it again the DMA restart sending data to the display but in the meanwhile there is a previous write.

it could be that problem?

hasaranga commented 4 months ago

No, I wait for dma to complete. Tearing is visible even for dma test example. Tearing caused by internal redraw occurs while we write data to the display ram. These Chinese manufacturers didn't exposed the TE pin of ST7789. So we can't detect the internal redraw. They also didn't exposed the miso pin. So we can't read from the display. Therefore we can't get the current scanline also. It seems tearing is unavoidable!