]> begriffs open source - cmsis-driver-validation/blob - Doxygen/DV_USBD.txt
rework release history
[cmsis-driver-validation] / Doxygen / DV_USBD.txt
1 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
2 /**
3 \defgroup usbd_config Configuration
4 \ingroup  dv_usbd
5
6 The USB Device driver validation settings are available in the <b>DV_USBD_Config.h</b> configuration file.
7
8 \image html dv_usbd_config_h.png "DV_USBD_Config.h configuration file in Configuration Wizard view mode"
9
10 \section usbd_config_detail Configuration settings
11
12 <b>Driver_USBD#</b> selects the driver instance that will be tested.<br>
13 For example if we want to test <c>Driver_USBD2</c> then this setting would be set to <c>2</c>.
14
15 <b>Tests</b> section contains selections of tests to be executed.
16 For details on tests performed by each test function please refer to \ref usbd_tests "USB Device Tests".
17
18 */
19
20 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
21 /**
22 \defgroup usbd_comp_test USB Compliance Tests 
23 \ingroup dv_usbd
24
25 USB drivers need to be tested against the requirements of the USB standard. The following tools are provided by the
26 <a href="http://www.usb.org" target="_blank">USB Implementers Forum</a>: 
27  - <a href="http://www.usb.org/developers/tools/usb20_tools/" target="_blank">USB Command Verifier (USB20CV Tools)</a> for
28    USB 2.0 controllers
29  - <a href="http://www.usb.org/developers/tools/" target="_blank">USB Command Verifier (USB3CV Tools)</a> for USB 3
30    controllers
31
32 Before using the command verifier tools, make sure that you have an application running with the USB device class that you
33 are going to test. For example, if you want to test the behavior of the USB MSC device class, create a µVision project
34 containing this class. For more information, refer to the
35 <a href="http://www.keil.com/pack/doc/mw/USB/html/_u_s_b__device.html#Creation_Steps" target="_blank">MDK Middleware</a>
36 documentation.
37
38 Then, follow these steps to run the verification tools on a Windows PC:
39
40 - Install the appropriate USB Command Verifier tool and reboot your PC.
41 - Connect your device to the PC.
42 - Open the Windows Device Manager and select <b>View - Devices by connection</b> to view the USB host controllers available
43   on the PC:
44
45   \image html usbd_dev_manager.png "Select USB Device"
46
47 - Expand the entry and verify the controller properties to which your device is connected. Remember the location of the
48   controller that will be tested:
49   
50   \image html usbd_dev_location.png "Device Location"
51
52 - Run the USB Command Verifier tool and select the controller according to the location found in the previous step:
53
54   \image html usbd_select_device.png "Select Controller"
55
56 \note 
57 Do not test the controller that is connected to the keyboard or mouse. All devices connected to the tested controller will
58 stop working.
59
60 - When selecting the <b>Compliance Test</b> mode all test cases will run. In the <b>Debug</b> mode, you can choose individual
61   test cases by selecting the related check boxes. Test reports are saved automatically in the \b Reports directory.
62
63 \image html usbd_command_verifier.png "Compliance Tests"
64 The following tests should be executed for:
65  - USB Mass Storage Class: Chapter 9 Tests + MSC Tests
66  - USB HID class: Chapter 9 Tests + HID Tests
67  - Any other class (CDC, ADC, etc.): only Chapter 9 Tests
68
69 <b>Chapter 9 Tests</b> refers to the USB Device Framework chapter of the USB specification. Every USB peripheral is required
70 conform to this test which must be passed. Passed tests offer a good level of confidence that there are no major flows in the
71 USB device drivers.
72
73 The USB Command Verifier does not test how well a device behaves under stress. To get a better confidence, conduct stress
74 tests of all available examples:
75   - USB MSC: Send a long file to the mass storage device and read it back and compare the output.
76   - USB HID: Use the HID Client (available in the MDK installation directory below \\ARM\\Utilities\\HID_Client\\Release) to
77     see how the device works under stress.
78   - USB CDC (Virtual COM): Send a large file on the Virtual COM port and capture it on the UART and vice versa. Compare sent
79     and received files for both directions.
80   - USB ADC: Play a sound file form the board for some time and listen for any sound distortion. Record sounds coming from
81     a microphone and verify the recorded file on the USB Host.
82
83 After the completion of the tests, click <b>Exit</b> to switch back the USB stack. Otherwise, the USB stack will stay in test
84 mode.
85 */