]> begriffs open source - cmsis/blob - CMSIS/DoxyGen/Driver/src/General.txt
CMSIS-Driver: minor enhancements in headers (added helper macros for driver name...
[cmsis] / CMSIS / DoxyGen / Driver / src / General.txt
1 /**
2 \mainpage Overview
3
4 The CMSIS-Driver specification is a software API that describes peripheral driver interfaces for middleware stacks and user
5 applications. The CMSIS-Driver API is designed to be generic and independent of a specific RTOS making it reusable across a
6 wide range of supported microcontroller devices. The CMSIS-Driver API covers a wide range of use cases for the supported
7 peripheral types, but can not take every potential use-case into account. Over time, it is indented to extend the
8 CMSIS-Driver API with further groups to cover new use-cases.
9
10 The CMSIS Software Pack publishes the API Interface under the Component Class \b CMSIS \b Driver with header files and a
11 documentation. These header files are the reference for the implementation of the standardized peripheral driver interfaces. 
12 These implementations are published typically in the Device Family Pack of a related microcontroller family under the
13 Component Class \b CMSIS \b Driver. A Device Family Pack may contain additional interfaces in the Component Class \b Device
14 to extend the standard Peripheral Drivers covered by this CMSIS-Driver specification with additional device specific
15 interfaces for example for Memory BUS, GPIO, or DMA.
16
17 The standard peripheral driver interfaces connect microcontroller peripherals for example with middleware that implements
18 communication stacks, file systems, or graphic user interfaces. Each peripheral driver interface may provide multiple
19 instances reflecting the multiple physical interfaces of the same type in a device. For example the two physical SPI
20 interfaces are reflected with a separate \ref AccessStruct for SPI1 and SPI2. The \ref AccessStruct is the interface of a
21 driver to the middleware component or the user application.
22
23 \image html Driver.png  "Peripheral Driver Interfaces and Middleware"
24
25 The following CMSIS-Driver API groups are defined:
26   - \ref can_interface_gr "CAN": Interface to CAN bus peripheral.
27   - \ref eth_interface_gr "Ethernet": Interface to Ethernet MAC and PHY peripheral.
28   - \ref i2c_interface_gr "I2C": Multi-master Serial Single-Ended Bus interface driver.
29   - \ref mci_interface_gr "MCI": Memory Card Interface for SD/MMC memory.
30   - \ref nand_interface_gr "NAND": NAND Flash Memory interface driver.
31   - \ref flash_interface_gr "Flash": Flash Memory interface driver.
32   - \ref sai_interface_gr "SAI": Serial audio interface driver (I2s, PCM, AC'97, TDM, MSB/LSB Justified).
33   - \ref spi_interface_gr "SPI": Serial Peripheral Interface Bus driver.
34   - \ref storage_interface_gr "Storage": Storage device interface driver.
35   - \ref usart_interface_gr "USART": Universal Synchronous and Asynchronous Receiver/Transmitter interface driver.
36   - \ref usb_interface_gr "USB": Interface driver for USB Host and USB Device communication.
37   - \ref vio_interface_gr "VIO": API for virtual I/Os (VIO).
38   - \ref wifi_interface_gr "WiFi": Interface driver for wireless communication.
39
40 <hr>
41
42 CMSIS-Driver in ARM::CMSIS Pack
43 -------------------------------
44
45 The following files relevant to CMSIS-Driver are present in the <b>ARM::CMSIS</b> Pack directories:
46 | Directory                      | Content                                                                |
47 |--------------------------------|------------------------------------------------------------------------|
48 |\b CMSIS/Documentation/Driver   | This documentation                                                     |
49 |\b CMSIS/Driver/Include         | Driver header files (Driver_<i>interface</i>.h, Driver_Common.h)       |
50 |\b CMSIS/Driver/DriverTemplates | Driver implementation template files (Driver_<i>interface</i>.c)       |
51
52 <hr>
53 */
54
55 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
56 /**
57 \page driver_revisionHistory Revision History of CMSIS-Driver
58
59
60 <table class="cmtable" summary="Revision History">
61     <tr>
62       <th>Version</th>
63       <th>Description</th>
64     </tr>
65     <tr>
66       <td>2.8.0</td>
67       <td>
68         - Changed: removed volatile from status related typedefs APIs
69         - Enhanced WiFi Interface API with support for polling Socket Receive/Send
70         - Added VIO API 0.1.0 (Preview)
71       </td>
72     </tr>
73     <tr>
74       <td>2.7.1</td>
75       <td>
76         - Finalized WiFi Interface API 1.0.0.
77       </td>
78     </tr>
79     <tr>
80       <td>2.7.0</td>
81       <td>
82         - Added WiFi Interface API 1.0.0-beta.
83         - Added custom driver selection to simplify implementation of new CMSIS-Driver.
84       </td>
85     </tr>
86     <tr>
87       <td>2.6.0</td>
88       <td>
89         - Enhanced CAN-Driver API with explicit BUSOFF state.
90         - Enhanced NAND-Driver API for ECC handling.
91       </td>
92     </tr>
93     <tr>
94       <td>2.05</td>
95       <td>
96         - Changed: All typedefs related to status have been made volatile. 
97       </td>
98     </tr>
99     <tr>
100       <td>2.04</td>
101       <td>
102         - Added: template files for CAN interface driver.
103       </td>
104     </tr>
105     <tr>
106       <td>2.03</td>
107       <td>
108         - Added: CAN API for an interface to CAN peripherals
109         - Added: Overview of the \ref driverValidation "CMSIS-Driver Validation" Software Pack.
110         - Enhanced: documentation and clarified behavior of the \ref CallSequence.
111       </td>
112     </tr>
113     <tr>
114       <td>2.02</td>
115       <td>
116         - Minor API changes, for exact details refer to the header file of each driver.
117         - Added: Flash Interface, NAND interface.
118       </td>
119     </tr>
120     <tr>
121       <td>2.00</td>
122       <td>API with non-blocking data transfer, independent of CMSIS-RTOS.</td>
123     </tr>
124     <tr>
125       <td>1.10</td>
126       <td>Initial release</td>
127     </tr>
128 </table>
129 */
130
131 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
132 /**
133 \page theoryOperation Theory of Operation
134
135 [TOC]
136
137 This section gives an overview of the general operation of CMSIS-Drivers. It explains the \ref DriverFunctions that are
138 common in all CMSIS-Drivers along with the \ref CallSequence. The topic \ref Data_Xfer_Functions describes how data
139 read/write operations to the peripheral are implemented.
140
141 Each CMSIS-Driver defines an \ref AccessStruct for calling the various driver functions and each peripheral (that is accessed
142 via a CMSIS-Driver) has one \ref DriverInstances "Driver Instance".
143
144
145 \section DriverFunctions Common Driver Functions
146
147 Each CMSIS-Driver contains these functions:
148
149  - \b GetVersion: can be called at any time to obtain version information of the driver interface.
150  
151  - \b GetCapabilities: can be called at any time to obtain capabilities of the driver interface.
152  
153  - \b Initialize: must be called before powering the peripheral using \b PowerControl. This function performs the following:
154      - allocate I/O resources.
155          - register an optional \b SignalEvent callback function.
156
157  - \b SignalEvent: is an optional callback function that is registered with the \b Initialize function. This callback
158    function is initiated from interrupt service routines and indicates hardware events or the completion of a data block
159    transfer operation.
160
161  - \b PowerControl: Controls the power profile of the peripheral and needs to be called after \b Initialize. Typically, three
162    power options are available:
163      - \c ARM_POWER_FULL: Peripheral is turned on and fully operational. The driver initializes the peripheral registers, interrupts, and (optionally) DMA.
164      - \c ARM_POWER_LOW: (optional) Peripheral is in low power mode and partially operational; usually, it can detect
165        external events and wake-up.
166      - \c ARM_POWER_OFF: Peripheral is turned off and not operational (pending operations are terminated). This is the state
167        after device reset.
168  
169  - \b Uninitialize: Complementary function to Initialize. Releases the I/O pin resources used by the interface.
170
171  - \b Control: Several drivers provide a control function to configure communication parameters or execute miscellaneous
172    control functions.
173
174 The section \ref CallSequence contains more information on the operation of each function. Additional functions are specific
175 to each driver interface and are described in the individual sections of each driver.
176
177 \subsection ProcessorMode Cortex-M Processor Mode
178
179 The CMSIS-Driver functions access peripherals and interrupts and are designed to execute in \b Privileged mode.
180 When calling CMSIS-Driver functions from RTOS threads, it should be ensure that these threads execute in \b Privileged mode.
181
182
183 \section CallSequence Function Call Sequence
184
185 For normal operation of the driver, the API functions \b GetVersion, \b GetCapabilities, \b Initialize, \b PowerControl, \b Uninitialize are 
186 called in the following order:
187
188 \msc
189  a [label="", textcolor="indigo", linecolor="indigo", arclinecolor="indigo"],
190  b [label="", textcolor="blue", linecolor="blue", arclinecolor="blue"];
191
192  a rbox a [label="Middleware", linecolor="indigo"],
193  b rbox b [label="Driver", linecolor="blue"];
194  --- [label="Verify API version"];
195  a=>b [label="GetVersion ()", textcolor="gray", linecolor="gray"];
196  --- [label="Obtain driver features"];
197  a=>b [label="GetCapabilities (...)", textcolor="gray", linecolor="gray"];
198  ---  [label="Setup software resources"];
199  a=>b [label="Initialize (...)", textcolor="red", linecolor="red"];
200  --- [label="Setup the peripheral"];
201  a=>b  [label="PowerControl (ARM_POWER_FULL)", textcolor="red", linecolor="red"];
202  --- [label="Operate with the peripheral"];
203  a=>b [label="Data Transfer Functions"];
204  a<=b  [label="SignalEvent (...)"];
205  --- [label="Wait for external hardware events"];
206  a=>b  [label="PowerControl (ARM_POWER_LOW)"];
207  a<=b  [label="SignalEvent (...)"];
208  --- [label="Stop working with peripheral"];
209  a=>b [label="PowerControl (ARM_POWER_OFF)", textcolor="red", linecolor="red"];
210  a=>b [label="Uninitialize (...)", textcolor="red", linecolor="red"];
211 \endmsc
212
213 The functions \b GetVersion and \b GetCapabilities can be called any time to obtain the required information from the driver.
214 These functions return always the same information.
215
216
217 \subsection CS_start Start Sequence
218
219 To start working with a peripheral the functions \b Initialize and \b PowerControl need to be called in this order:
220 \code
221   drv->Initialize (...);                 // Allocate I/O pins
222   drv->PowerControl (ARM_POWER_FULL);    // Power up peripheral, setup IRQ/DMA
223 \endcode
224
225 - \b Initialize typically allocates the I/O resources (pins) for the peripheral. The function can be called multiple times;
226   if the I/O resources are already initialized it performs no operation and just returns with \ref ARM_DRIVER_OK.
227 - \b PowerControl (\c ARM_POWER_FULL) sets the peripheral registers including interrupt (NVIC) and optionally DMA.
228   The function can be called multiple times; if the registers are already set it performs no operation and just returns with \ref ARM_DRIVER_OK.
229   
230 \subsection CS_stop Stop Sequence
231
232 To stop working with a peripheral the functions \b PowerControl and \b Uninitialize need to be called in this order:
233 \code
234   drv->PowerControl (ARM_POWER_OFF);     // Terminate any pending transfers, reset IRQ/DMA, power off peripheral
235   drv->Uninitialize (...);               // Release I/O pins
236 \endcode
237 The functions \b PowerControl and \b Uninitialize always execute and can be used to put the peripheral into a <b>Safe State</b>,
238 for example after any data transmission errors.  To restart the peripheral in a error condition, you should first execute
239 the \ref CS_stop and then the \ref CS_start.
240
241 - \b PowerControl (\c ARM_POWER_OFF) terminates any pending data transfers with the peripheral, disables the peripheral and 
242   leaves it in a defined mode (typically the reset state).
243     - when DMA is used it is disabled (including the interrupts)
244     - peripheral interrupts are disabled on NVIC level
245     - the peripheral is reset using a dedicated reset mechanism (if available) or by clearing the peripheral registers
246     - pending peripheral interrupts are cleared on NVIC level
247     - driver variables are cleared
248 - \b Uninitialize always releases I/O pin resources.
249
250 \section Share_IO Shared I/O Pins
251
252 All CMSIS-Driver provide a \ref CS_start and \ref CS_stop. Therefore two different drivers can share the same I/O pins, 
253 for example UART1 and SPI1 can have overlapping I/O pins. In this case the communication channels can be used as shown below:
254
255 \code 
256   SPI1drv->Initialize (...);                // Start SPI1
257   SPI1drv->PowerControl (ARM_POWER_FULL);
258    ...                                      // Do operations with SPI1
259   SPI1drv->PowerControl (ARM_POWER_OFF);    // Stop SPI1
260   SPI1drv->Uninitialize ();
261    ...
262   USART1drv->Initialize (...);              // Start USART1
263   USART1drv->PowerControl (ARM_POWER_FULL);
264    ...                                      // Do operations with USART1
265   USART1drv->PowerControl (ARM_POWER_OFF);  // Stop USART1
266   USART1drv->Uninitialize ();
267 \endcode
268  
269 \section Data_Xfer_Functions Data Transfer Functions
270
271 A CMSIS-Driver implements non-blocking functions to transfer data to a peripheral. This means that the driver configures the
272 read or write access to the peripheral and instantly returns to the calling application.  The function names for data
273 transfer end with:
274  - \b Send to write data to a peripheral.
275  - \b Receive to read data from a peripheral.
276  - \b Transfer to indicate combined read/write operations to a peripheral.
277
278 During a data transfer, the application can query the number of transferred data items using functions named
279 <b>Get<i>xxx</i>Count</b>. On completion of a data transfer, the driver calls a callback function with a specific event code.
280
281 During the data exchange with the peripheral, the application can decide to:
282  - Wait (using an RTOS scheduler) for the callback completion event. The RTOS is controlled by the application code which
283    makes the driver itself RTOS independent.
284  - Use polling functions that return the number of transferred data items to show progress information or partly read or fill
285    data transfer buffers.
286  - Prepare another data transfer buffer for the next data transfer.
287  
288 The following diagram shows the basic communication flow when using the \b _Send function in an application.
289
290 \image html Non_blocking_transmit_small.png  "Non-blocking Send Function"
291
292 \section AccessStruct Access Struct
293
294 A CMSIS-Driver publishes an \ref AccessStruct with the data type name ARM_DRIVER_xxxx that gives to access the driver
295 functions.
296
297 \b Code \b Example: \b Function \b Access \b of \b the \b SPI \b driver
298 \code
299 typedef struct _ARM_DRIVER_SPI {
300   ARM_DRIVER_VERSION   (*GetVersion)      (void);
301   ARM_SPI_CAPABILITIES (*GetCapabilities) (void);
302   int32_t              (*Initialize)      (ARM_SPI_SignalEvent_t cb_event);
303   int32_t              (*Uninitialize)    (void);
304   int32_t              (*PowerControl)    (ARM_POWER_STATE state);
305   int32_t              (*Send)            (const void *data, uint32_t num);
306   int32_t              (*Receive)         (      void *data, uint32_t num);
307   int32_t              (*Transfer)        (const void *data_out, void *data_in, uint32_t num);
308   uint32_t             (*GetDataCount)    (void);
309   int32_t              (*Control)         (uint32_t control, uint32_t arg);
310   ARM_SPI_STATUS       (*GetStatus)       (void);
311 } const ARM_DRIVER_SPI;
312 \endcode
313
314 \subsection DriverInstances Driver Instances
315
316 A device may offer several peripherals of the same type. For such devices, the CMSIS-Driver publishes multiple instances
317 of the \ref AccessStruct. The name of each driver instance reflects the names of the peripheral available in the device.
318
319 \b Code \b Example: \ref AccessStruct \b for \b three \b SPIs \b in \b a \b microcontroller \b device.
320 \code
321 ARM_DRIVER_SPI Driver_SPI1;     // access functions for SPI1 interface
322 ARM_DRIVER_SPI Driver_SPI2;     // access functions for SPI2 interface
323 ARM_DRIVER_SPI Driver_SPI3;     // access functions for SPI3 interface
324 \endcode
325
326 The access functions can be passed to middleware to specify the driver instance that the middleware should use for communication.
327
328 \b Naming \b Convention
329
330 The access structs need to follow this naming convention: the keyword "Driver" followed by an underscore "_", the interface
331 name "IFNAME" (usually in upper case letters), and the instance number "n". Here's the full list of access struct names for
332 all drivers (n to be replaced with the actual instance number):
333 \code
334 Driver_CANn
335 Driver_ETH_MACn
336 Driver_ETH_PHYn
337 Driver_Flashn
338 Driver_I2Cn
339 Driver_MCIn
340 Driver_NANDn
341 Driver_SAIn
342 Driver_SPIn
343 Driver_Storagen
344 Driver_USARTn
345 Driver_USBDn
346 Driver_USBHn
347 Driver_WiFin
348 \endcode
349
350
351 \b Example:
352 \code
353 void init_middleware (ARM_DRIVER_SPI *Drv_spi) ...
354 \\ inside the middleware the SPI driver functions are called with:
355 \\   Drv_spi->function (...);
356 \endcode
357  
358 \code
359 \\ setup middleware
360 init_middleware (&Driver_SPI1);      // connect middleware to SPI1 interface
361   :
362 init_middleware (&Driver_SPI2);      // connect middleware to SPI2 interface
363 \endcode
364
365
366 \section DriverConfiguration Driver Configuration
367
368 For a device family, the drivers may be configurable. The \ref referenceImplementation stores configuration options in a
369 central file with the name \b RTE_Device.h. However, the configuration of the drivers itself is not part of the CMSIS-Driver
370 specification.
371
372 \section CodeExample Code Example
373
374 The following example code shows the usage of the SPI interface.
375
376 \include SPI_Demo.c
377 */
378
379 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
380 /**
381 \page referenceImplementation Reference Implementation
382
383 The API of the CMSIS-Drivers is published in the \ref DriverHeaderFiles.
384
385 To simplify the development of a CMSIS-Driver both \ref DriverTemplates and \ref DriverExamples are provided.
386
387 ARM offers also a Software Pack for CMSIS-Driver Validation as described in \ref driverValidation.
388
389 \section DriverHeaderFiles Driver Header Files
390
391 The API of each CMSIS-Driver is published in a header file. It is recommended to include the header file that is part of the
392 CMSIS specification in the implementation file of the CMSIS-Driver. 
393
394 The following header files are available in the directory <b>.\\CMSIS\\Driver\\Include</b>.
395
396 | Header File          | Description
397 |----------------------|-------------------------
398 | %Driver_Common.h     | \ref common_drv_gr
399 | %Driver_CAN.h        | \ref can_interface_gr
400 | %Driver_ETH.h        | \ref eth_interface_gr
401 | %Driver_ETH_MAC.h    | \ref eth_mac_interface_gr
402 | %Driver_ETH_PHY.h    | \ref eth_phy_interface_gr
403 | %Driver_Flash.h      | \ref flash_interface_gr
404 | %Driver_I2C.h        | \ref i2c_interface_gr
405 | %Driver_MCI.h        | \ref mci_interface_gr
406 | %Driver_NAND.h       | \ref nand_interface_gr
407 | %Driver_SPI.h        | \ref spi_interface_gr
408 | %Driver_Storage.h    | \ref storage_interface_gr
409 | %Driver_SAI.h        | \ref sai_interface_gr
410 | %Driver_USART.h      | \ref usart_interface_gr
411 | %Driver_USB.h        | \ref usb_interface_gr
412 | %Driver_USBD.h       | \ref usbd_interface_gr
413 | %Driver_USBH.h       | \ref usbh_interface_gr
414 | %Driver_WiFi.h       | \ref wifi_interface_gr
415
416
417 \section DriverTemplates Driver Template Files
418
419 Driver template files are code skeletons that provide the structure of a CMSIS-Driver.  The following templates are 
420 available in the directory <b>.\\CMSIS\\Driver\\DriverTemplates</b>.
421
422 | Source File       | Description
423 |-------------------|------------------------------------
424 | %Driver_CAN.c     | \ref can_interface_gr
425 | %Driver_ETH_MAC.c | \ref eth_mac_interface_gr
426 | %Driver_ETH_PHY.c | \ref eth_mac_interface_gr
427 | %Driver_Flash.c   | \ref flash_interface_gr
428 | %Driver_I2C.c     | \ref i2c_interface_gr
429 | %Driver_MCI.c     | \ref mci_interface_gr
430 | %Driver_SAI.c     | \ref sai_interface_gr
431 | %Driver_SPI.c     | \ref spi_interface_gr
432 | %Driver_Storage.c | \ref storage_interface_gr
433 | %Driver_USART.c   | \ref usart_interface_gr
434 | %Driver_USBD.c    | \ref usbd_interface_gr
435 | %Driver_USBH.c    | \ref usbh_interface_gr
436
437
438 \section DriverExamples Driver Examples
439
440 The driver examples are full working CMSIS-Drivers that may be adapted to a different hardware. Examples are currently
441 available for the NXP LPC1800 series and provide the implementation of a complete CMSIS-Driver. The following examples are 
442 available in the directory <b>.\\CMSIS\\Pack\\Example\\CMSIS_Driver</b>.
443
444 | Source File       | Header File       | Description
445 |-------------------|-------------------|-------------------------------
446 | %EMAC_LPC18xx.c   | %EMAC_LPC18xx.h   | \ref eth_mac_interface_gr
447 | %SSP_LPC18xx.c    | %SSP_LPC18xx.h    | \ref spi_interface_gr
448 | %I2C_LPC18xx.c    | %I2C_LPC18xx.h    | \ref i2c_interface_gr
449 | %I2S_LPC18xx.c    | %I2S_LPC18xx.h    | \ref sai_interface_gr
450 | %MCI_LPC18xx.c    | %MCI_LPC18xx.h    | \ref mci_interface_gr
451 | %USART_LPC18xx.c  | %USART_LPC18xx.h  | \ref usart_interface_gr
452 | %USBn_LPC18xx.c   | %USB_LPC18xx.h    | common files for \ref usbd_interface_gr and \ref usbh_interface_gr
453 | %USBDn_LPC18xx.c  | <i>none</i>       | \ref usbd_interface_gr
454 | %USBHn_LPC18xx.c  | <i>none</i>       | \ref usbh_interface_gr
455
456
457 These CMSIS-Drivers use additional modules for GPIO and DMA control:
458
459 | Source File       | Header File      | Description
460 |-------------------|------------------|---------------------------------------
461 | %GPIO_LPC18xx.c   | %GPIO_LPC18xx.h  | GPIO Interface for LPC1800 series
462 | %GPDMA_LPC18xx.c  | <i>none</i>      | DMA Interface for LPC1800 series
463 | %SCU_LPC18xx.c    | %SCU_LPC18xx.h   | SCU Interface for LPC1800 series
464
465 The CMSIS-Drivers for the LPC1800 device have also many configuration options that are controls using \#define statements in
466 the file <b>.\\CMSIS\\Pack\\Example\\CMSIS_Driver\\Config\\RTE_Device.h</b>. Using this file, the I/O pin and DMA assignment
467 can be set among other parameters such as USB speed and PHY interfaces. 
468
469 Further driver reference implementations are available in Device Family Packs (DFP) labeled with version 2.0.0 or higher. 
470 */
471
472 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
473 /**
474 \page driverValidation Driver Validation
475
476 The <a href="https://www.keil.com/pack/" target=_blank>Software Pack</a> named <b>ARM::CMSIS-Driver_Validation</b> contains the following:
477
478  - Source code of a CMSIS-Driver Validation Suite along with configuration file.
479  - Documentation of the CMSIS-Driver Validation Suite.
480  - Examples that shows the usage of the CMSIS-Driver Validation Suite on various target platforms.
481
482 The CMSIS-Driver Validation Suite performs the following tests:
483  - Generic Validation of API function calls
484  - Validation of Configuration Parameters
485  - Validation of Communication with loopback tests
486  - Validation of Communication Parameters such as baudrate
487  - Validation of Event functions
488
489 The following CMSIS-Drivers can be tested with the current release:
490  - \ref can_interface_gr : with loop back test of communication.
491  - \ref eth_interface_gr : MAC and PHY with loop back test of communication.
492  - \ref i2c_interface_gr : only API and setup; does not test data transfer.
493  - \ref mci_interface_gr : only API and setup; does not test data transfer.
494  - \ref spi_interface_gr : with loop back test of communication.
495  - \ref usart_interface_gr : with loop back test of communication.
496  - \ref usbd_interface_gr : only API and setup; does not test data transfer.
497  - \ref usbh_interface_gr : only API and setup; does not test data transfer.
498  - \ref wifi_interface_gr : extensive tests for WiFi Driver.
499  
500 The Driver Validation output can be printed to a console or saved in an XML file, via standard output (usually ITM).
501  
502 \section test_output Sample Test Output
503 \verbatim
504 CMSIS-Driver USART Test Report   Dec  6 2019   11:44:30 
505
506 TEST 01: USART_GetCapabilities            PASSED
507 TEST 02: USART_Initialization             PASSED
508 TEST 03: USART_PowerControl               
509   DV_USART.c (301): [WARNING] Low power is not supported
510                                           PASSED
511 TEST 04: USART_Config_PolarityPhase       PASSED
512 TEST 05: USART_Config_DataBits            
513   DV_USART.c (387): [WARNING] Data Bits = 9 are not supported
514                                           PASSED
515 TEST 06: USART_Config_StopBits            
516   DV_USART.c (425): [WARNING] Stop Bits = 1.5 are not supported
517   DV_USART.c (429): [WARNING] Stop Bits = 0.5 are not supported
518                                           PASSED
519 TEST 07: USART_Config_Parity              PASSED
520 TEST 08: USART_Config_Baudrate            PASSED
521 TEST 09: USART_Config_CommonParams        PASSED
522 TEST 10: USART_Send                       PASSED
523 TEST 11: USART_AsynchronousReceive        PASSED
524 TEST 12: USART_Loopback_CheckBaudrate     PASSED
525 TEST 13: USART_Loopback_Transfer          PASSED
526 TEST 14: USART_CheckInvalidInit           PASSED
527
528 Test Summary: 14 Tests, 14 Passed, 0 Failed.
529 Test Result: PASSED
530 \endverbatim
531
532 \section loop_back_setup Setup for Loop Back Communication
533
534 To perform loop back communication tests it is required to connect the input and the output of the peripherals as shown in this table:
535
536 Peripheral       | Loop Back Configuration
537 :----------------|:----------------------------
538 Ethernet         | Connect TX+ (Pin 1) with RX+ (Pin 3), TX- (Pin 2) with RX- (Pin 6)
539 SPI              | Connect MISO to MOSI
540 USART            | Connect TX with RX
541
542 The following picture shows the necessary external loop back connections for the Keil MCBSTM32F400 evaluation board:
543  - SPI: PB14 (SPI2_MISO) and PB15 (SPI2_MOSI)
544  - USART: PB6 (USART1_TX) and PB7 (USART1_RX)
545  - Ethernet: Pin 1 (TX+) and Pin 3 (RX+), Pin 2 (TX-) and Pin 6 (RX-) 
546
547 \image html image006.png  "Connections for Loop Back Communication Tests on Keil MCBSTM32F400"
548
549
550 */