]> begriffs open source - cmsis-driver-validation/blob - Doxygen/DriverValidation.txt
Configuration split per component and reworked SPI driver validation
[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 Validation</b>.<br>
6 <a href="http://www.keil.com/pack/doc/CMSIS/Driver/html/index.html" target="_blank">CMSIS-Driver</a> specifies the 
7 software API for peripheral driver interfaces that connect microcontroller peripherals with middleware or the user application. 
8
9 The CMSIS-Driver Validation is used to validate the driver implementation compliance to the CMSIS-Driver specification.
10
11 The CMSIS-Driver Validation provides:
12   - Configurable validation tests for various CMSIS-Driver interfaces
13   - Example projects that show the usage of the CMSIS-Driver Validation
14
15 The CMSIS-Driver Validation tests and verifies:
16   - <b>API interface</b> using the driver capabilities as well as valid and invalid parameters
17   - <b>Data communication</b> with various transfer sizes and communication parameters:
18     - <b>Loopback testing</b> (for some interfaces) for testing of the underlying hardware with usage of a local loopback
19     - <b>Server testing</b> (for some interfaces) for extensive testing of the underlying hardware with usage of a dedicated Server
20   - <b>Transfer speed</b> of the data communication with time measurement of data transfer duration
21   - <b>Error event</b> signaling in error conditions
22
23 The CMSIS-Driver Validation requires
24 <a href="http://www.keil.com/pack/doc/CMSIS/RTOS2/html/index.html" target="_blank">CMSIS-RTOS2</a> functionality and can be
25 used to verify the setup and configuration of the CMSIS-Driver interfaces in a user system.<br>
26
27 The diagram below shows an overview of the CMSIS-Driver Validation configuration.
28
29 \image html cmsis_dv.png
30
31 This manual contains the following chapters:
32   - \ref setup                 - Describes the general setup of the CMSIS-Driver Validation test and how to generate test report.
33   - \ref report                - Describes the reports produced by the CMSIS-Driver Validation.
34   - \ref debugging             - Describes procedure for debugging of the interface drivers using the CMSIS-Driver Validation.
35   - \ref resource_requirements - Lists memory and CMSIS-RTOS2 requirements.
36   - \ref examples              - Contains information about several example projects including the required hardware setup.
37   - <a class="el" href="./modules.html">Reference</a> - Explains the configuration and tests for the various CMSIS-Driver interfaces.
38
39 The CMSIS-Driver Validation provides validation for the following interfaces:
40   - \ref dv_can   "CAN"        - Controller Area Network (CAN) interface driver.
41   - \ref dv_eth   "Ethernet"   - Ethernet MAC and PHY peripheral interface driver.
42   - \ref dv_i2c   "I2C"        - Inter-Integrated Circuit (I2C) multi-master serial single-ended bus interface driver.
43   - \ref dv_mci   "MCI"        - Memory Card Interface driver for SD/MMC memory.
44   - \ref dv_spi   "SPI"        - Serial Peripheral Interface (SPI) driver.
45   - \ref dv_usart "USART"      - Universal Synchronous and Asynchronous Receiver/Transmitter (USART) interface driver.
46   - \ref dv_usbd  "USB Device" - Universal Serial Bus (USB) Device interface driver.
47   - \ref dv_usbh  "USB Host"   - Universal Serial Bus (USB) Host interface driver.
48   - \ref dv_wifi  "WiFi"       - WiFi (Wireless Fidelity Interface) module/shield 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 <table class="cmtable" summary="Revision History">
59     <tr>
60       <th>Version</th>
61       <th>Description</th>
62     </tr>
63     <tr>
64       <td>V2.0.0-dev3</td>
65       <td>
66         - Removed bundle
67         - Changed configuration from single config file to a config file per component
68         - Updated framework allowing linker to remove unused test functions
69         - Reworked SPI Driver testing (major)
70         - Added SPI_Server application for Keil MCBSTM32F400 evaluation board
71         - Added requirements for CMSIS driver API versions
72         - Updated WiFi Driver tests (WiFi Driver API V1.1)
73         - Updated all examples
74         - Deprecated CMSIS-RTOS1
75       </td>
76     </tr>
77     <tr>
78       <td>V1.4.0</td>
79       <td>
80         - Updated conditions to support all Cortex-M devices
81         - Introduced test groups (each driver is organized in a group)
82         - Improved XSL for XML display
83         - Updated all examples
84         - Removed example for Atmel board
85         - WiFi Driver Testing: Added SockServer application for PC running Microsoft Windows
86         - WiFi Driver Testing: Added upstream and downstream bandwidth testing
87         - WiFi Driver Testing: Added example for Inventek ISM43362 WiFi Driver testing on STMicroelectronics B-L475E-IOT01A1 board
88         - WiFi Driver Testing: Added example for Inventek ISM43362 WiFi Driver testing using ISMART43362-E WiFi shield mounted on NXP LPCXpresso55S69 board
89         - WiFi Driver Testing: Added examples for Espressif ESP8266 and ESP32 WiFi Driver testing with NXP MIMXRT1064-EVK board
90         - WiFi Driver Testing: Added example for WIZnet WizFi360 WiFi Driver testing with NXP MIMXRT1064-EVK board
91       </td>
92     </tr>
93     <tr>
94       <td>V1.3.0</td>
95       <td>
96         - Added WiFi tests
97       </td>
98     </tr>
99     <tr>
100       <td>V1.2.0</td>
101       <td>
102         - Added CMSIS-RTOS2 and Arm Compiler 6 compatibility
103       </td>
104     </tr>
105     <tr>
106       <td>V1.1.0</td>
107       <td>
108         - Added USB Host, CAN and Ethernet Precision Time Protocol tests
109       </td>
110     </tr>
111     <tr>
112       <td>V1.0.0</td>
113       <td>
114         - Initial release for CMSIS-Driver API V2.0
115       </td>
116     </tr>
117  </table>
118
119
120 */
121 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
122 /**
123 \page setup Setup
124
125 \section step1 Step 1: Create an MDK project for your target microcontroller device
126
127
128 \section step2 Step 2: Add the required software components
129
130 For proper operation, add the following software components in the <b>Manage Run-Time Environment</b> window:
131 - <b>CMSIS Driver Validation: Framework</b>
132 - <b>CMSIS Driver Validation: driver</b>, driver interfaces to be tested
133 - <b>CMSIS Driver: driver</b>, driver implementations to be tested
134 - <b>CMSIS: RTOS2 (API): Keil RTX5</b>
135 - <b>Compiler: I/O: STDOUT</b>, variant \b ITM (if your hardware does not support ITM select \b EVR to use Event Recorder instead of ITM)
136 - Resolve any unresolved component dependencies
137
138
139 \section step3 Step 3: Add the application's main file (main.c)
140
141 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
142 <b>CMSIS-RTOS2 'main' function</b> file from <b>CMSIS: RTOS2:Keil RTX5</b>.
143
144 Add this include:
145 \code
146 #include "cmsis_dv.h"
147 \endcode
148
149 In the <c>app_main</c> function, create the \c cmsis_dv thread, before endless <c>for</c> loop:
150 \code
151 osThreadNew(cmsis_dv, NULL, NULL);
152 \endcode
153 to run all the tests that you have chosen in the next step.
154
155
156 \section step4 Step 4: Configure the CMSIS-Driver Validation framework in DV_Config.h file
157
158 Open <b>DV_Config.h</b> under the <b>CMSIS Driver Validation</b> group in the Project window.
159
160 In the configuration file <b>DV_Config.h</b> select <b>Plain Text</b> as the <b>Report Format</b>.
161
162 \section step5 Step 5: Configure the interface settings and tests in related DV_interface_Config.h files
163
164 Each interface has a related <b>DV_<i>interface</i>_Config.h</b> file, where <i>interface</i> represents interface's acronym or abbreviation.<br>
165 For example for Serial Peripheral Interface (SPI) related config file name is DV_SPI_Config.h.
166
167 For details on interface specific configuration and test selection please check the Configuration section in the 
168 <a class="el" href="./modules.html">Reference</a> of the related interface.
169
170
171 \section step6 Step 6: Configure the Heap memory
172
173 Depending on the buffer sizes used for data transfer tests the heap size has to be adjusted to provide enough memory for these 
174 buffers to be allocated.<br>
175 Depending on how heap is configured in your system, open your <b>startup_<i>device</i>.s</b> file from the \b Device group in the \b Project window 
176 or use a <b>linker script</b> to adjust the heap size.<br>
177 Set the <b>heap size</b> to minimum of <b>16384</b> bytes.
178
179 For details on heap requirements please refer to the \ref heap_req "Heap Memory requirements" documentation.
180
181
182 \section step7 Step 7: Configure the CMSIS-RTOS2 (Keil RTX5)
183
184 Open <b>RTX_Config.h</b> and set:
185 - <b>System Configuration: Global Dynamic Memory size [bytes]</b> to \a 16384
186 - <b>Thread configuration: Default Thread stack size [bytes]</b> to \a 3072
187
188 For details on CMSIS-RTOS2 requirements please refer to the \ref rtos2_req "CMSIS-RTOS2 requirements" documentation.
189
190 \section step8 Step 8: Configure the Device
191
192 Depending on your device, you might have different pin/hardware configuration options. Usually, you can configure the device
193 using the \c RTE_Device.h file from the \b Device group or with a vendor provided pin configuration tool. 
194 Enable all interfaces you wish to test and make all necessary pin-out changes required by your actual board layout (consult the board schematics).<br> 
195 You can check the provided \ref examples "examples" as a reference point.
196
197 For a robust test with good coverage, implement various targets with different settings:
198 - Use <b>non-DMA (IRQ)</b> and <b>DMA</b> configurations if they are available on the driver
199 - Use different compiler <b>optimization levels</b> in the
200   <a href="http://www.keil.com/support/man/docs/uv4/uv4_dg_adscc.htm" target="_blank">C/C++ tab</a> of the
201   <b>Options for Target</b> dialog
202
203
204 \section step9 Step 9: Setup the required hardware
205
206 For the interfaces that support loopback testing: \ref dv_eth "Ethernet", \ref dv_usart "USART" and \ref dv_spi "SPI", 
207 connect the following pins on your target hardware together (refer to the hardware schematics):
208
209 - Ethernet: RX+ and TX+, RX- and TX-
210 - USART:    RX and TX
211 - SPI:      MOSI and MISO
212
213 For the interfaces that support testing with dedicated server: \ref dv_wifi "WiFi" and \ref dv_spi "SPI", 
214 connect the related hardware as required by the related server:
215
216 - WiFi: WiFi module has to be in close proximity to the Access Point which is in the same network as the required \ref wifi_sock_setup
217 - SPI:  MOSI, MISO, SCLK, SS, GND to the same lines on the \ref spi_server
218
219
220 \section step10 Step 10: Download and Run the Project
221
222 In the <b>Options for Target</b> dialog, under debug settings, if you use ITM as standard output channel ensure that 
223 \b Trace and <b>ITM port 0</b> are enabled and that the correct <b>Core Clock</b> frequency is set:
224
225 \image html target_dialog.png "ITM Channel setting"
226
227 Build, load and run the project. The output is displayed in the <b>Debug (printf) Viewer</b> window.<br>
228 Example below shows output result of an SPI driver testing:
229 \verbatim
230 CMSIS-Driver SPI Test Report   May  4 2020   14:06:23 
231
232 TEST 01: SPI_GetVersion                   
233   DV_SPI.c (1023): [INFO] Driver API version 2.3, Driver version 2.15
234                                           PASSED
235 TEST 02: SPI_GetCapabilities              PASSED
236 TEST 03: SPI_Initialize_Uninitialize      PASSED
237 TEST 04: SPI_PowerControl                 
238   DV_SPI.c (1314): [WARNING] PowerControl (ARM_POWER_LOW) is not supported
239                                           PASSED
240 TEST 05: SPI_Mode_Master_SS_Unused        PASSED
241 TEST 06: SPI_Mode_Master_SS_Sw_Ctrl       PASSED
242 TEST 07: SPI_Mode_Master_SS_Hw_Ctrl_Out   PASSED
243 TEST 08: SPI_Mode_Master_SS_Hw_Mon_In     PASSED
244 TEST 09: SPI_Mode_Slave_SS_Hw_Mon         PASSED
245 TEST 10: SPI_Mode_Slave_SS_Sw_Ctrl        PASSED
246 TEST 11: SPI_Format_Clock_Pol0_Pha0       PASSED
247 TEST 12: SPI_Format_Clock_Pol0_Pha1       PASSED
248 TEST 13: SPI_Format_Clock_Pol1_Pha0       PASSED
249 TEST 14: SPI_Format_Clock_Pol1_Pha1       PASSED
250 TEST 15: SPI_Format_Frame_TI              PASSED
251 TEST 16: SPI_Format_Clock_Microwire       NOT EXECUTED
252 TEST 17: SPI_Data_Bits_1                  NOT EXECUTED
253 TEST 18: SPI_Data_Bits_2                  NOT EXECUTED
254 TEST 19: SPI_Data_Bits_3                  NOT EXECUTED
255 TEST 20: SPI_Data_Bits_4                  NOT EXECUTED
256 TEST 21: SPI_Data_Bits_5                  NOT EXECUTED
257 TEST 22: SPI_Data_Bits_6                  NOT EXECUTED
258 TEST 23: SPI_Data_Bits_7                  NOT EXECUTED
259 TEST 24: SPI_Data_Bits_8                  PASSED
260 TEST 25: SPI_Data_Bits_9                  NOT EXECUTED
261 TEST 26: SPI_Data_Bits_10                 NOT EXECUTED
262 TEST 27: SPI_Data_Bits_11                 NOT EXECUTED
263 TEST 28: SPI_Data_Bits_12                 NOT EXECUTED
264 TEST 29: SPI_Data_Bits_13                 NOT EXECUTED
265 TEST 30: SPI_Data_Bits_14                 NOT EXECUTED
266 TEST 31: SPI_Data_Bits_15                 NOT EXECUTED
267 TEST 32: SPI_Data_Bits_16                 PASSED
268 TEST 33: SPI_Data_Bits_17                 NOT EXECUTED
269 TEST 34: SPI_Data_Bits_18                 NOT EXECUTED
270 TEST 35: SPI_Data_Bits_19                 NOT EXECUTED
271 TEST 36: SPI_Data_Bits_20                 NOT EXECUTED
272 TEST 37: SPI_Data_Bits_21                 NOT EXECUTED
273 TEST 38: SPI_Data_Bits_22                 NOT EXECUTED
274 TEST 39: SPI_Data_Bits_23                 NOT EXECUTED
275 TEST 40: SPI_Data_Bits_24                 NOT EXECUTED
276 TEST 41: SPI_Data_Bits_25                 NOT EXECUTED
277 TEST 42: SPI_Data_Bits_26                 NOT EXECUTED
278 TEST 43: SPI_Data_Bits_27                 NOT EXECUTED
279 TEST 44: SPI_Data_Bits_28                 NOT EXECUTED
280 TEST 45: SPI_Data_Bits_29                 NOT EXECUTED
281 TEST 46: SPI_Data_Bits_30                 NOT EXECUTED
282 TEST 47: SPI_Data_Bits_31                 NOT EXECUTED
283 TEST 48: SPI_Data_Bits_32                 NOT EXECUTED
284 TEST 49: SPI_Bit_Order_MSB_LSB            PASSED
285 TEST 50: SPI_Bit_Order_LSB_MSB            PASSED
286 TEST 51: SPI_Bus_Speed_Min                PASSED
287 TEST 52: SPI_Bus_Speed_Max                
288   DV_SPI.c (3524): [WARNING] At requested bus speed of 10000000 bps, effective bus speed is 6477809 bps
289                                           PASSED
290 TEST 53: SPI_Number_Of_Items              PASSED
291 TEST 54: SPI_Abort                        PASSED
292 TEST 55: SPI_DataLost                     PASSED
293 TEST 56: SPI_ModeFault                    PASSED
294
295 Test Summary: 56 Tests, 25 Passed, 0 Failed.
296 Test Result: PASSED
297 \endverbatim
298
299 */
300 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
301 /**
302 \page report Report
303
304 The CMSIS-Driver Validation can output the test report in a <b>Plain Text</b> format or as an <b>XML</b> formatted output.<br>
305 Selection of the output report type is done in the <b>DV_Config.h</b> configuration file.
306
307 \image html dv_config_h.png "Configuration file DV_Config.h in Configuration Wizard view mode"
308
309 The <b>Plain Text</b> selection instructs the CMSIS-Driver Validation framework to generate a plain text report 
310 which can be seen in the <b>Debug (printf) Viewer</b> window and is mostly used for driver debugging purposes 
311 but can also be used as a final report.
312
313 The <b>XML</b> selection instructs the CMSIS-Driver Validation framework to generate an XML formatted report 
314 which is meant to be used as a final report and can be viewed nicely in any Web browser.<br>
315
316 The report file can be written into a <b>TestReport.xml</b> file directly by the uVision with an additional debugger script 
317 called <b>SaveXML.ini</b> which needs to specified as <b>Initialization File:</b> for the <b>Debugger</b> in the 
318 <b>Options for target</b> dialog, or it can be copy-pasted manually from the <b>Debug (printf) Viewer</b> window to 
319 the TestReport.xml file.<br>
320 The SaveXML.ini script can be found in <c>\<pack root directory\></c><b>\\Scripts</b> directory.
321
322 To view <b>TestReport.xml</b> file in a Web browser an additional style sheet <b>TR_Style.xsl</b> file needs to be 
323 in the same directory as the TestReport.xml file.<br>
324 The TR_Style.xsl file contains the description of formatting for the Web browser to display the TestReport.xml report and 
325 can be found in <c>\<pack root directory\></c><b>\\Scripts</b> directory.
326
327
328 The XML file uses coloring to differentiate the results in the following way:
329  - <span style="font-weight:bold; color:Green">Passed</span> status means that test function has passed successfully.
330  - <span style="font-weight:bold; color:DarkOrange">Passed</span> status means that test function has passed but there were some warnings 
331      (<c>More details</c> can be used to see the details about warnings).
332  - <span style="font-weight:bold; color:Blue">Not executed</span> status means that test function did not check any assertions.
333  - <span style="font-weight:bold; color:Red">Failed</span> status means that test function has failed 
334      (<c>More details</c> can be used to see the details on reasons of failure).
335
336 */
337 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
338 /**
339 \page debugging Debugging
340
341 After running the CMSIS-Driver Validation output report is used to see if the driver is compliant to the CMSIS-Driver specification.
342
343 If the result of the driver testing under <c>Test Summary</c> contains any <c>Failed</c> tests then the driver needs to be corrected.
344
345 Example of report in the Plain Text format of a non-compliant SPI driver:
346 \verbatim
347 CMSIS-Driver SPI Test Report   May  6 2020   10:47:11 
348
349 TEST 01: SPI_GetVersion                   
350   DV_SPI.c (1023): [INFO] Driver API version 2.3, Driver version 2.15
351                                           PASSED
352 TEST 02: SPI_GetCapabilities              PASSED
353 TEST 03: SPI_Initialize_Uninitialize      
354   DV_SPI.c (1106): [FAILED]
355   DV_SPI.c (1109): [FAILED]
356   DV_SPI.c (1112): [FAILED]
357                                           FAILED
358 TEST 04: SPI_PowerControl                 
359   DV_SPI.c (1314): [WARNING] PowerControl (ARM_POWER_LOW) is not supported
360                                           PASSED
361 ...
362
363 Test Summary: 56 Tests, 24 Passed, 1 Failed.
364 Test Result: FAILED
365 \endverbatim
366
367 From previous report it is clear that there was one test function has failed.<br>
368 By Inspecting the details in previous report it is clear that <c>TEST 03: SPI_Initialize_Uninitialize</c> has failed 
369 on multiple assertions.<br>
370 Each failed assertion is recorded as a single  line in the test report.<br>
371 The failed assert information in the output report contains additional information about the <b>source module</b> and <b>line</b> 
372 in that module where the assertion is located as well as any optional additional debugging info.
373
374 The documentation can be consulted regarding the failed function, for example in previous case 
375 documentation on the \ref SPI_Initialize_Uninitialize can be consulted.
376
377 Main way of fixing the driver consists of opening reported file mentioned as failed and inspecting the 
378 line in which failure was reported.
379
380 In the previous report, opening <b>DV_SPI.c</b> module (available in the project) and inspecting the <b>1106</b> line 
381 which states:
382 \verbatim
383   // Driver is uninitialized and peripheral is powered-off:
384   // Call PowerControl(ARM_POWER_FULL) function and assert that it returned ARM_DRIVER_ERROR status
385   TEST_ASSERT(drv->PowerControl (ARM_POWER_FULL) == ARM_DRIVER_ERROR);
386 \endverbatim
387
388 informs us that call to <c>PowerControl (ARM_POWER_FULL)</c>, when driver is not initialized, is expected to 
389 return <c>ARM_DRIVER_ERROR</c> status code but it has returned a different status code instead.
390
391 We should put a breakpoint to this line and start the debug session.<br>
392 When the breakpoint is hit we can see that a call to <c>PowerControl (ARM_POWER_FULL)</c> has returned <c>ARM_DRIVER_OK</c> 
393 instead of expected <c>ARM_DRIVER_ERROR</c> status code.
394
395 We can now go into source code of the driver and fix this.
396
397 After we have fixed the driver, the report now looks like below:
398
399 \verbatim
400 CMSIS-Driver SPI Test Report   May  6 2020   11:15:30 
401
402 TEST 01: SPI_GetVersion                   
403   DV_SPI.c (1023): [INFO] Driver API version 2.3, Driver version 2.15
404                                           PASSED
405 TEST 02: SPI_GetCapabilities              PASSED
406 TEST 03: SPI_Initialize_Uninitialize      PASSED
407 TEST 04: SPI_PowerControl                 
408   DV_SPI.c (1314): [WARNING] PowerControl (ARM_POWER_LOW) is not supported
409                                           PASSED
410 ...
411
412 Test Summary: 56 Tests, 25 Passed, 0 Failed.
413 Test Result: PASSED
414 \endverbatim
415
416 The fix for the assertion failing in line 1106 was has also fixed subsequent assertions 
417 in lines 1109 and 1112 thus the driver now reports no failed tests and reports that all 
418 of the 25 executed tests have passed.
419
420 This report could be used as an insurance that the SPI Driver on this device is compliant to the CMSIS-Driver specification.
421
422 The TestReport.xml report created instead of Plain Text opened in a Web browser looks like on the picture below:
423
424 \image html xml_report.png "XML test report"
425
426 */
427 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
428 /**
429 \page resource_requirements Resource Requirements
430
431 \section heap_req Heap Memory
432 Heap memory is used by the memory allocation functions.<br>
433 It is usually configured in the <a class="el" href="http://www.keil.com/support/man/docs/gsac/gsac_startupcodecortex.htm" target="_blank">startup_device.s</a>
434 file located under the \b Device component class but it can also, in some cases,  be configured by a <b>linker script</b> instead.
435
436 Some interface test functions allocate additional buffers from the heap memory.
437
438 The CMSIS-Driver Validation framework does not impose heap requirements because it does not use heap memory.
439
440 Each interface test module has specific requirements for the heap memory, default requirements are listed below:
441
442 | Interface test module   | Heap memory requirement (in bytes) |
443 | :---------------------: | :--------------------------------: |
444 | CAN                     | 128                                |
445 | Ethernet                | 1024                               |
446 | SPI                     | 12288                              |
447 | USART                   | 2048                               |
448
449 Interface test modules that are not listed in the previous table do not use heap memory.
450
451 The system heap memory size must support the largest heap requirement of any used interface test module.<br>
452 For example, if SPI driver testing is selected heap memory size should be set to at least 12 kB.
453
454 Suggested value for heap memory size is <b>16384</b> bytes.
455
456 \note Each module contains additional settings in related configuration file which are not exposed through 
457       Configuration Wizard and impact the heap memory requirement.<br>
458       If these values are changed please adjust heap memory size accordingly.
459
460 \section rtos2_req CMSIS-RTOS2
461
462 The thread requirements need to be reflected in the CMSIS-RTOS2 configuration. Refer to the
463 <a class="el" href="http://www.keil.com/pack/doc/cmsis/RTOS2/html/index.html" target="_blank">CMSIS-RTOS2 Reference</a> for further details.
464
465 For <a class="el" href="http://www.keil.com/pack/doc/cmsis/RTOS2/html/rtx5_impl.html" target="_blank">CMSIS-RTOS2 RTX5</a>, thread
466 requirements are configured in the
467 <a class=el href="http://www.keil.com/pack/doc/cmsis/RTOS2/html/config_rtx5.html" target="_blank">RTX_Config.h</a> file located
468 under the \b CMSIS component class:
469
470 | Option                                                            | Value                              |
471 | :---------------------------------------------------------------- | :--------------------------------: |
472 | System Configuration: Global Dynamic Memory size [bytes] (Note 1) | 16384                              |
473 | Thread Configuration: Default Thread Stack size [bytes]           | 3072                               |
474
475 \note Note 1: This setting is only necessary for WiFi driver testing, for other driver testing value of 4096 bytes is sufficient.
476
477 */
478 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
479 /**
480 \page examples Examples
481
482 The CMSIS-Driver Validation Software Pack contains a set of examples that show how to use the CMSIS-Driver Validation on 
483 a real hardware.<br>
484 Use <a href="http://www2.keil.com/mdk5/packinstaller" target="_blank">Pack Installer</a> to copy them to your machine.
485
486 The following example projects are available:
487
488 - \subpage examples_xmc4500_relax
489 - \subpage examples_mcbstm32f200
490 - \subpage examples_mcbstm32f400
491 - \subpage examples_b_l475e_iot01a1
492 - \subpage examples_stm32f746g
493 - \subpage examples_ismart43362_e
494 - \subpage examples_esp8266
495 - \subpage examples_esp32
496 - \subpage examples_wizfi360
497
498 \anchor example_targets
499 Targets
500 -------
501
502 Example projects contain some of the following targets:
503 - <b>Create Report</b>: Test results and statistics are printed to the <b>TestReport\TestReport.xml</b> file. Open the file in a Web browser of your choice.
504 - \b Debug: Results and statistics are printed to the <b>Debug (printf) Viewer</b> window or to the <b>Virtual COM Port</b> through the on-board debugger.
505 - \b Release: Same as the Debug target but with higher level of code optimization selected.
506 */
507
508
509 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
510 /**
511 \page examples_xmc4500_relax Infineon XMC4500 Relax Kit
512
513 Software Setup
514 --------------
515
516 Using the <a href="http://www2.keil.com/mdk5/packinstaller" target="_blank">Pack Installer</a> install the latest 
517 <b>Infineon::XMC4000_DFP</b> pack and copy the example project
518 <b>CMSIS-Driver Validation (XMC4500 Relax Lite Kit)</b> to your machine.
519
520 -# Choose one of the available \ref example_targets "Targets" and build the project.
521 -# If you wish to test the loopback mode for some of the interfaces, refer to the next section for proper board
522    configuration.
523 -# Run the validation on the target hardware using the on-board JLink-Lite debugger.
524
525 Hardware Setup
526 --------------
527
528 The following picture shows the necessary external loopback connections for the Infineon XMC4500 Relax Kit evaluation board:
529  - <b>UART2</b>: \b P0.4 (UART2_RX)  and \b P0.5 (UART2_TX)  (Header X2)
530  - <b>SPI0</b>:  \b P5.0 (SPI0_MOSI) and \b P5.1 (SPI0_MISO) (Header X2)
531  - For <b>Ethernet</b> use a loopback plug as described in \ref eth_loopback "Loopback Communication Setup". 
532
533 \image html xmc4500.png  "Connections for Loopback Communication Tests on the Infineon XMC4500 Relax Kit"
534
535 */
536 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
537 /**
538 \page examples_mcbstm32f200 Keil MCBSTM32F200
539
540 Software Setup
541 --------------
542
543 Using the <a href="http://www2.keil.com/mdk5/packinstaller" target="_blank">Pack Installer</a> install the latest 
544 <b>Keil::STM32F2xx_DFP</b> pack and copy the example project
545 <b>CMSIS-Driver Validation (MCBSTM32F200)</b> to your machine.
546
547 -# Choose one of the available \ref example_targets "Targets" and build the project.
548 -# If you wish to test the loopback mode for some of the interfaces, refer to the next section for proper board
549    configuration.
550 -# Run the validation on the target hardware.
551
552 \note The example is preconfigured to use an 
553 <a href="http://www2.keil.com/mdk5/ulink/ulinkplus/" target="_blank">ULINKplus</a> debug adapter.
554
555
556 Hardware Setup
557 --------------
558
559 The following picture shows the necessary external loopback connections for the Keil MCBSTM32F400 evaluation board:
560  - <b>SPI2</b>: \b PB14 (SPI2_MISO) and \b PB15 (SPI2_MOSI) (for Loopback Test Mode)
561  - <b>USART1</b>: \b PB6 (USART1_TX) and \b PB7 (USART1_RX)
562  - For <b>Ethernet</b> use a loopback plug as described in \ref eth_loopback "Loopback Communication Setup". 
563
564 \image html mcbstm32f400.png  "Connections for Loopback Communication Tests on the Keil MCBSTM32F200"
565
566 */
567 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
568 /**
569 \page examples_mcbstm32f400 Keil MCBSTM32F400
570
571 Software Setup
572 --------------
573
574 Using the <a href="http://www2.keil.com/mdk5/packinstaller" target="_blank">Pack Installer</a> install the latest 
575 <b>Keil::STM32F4xx_DFP</b> pack and copy the example project
576 <b>CMSIS-Driver Validation (MCBSTM32F400)</b> to your machine.
577
578 -# Choose one of the available \ref example_targets "Targets" and build the project.
579 -# If you wish to test the loopback mode for some of the interfaces, refer to the next section for proper board
580    configuration.
581 -# Run the validation on the target hardware.
582
583 \note The example is preconfigured to use an 
584 <a href="http://www2.keil.com/mdk5/ulink/ulinkplus/" target="_blank">ULINKplus</a> debug adapter.
585
586
587 Hardware Setup
588 --------------
589
590 The following picture shows the necessary external loopback connections for the Keil MCBSTM32F400 evaluation board:
591  - <b>SPI2</b>: \b PB14 (SPI2_MISO) and \b PB15 (SPI2_MOSI) (for Loopback Test Mode)
592  - <b>USART1</b>: \b PB6 (USART1_TX) and \b PB7 (USART1_RX)
593  - For <b>Ethernet</b> use a loopback plug as described in \ref eth_loopback "Loopback Communication Setup". 
594
595 \image html mcbstm32f400.png  "Connections for Loopback Communication Tests on the Keil MCBSTM32F400"
596
597 */
598 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
599 /**
600 \page examples_b_l475e_iot01a1 STMicroelectronics B-L475E-IOT01A1
601
602 Software Setup
603 --------------
604
605 Using the <a href="http://www2.keil.com/mdk5/packinstaller" target="_blank">Pack Installer</a> install the latest 
606 <b>Keil::STM32L4xx_DFP</b> pack and copy the example project
607 <b>CMSIS-Driver WiFi Inventek ISM43362 Validation (B-L475E-IOT01A1)</b> to your machine.
608
609 -# Choose one of the available \ref example_targets "Targets" and build the project.
610 -# Run the validation on the target hardware using the on-board ST-Link/V2 debugger.
611
612 This example is prepared for verification of the WiFi driver and it requires \ref wifi_requirements "WiFi equirements", 
613 as well as, proper configuration described in \ref wifi_config "WiFi Configuration".
614
615 For details on WiFi driver validation please refer to \ref dv_wifi.
616
617 \image html b-l475e-iot01a.png  "STMicroelectronics B-L475E-IOT01A1 board"
618
619 */
620 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
621 /**
622 \page examples_ismart43362_e Inventek ISMART43362-E WiFi Shield with NXP LPCXpresso55S69
623
624 Software Setup
625 --------------
626
627 Using the <a href="http://www2.keil.com/mdk5/packinstaller" target="_blank">Pack Installer</a> install the latest 
628 <b>NXP::LPC55S69_DFP</b> and <b>NXP::LPCXpresso55S69_EVK</b> packs and copy the example project
629 <b>CMSIS-Driver WiFi Inventek ISM43362 Validation (LPCXpresso55S69)</b> to your machine.
630
631 -# Choose one of the available \ref example_targets "Targets" and build the project.
632 -# Run the validation on the target hardware.
633
634 \note The example is preconfigured to use an 
635 <a href="http://www2.keil.com/mdk5/ulink/ulinkplus/" target="_blank">ULINKplus</a> debug adapter.
636
637 This example is prepared for verification of the WiFi driver and it requires \ref wifi_requirements "WiFi requirements", 
638 as well as, proper configuration described in \ref wifi_config "WiFi Configuration".
639
640 For details on WiFi driver tests please refer to \ref dv_wifi.
641
642 Hardware Setup
643 --------------
644
645 This example uses the ISMART module with SPI communication.<br>
646 By default, the shield is loaded with a UART firmware.<br>
647 Instructions on how to flash the SPI firmware can be found in the
648 [CMSIS-Driver documentation](https://arm-software.github.io/CMSIS-Driver/General/html/driver_WiFi.html#driver_ISM43362).
649
650 For proper operation of the Inventek ISMART43362-E WiFi Shield please connect the jumper between 5V_BOARD and 5V_MOD pins 
651 on the WiFi Shield.
652
653 \note Before running the validation on this hardware the WiFi Shield has to be reset by pressing SW2 push-button 
654 on the WiFi Shield and the debug session has to be started in less than 5 seconds after the reset push-button was released.
655
656 \image html lpcxpresso55s69.png  "NXP LPCXpresso55S69 with Inventek ISMART43362-E WiFi Shield attached"
657
658 */
659 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
660 /**
661 \page examples_esp8266 Espressif ESP8266 SparkFun WiFi Shield with NXP MIMXRT1064-EVK
662
663 Software Setup
664 --------------
665
666 Using the <a href="http://www2.keil.com/mdk5/packinstaller" target="_blank">Pack Installer</a> install the latest 
667 <b>NXP::MIMXRT1064_DFP</b> and <b>NXP::EVK-MIMXRT1064_BSP</b> packs and copy the example project
668 <b>CMSIS-Driver WiFi Espressif ESP8266 Validation (EVK-MIMXRT1064)</b> to your machine.
669
670 -# Choose one of the available \ref example_targets "Targets" and build the project.
671 -# Run the validation on the target hardware using the on-board CMSIS-DAP Debugger.
672
673 This example is prepared for verification of the WiFi driver and it requires \ref wifi_requirements "WiFi equirements", 
674 as well as, proper configuration described in \ref wifi_config "WiFi Configuration".
675
676 For details on WiFi driver tests please refer to \ref dv_wifi.
677
678 \image html mimxrt1064evk.png    "NXP MIMXRT1064-EVK with"
679 \image html esp8266_sparkfun.png "Espressif ESP8266 SparkFun WiFi Shield"
680
681 */
682 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
683 /**
684 \page examples_esp32 Espressif ESP32 WROOM SparkFun Thing Plus WiFi Shield with NXP MIMXRT1064-EVK
685
686 Software Setup
687 --------------
688
689 Using the <a href="http://www2.keil.com/mdk5/packinstaller" target="_blank">Pack Installer</a> install the latest 
690 <b>NXP::MIMXRT1064_DFP</b> and <b>NXP::EVK-MIMXRT1064_BSP</b> packs and copy the example project
691 <b>CMSIS-Driver WiFi Espressif ESP32 Validation (EVK-MIMXRT1064)</b> to your machine.
692
693 -# Choose one of the available \ref example_targets "Targets" and build the project.
694 -# Run the validation on the target hardware using the on-board CMSIS-DAP Debugger.
695
696 This example is prepared for verification of the WiFi driver and it requires \ref wifi_requirements "WiFi equirements", 
697 as well as, proper configuration described in \ref wifi_config "WiFi Configuration".
698
699 For details on WiFi driver tests please refer to \ref dv_wifi.
700
701 \image html mimxrt1064evk.png        "NXP MIMXRT1064-EVK with"
702 \image html esp32_wroom_sparkfun.png "Espressif ESP32 WROOM SparkFun Thing Plus WiFi Shield"
703
704 */
705 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
706 /**
707 \page examples_wizfi360 WIZnet WizFi360-EVB WiFi Shield with NXP MIMXRT1064-EVK
708
709 Software Setup
710 --------------
711
712 Using the <a href="http://www2.keil.com/mdk5/packinstaller" target="_blank">Pack Installer</a> install the latest 
713 <b>NXP::MIMXRT1064_DFP</b> and <b>NXP::EVK-MIMXRT1064_BSP</b> packs and copy the example project
714 <b>CMSIS-Driver WiFi WIZnet WizFi360 Validation (EVK-MIMXRT1064)</b> to your machine.
715
716 -# Choose one of the available \ref example_targets "Targets" and build the project.
717 -# Run the validation on the target hardware using the on-board CMSIS-DAP Debugger.
718
719 This example is prepared for verification of the WiFi driver and it requires \ref wifi_requirements "WiFi equirements", 
720 as well as, proper configuration described in \ref wifi_config "WiFi Configuration".
721
722 For details on WiFi driver tests please refer to \ref dv_wifi.
723
724 \image html mimxrt1064evk.png "NXP MIMXRT1064-EVK with"
725 \image html wizfi360-evb.png  "WIZnet WizFi360-EVB WiFi Shield"
726
727 */
728 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
729 /**
730 \page examples_stm32f746g STMicroelectronics STM32F746G-Discovery
731
732 Software Setup
733 --------------
734
735 Using the <a href="http://www2.keil.com/mdk5/packinstaller" target="_blank">Pack Installer</a> install the latest 
736 <b>Keil::STM32F7xx_DFP</b> pack and copy the example project
737 <b>CMSIS-Driver Validation (STM32F746G-Discovery)</b> to your machine.
738
739 -# Choose one of the available \ref example_targets "Targets" and build the project.
740 -# If you wish to test the loopback mode for some of the interfaces, refer to the next section for proper board
741    configuration.
742 -# Run the validation on the target hardware using the on-board ST-Link/V2 debugger.
743
744
745 Hardware Setup
746 --------------
747
748 The following picture shows the necessary external loopback connections for the STMicroelectronics STM32F746G-Discovery evaluation board:
749  - <b>SPI2</b>: \b D12 (SPI2_MISO) and \b D11 (SPI2_MOSI)
750  - <b>USART6</b>: \b D1 (USART6_TX) and \b D0 (USART6_RX)
751  - For <b>Ethernet</b> use a loopback plug as described in \ref eth_loopback "Loopback Communication Setup". 
752
753 \image html stm32f746g-disco.png  "Connections for Loopback Communication Tests on STM32F746G-Discovery"
754
755 */