|ARM Technical Support Knowledge Articles|
Applies to: RTX51 Real-time Kernel
I call an os_wait library routine as follows:
os_wait (K_TMO, 1000, NULL);
but it returns before the specified number of ticks have elapsed. What's going on?
The problem is that the 1000 is being implicitly cast to an 8-bit value. If you need to delay more than 255 ticks, you must use multiple calls to os_wait. You should replace your above code with the following:
os_wait (K_TMO, 250, NULL); os_wait (K_TMO, 250, NULL); os_wait (K_TMO, 250, NULL); os_wait (K_TMO, 250, NULL);
This delays the task for 1000 ticks.
Article last edited on: 2004-06-07 09:09:30
Did you find this article helpful? Yes No
How can we improve this article?