functionOverview.html 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <title>Function Overview</title>
  7. <title>CMSIS-RTOS: Function Overview</title>
  8. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  9. <link href="cmsis.css" rel="stylesheet" type="text/css" />
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <script type="text/javascript" src="printComponentTabs.js"></script>
  13. <link href="navtree.css" rel="stylesheet" type="text/css"/>
  14. <script type="text/javascript" src="resize.js"></script>
  15. <script type="text/javascript" src="navtree.js"></script>
  16. <script type="text/javascript">
  17. $(document).ready(initResizable);
  18. $(window).load(resizeHeight);
  19. </script>
  20. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  21. <script type="text/javascript" src="search/search.js"></script>
  22. <script type="text/javascript">
  23. $(document).ready(function() { searchBox.OnSelectItem(0); });
  24. </script>
  25. </head>
  26. <body>
  27. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  28. <div id="titlearea">
  29. <table cellspacing="0" cellpadding="0">
  30. <tbody>
  31. <tr style="height: 46px;">
  32. <td id="projectlogo"><img alt="Logo" src="CMSIS_Logo_Final.png"/></td>
  33. <td style="padding-left: 0.5em;">
  34. <div id="projectname">CMSIS-RTOS
  35. &#160;<span id="projectnumber">Version 1.03</span>
  36. </div>
  37. <div id="projectbrief">Real-Time Operating System: API and RTX Reference Implementation.</div>
  38. </td>
  39. </tr>
  40. </tbody>
  41. </table>
  42. </div>
  43. <!-- end header part -->
  44. <div id="CMSISnav" class="tabs1">
  45. <ul class="tablist">
  46. <script type="text/javascript">
  47. <!--
  48. writeComponentTabs.call(this);
  49. //-->
  50. </script>
  51. </ul>
  52. </div>
  53. <!-- Generated by Doxygen 1.8.6 -->
  54. <script type="text/javascript">
  55. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  56. </script>
  57. <div id="navrow1" class="tabs">
  58. <ul class="tablist">
  59. <li><a href="index.html"><span>Main&#160;Page</span></a></li>
  60. <li class="current"><a href="pages.html"><span>Usage&#160;and&#160;Description</span></a></li>
  61. <li><a href="modules.html"><span>Reference</span></a></li>
  62. <li>
  63. <div id="MSearchBox" class="MSearchBoxInactive">
  64. <span class="left">
  65. <img id="MSearchSelect" src="search/mag_sel.png"
  66. onmouseover="return searchBox.OnSearchSelectShow()"
  67. onmouseout="return searchBox.OnSearchSelectHide()"
  68. alt=""/>
  69. <input type="text" id="MSearchField" value="Search" accesskey="S"
  70. onfocus="searchBox.OnSearchFieldFocus(true)"
  71. onblur="searchBox.OnSearchFieldFocus(false)"
  72. onkeyup="searchBox.OnSearchFieldChange(event)"/>
  73. </span><span class="right">
  74. <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
  75. </span>
  76. </div>
  77. </li>
  78. </ul>
  79. </div>
  80. </div><!-- top -->
  81. <div id="side-nav" class="ui-resizable side-nav-resizable">
  82. <div id="nav-tree">
  83. <div id="nav-tree-contents">
  84. <div id="nav-sync" class="sync"></div>
  85. </div>
  86. </div>
  87. <div id="splitbar" style="-moz-user-select:none;"
  88. class="ui-resizable-handle">
  89. </div>
  90. </div>
  91. <script type="text/javascript">
  92. $(document).ready(function(){initNavTree('functionOverview.html','');});
  93. </script>
  94. <div id="doc-content">
  95. <!-- window showing the filter options -->
  96. <div id="MSearchSelectWindow"
  97. onmouseover="return searchBox.OnSearchSelectShow()"
  98. onmouseout="return searchBox.OnSearchSelectHide()"
  99. onkeydown="return searchBox.OnSearchSelectKey(event)">
  100. <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Pages</a></div>
  101. <!-- iframe showing the search results (closed by default) -->
  102. <div id="MSearchResultsWindow">
  103. <iframe src="javascript:void(0)" frameborder="0"
  104. name="MSearchResults" id="MSearchResults">
  105. </iframe>
  106. </div>
  107. <div class="header">
  108. <div class="headertitle">
  109. <div class="title">Function Overview </div> </div>
  110. </div><!--header-->
  111. <div class="contents">
  112. <div class="textblock"><p>The following list provides a brief overview of all CMSIS-RTOS functions. Functions marked with $ are optional. A specific CMSIS-RTOS implementation may not provide all functions, but this is clearly indicated with <b>osFeatureXXXX</b> defines.</p>
  113. <dl class="section note"><dt>Note</dt><dd>Functions that are not supported by the <a class="el" href="rtxImplementation.html">RTX Implementation</a>, are marked with a (*).</dd></dl>
  114. <ul>
  115. <li><a class="el" href="group__CMSIS__RTOS__KernelCtrl.html">Kernel Information and Control</a><ul>
  116. <li><a class="el" href="group__CMSIS__RTOS__KernelCtrl.html#ga53d078a801022e202e8115c083ece68e">osKernelInitialize</a> : Initialize the RTOS kernel.</li>
  117. <li><a class="el" href="group__CMSIS__RTOS__KernelCtrl.html#gaab668ffd2ea76bb0a77ab0ab385eaef2">osKernelStart</a> : Start the RTOS kernel.</li>
  118. <li><a class="el" href="group__CMSIS__RTOS__KernelCtrl.html#ga3b571de44cd3094c643247a7397f86b5">osKernelRunning</a> : Query if the RTOS kernel is running.</li>
  119. <li><a class="el" href="group__CMSIS__RTOS__KernelCtrl.html#gad0262e4688e95d1e9038afd9bcc16001">osKernelSysTick</a> : Get RTOS kernel system timer counter.</li>
  120. <li><a class="el" href="group__CMSIS__RTOS__KernelCtrl.html#ga9e0954d52722673e2031233a2ab99960">osKernelSysTickFrequency</a> : RTOS kernel system timer frequency in Hz.</li>
  121. <li><a class="el" href="group__CMSIS__RTOS__KernelCtrl.html#gae12c190af42d7310d8006d64f4ed5a88">osKernelSysTickMicroSec</a> : Convert microseconds value to RTOS kernel system timer value.</li>
  122. </ul>
  123. </li>
  124. <li><a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html">Thread Management</a><ul>
  125. <li><a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#gac59b5713cb083702dce759c73fd90dff">osThreadCreate</a> : Start execution of a thread function.</li>
  126. <li><a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#gaea135bb90eb853eff39e0800b91bbeab">osThreadTerminate</a> : Stop execution of a thread function.</li>
  127. <li><a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#gaf13a667493c5d629a90c13e113b99233">osThreadYield</a> : Pass execution to next ready thread function.</li>
  128. <li><a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#gab1df2a28925862ef8f9cf4e1c995c5a7">osThreadGetId</a> : Get the thread identifier to reference this thread.</li>
  129. <li><a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#ga0dfb90ccf1f6e4b54b9251b12d1cbc8b">osThreadSetPriority</a> : Change the execution priority of a thread function.</li>
  130. <li><a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#ga4299d838978bc2aae5e4350754e6a4e9">osThreadGetPriority</a> : Obtain the current execution priority of a thread function.</li>
  131. </ul>
  132. </li>
  133. <li><a class="el" href="group__CMSIS__RTOS__Wait.html">Generic Wait Functions</a><ul>
  134. <li><a class="el" href="group__CMSIS__RTOS__Wait.html#ga02e19d5e723bfb06ba9324d625162255">osDelay</a> : Wait for a specified time.</li>
  135. <li><a class="el" href="technicalData.html#osWait">osWait</a> : Wait for any event of the type Signal, Message, or Mail.(*)</li>
  136. </ul>
  137. </li>
  138. <li><a class="el" href="group__CMSIS__RTOS__TimerMgmt.html">Timer Management</a><ul>
  139. <li><a class="el" href="group__CMSIS__RTOS__TimerMgmt.html#gaedd312bfdca04e0b8162b666e09a1ae6">osTimerCreate</a> : Define attributes of the timer callback function.</li>
  140. <li><a class="el" href="group__CMSIS__RTOS__TimerMgmt.html#ga27a797a401b068e2644d1125f22a07ca">osTimerStart</a> : Start or restart the timer with a time value.</li>
  141. <li><a class="el" href="group__CMSIS__RTOS__TimerMgmt.html#ga58f36b121a812936435cacc6e1e0e091">osTimerStop</a> : Stop the timer.</li>
  142. <li><a class="el" href="group__CMSIS__RTOS__TimerMgmt.html#ga746b8043d906849bd65e3900fcb483cf">osTimerDelete</a> : Delete a timer.</li>
  143. </ul>
  144. </li>
  145. <li><a class="el" href="group__CMSIS__RTOS__SignalMgmt.html">Signal Events</a><ul>
  146. <li><a class="el" href="group__CMSIS__RTOS__SignalMgmt.html#ga3de2730654589d6c3559c4b9e2825553">osSignalSet</a> : Set signal flags of a thread.</li>
  147. <li><a class="el" href="group__CMSIS__RTOS__SignalMgmt.html#ga87283a6ebc31ce9ed42baf3ea7e4eab6">osSignalClear</a> : Reset signal flags of a thread.</li>
  148. <li><a class="el" href="group__CMSIS__RTOS__SignalMgmt.html#ga38860acda96df47da6923348d96fc4c9">osSignalWait</a> : Suspend execution until specific signal flags are set.</li>
  149. </ul>
  150. </li>
  151. <li><a class="el" href="group__CMSIS__RTOS__MutexMgmt.html">Mutexes</a><ul>
  152. <li><a class="el" href="group__CMSIS__RTOS__MutexMgmt.html#ga5c9de56e717016e39e788064e9a291cc">osMutexCreate</a> : Define and initialize a mutex.</li>
  153. <li><a class="el" href="group__CMSIS__RTOS__MutexMgmt.html#ga5e1752b73f573ee015dbd9ef1edaba13">osMutexWait</a> : Obtain a mutex or Wait until it becomes available.</li>
  154. <li><a class="el" href="group__CMSIS__RTOS__MutexMgmt.html#ga006e4744d741e8e132c3d5bbc295afe1">osMutexRelease</a> : Release a mutex.</li>
  155. <li><a class="el" href="group__CMSIS__RTOS__MutexMgmt.html#gac27e24135185d51d18f3dabc20910219">osMutexDelete</a> : Delete a mutex.</li>
  156. </ul>
  157. </li>
  158. <li><a class="el" href="group__CMSIS__RTOS__SemaphoreMgmt.html">Semaphores</a><ul>
  159. <li><a class="el" href="group__CMSIS__RTOS__SemaphoreMgmt.html#ga97381e8e55cd47cec390bf57c96d6edb">osSemaphoreCreate</a> : Define and initialize a semaphore.</li>
  160. <li><a class="el" href="group__CMSIS__RTOS__SemaphoreMgmt.html#gacc15b0fc8ce1167fe43da33042e62098">osSemaphoreWait</a> : Obtain a semaphore token or Wait until it becomes available.</li>
  161. <li><a class="el" href="group__CMSIS__RTOS__SemaphoreMgmt.html#gab108914997c49e14d8ff1ae0d1988ca0">osSemaphoreRelease</a> : Release a semaphore token.</li>
  162. <li><a class="el" href="group__CMSIS__RTOS__SemaphoreMgmt.html#gabae2801ac2c096f6e8c69a264908f595">osSemaphoreDelete</a> : Delete a semaphore.</li>
  163. </ul>
  164. </li>
  165. <li><a class="el" href="group__CMSIS__RTOS__PoolMgmt.html">Memory Pool</a><ul>
  166. <li><a class="el" href="group__CMSIS__RTOS__PoolMgmt.html#ga34af5c4f4ab38f4138ea7f1f9ece3a1a">osPoolCreate</a> : Define and initialize a fix-size memory pool.</li>
  167. <li><a class="el" href="group__CMSIS__RTOS__PoolMgmt.html#gaa0b2994f1a866c19e0d11e6e0d44f543">osPoolAlloc</a> : Allocate a memory block.</li>
  168. <li><a class="el" href="group__CMSIS__RTOS__PoolMgmt.html#ga9f129fcad4730fbd1048ad4fa262f36a">osPoolCAlloc</a> : Allocate a memory block and zero-set this block.</li>
  169. <li><a class="el" href="group__CMSIS__RTOS__PoolMgmt.html#ga4a861e9c469c9d0daf5721bf174f8e54">osPoolFree</a> : Return a memory block to the memory pool.</li>
  170. </ul>
  171. </li>
  172. <li><a class="el" href="group__CMSIS__RTOS__Message.html">Message Queue</a><ul>
  173. <li><a class="el" href="group__CMSIS__RTOS__Message.html#gaf3b9345cf426304d46565152bc26fb78">osMessageCreate</a> : Define and initialize a message queue.</li>
  174. <li><a class="el" href="group__CMSIS__RTOS__Message.html#gac0dcf462fc92de8ffaba6cc004514a6d">osMessagePut</a> : Put a message into a message queue.</li>
  175. <li><a class="el" href="group__CMSIS__RTOS__Message.html#ga6c6892b8f2296cca6becd57ca2d7e1ae">osMessageGet</a> : Get a message or suspend thread execution until message arrives.</li>
  176. </ul>
  177. </li>
  178. <li><a class="el" href="group__CMSIS__RTOS__Mail.html">Mail Queue</a><ul>
  179. <li><a class="el" href="group__CMSIS__RTOS__Mail.html#gaa177e7fe5820dd70d8c9e46ded131174">osMailCreate</a> : Define and initialize a mail queue with fix-size memory blocks.</li>
  180. <li><a class="el" href="group__CMSIS__RTOS__Mail.html#gadf5ce811bd6a56e617e902a1db6c2194">osMailAlloc</a> : Allocate a memory block.</li>
  181. <li><a class="el" href="group__CMSIS__RTOS__Mail.html#ga8fde74f6fe5b9e88f75cc5eb8f2124fd">osMailCAlloc</a> : Allocate a memory block and zero-set this block.</li>
  182. <li><a class="el" href="group__CMSIS__RTOS__Mail.html#ga485ef6f81854ebda8ffbce4832181e02">osMailPut</a> : Put a memory block into a mail queue.</li>
  183. <li><a class="el" href="group__CMSIS__RTOS__Mail.html#gac6ad7e6e7d6c4a80e60da22c57a42ccd">osMailGet</a> : Get a mail or suspend thread execution until mail arrives.</li>
  184. <li><a class="el" href="group__CMSIS__RTOS__Mail.html#ga27c1060cf21393f96b4fd1ed1c0167cc">osMailFree</a> : Return a memory block to the mail queue.</li>
  185. </ul>
  186. </li>
  187. <li><a class="el" href="group__RTX__Global__Functions.html">RTX Specific Functions</a><ul>
  188. <li><a class="el" href="group__RTX__Global__Functions.html#gafb4dc4d3dff8343a393726d2860282e4">os_idle_demon</a> : System thread running when no other thread is ready to run.</li>
  189. <li><a class="el" href="group__RTX__Global__Functions.html#ga3e9c57746ccbdfe90464ad50513c569e">os_suspend</a> : Suspend the RTX task scheduler.</li>
  190. <li><a class="el" href="group__RTX__Global__Functions.html#ga1b85a217d43e6b971ffcf24f8aae1c33">os_resume</a> : Resume the RTX task scheduler.</li>
  191. <li><a class="el" href="group__RTX__Global__Functions.html#ga145e7eafdd042bb522020cbb3b469d9c">os_tick_init</a> : Initialize an alternative hardware timer as RTX kernel timer.</li>
  192. <li><a class="el" href="group__RTX__Global__Functions.html#ga567543bf38239a91f09751686c23017b">os_tick_val</a> : Get alternative hardware timer's current value.</li>
  193. <li><a class="el" href="group__RTX__Global__Functions.html#gad5deddec3fea0fb31798f571afc3c692">os_tick_ovf</a> : Get alternative hardware timer's overflow flag.</li>
  194. <li><a class="el" href="group__RTX__Global__Functions.html#ga85dab8408f27236c7341a69feb6258c7">os_tick_irqack</a> : Acknowledge alternative hardware timer interrupt.</li>
  195. <li><a class="el" href="group__RTX__Global__Functions.html#ga651ae76b3acf45f80bf0e0487b51d6e6">os_error</a> : Called when a runtime error is detected.</li>
  196. </ul>
  197. </li>
  198. </ul>
  199. <h1><a class="anchor" id="CMSIS_RTOS_TimeOutValue"></a>
  200. Timout Value</h1>
  201. <p>The timeout value specifies the number of timer ticks until a timeout or time delay elapses. The value is an upper bound and depends on the actual time elapsed since the last timer tick.</p>
  202. <p>For a value of <b>1</b> the system waits until the next timer tick occurs. That means that the actual timeout value can be one timer tick less than the specified timeout value.</p>
  203. <div class="image">
  204. <img src="TimerValues.png" alt="TimerValues.png"/>
  205. <div class="caption">
  206. Timer Values</div></div>
  207. <h1><a class="anchor" id="CMSIS_RTOS_ISR_Calls"></a>
  208. Calls from Interrupt Service Routines</h1>
  209. <p>The following CMSIS-RTOS functions can be called from threads and Interrupt Service Routines (ISR):</p>
  210. <ul>
  211. <li><a class="el" href="group__CMSIS__RTOS__KernelCtrl.html#ga3b571de44cd3094c643247a7397f86b5">osKernelRunning</a></li>
  212. <li><a class="el" href="group__CMSIS__RTOS__SignalMgmt.html#ga3de2730654589d6c3559c4b9e2825553">osSignalSet</a></li>
  213. <li><a class="el" href="group__CMSIS__RTOS__SemaphoreMgmt.html#gab108914997c49e14d8ff1ae0d1988ca0">osSemaphoreRelease</a></li>
  214. <li><a class="el" href="group__CMSIS__RTOS__PoolMgmt.html#gaa0b2994f1a866c19e0d11e6e0d44f543">osPoolAlloc</a>, <a class="el" href="group__CMSIS__RTOS__PoolMgmt.html#ga9f129fcad4730fbd1048ad4fa262f36a">osPoolCAlloc</a>, <a class="el" href="group__CMSIS__RTOS__PoolMgmt.html#ga4a861e9c469c9d0daf5721bf174f8e54">osPoolFree</a></li>
  215. <li><a class="el" href="group__CMSIS__RTOS__Message.html#gac0dcf462fc92de8ffaba6cc004514a6d">osMessagePut</a>, <a class="el" href="group__CMSIS__RTOS__Message.html#ga6c6892b8f2296cca6becd57ca2d7e1ae">osMessageGet</a></li>
  216. <li><a class="el" href="group__CMSIS__RTOS__Mail.html#gadf5ce811bd6a56e617e902a1db6c2194">osMailAlloc</a>, <a class="el" href="group__CMSIS__RTOS__Mail.html#ga8fde74f6fe5b9e88f75cc5eb8f2124fd">osMailCAlloc</a>, <a class="el" href="group__CMSIS__RTOS__Mail.html#gac6ad7e6e7d6c4a80e60da22c57a42ccd">osMailGet</a>, <a class="el" href="group__CMSIS__RTOS__Mail.html#ga485ef6f81854ebda8ffbce4832181e02">osMailPut</a>, <a class="el" href="group__CMSIS__RTOS__Mail.html#ga27c1060cf21393f96b4fd1ed1c0167cc">osMailFree</a></li>
  217. </ul>
  218. <p>Functions that cannot be called from an ISR are verifying the interrupt status and return, in case they are called from an ISR context, the status code <b>osErrorISR</b>. In some implementations, this condition might be caught using the HARD FAULT vector.</p>
  219. <p>Some CMSIS-RTOS implementations support CMSIS-RTOS function calls from multiple ISRs at the same time. If this is impossible, the CMSIS-RTOS rejects calls by nested ISR functions with the status code <b>osErrorISRRecursive</b>. </p>
  220. </div></div><!-- contents -->
  221. </div><!-- doc-content -->
  222. <!-- start footer part -->
  223. <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  224. <ul>
  225. <li class="navelem"><a class="el" href="index.html">index</a></li>
  226. <li class="footer">Generated on Mon Mar 18 2019 16:06:29 for CMSIS-RTOS by Arm Ltd. All rights reserved.
  227. <!--
  228. <a href="http://www.doxygen.org/index.html">
  229. <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6
  230. -->
  231. </li>
  232. </ul>
  233. </div>
  234. </body>
  235. </html>