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?
What did you try doing? How do you know its not deleted? Are you letting the idle task get some processing time?
I varified from task list that it is still alive. why idle task should get CPU time?
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 ().
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.