]> begriffs open source - cmsis/blob - CMSIS/DoxyGen/Driver/src/validation.md
Doc: Clean up of CMSIS-Driver docs, incl. change to markdown.
[cmsis] / CMSIS / DoxyGen / Driver / src / validation.md
1 # Driver Validation {#driverValidation}
2
3 Developers can use **CMSIS-Driver Validation** framework to verify that an implementation of a peripheral driver is compliant with the corresponding CMSIS-Driver Specification. Verified drivers can then be reliably used with middleware components and user applications that rely on CMSIS-Driver APIs.
4
5 The CMSIS-Driver Validation is maintained in a separate public [GitHub repository](https://github.com/ARM-software/CMSIS-Driver_Validation), and is also released as a [CMSIS Software Pack](https://www.keil.arm.com/packs/) named **ARM::CMSIS-Driver_Validation**.
6
7 This page gives an overview about driver validation. Refer to [CMSIS-Driver Validation Guide](https://arm-software.github.io/CMSIS-Driver_Validation/latest/index.html)) for full documentation.
8
9 The CMSIS-Driver Validation Suite performs the following tests:
10  - Generic Validation of API function calls
11  - Validation of Configuration Parameters
12  - Validation of Communication with loopback tests
13  - Validation of Communication Parameters such as baudrate
14  - Validation of Event functions
15
16 The following CMSIS-Drivers can be tested with the current release:
17  - \ref can_interface_gr : with loop back test of communication.
18  - \ref eth_interface_gr : MAC and PHY with loop back test of communication.
19  - \ref i2c_interface_gr : only API and setup; does not test data transfer.
20  - \ref mci_interface_gr : only API and setup; does not test data transfer.
21  - \ref spi_interface_gr : with loop back test of communication.
22  - \ref usart_interface_gr : with loop back test of communication.
23  - \ref usbd_interface_gr : only API and setup; does not test data transfer.
24  - \ref usbh_interface_gr : only API and setup; does not test data transfer.
25  - \ref wifi_interface_gr : extensive tests for WiFi Driver.
26
27  ## Sample Test Output {#test_output}
28
29 The Driver Validation output can be printed to a console or saved in an XML file, via standard output (usually ITM).
30
31 ```
32 CMSIS-Driver USART Test Report   Dec  6 2019   11:44:30
33
34 TEST 01: USART_GetCapabilities            PASSED
35 TEST 02: USART_Initialization             PASSED
36 TEST 03: USART_PowerControl
37   DV_USART.c (301): [WARNING] Low power is not supported
38                                           PASSED
39 TEST 04: USART_Config_PolarityPhase       PASSED
40 TEST 05: USART_Config_DataBits
41   DV_USART.c (387): [WARNING] Data Bits = 9 are not supported
42                                           PASSED
43 TEST 06: USART_Config_StopBits
44   DV_USART.c (425): [WARNING] Stop Bits = 1.5 are not supported
45   DV_USART.c (429): [WARNING] Stop Bits = 0.5 are not supported
46                                           PASSED
47 TEST 07: USART_Config_Parity              PASSED
48 TEST 08: USART_Config_Baudrate            PASSED
49 TEST 09: USART_Config_CommonParams        PASSED
50 TEST 10: USART_Send                       PASSED
51 TEST 11: USART_AsynchronousReceive        PASSED
52 TEST 12: USART_Loopback_CheckBaudrate     PASSED
53 TEST 13: USART_Loopback_Transfer          PASSED
54 TEST 14: USART_CheckInvalidInit           PASSED
55
56 Test Summary: 14 Tests, 14 Passed, 0 Failed.
57 Test Result: PASSED
58 ```
59
60 ## Setup for Loop Back Communication {#loop_back_setup}
61
62 To perform loop back communication tests it is required to connect the input and the output of the peripherals as shown in this table:
63
64 Peripheral       | Loop Back Configuration
65 :----------------|:----------------------------
66 Ethernet         | Connect TX+ (Pin 1) with RX+ (Pin 3), TX- (Pin 2) with RX- (Pin 6)
67 SPI              | Connect MISO to MOSI
68 USART            | Connect TX with RX
69
70 The following picture shows the necessary external loop back connections for the Keil MCBSTM32F400 evaluation board:
71  - SPI: PB14 (SPI2_MISO) and PB15 (SPI2_MOSI)
72  - USART: PB6 (USART1_TX) and PB7 (USART1_RX)
73  - Ethernet: Pin 1 (TX+) and Pin 3 (RX+), Pin 2 (TX-) and Pin 6 (RX-)
74
75 ![Connections for Loop Back Communication Tests on Keil MCBSTM32F400](./images/image006.png)