Welcome to mirror list, hosted at ThFree Co, Russian Federation.

group__CMSIS__RTOS__TickAPI.html « html « RTOS2 « docs « CMSIS « Drivers - github.com/Flipper-Zero/STM32CubeWB.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 87a686ad714323695ae3c8fea50993c327d5a088 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
<!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>OS Tick API</title>
<title>CMSIS-RTOS2: OS Tick API</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-RTOS2
   &#160;<span id="projectnumber">Version 2.1.3</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><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('group__CMSIS__RTOS__TickAPI.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="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">OS Tick API</div>  </div>
</div><!--header-->
<div class="contents">

<p>System tick timer interface for periodic RTOS Kernel Ticks defined in <b>os_tick.h</b>  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga5eeffb4d9dc6c6802fee8898096d9a59"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CMSIS__RTOS__TickAPI.html#ga5eeffb4d9dc6c6802fee8898096d9a59">OS_Tick_Setup</a> (uint32_t freq, <a class="el" href="os__tick_8h.html#afbfa2180a9b6208f34891d539e9e2d52">IRQHandler_t</a> handler)</td></tr>
<tr class="memdesc:ga5eeffb4d9dc6c6802fee8898096d9a59"><td class="mdescLeft">&#160;</td><td class="mdescRight">Setup OS Tick timer to generate periodic RTOS Kernel Ticks.  <a href="#ga5eeffb4d9dc6c6802fee8898096d9a59">More...</a><br/></td></tr>
<tr class="separator:ga5eeffb4d9dc6c6802fee8898096d9a59"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3e47971bf3a02599d9ecb32208adafec"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CMSIS__RTOS__TickAPI.html#ga3e47971bf3a02599d9ecb32208adafec">OS_Tick_Enable</a> (void)</td></tr>
<tr class="memdesc:ga3e47971bf3a02599d9ecb32208adafec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable OS Tick timer interrupt.  <a href="#ga3e47971bf3a02599d9ecb32208adafec">More...</a><br/></td></tr>
<tr class="separator:ga3e47971bf3a02599d9ecb32208adafec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5e325c304fef5003b1dc31906f6a3056"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CMSIS__RTOS__TickAPI.html#ga5e325c304fef5003b1dc31906f6a3056">OS_Tick_Disable</a> (void)</td></tr>
<tr class="memdesc:ga5e325c304fef5003b1dc31906f6a3056"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disable OS Tick timer interrupt.  <a href="#ga5e325c304fef5003b1dc31906f6a3056">More...</a><br/></td></tr>
<tr class="separator:ga5e325c304fef5003b1dc31906f6a3056"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga57065ec4b281504ad4de13a419870b4f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CMSIS__RTOS__TickAPI.html#ga57065ec4b281504ad4de13a419870b4f">OS_Tick_AcknowledgeIRQ</a> (void)</td></tr>
<tr class="memdesc:ga57065ec4b281504ad4de13a419870b4f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Acknowledge execution of OS Tick timer interrupt.  <a href="#ga57065ec4b281504ad4de13a419870b4f">More...</a><br/></td></tr>
<tr class="separator:ga57065ec4b281504ad4de13a419870b4f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa8b4eca23e3ffe2df403291958cdc905"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CMSIS__RTOS__TickAPI.html#gaa8b4eca23e3ffe2df403291958cdc905">OS_Tick_GetIRQn</a> (void)</td></tr>
<tr class="memdesc:gaa8b4eca23e3ffe2df403291958cdc905"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get OS Tick timer IRQ number.  <a href="#gaa8b4eca23e3ffe2df403291958cdc905">More...</a><br/></td></tr>
<tr class="separator:gaa8b4eca23e3ffe2df403291958cdc905"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga936217ea28236fb57648973e0d8f627a"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CMSIS__RTOS__TickAPI.html#ga936217ea28236fb57648973e0d8f627a">OS_Tick_GetClock</a> (void)</td></tr>
<tr class="memdesc:ga936217ea28236fb57648973e0d8f627a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get OS Tick timer clock frequency.  <a href="#ga936217ea28236fb57648973e0d8f627a">More...</a><br/></td></tr>
<tr class="separator:ga936217ea28236fb57648973e0d8f627a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga123151dc19d5a94a68f12cdbf61a9bb5"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CMSIS__RTOS__TickAPI.html#ga123151dc19d5a94a68f12cdbf61a9bb5">OS_Tick_GetInterval</a> (void)</td></tr>
<tr class="memdesc:ga123151dc19d5a94a68f12cdbf61a9bb5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get OS Tick timer interval reload value.  <a href="#ga123151dc19d5a94a68f12cdbf61a9bb5">More...</a><br/></td></tr>
<tr class="separator:ga123151dc19d5a94a68f12cdbf61a9bb5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa64a145a554f1e5077848938d7f39c92"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CMSIS__RTOS__TickAPI.html#gaa64a145a554f1e5077848938d7f39c92">OS_Tick_GetCount</a> (void)</td></tr>
<tr class="memdesc:gaa64a145a554f1e5077848938d7f39c92"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get OS Tick timer counter value.  <a href="#gaa64a145a554f1e5077848938d7f39c92">More...</a><br/></td></tr>
<tr class="separator:gaa64a145a554f1e5077848938d7f39c92"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1f9a593126b7f0b66fc526c2cebd6192"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CMSIS__RTOS__TickAPI.html#ga1f9a593126b7f0b66fc526c2cebd6192">OS_Tick_GetOverflow</a> (void)</td></tr>
<tr class="memdesc:ga1f9a593126b7f0b66fc526c2cebd6192"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get OS Tick timer overflow status.  <a href="#ga1f9a593126b7f0b66fc526c2cebd6192">More...</a><br/></td></tr>
<tr class="separator:ga1f9a593126b7f0b66fc526c2cebd6192"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
<p>The <b>OS Tick API</b> is an interface to a system timer that generates the Kernel Ticks.</p>
<p>All Cortex-M processors provide an unified System Tick Timer that is typically used to generate the RTOS Kernel Tick. The Cortex-A processors do not implement an unified system timer and required a device specific implementation.</p>
<p>CMSIS-RTOS2 provides in the directory <a class="el" href="index.html#directory">CMSIS/RTOS2/Source</a> the several OS Tick implementations that can be used by any RTOS kernel.</p>
<table class="doxtable">
<tr>
<th align="left">Filename </th><th align="left">OS Tick Implementation for...  </th></tr>
<tr>
<td align="left"><b>os_systick.c</b> </td><td align="left">Cortex-M SysTick timer </td></tr>
<tr>
<td align="left"><b>os_tick_gtim.c</b> </td><td align="left">Cortex-A Generic Timer (available in some devices) </td></tr>
<tr>
<td align="left"><b>os_tick_ptim.c</b> </td><td align="left">Cortex-A Private Timer (available in some devices) </td></tr>
</table>
<dl class="section note"><dt>Note</dt><dd>The above OS Tick source files implement <code>weak</code> functions which may be overwritten by user-specific implementations. </dd></dl>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga5eeffb4d9dc6c6802fee8898096d9a59"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t OS_Tick_Setup </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>freq</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="os__tick_8h.html#afbfa2180a9b6208f34891d539e9e2d52">IRQHandler_t</a>&#160;</td>
          <td class="paramname"><em>handler</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">freq</td><td>tick frequency in Hz </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">handler</td><td>tick IRQ handler </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 on success, -1 on error.</dd></dl>
