![]() |
CMSIS-Driver Validation
Version 1.3.0
Driver Validation
|
For proper operation, add the following software components in the Manage Run-Time Environment window:
Right-click Source Group 1... and select Add New Item to Group. Select User Code Template and choose the main file from Device:Startup or CMSIS-RTOS2:Keil RTX5.
Add this include:
In the main function, after kernel initialization, create the cmsis_dv
thread:
to run all tests that you have chosen in the next step.
Open DV_Config.h
under the CMSIS Driver Validation group in the Project window.
Common Test Settings
The common test settings help you to choose the output format of the test and the buffer sizes and buffer content that should be used for the send, receive, and transfer tests:
Driver-specific Settings
Every interface has specific settings that can be changed in the according section:
Open RTX_Config.h and edit set:
Depending on the buffer sizes that you have chosen in step 4, you need to add more heap. Open your startup_device.s file from the Device group in the Project window. Click on Configuration Wizard. Increase the heap size:
Refer to the Resource Requirements section for a calculation example.
Depending on your device, you might have different pin/hardware configuration options. Usually, you can configure the device using the RTE_Device.h
file from the Device group. Enable all interfaces you wish to use in the tests and make all necessary pin-out changes required by your actual board layout (consult the board schematics). The pre-built examples are already configured for the underlying hardware.
For a robust test with good coverage, implement various targets with different settings:
These interfaces support loopback testing: Ethernet, SPI, and USART. Connect the following pins on your target hardware together (refer to the hardware schematics):
In the Options for Target dialog, under debug settings, ensure that Trace and ITM port 0 are enabled and that the correct clock frequency is set:
Build, load and run the project. The output is displayed in the Debug (printf) Viewer window:
CMSIS-Driver Test Suite Oct 8 2015 17:12:21 TEST 01: ETH_MAC_GetCapabilities PASSED TEST 02: ETH_MAC_Initialization PASSED TEST 03: ETH_MAC_PowerControl DV_ETH.c (163) [WARNING] Low power is not supported TEST 04: ETH_MAC_SetBusSpeed DV_ETH.c (197) [WARNING] Link speed 1G is not supported TEST 05: ETH_MAC_Config_Mode PASSED TEST 06: ETH_MAC_Config_CommonParams PASSED TEST 07: ETH_PHY_Initialization PASSED TEST 08: ETH_PHY_PowerControl DV_ETH.c (300) [WARNING] Low power is not supported TEST 09: ETH_PHY_Config PASSED TEST 10: ETH_Loopback_Transfer PASSED TEST 11: ETH_PHY_CheckInvalidInit NOT EXECUTED TEST 12: ETH_MAC_CheckInvalidInit NOT EXECUTED Test Summary: 12 Tests, 10 Executed, 7 Passed, 0 Failed, 3 Warnings. Test Result: WARNING
If you see warnings during loopback transfer tests, please read the section Reading Test Results which gives you more information on how to interpret the results.