2024-05-22 06:15 AM - last edited on 2024-05-22 06:38 AM by SofLit
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.
Solved! Go to Solution.
2024-06-14 06:18 AM
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.
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
2024-05-22 06:25 AM - edited 2024-05-22 06:37 AM
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.
2024-05-22 06:38 AM
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
2024-05-22 06:54 AM
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?
2024-05-22 07:05 AM
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.
2024-05-22 11:01 PM
Cannot find it in the description, does the application with TouchGFX (without FD CAN) work without problems on the target board?
2024-05-23 04:30 AM
Yes. The bored works fine with just touchgfx and some low level programming.
2024-06-14 06:18 AM
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.
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