BRT Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Author Topic: How to syncronize framerate of the display with update rate of the displaylist  (Read 7263 times)

Spyy

  • Newbie
  • *
  • Posts: 20
    • View Profile

Hi,
i am not sure if i understood the 81x concept right...

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

I read the chapter "Synchronization between MCU & Coprocessor Engine" but i must admit i did not understand it fully

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 ?

I saw that there is an interrupt for INT_CMDEMPTY or
swap INT_SWAP => is this the swap i do via display list ?

I think a code example will be helpful here to understand the interrupt/syncronizing handling...

Thank you for your help

Torsten
Logged

Rudolph

  • Sr. Member
  • ****
  • Posts: 389
    • View Profile

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.

Quote
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.

Quote
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.

Quote
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.

Quote
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
Logged

Spyy

  • Newbie
  • *
  • Posts: 20
    • View Profile

Hi Rudolph,

thank you very much for this detailed answer!  :) Explains a lot....
and be sure...i am looking A LOT into your great library....I am on teensy 4.1 and i am still trying to get DMA SPI ready.... to get things faster and have more processor time...
At the moment i am not sure to use direct display list or via command list to write onto the 81x

Torsten
Logged

Rudolph

  • Sr. Member
  • ****
  • Posts: 389
    • View Profile

Well, I added Teensy 4.1 support with DMA back in early january.
It compiles fine but I have no way to test it.

So you are writing your own library, fine.

I would apreciate it though if you would try out my example on the Teensy 4.1 and report if it
is working or not:
https://github.com/RudolphRiedel/FT800-FT813/tree/5.x/example_projects/EVE_Test_Arduino_PlatformIO

And if it does not work with DMA I may need to make it work. :-)
Logged