I have a Teensy MicroMod connected to an ILI9488 (16bit color depth) over an 8 bit parallel bus.
I use DMA to transfer most of the data to the display using two half screen sized frame buffers.
When doing full screen scrolling or page transitions there is sometimes noticeable tearing affect.
The display has a tearing effect pin connected to a GPIO and I would like to try use it to reduce tearing but need help in understanding how to do this.
At the moment this is how I write data to the display:
@kisvegabor thanks!
Is there a basic code example for #1? If I have to use a while loop there it would not be optimal as I have a few other tasks that are running in parallel (canbus, ADC, PWM and SD)
@kisvegabor makes sense now
So I disable the display refresh timer after lv_init() and then in my vsync IRQ I would just call _lv_disp_refr_timer(NULL); ?
I assume I will also need to call the refr_timer above just once after setup to trigger the first screen write?
Do I keep lv_disp_flush_ready(&disp_drv) in my DMA IRQ as seen in the code example?
So I decoupled the display refresh timer and called it when TE is triggered, but all I get is a blank screen
I did call it once manually after startup code and creating the first screen - but that drew the first screen and stopped right after that.
Also, I did notice that TE triggers roughly 10ms after the DMA callback, so I think there is reason to try get this to work
I have a printf in my DMA interrupt and the TE interrupt - not seeing them being triggered again after disabling the timer.
Or do you want me to add the printf into _lv_disp_refr_timer?
Also, do I need to force full screen updates to use the TE pin?
AFAIK, TE signal is working even if there are no changes on the screen. It’s just show when the display controller copies the data from its RAM to the display.
So if you just show a label on the screen, you should see the TE signal continuously coming with 60-100Hz (or so)
I added a user log to _lv_disp_refr_timer and it gets called once, after the first half of the screen is updated (as I have two half screen sized buffers) and then stops there. Seems like the whole device is waiting for something as it’s not running…
I’ve tried it out on PC and it worked well. I did this:
/*Delete the original display refresh timer*/
lv_disp_t * disp = lv_disp_get_default();
lv_timer_del(disp->refr_timer);
disp->refr_timer = NULL;
while(1) {
/* Periodically call the lv_task handler.
* It could be done in a timer interrupt or an OS task too.*/
lv_timer_handler();
usleep(5 * 1000);
/*Call this anywhere you want to refresh the dirty areas*/
_lv_disp_refr_timer(NULL);
}
Does it work for you? No TE signal here, just the decoupling of the display refresh timer.