cancel
Showing results for 
Search instead for 
Did you mean: 

Touchgfx with FDCAN communication failing to display

DylanWalt
Associate II

I’m using the STM32H750B-DK board to explore FD CAN integration with TouchGFX and have encountered an unusual error. When debugging, the screen begins to tear and fails to display any of the TouchGFX visuals. However, when I compile and run the program, it encounters no errors but again fails to display anything, although it doesn’t exhibit screen tearing. When the program is run in simulation mode, it displays and acts as expected with all the TouchGFX visuals working correctly.

What could be the source of this issue, and are there any potential workarounds?

Included below are the main.c and screenshot of the ioc.

DylanWalt_0-1716383704548.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @DylanWalt ,

Personally, I have no experience using FDCAN, but what I can suggest is to start slowly and progress little by little. First, ensure you can run your application with only the FDCAN setup, without any communications. Then, try to send or receive specific data, so you can check the communication and verify if the data is transmitted correctly or not. 

If you are unsure how to transfer data between you GUI application and hardware, there are Board Specific Demos available in the TouchGFX Designer which you can study to learn the process. I suggest you take a look at STM32H735G-DK example.

STM32H735G-DK Board Specific DemoSTM32H735G-DK Board Specific Demo

In addition, there is documentation that describes the process of handing external event. You can access it from here .

I hope this helps you, don't hesitate to ask more questions

Mohammad MORADI
ST Software Developer | TouchGFX

View solution in original post

7 REPLIES 7
SofLit
ST Employee

Hello,

Simulation and running on target differ in the low level application where the peripherals are used in a real platform while in the simulation only graphics aspects are running under #ifdef SIMULATOR

So you can suspect something blocking in your application at FDCAN level or whatever else.

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.
Peter BENSCH
ST Employee

In addition to what @SofLit said, you have to bear in mind that with the STM32H750 you are dealing with a single core CPU that is supposed to do everything at the same time: Handling of TFT, FDCAN, other interfaces, data transfers from and to external memory, etc. If you don't meticulously calculate when you do what in the programme, you will always have problems like this.

You can't see much from your main.c because only you know what you have programmed in the TouchGFX structure. Always keep in mind that the TFT is refreshed at 60Hz and you can only do something in the pauses in between, i.e. less than 16ms. As soon as something takes longer than say 5...10ms, you have to think about splitting this activity into smaller chunks.

Regards
/Peter

In order 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.

Is there an example or a reference that I can use to achieve the goal of integrating FD CAN and TouchGFX? Or did I miss the answer in your previous response?

Unfortunately, there is no FDCAN/TouchGFX example offered by ST as it's a specific use case. 

You need to debug that step by step and as said by @Peter BENSCH mainly debug the timings and performance. I suppose you're using FreeRTOS, so check the CPU load ..

Check if you already enabled the cache. 

 

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.
EmbDev
Senior

Cannot find it in the description, does the application with TouchGFX (without FD CAN) work without problems on the target board?

Yes.  The bored works fine with just touchgfx and some low level programming.

Hello @DylanWalt ,

Personally, I have no experience using FDCAN, but what I can suggest is to start slowly and progress little by little. First, ensure you can run your application with only the FDCAN setup, without any communications. Then, try to send or receive specific data, so you can check the communication and verify if the data is transmitted correctly or not. 

If you are unsure how to transfer data between you GUI application and hardware, there are Board Specific Demos available in the TouchGFX Designer which you can study to learn the process. I suggest you take a look at STM32H735G-DK example.

STM32H735G-DK Board Specific DemoSTM32H735G-DK Board Specific Demo

In addition, there is documentation that describes the process of handing external event. You can access it from here .

I hope this helps you, don't hesitate to ask more questions

Mohammad MORADI
ST Software Developer | TouchGFX