I have to admit that I do not synchronize the display-list refresh to the framerate but I know a few things about EVE.
1. We have a display list/ command list where i can write to.
2. We can swap the display to show the content of the display list/command list
3. We have framerate of the display itself e.g 50 Hz
Almost correct.
The display list is what is used for the display itself, the command list is processed by the coprocessor-engine to generate the entries in the display-list.
And then there are a couple of coprocessor-engine commands that have nothing to do with display lists like CMD_FLASHFAST.
I read the chapter "Synchronization between MCU & Coprocessor Engine" but i must admit i did not understand it fully
That is about the coprocessor engine, this has nothing to do with the framerate.
The coprocessor engine can be used to fill the display-list and itself is fed with commands thru the command-fifo at RAM_CMD.
How are these values "related, connected" ?
Will a swap start a new frame on the display ?
Are they not connected ?
Is the content shown/starts a new frame when the displaylist buffer is empty ?
No, a SWAP wil not immediately start a new frame, it happens after the current frame is done.
The "displaylist buffer" is never empty. The display-list has two memory banks that are swapped.
One is used to generate the frames and the other one can be written to.
So rule of thumb, just do the refresh slower than the framerate.
I generally aim for 60Hz when configuring the display clock.
And I refresh the display list with 50Hz using the coprocessor engine.
This way I do not need any synchronization, the display list is always available to be written to.
I saw that there is an interrupt for INT_CMDEMPTY or
That again is for the coprocessor engine, that signalises that the 4k command-fifo is empty.
There is not much this is actually usefull for, very few commands take long enough that I would
consider using this interrupt to be beneficial.
For example cmd_loadimage() takes a couple of ms when decoding .png files - but then this is something that is not done during display-list building anyways but rather at startup.
swap INT_SWAP => is this the swap i do via display list ?
This is the interrupt that the swap happened, yes.
Using this a synchronization to the panel framerate could be achieved if that is deemed necessary
for whatever reason.
Also CMD_SWAP is writing DLSWAP_FRAME to REG_DLSWAP and the swap is done when the first two bits read back as zeroes.
"These bits can be also be read by the host to check the availability of the display list buffer. If the
value is read as zero, the display list buffer is safe and ready to write. Otherwise, the host needs to
wait till it becomes zero."
But again, unless there is a good reason to synchronize the refresh with the panel framerate (and I never had one),
it is perfectly fine to just keep the refresh below the framerate.
https://github.com/RudolphRiedel/FT800-FT813