You need to make sure your tasks loop around forever otherwise they will run once and exit, unless they are designed to only run once.
Here is what I do in each task.
while(1)
{
// Your code for the task goes here
OSTimeDly(1); // Let the task yield to other tasks
}
The time int eh delay can be higher values if you don’t need the task running quickly.
Using the Dly call will ensure that lower priority tasks get a time slice otherwise they will not be executed. Only higher priority tasks will cause it to yield automatically.
Thanks for the reply. I have actually used the OSTimeDlyHMSM() function. I still have the problem. I have been using uCos-ii for long time but I used only with static IP assignmet. But Now I need to use uCos with DHCP assigned IP. DHCP assigned IP is crashing the system. It runs only once and terminates.
Have you ever used Dynamic IP and uCos together. If so, Could you please send me a sample if possible?