![]() |
CMSIS-Driver Validation
Version 1.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-RTOS:RTOS:Keil RTX.
Add this include:
In the main function, after initialization, call
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. Select all tests that you wish to use. For more information on the test cases, check the Reference section.
Common Test Settings The common test settings help you to choose the output format of the test and the buffer sizes and buffer contest that should be used for the send, receive, and transfer tests:
Open RTX_Conf_CM.c 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:
Calculation Example
Let's assume that the default heap size in the startup file is 0x400 (which is 1024 bytes). Add 1024 for the framework and for example another 1024 if your buffer size is set to 512 bytes (default). This computes to a total heap of 3072 which is equivalent to 0xC04. Set this number in the startup file.
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.
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