I make file browser with st32f746 discovery When some string functions (like strchr strcat) on file path or on some touch pointer Sddriver stuck at driver initialize and after check I found it stuck at enable widebus 4b and if I cancelled that step in driver or changed to 1 b itworks I'm sure it is not driver or card problem It is some pointers or string functions
If any one face like that problem please help
Note that small microcontrollers and malloc() might not always be a good idea.
If the data will live through the full lifetime of the program and you already know the number of elements, then the data can be statically allocated and you can have the compiler help you with range checking etc directly when you compile.
If the data needs to be allocated/freed many times during execution, then you might get memory fragmentation so your program starts to fail with allocations even if the heap actually have enough space free - it's just that the free space has been split into many small fragment that are too small for your request.
It can be hard to test for potential fragmentation issues since the failures might not be seen until the device has been running for weeks or months. But people can be sad if their alarm clock or microwave oven hangs every three months and they have to remove the battery or unplug the power coord just to force a restart.
Never switch technology (in this case static -> auto -> dynamic allocation) as a way around a bug instead of actually trying to locate the bug. You should only switch technology if you find that you gain actual advantages - not as a way to randomly rewrite the code until it stops failing.