Currently I am able to stream video on tft 320x240 (on wrover) however I get tearing effect.
It is spi display witl ili9341 controller.
My question is - how to display smooth refresh rate at 30/60fps and wait for vsync
What do I select in command registers?
Is it done at initialization or I call special instruction to wait for refresh?
If you're using the SPI interface, there doesn't appear to be a way to detect/control VSYNC (according to the datasheet), but you can use command 0x45 to ask it the current scanline being drawn. If you synchronize to this information, you can avoid changing lines that are currently being refreshed. You can also change the refresh rate of the display to better hide/match your updates.
Thanks a lot! I will try to check status of drawn lines.
I also noticed there are modes of operation and one of them defines vsync display operation.
I must be calculating commands wrong from datasheet. Maybe you could help with that.
Thanks again.
The display refresh is happening continuously. If you happen to modify pixels that are on the line currently being refreshed, you will see "tearing" (some parts of the line have old data and some have new). I believe you will be able to avoid this by asking the controller what scan line is currently being refreshed and "stay away" from that part of the display with your changes.