2025-05-05 12:07 AM
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?
Solved! Go to Solution.
2025-05-07 3:50 AM
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.
2025-05-05 6:28 AM
Guys, this is the Cubemx LTDC settings;
and this is the TFT screen timing diagram and input timing requirements;
LTDC frequency is 29.2MHz.
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?
2025-05-07 3:50 AM
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.
2025-05-07 4:01 AM
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,
2025-05-07 4:07 AM
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.
2025-05-13 4:17 AM
Hello @ABURM ,
You may have a slower rendering due to the video processing which will increase the render time.
Br,