I'm using freertos with Hal stm library, for running three tasks, the first one with stack size 128 the second with 512 while the third one is 1100.
The three tasks are created successfully, but when running the scheduler only switches between the first two tasks even if the three have the same priority.
The total project stack size is 8k and heap is 9k while freertos heap is 4k
What could be the problem?
Difficult to say without seeing the code, but here are some debugging tips.
Make sure you have configASSERT() defined to something that is going to halt execution (so you know it has been called). The newer the version of FreeRTOS the better as newer versions have more assert points added.
Ensure to have a malloc failed hook defined so you know if you run out of heap.
Try setting a break point at the start of the task you think is not running and see if it is ever entered at all - maybe it runs once but puts itself into a state where it won't run again (difficult to say without seeing the code of the tasks).
Likewise ensure to have stack overflow detection set to 2.