xmclib/CMSIS/Documentation/RTOS/html/functionOverview.html

238 lines
18 KiB
HTML
Raw Permalink Normal View History

2024-10-17 17:09:59 +02:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Function Overview</title>
<title>CMSIS-RTOS: Function Overview</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="cmsis.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="printComponentTabs.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 46px;">
<td id="projectlogo"><img alt="Logo" src="CMSIS_Logo_Final.png"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">CMSIS-RTOS
&#160;<span id="projectnumber">Version 1.03</span>
</div>
<div id="projectbrief">Real-Time Operating System: API and RTX Reference Implementation.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<div id="CMSISnav" class="tabs1">
<ul class="tablist">
<script type="text/javascript">
<!--
writeComponentTabs.call(this);
//-->
</script>
</ul>
</div>
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li class="current"><a href="pages.html"><span>Usage&#160;and&#160;Description</span></a></li>
<li><a href="modules.html"><span>Reference</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('functionOverview.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<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>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="headertitle">
<div class="title">Function Overview </div> </div>
</div><!--header-->
<div class="contents">
<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>
<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>
<ul>
<li><a class="el" href="group__CMSIS__RTOS__KernelCtrl.html">Kernel Information and Control</a><ul>
<li><a class="el" href="group__CMSIS__RTOS__KernelCtrl.html#ga53d078a801022e202e8115c083ece68e">osKernelInitialize</a> : Initialize the RTOS kernel.</li>
<li><a class="el" href="group__CMSIS__RTOS__KernelCtrl.html#gaab668ffd2ea76bb0a77ab0ab385eaef2">osKernelStart</a> : Start the RTOS kernel.</li>
<li><a class="el" href="group__CMSIS__RTOS__KernelCtrl.html#ga3b571de44cd3094c643247a7397f86b5">osKernelRunning</a> : Query if the RTOS kernel is running.</li>
<li><a class="el" href="group__CMSIS__RTOS__KernelCtrl.html#gad0262e4688e95d1e9038afd9bcc16001">osKernelSysTick</a> : Get RTOS kernel system timer counter.</li>
<li><a class="el" href="group__CMSIS__RTOS__KernelCtrl.html#ga9e0954d52722673e2031233a2ab99960">osKernelSysTickFrequency</a> : RTOS kernel system timer frequency in Hz.</li>
<li><a class="el" href="group__CMSIS__RTOS__KernelCtrl.html#gae12c190af42d7310d8006d64f4ed5a88">osKernelSysTickMicroSec</a> : Convert microseconds value to RTOS kernel system timer value.</li>
</ul>
</li>
<li><a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html">Thread Management</a><ul>
<li><a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#gac59b5713cb083702dce759c73fd90dff">osThreadCreate</a> : Start execution of a thread function.</li>
<li><a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#gaea135bb90eb853eff39e0800b91bbeab">osThreadTerminate</a> : Stop execution of a thread function.</li>
<li><a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#gaf13a667493c5d629a90c13e113b99233">osThreadYield</a> : Pass execution to next ready thread function.</li>
<li><a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#gab1df2a28925862ef8f9cf4e1c995c5a7">osThreadGetId</a> : Get the thread identifier to reference this thread.</li>
<li><a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#ga0dfb90ccf1f6e4b54b9251b12d1cbc8b">osThreadSetPriority</a> : Change the execution priority of a thread function.</li>
<li><a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#ga4299d838978bc2aae5e4350754e6a4e9">osThreadGetPriority</a> : Obtain the current execution priority of a thread function.</li>
</ul>
</li>
<li><a class="el" href="group__CMSIS__RTOS__Wait.html">Generic Wait Functions</a><ul>
<li><a class="el" href="group__CMSIS__RTOS__Wait.html#ga02e19d5e723bfb06ba9324d625162255">osDelay</a> : Wait for a specified time.</li>
<li><a class="el" href="technicalData.html#osWait">osWait</a> : Wait for any event of the type Signal, Message, or Mail.(*)</li>
</ul>
</li>
<li><a class="el" href="group__CMSIS__RTOS__TimerMgmt.html">Timer Management</a><ul>
<li><a class="el" href="group__CMSIS__RTOS__TimerMgmt.html#gaedd312bfdca04e0b8162b666e09a1ae6">osTimerCreate</a> : Define attributes of the timer callback function.</li>
<li><a class="el" href="group__CMSIS__RTOS__TimerMgmt.html#ga27a797a401b068e2644d1125f22a07ca">osTimerStart</a> : Start or restart the timer with a time value.</li>
<li><a class="el" href="group__CMSIS__RTOS__TimerMgmt.html#ga58f36b121a812936435cacc6e1e0e091">osTimerStop</a> : Stop the timer.</li>
<li><a class="el" href="group__CMSIS__RTOS__TimerMgmt.html#ga746b8043d906849bd65e3900fcb483cf">osTimerDelete</a> : Delete a timer.</li>
</ul>
</li>
<li><a class="el" href="group__CMSIS__RTOS__SignalMgmt.html">Signal Events</a><ul>
<li><a class="el" href="group__CMSIS__RTOS__SignalMgmt.html#ga3de2730654589d6c3559c4b9e2825553">osSignalSet</a> : Set signal flags of a thread.</li>
<li><a class="el" href="group__CMSIS__RTOS__SignalMgmt.html#ga87283a6ebc31ce9ed42baf3ea7e4eab6">osSignalClear</a> : Reset signal flags of a thread.</li>
<li><a class="el" href="group__CMSIS__RTOS__SignalMgmt.html#ga38860acda96df47da6923348d96fc4c9">osSignalWait</a> : Suspend execution until specific signal flags are set.</li>
</ul>
</li>
<li><a class="el" href="group__CMSIS__RTOS__MutexMgmt.html">Mutexes</a><ul>
<li><a class="el" href="group__CMSIS__RTOS__MutexMgmt.html#ga5c9de56e717016e39e788064e9a291cc">osMutexCreate</a> : Define and initialize a mutex.</li>
<li><a class="el" href="group__CMSIS__RTOS__MutexMgmt.html#ga5e1752b73f573ee015dbd9ef1edaba13">osMutexWait</a> : Obtain a mutex or Wait until it becomes available.</li>
<li><a class="el" href="group__CMSIS__RTOS__MutexMgmt.html#ga006e4744d741e8e132c3d5bbc295afe1">osMutexRelease</a> : Release a mutex.</li>
<li><a class="el" href="group__CMSIS__RTOS__MutexMgmt.html#gac27e24135185d51d18f3dabc20910219">osMutexDelete</a> : Delete a mutex.</li>
</ul>
</li>
<li><a class="el" href="group__CMSIS__RTOS__SemaphoreMgmt.html">Semaphores</a><ul>
<li><a class="el" href="group__CMSIS__RTOS__SemaphoreMgmt.html#ga97381e8e55cd47cec390bf57c96d6edb">osSemaphoreCreate</a> : Define and initialize a semaphore.</li>
<li><a class="el" href="group__CMSIS__RTOS__SemaphoreMgmt.html#gacc15b0fc8ce1167fe43da33042e62098">osSemaphoreWait</a> : Obtain a semaphore token or Wait until it becomes available.</li>
<li><a class="el" href="group__CMSIS__RTOS__SemaphoreMgmt.html#gab108914997c49e14d8ff1ae0d1988ca0">osSemaphoreRelease</a> : Release a semaphore token.</li>
<li><a class="el" href="group__CMSIS__RTOS__SemaphoreMgmt.html#gabae2801ac2c096f6e8c69a264908f595">osSemaphoreDelete</a> : Delete a semaphore.</li>
</ul>
</li>
<li><a class="el" href="group__CMSIS__RTOS__PoolMgmt.html">Memory Pool</a><ul>
<li><a class="el" href="group__CMSIS__RTOS__PoolMgmt.html#ga34af5c4f4ab38f4138ea7f1f9ece3a1a">osPoolCreate</a> : Define and initialize a fix-size memory pool.</li>
<li><a class="el" href="group__CMSIS__RTOS__PoolMgmt.html#gaa0b2994f1a866c19e0d11e6e0d44f543">osPoolAlloc</a> : Allocate a memory block.</li>
<li><a class="el" href="group__CMSIS__RTOS__PoolMgmt.html#ga9f129fcad4730fbd1048ad4fa262f36a">osPoolCAlloc</a> : Allocate a memory block and zero-set this block.</li>
<li><a class="el" href="group__CMSIS__RTOS__PoolMgmt.html#ga4a861e9c469c9d0daf5721bf174f8e54">osPoolFree</a> : Return a memory block to the memory pool.</li>
</ul>
</li>
<li><a class="el" href="group__CMSIS__RTOS__Message.html">Message Queue</a><ul>
<li><a class="el" href="group__CMSIS__RTOS__Message.html#gaf3b9345cf426304d46565152bc26fb78">osMessageCreate</a> : Define and initialize a message queue.</li>
<li><a class="el" href="group__CMSIS__RTOS__Message.html#gac0dcf462fc92de8ffaba6cc004514a6d">osMessagePut</a> : Put a message into a message queue.</li>
<li><a class="el" href="group__CMSIS__RTOS__Message.html#ga6c6892b8f2296cca6becd57ca2d7e1ae">osMessageGet</a> : Get a message or suspend thread execution until message arrives.</li>
</ul>
</li>
<li><a class="el" href="group__CMSIS__RTOS__Mail.html">Mail Queue</a><ul>
<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>
<li><a class="el" href="group__CMSIS__RTOS__Mail.html#gadf5ce811bd6a56e617e902a1db6c2194">osMailAlloc</a> : Allocate a memory block.</li>
<li><a class="el" href="group__CMSIS__RTOS__Mail.html#ga8fde74f6fe5b9e88f75cc5eb8f2124fd">osMailCAlloc</a> : Allocate a memory block and zero-set this block.</li>
<li><a class="el" href="group__CMSIS__RTOS__Mail.html#ga485ef6f81854ebda8ffbce4832181e02">osMailPut</a> : Put a memory block into a mail queue.</li>
<li><a class="el" href="group__CMSIS__RTOS__Mail.html#gac6ad7e6e7d6c4a80e60da22c57a42ccd">osMailGet</a> : Get a mail or suspend thread execution until mail arrives.</li>
<li><a class="el" href="group__CMSIS__RTOS__Mail.html#ga27c1060cf21393f96b4fd1ed1c0167cc">osMailFree</a> : Return a memory block to the mail queue.</li>
</ul>
</li>
<li><a class="el" href="group__RTX__Global__Functions.html">RTX Specific Functions</a><ul>
<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>
<li><a class="el" href="group__RTX__Global__Functions.html#ga3e9c57746ccbdfe90464ad50513c569e">os_suspend</a> : Suspend the RTX task scheduler.</li>
<li><a class="el" href="group__RTX__Global__Functions.html#ga1b85a217d43e6b971ffcf24f8aae1c33">os_resume</a> : Resume the RTX task scheduler.</li>
<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>
<li><a class="el" href="group__RTX__Global__Functions.html#ga567543bf38239a91f09751686c23017b">os_tick_val</a> : Get alternative hardware timer's current value.</li>
<li><a class="el" href="group__RTX__Global__Functions.html#gad5deddec3fea0fb31798f571afc3c692">os_tick_ovf</a> : Get alternative hardware timer's overflow flag.</li>
<li><a class="el" href="group__RTX__Global__Functions.html#ga85dab8408f27236c7341a69feb6258c7">os_tick_irqack</a> : Acknowledge alternative hardware timer interrupt.</li>
<li><a class="el" href="group__RTX__Global__Functions.html#ga651ae76b3acf45f80bf0e0487b51d6e6">os_error</a> : Called when a runtime error is detected.</li>
</ul>
</li>
</ul>
<h1><a class="anchor" id="CMSIS_RTOS_TimeOutValue"></a>
Timout Value</h1>
<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>
<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>
<div class="image">
<img src="TimerValues.png" alt="TimerValues.png"/>
<div class="caption">
Timer Values</div></div>
<h1><a class="anchor" id="CMSIS_RTOS_ISR_Calls"></a>
Calls from Interrupt Service Routines</h1>
<p>The following CMSIS-RTOS functions can be called from threads and Interrupt Service Routines (ISR):</p>
<ul>
<li><a class="el" href="group__CMSIS__RTOS__KernelCtrl.html#ga3b571de44cd3094c643247a7397f86b5">osKernelRunning</a></li>
<li><a class="el" href="group__CMSIS__RTOS__SignalMgmt.html#ga3de2730654589d6c3559c4b9e2825553">osSignalSet</a></li>
<li><a class="el" href="group__CMSIS__RTOS__SemaphoreMgmt.html#gab108914997c49e14d8ff1ae0d1988ca0">osSemaphoreRelease</a></li>
<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>
<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>
<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>
</ul>
<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>
<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>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="index.html">index</a></li>
<li class="footer">Generated on Wed Feb 8 2017 10:21:02 for CMSIS-RTOS by ARM Ltd. All rights reserved.
<!--
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6
-->
</li>
</ul>
</div>
</body>
</html>