cancel
Showing results for 
Search instead for 
Did you mean: 

Problem while sending a LIN frame from touchGFX

Oussama_Baklouti
Associate II

I tried to send a LIN frame by creating a task .
The code didn't conatin any error but the frame wasn't sent 
What could be the problem ? 
This is my project 

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @Oussama_Baklouti,

As @SofLit mentioned, there are no custom code for the sendData() function that you have defined for your button. Please refer to the following documentations to learn about communication of TouchGFX with backend.

Backend Communication 

MVP Design Pattern 

Screen Definition 

You can also take a look at the Board Specific Demos available in the TouchGFX Designer, like STM32F746G-Disco Intertask Communication Demo

STM32F476G-Disco Board Specific DemoSTM32F476G-Disco Board Specific Demo

I hope this helps you! 

Mohammad MORADI
ST Software Developer | TouchGFX

View solution in original post

5 REPLIES 5
SofLit
ST Employee

Hello,

This is not TouchGFX subject and I'm wondering why you start with a complex example to debug LIN while you can start with a very simple one?

Start with a simple LIN project and debug it before going forward with TouchGFX and FreeRTOS.

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
Oussama_Baklouti
Associate II

I tried a simple LIN project "sending a LIN frame" using an ST board and it worked fine but when i used touchGFX the frame wasn't sent 

 


@Oussama_Baklouti wrote:

I tried a simple LIN project "sending a LIN frame" using an ST board and it worked fine but when i used touchGFX the frame wasn't sent 

 


This statement is important to locate the issue and normally it should said from the beginning

So you have an issue in your GUI programming. I let my TouchGFX colleagues help you.

It's related to this thread: https://community.st.com/t5/stm32-mcus-products/endless-loop-when-running-scb-enabledcache/td-p/710257

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

Hello,

Just opened your project and see that you are not using TouchGFX to send LIN data (nothing in Model.cpp nor in Screen1View.cpp)!

Could you please confirm that the issue is in SendData_Task() where you are sending LIN data?

 

void SendData_Task(void *argument)
{
  /* USER CODE BEGIN SendData_Task */
  /* Infinite loop */
  for(;;)

  {
	  uint8_t txBuffer[100];
      for (int i = 0; i < sizeof(txBuffer); i++)
      {
          txBuffer[i] = i;  // Example data
     }

      /* Send buffer via UART */
      HAL_UART_Transmit(&huart3, txBuffer, sizeof(txBuffer), HAL_MAX_DELAY);
    osDelay(1000);
  }
  /* USER CODE END SendData_Task */
}

 

In that case, most probably not related to TouchGFX topic. 

From my side I'm reaching HAL_UART_Transmit(&huart3, txBuffer, sizeof(txBuffer), HAL_MAX_DELAY); in debug with issues.

Didn't test data on PB10 (USART3_TX).

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

Hello @Oussama_Baklouti,

As @SofLit mentioned, there are no custom code for the sendData() function that you have defined for your button. Please refer to the following documentations to learn about communication of TouchGFX with backend.

Backend Communication 

MVP Design Pattern 

Screen Definition 

You can also take a look at the Board Specific Demos available in the TouchGFX Designer, like STM32F746G-Disco Intertask Communication Demo

STM32F476G-Disco Board Specific DemoSTM32F476G-Disco Board Specific Demo

I hope this helps you! 

Mohammad MORADI
ST Software Developer | TouchGFX