2019-02-04 04:03 AM
Hello,
I have such kind o problem with my application which contains of many screen. One of these screens is quite complicated (many modal windows, buttons, list, etc). When I call xQueueSend to forward messages between two tasks (one relates to uart and the other is GUI task) application hangs (every time). Hard fault error is called which is FORCED IMPRECISERR type. I increased TASK_STK_SIZE and respectively configTOTAL_HEAP_SIZE in FreeRTOSConfig.h but it didn't help. I noticed that when I remove canvas buffer from generated file for this screen, everything is ok, but unfortunately I cannot do it in TouchGFX Designer. That is why every time I generate new code I have to comment these lines. Do You have any solution to this problem and can You explain ma why such situation takes place?
2019-02-05 12:13 AM
Hi @Community member,
So you're not actually using the Canvas buffer? Did you keep in mind that TASK_STK_SIZE is in words and TOTAL_HEAP_SIZE is in bytes?
Best regards,
Martin
2019-02-05 03:36 AM
Hi,
Now I use Canvas buffer defined for whole application in main.cpp file. Size of this buffer is (8 * 1024). Yes I know the relations between TASK_STK_SIZE and TOTAL_HEAP_SIZE. Currently I use:
#define configGUI_TASK_STK_SIZE ( 1500 )
#define configUART_TASK_STK_SIZE ( 512 )
and
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 50 * 1024 ) )
which is quite huge.
If I won't find solution, one of my ideas is to simplify this screen (use less drawables). However I'd like to find the reason of this fault to avoid problems in the future when we release our product.
2019-02-05 01:46 PM
Hi @Community member,
Apologies. Just wanted to make sure we had the right settings - Classic mistake :) Can you try reducing the size of the buffer to a point where you no longer enter a hard fault? Just to see if we can make some sense of the numbers.
2019-02-06 01:06 AM
Hi,
I performed this test like You said. Firstly I commented Canvas buffer in main.cpp and I used buffer in automatically generated file for my problematic screen. Results are as follows: