cancel
Showing results for 
Search instead for 
Did you mean: 

Application crashes on CMSIS_RTOS_V2 but works on CMSIS_RTOS_V1

ypiotrp
Senior

Hi!

I've created an application using STM32H7B0 with external flash memory connected through OCTOSPI. Everything was fine until I started to create some kind of log console for printing logs from the program out to the LCD.

The log console consists of a Box for background, 18 TextArea objects for logs and a CustomContainer(4 TextArea with Wildcards and Box for background) as header. After downloading the app to the uC the LCD displays some kind of random pixels and it stops there. When I tried to pause the debugger it stays at some line in InterruptHandler for TIM1 and I cannot step through the code. It looks like the connection between the uC and debugger gets lost.

Then I stepped through the code to see which line is causing the error. I got to the second TextArea in my CustomContainer and method .setTypedText(). After I stepped one more time the same thing happened as I described in the previous paragraph. I decided to remove the CustomContainer from the screen and after that my app begun to run smoothly. I thought that maybe the problem is with the stack overflow but I increased the stack size for the task running TouchGFX_Process() and the issue still persisted. It's worth mentioning that the CustomContainer consists only of code generated by TouchGFX Designer.

As my last try I changed the FreeRTOS implementation in CubeMX from CMSIS_V2 to CMSIS_V1. That completely resolved my issue. I could add back the CustomContainer. I only wonder if the problem still exists but is "hidden" and will hit me again some other time?

Can you help me finding the root cause of the problem? Does TouchGFX works better on CMSIS_V1? What else could I try to do to resolve the problem? Unfortunately I can't share my code with you as it is protected by corporate laws.

Regards,

Piotr

1 REPLY 1
Alexandre RENOUX
Principal

Hello ypiotrp,

TouchGFX should work the same with CMSIS_V2 and CMSIS_V1. By default, we prefer using the latest version in our Application Templates (soon to be renamed as Board Setups) meaning CMSIS_V2.

Could you share a UI example (without the board specific code) so that we can try on other boards to see if the problem can be reproduced ? Have you tried on your side with different boards/MCUs ?

/Alexandre