cancel
Showing results for 
Search instead for 
Did you mean: 

Help to fix a TouchGFX custom board project

Gabriel T
Senior

MCU : STM32H743ZI

STM32CubeIDE 1.10.1

TouchGFX 4.18.1

I created a stm32h743 project with cubeMX and created a simple red screen as in this video https://www.youtube.com/watch?v=SRQD8JMeg_k&t=3034s

I added the fix in this topic https://community.st.com/s/question/0D53W00000j6zuDSAQ/exact-steps-to-configure-touchgfx

I also added in stm32h7xx_it.c :

extern LTDC_HandleTypeDef hltdc;
void LTDC_IRQHandler(void)
{
  HAL_LTDC_IRQHandler(&hltdc);
}

But my project isn't working, what can I do to debug it ? Should I add MPU code ?

7 REPLIES 7
Gabriel T
Senior

I have doubts about something :

In the IOC in TouchGFX, I chose

Framebuffer Strategy : Single Buffer

Buffer Location : By Allocation

BUT in LTDC/layer settings :

Layer 0 - Color Frame Buffer Start Address = 0

Layer 0 - Color Line length = 320

Layer 0 - Color Number of lines = 240

For now I put 0 in address because it is supposed to be allocated right ?

Hi,

First please change:

  1. Buffer Location : By Adddress
  2. Start address: address in memory ex. 0xC0000000
  3. Layer 0 - Color Frame Buffer Start Address = ex. 0xC0000000

Hi, thanks for the help,

I chose 0x2403E800 as it is the half of D1RAM (I use the other half for my code)

I changed

Buffer Location = By Address

Address = 0x2403E800

Layer 0 - Color Frame Buffer Start Address = 0x2403E800

I now get LTDC Line interrupts but my screen is still dark (it is supposed to display a red screen)

Hi,

Please share Your project. What type a display do You have? Do You have write correctly parameters for display?

Best Regards,

Slawek

I also added a MPU region

address = 0x2403E800

size = 256kB

my display is a RK035HQ01

https://www.digimax.it/media_import/DISPLAY/ROCKTECH/TFT%20LCD/RK035HQ01-T/RK035HQ01-T_DS_001.pdf

I think I filled the specs correctly

If you want to check I attached my project to the post

What I set

 hltdc.Init.HorizontalSync = 3;

 hltdc.Init.VerticalSync = 3;

 hltdc.Init.AccumulatedHBP = 46;

 hltdc.Init.AccumulatedVBP = 15;

 hltdc.Init.AccumulatedActiveW = 366;

 hltdc.Init.AccumulatedActiveH = 255;

 hltdc.Init.TotalWidth = 374;

 hltdc.Init.TotalHeigh = 263;

Hi,

Please send the project in the STM32CUBEIDE.

MM..1
Chief II

As i reply in dup your linker script is bad if framebuffer by your address

fx_ui\STM32H743ZITX_FLASH.ld

/* Entry Point */
ENTRY(Reset_Handler)
 
/* Highest address of the user mode stack */
_estack = ORIGIN(RAM_D1) + LENGTH(RAM_D1);    /* end of RAM */
/* Generate a link error if heap and stack don't fit into RAM */
_Min_Heap_Size = 0x1000 ;      /* required amount of heap  */
_Min_Stack_Size = 0x1000 ; /* required amount of stack */
 
/* Specify the memory areas */
MEMORY
{
  FLASH (rx)     : ORIGIN = 0x08000000, LENGTH = 2048K
  DTCMRAM (xrw)  : ORIGIN = 0x20000000, LENGTH = 128K
  RAM_D1 (xrw)   : ORIGIN = 0x24000000, LENGTH = 512K
  RAM_D2 (xrw)   : ORIGIN = 0x30000000, LENGTH = 288K
  RAM_D3 (xrw)   : ORIGIN = 0x38000000, LENGTH = 64K
  ITCMRAM (xrw)  : ORIGIN = 0x00000000, LENGTH = 64K
}
 

For custom LCD starting steps are :

  1. Open IDE workspace and start new project
  2. Select your MCU and config it in opened MX wizard without TouchGFX
  3. Config CLOCK and LTDC precise
  4. Generate and build code
  5. In LTDC layer config set background color and test LCD ...
  6. After all work add TouchGFX to project.