2018-06-18 12:22 PM
Hi,
So I have an issue with DSI tearing. Heres some background. I am using external SDRAM to hold framebuffers. I use double buffer method. Area is rather small at 180*400(*3). Back frame holds simple running number generated with for-loops and whole frame is stored inside SDRAM, back frame is copied to the front frame where LTDC layer points at. Also front frame is held in SDRAM.
I can write and copy the whole cycle successfully. Problem occurs every time something is moved inside SDRAM --> tearing. There is some sort of interrupt solution, but I have no clue how to implement that. I am not too familiar with DSI interrupts or interrupts in general. If I forcefully run HAL_DSI_Stop, do some SDRAM data transfers and then HAL_DSI_Start I no longer see tearing but since stopping whole DSI is quite violent there are some stutter. Therefore it is safe to say that BW of SDRAM is enough.
How do I implement this with interrupts. Heres code snippet and small video. Video is with Start/Stop hack.
// While True
HAL_DSI_Stop(&hdsi);
write_rpm(currentrpm, prevrpm); // Generating font with for-loops to back frame HAL_DMA2D_Start_IT(&hdma2d, addrL0Back, addrL0Front, 180,400); //DMA2D copy HAL_DMA2D_PollForTransfer(&hdma2d, 100);HAL_DSI_Start(&hdsi);//Stuff
Big thanks beforehand
--Eetu
2018-06-18 12:32 PM
I am sorry that I have never worked with the DSI, so I cannot help further but the concept is:
usually with Video systems, you can do some work in the blanking period.
the blanking period usually starts at the back porch and includes the front porch.
Generally with LCDs however, the Blanking time is very short.
so, enable the 'frame complete' interrupt, and work in that time, be sure to be out within the specified time, or you will get tearing.
2018-06-18 02:50 PM
What part are we talking about? Standard board/screen or custom?
The HAL libraries have examples for an assortment of boards, with configuration of LTDC and DSI. You might need to review these and cull them for details and use cases.
2018-06-19 02:33 AM
Screen is Ortustech's Blanview MIPI display (
https://drive.google.com/open?id=1dhV63t3RHmN_dCihiGVoG5oTsKSddYxW
), MCU is STM32F769xxx and PCB is custom. Yes, I have looked to BSP drivers and example projects (mostly STM32F769xxx Discovery double buffer w/ video mode) but can't get my head around it.