my application is composed by many threads.
One of this threads at each execution alocates some variables in the heap (I’m using the heap_4.c) end free those variables after their use.This task run periodically.
One other thread manage some memory transfer through the DMA and run only one time. At the end of this task, a vTaskDelete(NULL) is called.
Problem is following:
Until the second thread is alive, all it’s ok. variables of first task are allocates and deletes alwais at same addresses.
But when the second thread terminates, FreeRTOS goes in hard fault after the first thread execution.
What can be the problem?