How to debug multi-threading problems

Thread Starter

Hossein tmi

Joined Aug 19, 2018
2
Hi everyone.

we had performed a project with discovery f746 board that within it there just was a GUI task to run emwin functions.

Another functions(such as reading and writing in sd card by fatfs , usb, spi and stuff) were placed in the routines of Buttons.

After several times the process of USB (writing in USB flash memory) was ran ,

the running process stuck in RTOS's functions.

After that we decided to add another thread for USB In such a way that, after pressing related button ,a message is sent to this thread.

At the first it works fine but after several times running this thread, mkdir function (for creating a folder in USB flash memory) returns FR_NOT_ENOUGH_CORE value and the program stops running.

For resolving this problem we increased stack and heap size and memory that is assigned to the thread but it didn't affect.

In new version of our project we just added a new thread and the routine that was placed in Notification sent by related button was moved into new thread and another sections of projects haven't changed.

In old version of project that there just was one thread , mkdir function never had returned FR_NOT_ENOUGH_CORE value.

It seems this problem is related to multi threading but we don't know how to find out running process and fix problem.

Could anyone help us to resolve this problem?

We'll appreciate your suggestions.
 

MrChips

Joined Oct 2, 2009
30,802
Re: STM32F746G-DISCO

Multi-threaded issues are very difficult to resolve. Start by building the system up one thread at a time.
You might get more responses by seeking help on ST Community, OpenSTM, or StemWin.
 
Top