Jump to content

STM32F4 LTDC flickering issue


PhilippeAD

Recommended Posts

Hello,

I am working on a STM32F429 Discovery but I have remove the original display  and I have connected a NewHeaven 800x480 display fitted with a HX8264-D02. I use the LTDC interface to drive the screen with 18 bits for the colors and controls signals. The external SDRAM is used for the display memory. The IDE is OpenSTM32.

I have also a flicker problem. I have a test like this: when you touch the screen the software draw a box where you have touch the screen:

  while (1)
  {
  /* USER CODE END WHILE */

  /* USER CODE BEGIN 3 */
        gfxSleepMilliseconds(10);

        if (ginputGetMouseStatus(0, &ev))
        {
            if (!(ev.buttons & GMETA_MOUSE_CLICK))
                continue;

            if(DRAW_AREA(ev.x, ev.y))
            {

                        //gdispFillCircle(ev.x, ev.y, PEN_SIZE, BlueBlue);
                        gdispDrawBox(ev.x-10, ev.y-10, 20, 20, BlueBlue);
            }
        }

  }

What is the best solution to avoid this inesthetic problem. What is not correct in my setting.

I have enough memory but is is possible to work with the two windows of LTDC? I don't see how to do it.

For my target application is not possible to work with pixel map I think.

Thank you very much for your answer.

Best regards

20160611164826[1].MTS

Edited by Joel Bodenmann
Using code box
Link to comment
Share on other sites

Sorry it has taken me a while to reply. I had trouble viewing the video on my phone.

There are a couple of posdible causes for this type of flicker...

1. There is a hardware contention between the touch and the display. Easy test: turn off the drawing when you get a click event. If you still get the flicker when you touch then it is likely there is a pin connected to both devices or being driven by both devices.

2. The stm32f4 will be struggling running at that size display based on our previous tests. Look carefully at the fmsc parameters for the ram access to the sdram and tune them as much as possible to give you the best possible bandwidth. If you are bandwidth deprived you will definitely see results like you are seeing as the ltdc cannot supply the data fast enough to the panel leading to the image shifting you are seeing.

3. Check for anything that has higher priority than the ltdc controller. Check interrupts and other devices (particularly those to do with the io for the touch). Anything that takes too long at a higher  priority that the ltdc can cause the issues you are seeing.

 

I hope that helps.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...