<p>Setup OS Tick timer to generate periodic RTOS Kernel Ticks.</p>
<p>The timer should be configured to generate periodic interrupts at frequency specified by <em>freq</em>. The parameter <em>handler</em> defines the interrupt handler function that is called.</p>
<p>The timer should only be initialized and configured but must not be started to create interrupts. The RTOS kernel calls the function <a class="el" href="group__CMSIS__RTOS__TickAPI.html#ga3e47971bf3a02599d9ecb32208adafec">OS_Tick_Enable</a> to start the timer interrupts.</p>
<p><b>Cortex-M SysTick implementation:</b> </p>
<div class="fragment"><div class="line"><span class="preprocessor">#ifndef SYSTICK_IRQ_PRIORITY</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#define SYSTICK_IRQ_PRIORITY    0xFFU</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span></div>
<div class="line"><span class="keyword">static</span> uint8_t PendST;</div>
<div class="line"></div>
<div class="line">int32_t  <a class="code" href="group__CMSIS__RTOS__TickAPI.html#ga5eeffb4d9dc6c6802fee8898096d9a59">OS_Tick_Setup</a> (uint32_t freq, <a class="code" href="os__tick_8h.html#afbfa2180a9b6208f34891d539e9e2d52">IRQHandler_t</a> handler) {</div>
<div class="line">  (void)handler;</div>
<div class="line">  uint32_t load;</div>
<div class="line"></div>
<div class="line">  <span class="keywordflow">if</span> (freq == 0U) {</div>
<div class="line">    <span class="keywordflow">return</span> (-1);</div>
<div class="line">  }</div>
<div class="line"></div>
<div class="line">  load = (SystemCoreClock / freq) - 1U;</div>
<div class="line">  <span class="keywordflow">if</span> (load &gt; 0x00FFFFFFU) {</div>
<div class="line">    <span class="keywordflow">return</span> (-1);</div>
<div class="line">  }</div>
<div class="line"></div>
<div class="line">  NVIC_SetPriority(SysTick_IRQn, SYSTICK_IRQ_PRIORITY);</div>
<div class="line"></div>
<div class="line">  SysTick-&gt;CTRL =  SysTick_CTRL_CLKSOURCE_Msk | SysTick_CTRL_TICKINT_Msk;</div>
<div class="line">  SysTick-&gt;LOAD =  load;</div>
<div class="line">  SysTick-&gt;VAL  =  0U;</div>
<div class="line"></div>
<div class="line">  PendST = 0U;</div>
<div class="line"></div>
<div class="line">  <span class="keywordflow">return</span> (0);</div>
<div class="line">}</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="ga3e47971bf3a02599d9ecb32208adafec"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t OS_Tick_Enable </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Enable OS Tick timer interrupt.</p>
<p>Enable and start the OS Tick timer to generate periodic RTOS Kernel Tick interrupts.</p>
<p><b>Cortex-M SysTick implementation:</b> </p>
<div class="fragment"><div class="line">int32_t  <a class="code" href="group__CMSIS__RTOS__TickAPI.html#ga3e47971bf3a02599d9ecb32208adafec">OS_Tick_Enable</a> (<span class="keywordtype">void</span>) {</div>
<div class="line"></div>
<div class="line">  <span class="keywordflow">if</span> (PendST != 0U) {</div>
<div class="line">    PendST = 0U;</div>
<div class="line">    SCB-&gt;ICSR = SCB_ICSR_PENDSTSET_Msk;</div>
<div class="line">  }</div>
<div class="line"></div>
<div class="line">  SysTick-&gt;CTRL |=  SysTick_CTRL_ENABLE_Msk;</div>
<div class="line"></div>
<div class="line">  <span class="keywordflow">return</span> (0);</div>
<div class="line">}</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="ga5e325c304fef5003b1dc31906f6a3056"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t OS_Tick_Disable </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Disable OS Tick timer interrupt.</p>
<p>Stop the OS Tick timer and disable generation of RTOS Kernel Tick interrupts.</p>
<p><b>Cortex-M SysTick implementation:</b> </p>
<div class="fragment"><div class="line">int32_t  <a class="code" href="group__CMSIS__RTOS__TickAPI.html#ga5e325c304fef5003b1dc31906f6a3056">OS_Tick_Disable</a> (<span class="keywordtype">void</span>) {</div>
<div class="line"></div>
<div class="line">  SysTick-&gt;CTRL &amp;= ~SysTick_CTRL_ENABLE_Msk;</div>
<div class="line"></div>
<div class="line">  <span class="keywordflow">if</span> ((SCB-&gt;ICSR &amp; SCB_ICSR_PENDSTSET_Msk) != 0U) {</div>
<div class="line">    SCB-&gt;ICSR = SCB_ICSR_PENDSTCLR_Msk;</div>
<div class="line">    PendST = 1U;</div>
<div class="line">  }</div>
<div class="line"></div>
<div class="line">  <span class="keywordflow">return</span> (0);</div>
<div class="line">}</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="ga57065ec4b281504ad4de13a419870b4f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t OS_Tick_AcknowledgeIRQ </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Acknowledge execution of OS Tick timer interrupt.</p>
<p>Acknowledge the execution of the OS Tick timer interrupt function, for example clear the pending flag.</p>
<p><b>Cortex-M SysTick implementation:</b></p>
<div class="fragment"><div class="line">int32_t  <a class="code" href="group__CMSIS__RTOS__TickAPI.html#ga57065ec4b281504ad4de13a419870b4f">OS_Tick_AcknowledgeIRQ</a> (<span class="keywordtype">void</span>) {</div>
<div class="line">  (void)SysTick-&gt;CTRL;</div>
<div class="line">  return (0);</div>
<div class="line">}</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="gaa8b4eca23e3ffe2df403291958cdc905"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t OS_Tick_GetIRQn </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>OS Tick IRQ number</dd></dl>
<p>Get OS Tick timer IRQ number.</p>
<p>Return the numeric value that identifies the interrupt called by the OS Tick timer.</p>
<p><b>Cortex-M SysTick implementation:</b></p>
<div class="fragment"><div class="line">int32_t  <a class="code" href="group__CMSIS__RTOS__TickAPI.html#gaa8b4eca23e3ffe2df403291958cdc905">OS_Tick_GetIRQn</a> (<span class="keywordtype">void</span>) {</div>
<div class="line">  <span class="keywordflow">return</span> (SysTick_IRQn);</div>
<div class="line">}</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="ga936217ea28236fb57648973e0d8f627a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t OS_Tick_GetClock </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>OS Tick timer clock frequency in Hz</dd></dl>
<p>Get OS Tick timer clock frequency.</p>
<p>Return the input clock frequency of the OS Tick timer. This is the increment rate of the counter value returned by the function <a class="el" href="group__CMSIS__RTOS__TickAPI.html#gaa64a145a554f1e5077848938d7f39c92">OS_Tick_GetCount</a>. This function is used to by the function <a class="el" href="group__CMSIS__RTOS__KernelCtrl.html#ga4d69215a93220f72be3684cad582f16a">osKernelGetSysTimerFreq</a>.</p>
<p><b>Cortex-M SysTick implementation:</b></p>
<div class="fragment"><div class="line">uint32_t <a class="code" href="group__CMSIS__RTOS__TickAPI.html#ga936217ea28236fb57648973e0d8f627a">OS_Tick_GetClock</a> (<span class="keywordtype">void</span>) {</div>
<div class="line">  <span class="keywordflow">return</span> (SystemCoreClock);</div>
<div class="line">}</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="ga123151dc19d5a94a68f12cdbf61a9bb5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t OS_Tick_GetInterval </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>OS Tick timer interval reload value</dd></dl>
<p>Get OS Tick timer interval reload value.</p>
<p>Return the number of counter ticks between to periodic OS Tick timer interrupts.</p>
<p><b>Cortex-M SysTick implementation:</b></p>
<div class="fragment"><div class="line">uint32_t <a class="code" href="group__CMSIS__RTOS__TickAPI.html#ga123151dc19d5a94a68f12cdbf61a9bb5">OS_Tick_GetInterval</a> (<span class="keywordtype">void</span>) {</div>
<div class="line">  <span class="keywordflow">return</span> (SysTick-&gt;LOAD + 1U);</div>
<div class="line">}</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="gaa64a145a554f1e5077848938d7f39c92"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t OS_Tick_GetCount </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>OS Tick timer counter value</dd></dl>
<p>Get OS Tick timer counter value.</p>
<p>Return the current value of the OS Tick counter: 0 ... (reload value -1). The reload value is returned by the function <a class="el" href="group__CMSIS__RTOS__TickAPI.html#ga123151dc19d5a94a68f12cdbf61a9bb5">OS_Tick_GetInterval</a>. The OS Tick timer counter value is used to by the function <a class="el" href="group__CMSIS__RTOS__KernelCtrl.html#gae0fcaff6cecfb4013bb556c87afcd7d2">osKernelGetSysTimerCount</a>.</p>
<p><b>Cortex-M SysTick implementation:</b></p>
<div class="fragment"><div class="line">uint32_t <a class="code" href="group__CMSIS__RTOS__TickAPI.html#gaa64a145a554f1e5077848938d7f39c92">OS_Tick_GetCount</a> (<span class="keywordtype">void</span>) {</div>
<div class="line">  uint32_t load = SysTick-&gt;LOAD;</div>
<div class="line">  <span class="keywordflow">return</span>  (load - SysTick-&gt;VAL);</div>
<div class="line">}</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="ga1f9a593126b7f0b66fc526c2cebd6192"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">OS_Tick_GetOverflow </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>OS Tick overflow status (1 - overflow, 0 - no overflow).</dd></dl>
<p>Get OS Tick timer overflow status.</p>
<p>Return the state of OS Tick timer interrupt pending bit that indicates timer overflows to adjust SysTimer calculations.</p>
<p><b>Cortex-M SysTick implementation:</b></p>
<div class="fragment"><div class="line">uint32_t <a class="code" href="group__CMSIS__RTOS__TickAPI.html#ga1f9a593126b7f0b66fc526c2cebd6192">OS_Tick_GetOverflow</a> (<span class="keywordtype">void</span>) {</div>
<div class="line">  <span class="keywordflow">return</span> ((SysTick-&gt;CTRL &gt;&gt; 16) &amp; 1U);</div>
<div class="line">}</div>
</div><!-- fragment --> 
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Wed Jul 10 2019 15:21:04 for CMSIS-RTOS2 Version 2.1.3 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>