Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/29/00 19:19
Read: times


 
#3489 - RE: K_TMO & K_IVL
K_TMO and K_IVL are the arguments of the os_wait() function from the RTX51TNY real time operating system from the Keil C51 PK51 compiler package.

If you need a fixed delay of say 1 second after an event, you use a K_TMO.
If you have to toggle your output at a fixed frequency of 1Hz, you use a K_IVL.
The difference is in the way how the RTOS runs and executes multiple tasks.

Tasks in RTX51TNY are executed in time slices - round robin task switching. If your task, that is currently executed has a small job to do, it enters a waiting state by triggering os_wait() function. If another task has more job to do, it will be suspended by RTOS after 5 system timer ticks (50 ms). So if you trigger in your current task an os_wait(K_TMO) function, it will wait from now on the time, you specified. If you trigger a function with K_IVL argument, those 50 ms of a delay also count, so you the task will wait 50 ms less (this is the time, the previous task spent on execution) from now on.

Franc


List of 3 messages in thread
TopicAuthorDate
K_TMO & K_IVL            01/01/70 00:00      
RE: K_TMO & K_IVL            01/01/70 00:00      
RE: K_TMO & K_IVL            01/01/70 00:00      

Back to Subject List