Hello, I am programmin a Cygnal C8051F040 in C with RTX-51 Tiny. I have a task structure with 5 tasks. The tasks are started step by step, so task 1 sets task 2 "READY", task2 sets task 3 "READY", and so on. With a frequency of 1 Hz is an ext. IRQ comming. In the ISR of the ext. IRQ the task 1 is set in the "READY-State". What happens when task 5 is running, then comes an ext. IRQ (and so Task 1 is set to the "READY-State") and after the tasks 1-4 have finished the task 5 is set "READY" again. Will task 5 start at the position where he was interrupted or will he start at the beginning again ? Thanks, for your help.
The answer depends on whether or not you use round-robin. RTX51 Tiny switches tasks as described in the manual (http://www.keil.com/support/man/docs/tr51/tr51_tasksched.htm). Note that RTX51 is NOT preemptive. So, only round-robin or calling the os_wait or os_switch_task functions actually switch to another task. Tasks always resume where they left off after a task switch. Jon