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>Reading Test Results</title>
7 <title>CMSIS-Driver Validation: Reading Test Results</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.2.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('test_results.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>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><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">Reading Test Results </div> </div>
114 <div class="contents">
115 <div class="textblock"><p>The tests <a class="el" href="group__spi__funcs.html#ga20fdfd0f18a99ed6657b11bf41027e8f">SPI_Loopback_CheckBusSpeed</a> and <a class="el" href="group__usart__funcs.html#ga9dcba9495e1082c6318a98a8cc5196b9">USART_Loopback_CheckBaudrate</a> may issue warnings when using the default settings (especially loopback communication tests for SPI and USART): </p>
116 <pre class="fragment">CMSIS-Driver Test Suite Nov 18 2015 09:26:38
118 TEST 01: SPI_GetCapabilities PASSED
119 TEST 02: SPI_Initialization PASSED
120 TEST 03: SPI_PowerControl
121 DV_SPI.c (244) [WARNING] Low power is not supported
122 TEST 04: SPI_Config_PolarityPhase PASSED
123 TEST 05: SPI_Config_DataBits PASSED
124 TEST 06: SPI_Config_BitOrder
125 DV_SPI.c (315) [WARNING] Bit order LSB_MSB is not supported
126 TEST 07: SPI_Config_SSMode
127 DV_SPI.c (343) [WARNING] Slave select MASTER_HW_INPUT is not supported
128 TEST 08: SPI_Config_BusSpeed PASSED
129 TEST 09: SPI_Config_CommonParams PASSED
130 TEST 10: SPI_Send PASSED
131 TEST 11: SPI_Receive PASSED
132 TEST 12: SPI_Loopback_CheckBusSpeed
133 DV_SPI.c (525) [WARNING] At 25000kHz: measured time is 2.437125 x expected time
134 TEST 13: SPI_Loopback_Transfer PASSED
135 TEST 14: SPI_CheckInvalidInit NOT EXECUTED
136 </pre><p>The measured time is depending mainly on two factors: <b>DMA</b> and <b>software</b> <b>overhead</b>.</p>
137 <p>If you are not using <b>DMA</b> for data transfer, an interrupt is generated, in worst case, for every transferred byte. The interrupt handling overhead for each byte can produce 10 times slower transfer than DMA. DMA will transfer the data without overhead. Thus, only bus speed/baudrate tests with DMA enabled should be considered for optimization. In case DMA cannot be used (because no DMA channel is left to be used for example), the user needs to be aware that the data rates will decrease significantly.</p>
138 <p>The <b>software</b> <b>overhead</b> is introduced by the way the measurement is done. When the measurement is started a system tick value is stored and then the transfer is set up and started. The software then needs to determine when the transfer has ended and calculate required time difference by using previously stored system ticks and current system ticks. Usually, the software overhead is a constant number of CPU cycles. The total amount of time required for the software overhead depends on the actual CPU that is used and on the optimization level used during build. <br/>
139 Increasing the <b>Buffer size for baudrate test</b> reduces the software overhead effect. The following calculation example explains why.</p>
140 <p><b>Calculation</b> <b>Example</b> </p>
141 <p>SPI bus speed = 25 Mbps</p>
143 <li>Buffer size for baudrate tests = 512 byte (default value, equals 512 * 8 bit)</li>
144 <li>Actual bus speed = 18 Mbps (read from driver)</li>
145 <li>Expected time to transfer data = 227 µs (512 * 8 bit/18 Mbps)</li>
146 <li>Measured time = 245 µs = 227 µs + 18 µs (coming from a software overhead)</li>
147 <li>This results in a measured/expected time ratio of 1.08 which will lead to a warning</li>
149 <p>Using a buffer size of 8192 bytes in the example above will reduce the software overhead to less than 1% (which will issue no warning anymore). </p>
150 </div></div><!-- contents -->
151 </div><!-- doc-content -->
152 <!-- start footer part -->
153 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
155 <li class="footer">Generated on Thu Feb 21 2019 15:24:48 for CMSIS-Driver Validation by ARM Ltd. All rights reserved.
157 <a href="http://www.doxygen.org/index.html">
158 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6