This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Concurrent task processing in LPC2148

Hi all,

I am using RTX in LPC2148, I am using 3 tasks with different priority. I want to run the tasks periodically like task_1 run for every 10ms,task_2 runs for every 20ms and the third one for every 50ms.
Is this possible to run a task concurrently means i want to how to configure it. I try the below method

__task void task_1(void)
{ os_itv_set(10); while(1) { os_itv_wait();

/* my code goes here*/ }

}

same procedure i followed for remaining tasks, but i am not get what i am expected. Is there is any other ways are available in RTX.

Thanks in advance

Parents
  • Is this some abstract school project.

    Normally, tasks gets a priority based on the need for them to actually perform something. The high-priority tasks may then break in when a low-priority task was executing. And the high-priority task only breaks in when it has something to do, and then it returns to sleep as soon as it is done.

    In the end, it's not too common to need multiple threads that all have different priority and all are run by individual timers.

    Anyway - you don't tell us what you expect to happen, and what really is happening. And you aren't telling us how long the different tasks is busy doing something before they are ready to go back to sleep - which is important because they block lower-prio threads from being activated.

Reply
  • Is this some abstract school project.

    Normally, tasks gets a priority based on the need for them to actually perform something. The high-priority tasks may then break in when a low-priority task was executing. And the high-priority task only breaks in when it has something to do, and then it returns to sleep as soon as it is done.

    In the end, it's not too common to need multiple threads that all have different priority and all are run by individual timers.

    Anyway - you don't tell us what you expect to happen, and what really is happening. And you aren't telling us how long the different tasks is busy doing something before they are ready to go back to sleep - which is important because they block lower-prio threads from being activated.

Children