| |||||
Technical Support Support Resources
Product Information | RTX51: OS_WAIT DOESN'T DELAY FOR SPECIFIED TIMEQUESTIONI 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? ANSWERThe 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. Last Reviewed: Monday, June 07, 2004 | ||||
| |||||