Skip to main content
KMew
Senior III
March 30, 2023
Solved

LCD-TFT Display: Getting Black Screen (w/ Initial Screen Flicker) - Internal RAM

  • March 30, 2023
  • 2 replies
  • 10377 views

Hello,

I am trying to use an LCD display on my custom board. I am utilizing the Rocktech RK043FN66HS-CTG display with the STM32H7B3IIT6 MCU. When I first initialize the firmware (in debugging mode), the screen flickers once or twice (showing signs of life), but then immediately goes to a black screen and stays like that.

High Level Configuration Details:

  • Utilizing LTDC interface with DMA2D acceleration
  • Internal RAM (I have the footprint for External RAM, but I wanted to try and get it to work with the Internal RAM. I have sufficient RAM space internally)
  • 480 x 272 RGB565 display (hardware can handle up to RGB888, but to reduce RAM size, I am only using RGB565).
  • Using FreeRTOS to do the TouchGFX task

I used this video as a general guide to make sure I got the right idea, but there are differences. However, he has the same issue during debugging that I am seeing. The screen flickers then goes black.

https://www.youtube.com/watch?v=SRQD8JMeg_k

In that video, he notes that it was due to improper initialization of the RAM that caused that issue, so I am looking there to see if something is wrong.

I am doing a single buffer strategy and the buffer location is By Address, starting at 0x24040000 (AXI SRAM2), which can handle 393.216kByte according to the reference manual.

0693W00000bhEUOQA2.png 

I enabled the MPU region for that region base (SRAM 1, 2 & 3) in the CORTEX_M7.

0693W00000bhEUiQAM.png 

Using the TouchGFX 4.20.0 software package in the CubeMX, I configured it as follows:

0693W00000bhEUxQAM.png 

LTDC Configuration:

0693W00000bhEV7QAM.png0693W00000bhEVCQA2.png 

I am using the enable signal on the display (Pin 31) and the LCD backlight dimming functionality, which I enable at start-up with a base functionality:

HAL_GPIO_WritePin(LCD_EN_GPIO_Port, LCD_EN_Pin, GPIO_PIN_SET);
 uhLCD_PWM = LCD_PULSE_STARTUP;
 TIM12->CCR1 = LCD_PULSE_STARTUP;

(TIM12-CH1 = PB14)

(LCD_Enable is set to PE2)

I verified that the PWM signal from TIM12-CH1 is correct, as well as the voltage level from the enable.

Schematic of my display setup is below.

0693W00000bhEVgQAM.png 

With this setup, I get a screen flicker on start-up, then a black screen after that.

Does anyone know what would cause this?

This topic has been closed for replies.
Best answer by KMew

Hello MM,

An update. You were right! The DCLK signal was completely distorted and it was due to those 10nF capacitors. I took the design from the STM32H7B3I-EVAL evaluation board, but I made a mistake. In their design, they used a 10pF capacitor and I put a 10nF by accident.

Dumb mistake! :)

Thank you for helping me diagnose it MM!

2 replies

Romain DIELEMAN
ST Employee
March 31, 2023

Even before enabling TouchGFX I would try this test to be 100% sure it comes from the configuration.

/Romain

KMew
KMewAuthor
Senior III
March 31, 2023

Hello Romain,

Thank you for the suggestion. I will try this this morning and see if it works

MM..1
Chief III
March 31, 2023

On your config images you need LTDC mode RGB888 if your wires on STM is connected RGB888

Layer FB and TGFX then can use RGB565.

And LCD need first work without TouchGFX.

KMew
KMewAuthor
Senior III
March 31, 2023

Hello MM.

Thank you for the reply!

I did not know this. Thank you for letting me know!

I changed it to RGB888 and verified the LTDC pins are configured correctly. I get the same result. Screen flickers then goes black.

MM..1
Chief III
March 31, 2023

Ok on same screen Layer settings, how address you setup for layer?

You test with TouchGFX or without ?

show main code

TGFX by address cant place framebuffer into RAM, you need modify linker script ...

Try start test By Allocation