vTaskDelete

I have created two task. first task i want to delete from second task’s entry function. but i m not able to delete it. What can be the reasons?

vTaskDelete

What did you try doing?  How do you know its not deleted? Are you letting the idle task get some processing time?

vTaskDelete

I varified from task list that it is still alive. why idle task should get CPU time?

vTaskDelete

This is what we can read from the FreeRTOS API vTaskDelete page : NOTE: The idle task is responsible for freeing the kernel allocated memory from tasks that have been deleted. It is therefore important that the idle task is not starved of microcontroller processing time if your application makes any calls to vTaskDelete (). Memory allocated by the task code is not automatically freed, and should be freed before the task is deleted. See the demo application file death. c for sample code that utilises vTaskDelete ().