Hello, I believe that the round robin task switching won't perform correctly if any task with a rather high priority waits on a delay less than or equal to OS_ROBINTOUT. Is this a normal behavior? It is easy to illustrate this problem, at least on my machine: - open the round robin example (usually located at ...\keil\C166\AR166\Examples\RoundRobin) - make sure that OS_ROBINTOUT is defined to 5 in the AR166_Config.c file - compile and run the example in debug mode - observe that task 1 and task 2 are both executed from time to time, according to the round robin scheduler. This is normal. - replace the task 4 by the following code:
void task4 (void) _task_ 4 _priority_ 6 { while (1) { os_dly_wait(5); // 5 or less counter4++; } }