]> begriffs open source - cmsis-driver-validation/blob - Doxygen/DriverValidation.txt
Updated version number in documentation revision history
[cmsis-driver-validation] / Doxygen / DriverValidation.txt
1 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
2 /**
3 \mainpage Introduction
4
5 This manual explains the scope and the usage of the Software Pack for \b CMSIS-Driver \b Validation.
6 <a href="http://www.keil.com/pack/doc/CMSIS/Driver/html/index.html" target="_blank">CMSIS-Driver</a> are standard peripheral
7 API interfaces that connect microcontroller peripherals with middleware or the user application. 
8
9 The Software Pack for CMSIS-Driver validation provides:
10   - Configurable validation tests for several CMSIS-Driver interfaces
11   - Example projects that show the usage of the CMSIS-Driver validation
12
13 The CMSIS-Driver validation tests and verifies:
14   - \b API \b interface \b interaction using the driver capabilities as well as valid and invalid parameters.
15   - \b Data \b communication with various transfer sizes and communication parameters (i.e. baudrate).
16   - \b Loopback \b communication (for some interfaces) for testing the underlying hardware.
17   - \b Transfer \b speed of the data communication with time measurement of data transfers (for interfaces with loopback
18     functionality).
19
20 The CMSIS-Driver Validation requires
21 <a href="http://www.keil.com/pack/doc/CMSIS/RTOS/html/index.html" target="_blank">CMSIS-RTOS</a> or
22 <a href="http://www.keil.com/pack/doc/CMSIS/RTOS2/html/index.html" target="_blank">CMSIS-RTOS2</a> functionality and can be
23 used to verify the setup and configuration of the CMSIS-Driver interfaces in a user system. It is also used to validate
24 implementation of a CMSIS-Driver interface.
25
26 The diagram below is an overview of the configuration for CMSIS-Driver validation.
27
28 \image html DVSuite.png
29
30 This manual contains the following chapters:
31   - \ref test_setup - Describes the general setup of the CMSIS-Driver validation test and how to generate test output.
32   - \ref test_results - Explains how to interpret the test results from loopback tests.
33   - \ref examples - Contains information of several example projects including the required hardware setup.
34   - \ref resource_requirements - Lists memory and CMSIS-RTOS requirements.
35   - <a class="el" href="./modules.html">Reference</a> - explains the individual tests for the various CMSIS-Driver
36     interfaces.
37
38 The Software Pack for CMSIS-Driver validation current tests the following interfaces:
39   - \ref can_funcs - Controller Area Network (CAN) peripheral.
40   - \ref eth_funcs - Interface to Ethernet MAC and PHY peripheral.
41   - \ref i2c_funcs - Inter-Integrated Circuit (I2C) multi-master serial single-ended bus interface driver.
42   - \ref mci_funcs - Memory card interface for SD/MMC memory.
43   - \ref spi_funcs - Serial Peripheral Interface (SPI) driver.
44   - \ref usart_funcs - Universal Synchronous and Asynchronous Receiver/Transmitter
45     (USART) interface driver.
46   - \ref usbd_funcs - Universal Serial Bus (USB) Device interface driver.
47   - \ref usbh_funcs - Universal Serial Bus (USB) Host interface driver.
48   - \ref wifi_funcs - WiFi (Wireless Fidelity Interface) module driver.
49
50 This manual assumes that you are familiar with MDK. Refer to
51 <a href="http://www2.keil.com/mdk5/install" target="_blank">MDK Version 5 - Getting Started</a> for additional information.
52
53 <hr>
54
55 Revision History
56 ----------------
57
58 Version     | Description
59 :-----------|:------------------------------------------
60 V1.4.0-dev0 | WiFi testing: Introduced test groups (each driver is organized in a group), updated examples
61 V1.3.1-dev2 | WiFi testing: Added upstream and downstream bandwidth testing, added Sockserver for PC with Microsoft Windows
62 V1.3.1-dev1 | WiFi testing: Added example for Inventek ISM43362 WiFi Driver testing on STMicroelectronics B-L475E-IOT01A1 board
63 V1.3.1-dev0 | Updated conditions to support all Cortex-M devices 
64 V1.3.0      | Added WiFi tests
65 V1.2.0      | Added CMSIS-RTOS2 and Arm Compiler 6 compatibility
66 V1.1.0      | Added USB Host, CAN and Ethernet Precision Time Protocol tests
67 V1.0.0      | Initial release for CMSIS-Driver API V2.0
68 */
69
70 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
71 /**
72 \page test_setup Test Setup
73
74 \section step1 Step 1: Create an MDK project with your target microcontroller device
75
76
77 \section step2 Step 2: Add required software components
78
79 For proper operation, add the following software components in the <b>Manage Run-Time Environment</b> window:
80 - <b>CMSIS:RTOS2 (API):Keil RTX5</b>
81 - <b>Compiler:I/O:STDOUT</b>, variant \b ITM or \b User if your hardware does not support ITM.
82 - <b>CMSIS:CMSIS Driver Validation:Framework</b>
83 - Any other component from <b>CMSIS:CMSIS Driver Validation</b>
84 - Resolve any validation messages
85
86
87 \section step3 Step 3: Add main.c
88
89 Right-click <b>Source Group 1...</b> and select <b>Add New Item to Group</b>. Select <b>User Code Template</b> and choose the
90 \b main file from <b>Device:Startup</b> or <b>CMSIS-RTOS2:Keil RTX5</b>.
91
92 Add this include:
93 \code
94 include "cmsis_dv.h"
95 \endcode
96
97 In the main function, after kernel initialization, create the \c cmsis_dv thread:
98 \code
99 osThreadNew(cmsis_dv, NULL, NULL);
100 \endcode
101 to run all tests that you have chosen in the next step.
102
103
104 \section step4 Step 4: Configure DV_Config.h
105
106 Open \c DV_Config.h under the <b>CMSIS Driver Validation</b> group in the Project window.
107
108 \image html dv_config_h.png "Configuration File DV_Config.h"
109
110 <b>Common Test Settings</b>
111
112 The common test settings help you to choose the output format of the test and the buffer sizes and buffer content that should
113 be used for the send, receive, and transfer tests:
114 - The \b Print \b Output \b Format lets you select if you wish to create the output as plain text or as styled XML.
115 - The <b>Buffer size for assertions results</b> determines the size of the buffer that can be observed in the \b Watch
116   window.
117 - \b Buffer \b sizes lets you select the buffer sizes that are used for data transfer. This setting has a direct impact on
118   required \ref step6 "heap".
119 - You can specify also the <b>Buffer size for baudrate test</b>. For USART you can set the <b>Percentual tolerance for baudrate 
120   test</b> and for SPI the <b>Percentual trigger for bus speed test</b>. Depending on the device \ref step7 "configuration", for 
121   example when DMA is not used, the transfers may have larger overhead which is more significant for higher bus speeds. The 
122   transfer overhead is reduced for larger transfer buffer sizes.
123 - Select your preferred <b>Buffer pattern</b>
124
125 <b>Driver-specific Settings</b>
126
127 Every interface has specific settings that can be changed in the according section:
128 - You need to specify the driver instance number (<b>Driver_<i>interface</i>#</b>) is used for the test. This is especially
129   important for microcontroller devices that have multiple peripherals of the same kind.
130 - Some drivers can have additional baudrate or timing settings.
131 - Select all driver tests that you wish to use. Note that all tests can run independently from each other. You do not need to
132   specify a certain order.
133
134 \note For more information on additional settings and the different driver test cases, check the
135 <a class="el" href="./modules.html">Reference</a> section.
136
137
138 \section step5 Step 5: Configure Keil RTX5
139
140 Open \b RTX_Config.h and edit set:
141 - <b>Default Thread stack size [bytes]</b> to \a 2048
142
143
144 \section step6 Step 6: Configure Heap
145
146 Depending on the buffer sizes that you have chosen in \ref step4 "step 4", you need to add more heap. Open your
147 startup_<i>device</i>.s file from the \b Device group in the \b Project window. Click on \b Configuration \b Wizard. Increase
148 the heap size:
149 - For the validation framework add 1024 bytes.
150 - double the largest buffer size you have set in the configuration file and add this as well.
151
152 Refer to the \ref resource_requirements section for a calculation example.
153
154
155 \section step7 Step 7: Configure the Device
156
157 Depending on your device, you might have different pin/hardware configuration options. Usually, you can configure the device
158 using the \c RTE_Device.h file from the \b Device group. Enable all interfaces you wish to use in the tests and make all
159 necessary pin-out changes required by your actual board layout (consult the board schematics). The pre-built
160 \ref examples "examples" are already configured for the underlying hardware.
161
162 For a robust test with good coverage, implement various targets with different settings:
163 - \b Enable/disable the \b DMA controller of your device
164 - Set different \b buffer \b sizes in \ref step4 "DV_Config.h"
165 - Select different compiler \b optimization \b levels in the
166   <a href="http://www.keil.com/support/man/docs/uv4/uv4_dg_adscc.htm" target="_blank">C/C++ tab</a> of the
167   <b>Options for Target</b> dialog.
168
169
170 \section step8 Step 8: Make Hardware Connections for Loopback Tests
171
172 These interfaces support loopback testing: \ref eth_funcs "Ethernet", \ref spi_funcs "SPI", and \ref usart_funcs "USART".
173 Connect the following pins on your target hardware together (refer to the hardware schematics):
174
175 - Ethernet: RX+ and TX+, RX- and TX-
176 - SPI: MISO and MOSI
177 - USART: RX and TX
178
179
180 \section step9 Step 9: Download and Run the Project
181
182 In the <b>Options for Target</b> dialog, under debug settings, ensure that \b Trace and ITM port \token{0} are enabled and
183 that the correct clock frequency is set:
184
185 \image html target_dialog.png "ITM Channel setting"
186
187 Build, load and run the project. The output is displayed in the <b>Debug (printf) Viewer</b> window:
188
189 \verbatim
190 CMSIS-Driver Test Suite   Oct  8 2015   17:12:21 
191
192 TEST 01: ETH_MAC_GetCapabilities          PASSED
193 TEST 02: ETH_MAC_Initialization           PASSED
194 TEST 03: ETH_MAC_PowerControl             
195   DV_ETH.c (163) [WARNING] Low power is not supported
196 TEST 04: ETH_MAC_SetBusSpeed              
197   DV_ETH.c (197) [WARNING] Link speed 1G is not supported
198 TEST 05: ETH_MAC_Config_Mode              PASSED
199 TEST 06: ETH_MAC_Config_CommonParams      PASSED
200 TEST 07: ETH_PHY_Initialization           PASSED
201 TEST 08: ETH_PHY_PowerControl             
202   DV_ETH.c (300) [WARNING] Low power is not supported
203 TEST 09: ETH_PHY_Config                   PASSED
204 TEST 10: ETH_Loopback_Transfer            PASSED
205 TEST 11: ETH_PHY_CheckInvalidInit         NOT EXECUTED
206 TEST 12: ETH_MAC_CheckInvalidInit         NOT EXECUTED
207
208 Test Summary: 12 Tests, 10 Executed, 7 Passed, 0 Failed, 3 Warnings.
209 Test Result: WARNING
210 \endverbatim
211
212 If you see warnings during loopback transfer tests, please read the section \ref test_results which gives you more
213 information on how to interpret the results.
214 */
215
216
217 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
218 /**
219 \page test_results Reading Test Results
220
221 The tests \ref SPI_Loopback_CheckBusSpeed and \ref USART_Loopback_CheckBaudrate may issue warnings when using the default
222 settings (especially loopback communication tests for SPI and USART):
223 \verbatim
224 CMSIS-Driver Test Suite   Nov 18 2015   09:26:38 
225
226 TEST 01: SPI_GetCapabilities              PASSED
227 TEST 02: SPI_Initialization               PASSED
228 TEST 03: SPI_PowerControl                 
229   DV_SPI.c (244) [WARNING] Low power is not supported
230 TEST 04: SPI_Config_PolarityPhase         PASSED
231 TEST 05: SPI_Config_DataBits              PASSED
232 TEST 06: SPI_Config_BitOrder              
233   DV_SPI.c (315) [WARNING] Bit order LSB_MSB is not supported
234 TEST 07: SPI_Config_SSMode                
235   DV_SPI.c (343) [WARNING] Slave select MASTER_HW_INPUT is not supported
236 TEST 08: SPI_Config_BusSpeed              PASSED
237 TEST 09: SPI_Config_CommonParams          PASSED
238 TEST 10: SPI_Send                         PASSED
239 TEST 11: SPI_Receive                      PASSED
240 TEST 12: SPI_Loopback_CheckBusSpeed       
241   DV_SPI.c (525) [WARNING] At 25000kHz: measured time is 2.437125 x expected time
242 TEST 13: SPI_Loopback_Transfer            PASSED
243 TEST 14: SPI_CheckInvalidInit             NOT EXECUTED
244 \endverbatim
245
246 The measured time is depending mainly on two factors: \b DMA and \b software \b overhead.
247
248 If you are not using \b DMA for data transfer, an interrupt is generated, in worst case, for every transferred byte. The
249 interrupt handling overhead for each byte can produce 10 times slower transfer than DMA. DMA will transfer the data
250 without overhead. Thus, only bus speed/baudrate tests with DMA enabled should be considered for
251 optimization. In case DMA cannot be used (because no DMA channel is left to be used for example), the user needs to be aware
252 that the data rates will decrease significantly.
253
254 The \b software \b overhead is introduced by the way the measurement is done. When the measurement is started a system tick 
255 value is stored and then the transfer is set up and started. The software then needs to determine when the transfer 
256 has ended and calculate required time difference by using previously stored system ticks and current system ticks.
257 Usually, the software overhead is a constant number of CPU cycles. The total amount of time required for the software overhead 
258 depends on the actual CPU that is used and on the optimization level used during build. \n
259 Increasing the <b>Buffer size for baudrate test</b> reduces the software overhead effect. The following calculation example
260 explains why.
261
262 \b Calculation \b Example
263
264 SPI bus speed = 25 Mbps
265
266 - Buffer size for baudrate tests = 512 byte (default value, equals 512 * 8 bit)
267 - Actual bus speed = 18 Mbps (read from driver)
268 - Expected time to transfer data = 227 µs (512 * 8 bit/18 Mbps)
269 - Measured time = 245 µs = 227 µs + 18 µs (coming from a software overhead)
270 - This results in a measured/expected time ratio of 1.08 which will lead to a warning
271
272 Using a buffer size of 8192 bytes in the example above will reduce the software overhead to less than 1% (which will issue no
273 warning anymore).
274 */
275
276
277 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
278 /**
279 \page examples Examples
280
281 This Software Pack contains a set or pre-built examples that show how to use the validation suite together with real
282 hardware. The following example projects are available. Use
283 <a href="http://www2.keil.com/mdk5/packinstaller" target="_blank">Pack Installer</a> to copy them to your machine:
284
285 - \subpage examples_xmc4500_relax
286 - \subpage examples_mcbstm32f200
287 - \subpage examples_mcbstm32f400
288 - \subpage examples_b_l475e_iot01a1
289 - \subpage examples_stm32f746g
290
291 \anchor example_targets
292 Targets
293 -------
294
295 All projects contain two targets:
296 - <b>Create Report</b>: Test results and statistics are printed to the file \c TestReport\TestReport.xml. 
297   Open the file in a web browser of your choice.
298   \note <span style="font-weight:bold; color:Green">Passed</span> Status means that test case has passed sucessfully.
299   \note <span style="font-weight:bold; color:DarkOrange">Passed</span> Status means that tests case has passed but there were some warnings (More details can be used to see the details).
300   \note <span style="font-weight:bold; color:Blue">Not executed</span> Status means test case did not check any assertions.
301   \note <span style="font-weight:bold; color:Red">Failed</span> Status means test case has failed (More details can be used to see the details).
302 - \b Debug: Results and statistics are printed to the Debug (printf) Viewer window through the ITM output. You can also
303   examine the results in the \b test_report buffer structure which is accessible through the \b Watch window.
304 */
305
306
307 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
308 /**
309 \page examples_xmc4500_relax Infineon XMC4500 Relax Kit
310
311 Software Setup
312 --------------
313
314 Using <a href="http://www2.keil.com/mdk5/packinstaller" target="_blank">Pack Installer</a>, copy the example project
315 <b>CMSIS-Driver Validation (XMC4500 Relax Lite Kit)</b> to your machine.
316
317 -# Choose one of the available \ref example_targets and build the project.
318 -# If you wish to test the loopback mode for some of the interfaces, refer to the next section for proper board
319    configuration.
320 -# Run the test on the target hardware using the on-board JLink-Lite debug adapter.
321
322 Hardware Setup
323 --------------
324
325 The following picture shows the necessary external loopback connections for the Keil MCBSTM32F400 evaluation board:
326  - UART2: \b P0.4 (UART2_RX)  and \b P0.5 (UART2_TX)  (Header X2)
327  - SPI0:  \b P5.0 (SPI0_MOSI) and \b P5.1 (SPI0_MISO) (Header X2)
328  - For Ethernet use a loopback plug as described in \ref eth_loopback "Loopback Communication Setup". 
329
330 \image html xmc4500.png  "Connections for Loop Back Communication Tests on Infineon XMC4500 Relax Kit"
331 */
332
333
334 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
335 /**
336 \page examples_mcbstm32f200 Keil MCBSTM32F200
337
338 Software Setup
339 --------------
340
341 Using <a href="http://www2.keil.com/mdk5/packinstaller" target="_blank">Pack Installer</a>, copy the example project
342 <b>CMSIS-Driver Validation (MCBSTM32F200)</b> to your machine.
343
344 -# Choose one of the available \ref example_targets and build the project.
345 -# If you wish to test the loopback mode for some of the interfaces, refer to the next section for proper board
346    configuration.
347 -# Run the test on the target hardware.
348
349 \note To communicate with the development board, a debug adapter from the
350 <a href="http://www2.keil.com/mdk5/ulink/" target="_blank">ULINK</a> family is required.
351
352
353 Hardware Setup
354 --------------
355
356 The following picture shows the necessary external loopback connections for the Keil MCBSTM32F400 evaluation board:
357  - SPI2: \b PB14 (SPI2_MISO) and \b PB15 (SPI2_MOSI)
358  - USART1: \b PB6 (USART1_TX) and \b PB7 (USART1_RX)
359  - For Ethernet use a loopback plug as described in \ref eth_loopback "Loopback Communication Setup". 
360
361 \image html mcbstm32f400.png  "Connections for Loop Back Communication Tests on Keil MCBSTM32F200"
362 */
363
364
365 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
366 /**
367 \page examples_mcbstm32f400 Keil MCBSTM32F400
368
369 Software Setup
370 --------------
371
372 Using <a href="http://www2.keil.com/mdk5/packinstaller" target="_blank">Pack Installer</a>, copy the example project
373 <b>CMSIS-Driver Validation (MCBSTM32F400)</b> to your machine.
374
375 -# Choose one of the available \ref example_targets and build the project.
376 -# If you wish to test the loopback mode for some of the interfaces, refer to the next section for proper board
377    configuration.
378 -# Run the test on the target hardware.
379
380 \note To communicate with the development board, a debug adapter from the
381 <a href="http://www2.keil.com/mdk5/ulink/" target="_blank">ULINK</a> family is required.
382
383
384 Hardware Setup
385 --------------
386
387 The following picture shows the necessary external loopback connections for the Keil MCBSTM32F400 evaluation board:
388  - SPI2: \b PB14 (SPI2_MISO) and \b PB15 (SPI2_MOSI)
389  - USART1: \b PB6 (USART1_TX) and \b PB7 (USART1_RX)
390  - For Ethernet use a loopback plug as described in \ref eth_loopback "Loopback Communication Setup". 
391
392 \image html mcbstm32f400.png  "Connections for Loop Back Communication Tests on Keil MCBSTM32F400"
393 */
394
395
396 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
397 /**
398 \page examples_b_l475e_iot01a1 STMicroelectronics B-L475E-IOT01A1
399
400 Software Setup
401 --------------
402
403 Using <a href="http://www2.keil.com/mdk5/packinstaller" target="_blank">Pack Installer</a>, copy the example project
404 <b>CMSIS-Driver Validation (B-L475E-IOT01A1)</b> to your machine.
405
406 -# Choose one of the available \ref example_targets and build the project.
407 -# If you wish to test the loopback mode for some of the interfaces, refer to the next section for proper board
408    configuration.
409 -# Run the test on the target hardware using the on-board ST-Link/V2.
410
411 This example is prepared for testing WiFi Driver and for that it requires:
412  - SockServer in local network
413  - Access Point in local network
414
415 For details on WiFi Driver tests please refer to \ref wifi_funcs.
416
417 */
418
419
420 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
421 /**
422 \page examples_stm32f746g STMicroelectronics STM32F746G-Discovery
423
424 Software Setup
425 --------------
426
427 Using <a href="http://www2.keil.com/mdk5/packinstaller" target="_blank">Pack Installer</a>, copy the example project
428 <b>CMSIS-Driver Validation (STM32F746G-Discovery)</b> to your machine.
429
430 -# Choose one of the available \ref example_targets and build the project.
431 -# If you wish to test the loopback mode for some of the interfaces, refer to the next section for proper board
432    configuration.
433 -# Run the test on the target hardware using the on-board ST-Link/V2.
434
435
436 Hardware Setup
437 --------------
438
439 The following picture shows the necessary external loopback connections for the STM32F746G-Discovery evaluation board:
440  - SPI2: \b D12 (SPI2_MISO) and \b D11 (SPI2_MOSI)
441  - USART6: \b D1 (USART6_TX) and \b D0 (USART6_RX)
442  - For Ethernet use a loopback plug as described in \ref eth_loopback "Loopback Communication Setup". 
443
444 \image html stm32f746G-disco.png  "Connections for Loop Back Communication Tests on STM32F746G-Discovery"
445 */
446
447 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
448 /**
449 \page resource_requirements Resource Requirements
450
451 \section heap_req Heap Requirements
452 Heap is used by memory allocation functions. It is configured in the
453 <a class="el" href="http://www.keil.com/support/man/docs/gsac/gsac_startupcodecortex.htm" target="_blank">startup_device.s</a>
454 file located under the \b Device component class.
455
456 Additional memory is allocated for the validation framework and for the buffers that are used in the driver tests. 
457
458 For the validation framework add 1024 bytes of heap. Then, double the amount of the largest buffer size specified in the
459 \ref step4 "DV_Config.h" file and add this as well.
460
461 | Option (under section Heap Configuration)                         | Increase Value by
462 | :---------------------------------------------------------------- | :----------------------
463 | Heap Size (in Bytes)                                              | + (1024 + 2 x maximum buffer size)
464
465 \b Calculation \b Example
466
467 Let's assume that the default heap size in your device's startup file is \c 0x400 (which is 1024 bytes). Add 1024 for the
468 framework and for example another 2048 bytes if you are using the default \b Buffer \b Size of 512 bytes but you have set the
469 <b>Buffer size for baudrate tests</b> to 1024 bytes. This computes to a total heap of 3584 bytes which is equivalent to
470 \c 0xE00. Set this number in the startup file.
471
472
473 \section rtos2_req CMSIS-RTOS2 Requirements
474
475 The thread requirements need to be reflected in the CMSIS-RTOS2 configuration. Refer to the
476 <a class="el" href="http://www.keil.com/pack/doc/cmsis/RTOS2/html/index.html" target="_blank">CMSIS-RTOS2 Reference</a> for further details.
477
478 For <a class="el" href="http://www.keil.com/pack/doc/cmsis/RTOS2/html/rtx5_impl.html" target="_blank">CMSIS-RTOS2 RTX5</a>, thread
479 requirements are configured in the
480 <a class=el href="http://www.keil.com/pack/doc/cmsis/RTOS2/html/config_rtx5.html" target="_blank">RTX_Config.h</a> file located
481 under the \b CMSIS component class:
482
483 <table class="doxtable" summary="CMSIS-RTOS2 Configuration">
484     <tr>
485       <th align="left">Option (under section Thread Configuration)</th>
486       <th>Set Value to</th>
487     </tr>
488     <tr>
489       <td>Default Thread stack size [bytes]</td>
490       <td>2048</td>
491     </tr>
492 </table>
493
494
495 \section rtos_req CMSIS-RTOS Requirements
496
497 Instead of CMSIS-RTOS2 you can use CMSIS-RTOS. In this case the \c main thread is implicitly created.
498 For proper operation, you need to add a certain amount of thread stack size to the \c main thread.
499
500 The thread requirements need to be reflected in the CMSIS-RTOS configuration. Refer to the
501 <a class="el" href="http://www.keil.com/pack/doc/cmsis/RTOS/html/index.html" target="_blank">CMSIS-RTOS Reference</a> for further details.
502
503 For <a class="el" href="http://www.keil.com/pack/doc/cmsis/RTOS/html/rtxImplementation.html" target="_blank">CMSIS-RTOS RTX</a>, thread
504 requirements are configured in the
505 <a class=el href="http://www.keil.com/pack/doc/cmsis/RTOS/html/configure.html" target="_blank">RTX_Conf_CM.c</a> file located
506 under the \b CMSIS component class:
507
508 <table class="doxtable" summary="CMSIS-RTOS Configuration">
509     <tr>
510       <th align="left">Option (under section Thread Configuration)</th>
511       <th>Set Value to</th>
512     </tr>
513     <tr>
514       <td>Default Thread stack size [bytes]</td>
515       <td>2048</td>
516     </tr>
517     <tr>
518       <td>Main Thread stack size [bytes]</td>
519       <td>2048</td>
520     </tr>
521 </table>
522
523 \note Do not forget to set the correct <b>RTOS Kernel Timer input clock frequency [Hz]</b> otherwise the tests will not run
524 properly on the device.
525
526 \note Only WiFi tests create one additional thread for socket testing and usually WiFi drivers have a thread 
527 for processing messages.
528 */