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">
4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
6 <title>Resource Requirements</title>
7 <title>CMSIS-Driver Validation: Resource Requirements</title>
8 <link href="tabs.css" rel="stylesheet" type="text/css"/>
9 <link href="drv.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);
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); });
25 <link href="stylsheetf" rel="stylesheet" type="text/css" />
28 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
30 <table cellspacing="0" cellpadding="0">
32 <tr style="height: 46px;">
33 <td id="projectlogo"><img alt="Logo" src="keilarm.png"/></td>
34 <td style="padding-left: 0.5em;">
35 <div id="projectname">CMSIS-Driver Validation
36  <span id="projectnumber">Version 1.4.0</span>
38 <div id="projectbrief">Driver Validation</div>
44 <!-- end header part -->
45 <div id="DRVnav" class="tabs1">
47 <script type="text/javascript">
49 writeComponentTabs.call(this);
54 <!-- Generated by Doxygen 1.8.6 -->
55 <script type="text/javascript">
56 var searchBox = new SearchBox("searchBox", "search",false,'Search');
58 <div id="navrow1" class="tabs">
60 <li><a href="index.html"><span>Main Page</span></a></li>
61 <li class="current"><a href="pages.html"><span>Usage and Description</span></a></li>
62 <li><a href="modules.html"><span>Reference</span></a></li>
64 <div id="MSearchBox" class="MSearchBoxInactive">
66 <img id="MSearchSelect" src="search/mag_sel.png"
67 onmouseover="return searchBox.OnSearchSelectShow()"
68 onmouseout="return searchBox.OnSearchSelectHide()"
70 <input type="text" id="MSearchField" value="Search" accesskey="S"
71 onfocus="searchBox.OnSearchFieldFocus(true)"
72 onblur="searchBox.OnSearchFieldFocus(false)"
73 onkeyup="searchBox.OnSearchFieldChange(event)"/>
74 </span><span class="right">
75 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
82 <div id="side-nav" class="ui-resizable side-nav-resizable">
84 <div id="nav-tree-contents">
85 <div id="nav-sync" class="sync"></div>
88 <div id="splitbar" style="-moz-user-select:none;"
89 class="ui-resizable-handle">
92 <script type="text/javascript">
93 $(document).ready(function(){initNavTree('resource_requirements.html','');});
95 <div id="doc-content">
96 <!-- window showing the filter options -->
97 <div id="MSearchSelectWindow"
98 onmouseover="return searchBox.OnSearchSelectShow()"
99 onmouseout="return searchBox.OnSearchSelectHide()"
100 onkeydown="return searchBox.OnSearchSelectKey(event)">
101 <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Pages</a></div>
103 <!-- iframe showing the search results (closed by default) -->
104 <div id="MSearchResultsWindow">
105 <iframe src="javascript:void(0)" frameborder="0"
106 name="MSearchResults" id="MSearchResults">
111 <div class="headertitle">
112 <div class="title">Resource Requirements </div> </div>
114 <div class="contents">
115 <div class="textblock"><h1><a class="anchor" id="heap_req"></a>
116 Heap Requirements</h1>
117 <p>Heap is used by memory allocation functions. It is configured in the <a href="http://www.keil.com/support/man/docs/gsac/gsac_startupcodecortex.htm" class="el" target="_blank">startup_device.s</a> file located under the <b>Device</b> component class.</p>
118 <p>Additional memory is allocated for the validation framework and for the buffers that are used in the driver tests.</p>
119 <p>For the validation framework add 1024 bytes of heap. Then, double the amount of the largest buffer size specified in the <a class="el" href="test_setup.html#step4">DV_Config.h</a> file and add this as well.</p>
120 <table class="doxtable">
122 <th align="left">Option (under section Heap Configuration) </th><th align="left">Increase Value by </th></tr>
124 <td align="left">Heap Size (in Bytes) </td><td align="left">+ (1024 + 2 x maximum buffer size) </td></tr>
126 <p><b>Calculation</b> <b>Example</b> </p>
127 <p>Let's assume that the default heap size in your device's startup file is <code>0x400</code> (which is 1024 bytes). Add 1024 for the framework and for example another 2048 bytes if you are using the default <b>Buffer</b> <b>Size</b> of 512 bytes but you have set the <b>Buffer size for baudrate tests</b> to 1024 bytes. This computes to a total heap of 3584 bytes which is equivalent to <code>0xE00</code>. Set this number in the startup file.</p>
128 <h1><a class="anchor" id="rtos2_req"></a>
129 CMSIS-RTOS2 Requirements</h1>
130 <p>The thread requirements need to be reflected in the CMSIS-RTOS2 configuration. Refer to the <a href="http://www.keil.com/pack/doc/cmsis/RTOS2/html/index.html" class="el" target="_blank">CMSIS-RTOS2 Reference</a> for further details.</p>
131 <p>For <a href="http://www.keil.com/pack/doc/cmsis/RTOS2/html/rtx5_impl.html" class="el" target="_blank">CMSIS-RTOS2 RTX5</a>, thread requirements are configured in the <a href="http://www.keil.com/pack/doc/cmsis/RTOS2/html/config_rtx5.html" class="el" target="_blank">RTX_Config.h</a> file located under the <b>CMSIS</b> component class:</p>
132 <table class="doxtable" summary="CMSIS-RTOS2 Configuration">
134 <th align="left">Option (under section Thread Configuration) </th><th>Set Value to </th></tr>
136 <td>Default Thread stack size [bytes] </td><td>2048 </td></tr>
138 <td>Global Dynamic Memory size [bytes] (Note 1) </td><td>8192 </td></tr>
140 <dl class="section note"><dt>Note</dt><dd>Note 1: This setting is only necessary for WiFi driver testing, for other tests default setting of 4096 is sufficient.</dd></dl>
141 <h1><a class="anchor" id="rtos_req"></a>
142 CMSIS-RTOS Requirements</h1>
143 <p>Instead of CMSIS-RTOS2 you can use CMSIS-RTOS. In this case the <code>main</code> thread is implicitly created. For proper operation, you need to add a certain amount of thread stack size to the <code>main</code> thread.</p>
144 <p>The thread requirements need to be reflected in the CMSIS-RTOS configuration. Refer to the <a href="http://www.keil.com/pack/doc/cmsis/RTOS/html/index.html" class="el" target="_blank">CMSIS-RTOS Reference</a> for further details.</p>
145 <p>For <a href="http://www.keil.com/pack/doc/cmsis/RTOS/html/rtxImplementation.html" class="el" target="_blank">CMSIS-RTOS RTX</a>, thread requirements are configured in the <a href="http://www.keil.com/pack/doc/cmsis/RTOS/html/configure.html" class="el" target="_blank">RTX_Conf_CM.c</a> file located under the <b>CMSIS</b> component class:</p>
146 <table class="doxtable" summary="CMSIS-RTOS Configuration">
148 <th align="left">Option (under section Thread Configuration) </th><th>Set Value to </th></tr>
150 <td>Default Thread stack size [bytes] </td><td>2048 </td></tr>
152 <td>Main Thread stack size [bytes] </td><td>2048 </td></tr>
154 <dl class="section note"><dt>Note</dt><dd>Do not forget to set the correct <b>RTOS Kernel Timer input clock frequency [Hz]</b> otherwise the tests will not run properly on the device.</dd>
156 Only WiFi tests create one additional thread for socket testing and usually WiFi drivers have a thread for processing messages. </dd></dl>
157 </div></div><!-- contents -->
158 </div><!-- doc-content -->
159 <!-- start footer part -->
160 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
162 <li class="footer">Generated on Mon Dec 2 2019 12:02:23 for CMSIS-Driver Validation by ARM Ltd. All rights reserved.
164 <a href="http://www.doxygen.org/index.html">
165 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6