lv_timer_handler is called in the main loop…
I can try create another tick timer and call it from there, and lower the vsync interrupt priority.
Will test over the weekend and see if that works
So I did the following:
In my vsync IRQ I set a vsyncReady bool to true.
In my main loop under one of my interval times (where lv_timer_handler
is called) I added the following:
if(vsyncReady){
_lv_disp_refr_timer(NULL);
vsyncReady = false;
}
This worked and got the display and LVGL renders to appear.
Problem is… It made the tearing more noticeable.
Perhaps I should set the vsync to trigger earlier and not on the last line?
Are you sure you trigger on the right edge of the TE signal?
I trigger when it rises
attachInterrupt(digitalPinToInterrupt(TE), vsync_irq, RISING);
I can try change it HIGH, but it would be almost the same.
I also tied to play around with the scanline trigger point (eg trigger at 460px, 480px, 0px etc…) but just got worse.
Should I be using a single frame buffer with TE or is the two half screen sized buffers okay as well?