Skip to main content
Gabriel T
Senior
July 14, 2022
Question

Help to fix a TouchGFX custom board project

  • July 14, 2022
  • 7 replies
  • 3512 views

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 ?

This topic has been closed for replies.

7 replies

Gabriel T
Gabriel TAuthor
Senior
July 14, 2022

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 ?

SKacp.1
Associate
July 15, 2022

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
MM..1
Super User
July 16, 2022

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.