Skip to main content
ali_dehbidi
Associate III
March 18, 2021
Question

Why MX_TouchGFX_Process crashes!

  • March 18, 2021
  • 14 replies
  • 3489 views

Hi,

I'm using keil MDK V5.34 and touchGFX V 4.16.1 , I made a minimal project with these settings using LTDC, and a simple default project, But the problem is that when the MX_TouchGFX_Process is called, the MCU crashes! what's going on wrong?

any Ideas

[url=https://ibb.co/MV62hsP][img]https://i.ibb.co/swHmP2s/LCD1.png[/img][/url]

[url=https://ibb.co/Vgxpn4x][img]https://i.ibb.co/Lxrhj7r/LCD2.png[/img][/url]

[url=https://ibb.co/0cMt5rk][img]https://i.ibb.co/KXqwnWY/LCD3.png[/img][/url]

[url=https://ibb.co/VVrYCBb][img]https://i.ibb.co/6YV0tsG/LCD4.png[/img][/url]

[url=https://ibb.co/ypQnF3j][img]https://i.ibb.co/cwrchmn/LCD5.png[/img][/url]

[url=https://ibb.co/82GP2Qs][img]https://i.ibb.co/DkmwkjW/LCD6.png[/img][/url]

and here is the default code,

[code]

int main(void)

{

 /* USER CODE BEGIN 1 */

 /* USER CODE END 1 */

 /* MCU Configuration--------------------------------------------------------*/

 /* Reset of all peripherals, Initializes the Flash interface and the Systick. */

 HAL_Init();

 /* USER CODE BEGIN Init */

 /* USER CODE END Init */

 /* Configure the system clock */

 SystemClock_Config();

/* Configure the peripherals common clocks */

 PeriphCommonClock_Config();

 /* USER CODE BEGIN SysInit */

 /* USER CODE END SysInit */

 /* Initialize all configured peripherals */

 MX_GPIO_Init();

 MX_ADC1_Init();

 MX_I2C1_Init();

 MX_I2S1_Init();

 MX_LTDC_Init();

 MX_SPI4_Init();

 MX_TIM14_Init();

 MX_UART8_Init();

 MX_USART2_UART_Init();

 MX_USB_OTG_FS_PCD_Init();

 MX_USB_OTG_HS_HCD_Init();

 MX_DMA2D_Init();

 MX_CRC_Init();

 MX_TouchGFX_Init();

 /* USER CODE BEGIN 2 */

 /* USER CODE END 2 */

 /* Infinite loop */

 /* USER CODE BEGIN WHILE */

 while (1)

 {

  /* USER CODE END WHILE */

 MX_TouchGFX_Process();

  /* USER CODE BEGIN 3 */

 }

 /* USER CODE END 3 */

}

[/code]

What's going on wrong!

This topic has been closed for replies.

14 replies

franck23
Associate III
March 21, 2021

The position 0.0 on your touch screen depends on how your touchscreen is attached to your LCD.

Maybe another supplier of LCD will attach the touchscreen in another direction and the position 0 would become 320.

Touch Gfx doesn't know which way the touchscreen is attached, so it is the programmer's job (you) to adjust the coordonates. And this is what you have done.

For the screen transition, I have noticed the same problem, but I never had the time to check why it is happening.

Maybe someone else on the forum can help?

ali_dehbidi
Associate III
March 21, 2021

Franck23, thanks for the update, I have another problem too, when I use any dynamic text, the project crashes! I have used the digital clock widget, when I update the time, it would just crash! any Idea what's wrong?

franck23
Associate III
March 22, 2021

I don't know what it can be.

What do you mean by crash?

Do you have the same problem if you update a text area?

ali_dehbidi
Associate III
March 22, 2021

I did some problems, I have increased the stack and heap size to 0x1000, now it can be updated.