2025-07-31 12:52 AM
Hi all,
I'm working on a custom STM32MP135 SOC hosting a MMC memory.
The barebone firmware creates some tasks by the osThreadNew() function and works correctly.
Now I'm inserting FATFs module (moving from FileX) on the firmware to support the FAT fs on the MMC memory.
Most of the times the basic funcions work correctly (open, read/write, close). I'm able to create files and list them with findfirst/findnext functions.
If I add a open/read/close sequence, the read operation is done correctly but when the function returns to the caller and this one try to call other function, the firmware crashes on CDAbtHandler. This behavior is not random, it is systematic at every run. The reported address in LR parameter is useless.
In my understanding it could be a stack error but I'm not able to understand what could be causing the problem.
Should be the thread stack size?
How can i know the correct stack size?
Thanks!