<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How the os_wait function work for delay ?</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/21623/how-the-os_wait-function-work-for-delay</link><description> 
Using rtx51tny in a at89s52 system, 
xtal :24MHz 
INT_CLOCK : 10000 cycles (tick period : 5ms) 

 
In a delay sub take os_wait ( K_TMO , 1, 0); .When simulator
,firstly the function take 0.0047005sec(sim to 5ms) for
running,secondly,thirdly the function</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: How the os_wait function work for delay ?</title><link>https://community.arm.com/thread/49134?ContentTypeID=1</link><pubDate>Mon, 17 Dec 2007 08:21:57 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:dcf99558-91df-4b01-b729-939027c9bb40</guid><dc:creator>Keil Software Support Intl.</dc:creator><description>&lt;p&gt;&lt;p&gt;
Note that the argument to os_wait cannot be greater than a byte
(255 is therefore the maxium value.&lt;/p&gt;

&lt;p&gt;
This therefore fails &lt;b&gt;os_wait ( K_TMO , 300, 0);&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;
Also keep in mind that the execution is sychnonized with the
hardware timer. &lt;b&gt;os_wait ( K_TMO , 1, 0);&lt;/b&gt; effectively waits for
the next timer tick (which might come instantly after the function
call).&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>