cancel
Showing results for 
Search instead for 
Did you mean: 

Screen dithering problem.

ABURM
Associate III

Hi guys.

I am using STM32H7B3LIHQ MCU, MX25LM51245GXDI00 flash and IS42S32800J-6BLI RAM with NHD-4.3-800480CF-ASXP-CTP TFT screen. I configured the LTDC, FMC, OCTOSPI, TouchGFX and FREERTOS settings. I have a 2 problem.

1- I added textArea in the screen for trying. I am increasing the "counter" register and displaying its value in the textArea at 100 mS intervals. But counter register does not inreasing the 100mS intervals, it increasing in 1000mS intervals. FREERTOS TICK_RATE_Hz = 1000 and this is code;

void screenView::handleTickEvent()
{
    static int tickCount = 0;
    if (tickCount++ >= 100)
    {
    	Unicode::snprintf(textArea1Buffer, TEXTAREA1_SIZE, "%u",counter);
    	textArea1.invalidate();
        tickCount = 0;
    }
    if (counter >= 17000) counter = 0;
    else counter++;
}

2- I added an image with a resolution of 800x480 to the screen. The textarea is on this image. Every time I refresh the screen (textArea1:invalidate()), the screen dithering. But sometimes (1 time in 10 refreshes etc.) it doesn't dithering.

I can share cubemx settings, codes or schematics. What is the problem?

1 ACCEPTED SOLUTION

Accepted Solutions
ABURM
Associate III

Hi guys.

I solved the problem. FMC clock configuration and parameters were wrong. Screen dithering fixed. Video and another components (textarea etc.) is working perfectly.

handleTickEvent() It still doesn't work as it should. But it's not a big deal. But it is interesting that the St employes do not care about this post.

View solution in original post

5 REPLIES 5
ABURM
Associate III

Guys, this is the Cubemx LTDC settings;


LTDC.pnglayer.png

 

 

 

 

 

and this is the TFT screen timing diagram and input timing requirements;
timing.pngTFT.png

LTDC frequency is 29.2MHz.
LTDC freq.png

 

 

 

 

There is an interesting situation here. I change the signal polarities in cubemx and look at the signals with an oscilloscope. Changing the HSYNC and VSYNC signal polarities has no effect on the display. Horizantal syncronization polarity high or low and vertical syncronization polarity high or low it is not important. I added a 216x216 video to an 800x480 image. The video plays normally. But dithering problem is continue. Do you have any idea for this problem?

ABURM
Associate III

Hi guys.

I solved the problem. FMC clock configuration and parameters were wrong. Screen dithering fixed. Video and another components (textarea etc.) is working perfectly.

handleTickEvent() It still doesn't work as it should. But it's not a big deal. But it is interesting that the St employes do not care about this post.

LouisB
ST Employee

Hello @ABURM ,

For the handle tick event, could you try :

 

void screenView::handleTickEvent()
{
    static int tickCount = 0;
    if (!(tickCount % 100))
    {
    	Unicode::snprintf(textArea1Buffer, TEXTAREA1_SIZE, "%u",counter);
    	textArea1.invalidate();
        counter ++;
    	tickCount = 0;
    }
    if (counter >= 17000) counter = 0;
}

the way you put the  counter ++ its incremented every ticks.

 

BR,

Louis BOUDO
ST Software Developer | TouchGFX

Hi LouisB.

Thanks for simplifying the code.Do you have any idea about handleTickEvent() not being 1mS? This time increases for every component I add to the touchgfx project. For example, when I add the 216x216 example video, it becomes approximately 2mS.

Hello @ABURM ,

You may have a slower rendering due to the video processing which will increase the render time.

 

Br,

Louis BOUDO
ST Software Developer | TouchGFX