1 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
3 \defgroup usbd_comp_test USB Compliance Tests
6 USB drivers need to be tested against the requirements of the USB standard. The following tools are provided by the
7 <a href="http://www.usb.org" target="_blank">USB Implementers Forum</a>:
8 - <a href="http://www.usb.org/developers/tools/usb20_tools/" target="_blank">USB Command Verifier (USB20CV Tools)</a> for
10 - <a href="http://www.usb.org/developers/tools/" target="_blank">USB Command Verifier (USB3CV Tools)</a> for USB 3
13 Before using the command verifier tools, make sure that you have an application running with the USB device class that you
14 are going to test. For example, if you want to test the behavior of the USB MSC device class, create a µVision project
15 containing this class. For more information, refer to the
16 <a href="http://www.keil.com/pack/doc/mw/USB/html/_u_s_b__device.html#Creation_Steps" target="_blank">MDK Middleware</a>
19 Then, follow these steps to run the verification tools on a Windows PC:
21 - Install the appropriate USB Command Verifier tool and reboot your PC.
22 - Connect your device to the PC.
23 - Open the Windows Device Manager and select <b>View - Devices by connection</b> to view the USB host controllers available
26 \image html USB_Test_DevManager.png "Select USB Device"
28 - Expand the entry and verify the controller properties to which your device is connected. Remember the location of the
29 controller that will be tested:
31 \image html USB_Test_DevLocation.png "Device Location"
33 - Run the USB Command Verifier tool and select the controller according to the location found in the previous step:
35 \image html USB_Test_selectDevice.png "Select Controller"
38 Do not test the controller that is connected to the keyboard or mouse. All devices connected to the tested controller will
41 - When selecting the <b>Compliance Test</b> mode all test cases will run. In the <b>Debug</b> mode, you can choose individual
42 test cases by selecting the related check boxes. Test reports are saved automatically in the \b Reports directory.
44 \image html USB_Test_CommandVerifier.png "Compliance Tests"
45 The following tests should be executed for:
46 - USB Mass Storage Class: Chapter 9 Tests + MSC Tests
47 - USB HID class: Chapter 9 Tests + HID Tests
48 - Any other class (CDC, ADC, etc.): only Chapter 9 Tests
50 <b>Chapter 9 Tests</b> refers to the USB Device Framework chapter of the USB specification. Every USB peripheral is required
51 conform to this test which must be passed. Passed tests offer a good level of confidence that there are no major flows in the
54 The USB Command Verifier does not test how well a device behaves under stress. To get a better confidence, conduct stress
55 tests of all available examples:
56 - USB MSC: Send a long file to the mass storage device and read it back and compare the output.
57 - USB HID: Use the HID Client (available in the MDK installation directory below \\ARM\\Utilities\\HID_Client\\Release) to
58 see how the device works under stress.
59 - USB CDC (Virtual COM): Send a large file on the Virtual COM port and capture it on the UART and vice versa. Compare sent
60 and received files for both directions.
61 - USB ADC: Play a sound file form the board for some time and listen for any sound distortion. Record sounds coming from
62 a microphone and verify the recorded file on the USB Host.
64 After the completion of the tests, click <b>Exit</b> to switch back the USB stack. Otherwise, the USB stack will stay in test