• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# swtmr<a name="EN-US_TOPIC_0000001133846478"></a>
2
3-   [Command Function](#section166171064814)
4-   [Syntax](#section424011111682)
5-   [Parameters](#section1268410459465)
6-   [Usage](#section169806213815)
7-   [Example](#section16676026389)
8-   [Output](#section1541991614710)
9
10## Command Function<a name="section166171064814"></a>
11
12This command is used to query information about system software timers.
13
14## Syntax<a name="section424011111682"></a>
15
16swtmr \[_ID_\]
17
18## Parameters<a name="section1268410459465"></a>
19
20**Table  1**  Parameter description
21
22<a name="table517mcpsimp"></a>
23<table><thead align="left"><tr id="row523mcpsimp"><th class="cellrowborder" valign="top" width="21%" id="mcps1.2.4.1.1"><p id="p525mcpsimp"><a name="p525mcpsimp"></a><a name="p525mcpsimp"></a>Parameter</p>
24</th>
25<th class="cellrowborder" valign="top" width="52%" id="mcps1.2.4.1.2"><p id="p527mcpsimp"><a name="p527mcpsimp"></a><a name="p527mcpsimp"></a>Description</p>
26</th>
27<th class="cellrowborder" valign="top" width="27%" id="mcps1.2.4.1.3"><p id="p529mcpsimp"><a name="p529mcpsimp"></a><a name="p529mcpsimp"></a>Value Range</p>
28</th>
29</tr>
30</thead>
31<tbody><tr id="row530mcpsimp"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.2.4.1.1 "><p id="p532mcpsimp"><a name="p532mcpsimp"></a><a name="p532mcpsimp"></a>ID</p>
32</td>
33<td class="cellrowborder" valign="top" width="52%" headers="mcps1.2.4.1.2 "><p id="p534mcpsimp"><a name="p534mcpsimp"></a><a name="p534mcpsimp"></a>Specifies the ID of a software timer.</p>
34</td>
35<td class="cellrowborder" valign="top" width="27%" headers="mcps1.2.4.1.3 "><p id="p536mcpsimp"><a name="p536mcpsimp"></a><a name="p536mcpsimp"></a>[0,0xFFFFFFFF]</p>
36</td>
37</tr>
38</tbody>
39</table>
40
41## Usage<a name="section169806213815"></a>
42
43-   If no parameter is specified, information about all software timers is displayed.
44-   If the  **ID**  parameter is specified, information about the specified software timer is displayed.
45
46## Example<a name="section16676026389"></a>
47
48Run  **swtmr**  and  **swtmr 1**.
49
50## Output<a name="section1541991614710"></a>
51
52**Figure  1**  Querying information about all software timers<a name="fig9860611451"></a>
53![](figure/querying-information-about-all-software-timers.png "querying-information-about-all-software-timers")
54
55**Figure  2**  Querying information about software timer 1<a name="fig22051415124512"></a>
56![](figure/querying-information-about-software-timer-1.png "querying-information-about-software-timer-1")
57
58**Table  2**  Output
59
60<a name="table551mcpsimp"></a>
61<table><thead align="left"><tr id="row556mcpsimp"><th class="cellrowborder" valign="top" width="50%" id="mcps1.2.3.1.1"><p id="p558mcpsimp"><a name="p558mcpsimp"></a><a name="p558mcpsimp"></a>Parameter</p>
62</th>
63<th class="cellrowborder" valign="top" width="50%" id="mcps1.2.3.1.2"><p id="p560mcpsimp"><a name="p560mcpsimp"></a><a name="p560mcpsimp"></a>Description</p>
64</th>
65</tr>
66</thead>
67<tbody><tr id="row561mcpsimp"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p563mcpsimp"><a name="p563mcpsimp"></a><a name="p563mcpsimp"></a>SwTmrID</p>
68</td>
69<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p565mcpsimp"><a name="p565mcpsimp"></a><a name="p565mcpsimp"></a>ID of the software timer</p>
70</td>
71</tr>
72<tr id="row566mcpsimp"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p568mcpsimp"><a name="p568mcpsimp"></a><a name="p568mcpsimp"></a>State</p>
73</td>
74<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p570mcpsimp"><a name="p570mcpsimp"></a><a name="p570mcpsimp"></a>Status of the software timer</p>
75<p id="p88402543474"><a name="p88402543474"></a><a name="p88402543474"></a>The value can be <strong id="b164905263633836"><a name="b164905263633836"></a><a name="b164905263633836"></a>UnUsed</strong>, <strong id="b138979237833836"><a name="b138979237833836"></a><a name="b138979237833836"></a>Created</strong>, or <strong id="b3849463233836"><a name="b3849463233836"></a><a name="b3849463233836"></a>Ticking</strong>.</p>
76</td>
77</tr>
78<tr id="row571mcpsimp"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p573mcpsimp"><a name="p573mcpsimp"></a><a name="p573mcpsimp"></a>Mode</p>
79</td>
80<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p575mcpsimp"><a name="p575mcpsimp"></a><a name="p575mcpsimp"></a>Mode of the software timer</p>
81<p id="p657320204499"><a name="p657320204499"></a><a name="p657320204499"></a>The value can be <strong id="b201632419733836"><a name="b201632419733836"></a><a name="b201632419733836"></a>Once</strong>, <strong id="b45281151733836"><a name="b45281151733836"></a><a name="b45281151733836"></a>Period</strong>, or <strong id="b73443815433836"><a name="b73443815433836"></a><a name="b73443815433836"></a>NSD</strong> (one-shot timer that will not be automatically deleted after the timer has expired).</p>
82</td>
83</tr>
84<tr id="row576mcpsimp"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p578mcpsimp"><a name="p578mcpsimp"></a><a name="p578mcpsimp"></a>Interval</p>
85</td>
86<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p580mcpsimp"><a name="p580mcpsimp"></a><a name="p580mcpsimp"></a>Number of ticks used by the software timer</p>
87</td>
88</tr>
89<tr id="row581mcpsimp"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p583mcpsimp"><a name="p583mcpsimp"></a><a name="p583mcpsimp"></a>Count</p>
90</td>
91<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p585mcpsimp"><a name="p585mcpsimp"></a><a name="p585mcpsimp"></a>Number of times that the software timer has been used</p>
92</td>
93</tr>
94<tr id="row586mcpsimp"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p588mcpsimp"><a name="p588mcpsimp"></a><a name="p588mcpsimp"></a>Arg</p>
95</td>
96<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p590mcpsimp"><a name="p590mcpsimp"></a><a name="p590mcpsimp"></a>Input parameter passed</p>
97</td>
98</tr>
99<tr id="row591mcpsimp"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p593mcpsimp"><a name="p593mcpsimp"></a><a name="p593mcpsimp"></a>handlerAddr</p>
100</td>
101<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p595mcpsimp"><a name="p595mcpsimp"></a><a name="p595mcpsimp"></a>Callback address</p>
102</td>
103</tr>
104</tbody>
105</table>
106
107>![](../public_sys-resources/icon-note.gif) **NOTE:**
108>-   The  **ID**  value can be in decimal or hexadecimal format.
109>-   If the  **ID**  value is within the range of \[0,  _Number of current software timers - 1_\], the status of the specified software timer is returned. For other values, an error message is displayed.
110
111