Chapter 213. Test Programs
Table of Contents
213.1. Test Programs
Some CryptoAuthLib specific tests are built and can be used to verify correct operation of the library.
basiccheck
This test executes some basic device sanity checks to exercise the I2C transport layer, and to verify target device operation. It does not use the CryptoAuthLib test environment, put purely calls the CryptoAuthLib library functionality.
basicinfo
This test executes some basic device sanity checks to exercise the I2C transport layer, and to verify target device operation. It uses the CryptoAuthLib test environment and provides similar diagnostic output as the direct
basiccheck
test.cryptoauth_test
This test is only built when
CYGBLD_CRYPTOAUTHLIB_TESTS_MANUAL
is enabled since it relies on the/dev/haldiag
diagnostic terminal connection for interactive command input.The test is a build of the “command-line” test application allowing interaction with devices. On startup the application will display an inital prompt and wait for user input:
INFO:<code from 0x20209008 -> 0x202420c4, CRC a43d^gt; INFO:<Using haldiag for interactive test> INFO:<Enter "help\n" to display help menu> $
Depending on the eCos configuration, and the specific options for this CryptoAuthLib package, the features of the test may vary. The following is purely an example. The
help
command should list all of the supported commands. Normally a device needs to be selected prior to use. e.g.:$
help
Usage: help - Display Menu ecc608 - Set Target Device to ATECC608 info - Get the Chip Revision sernum - Get the Chip Serial Number rand - Generate Some Random Numbers readcfg - Read the Config Zone lockstat - Zone Lock Status tng - Run unit tests on TNG type part. basic - Run Basic Test on Selected Device util - Run Helper Function Tests clkdivm0 - Set ATECC608 to ClockDivider M0(0x00) clkdivm1 - Set ATECC608 to ClockDivider M1(0x05) clkdivm2 - Set ATECC608 to ClockDivider M2(0x0D) cd - Run Unit Tests on Cert Data cio - Run Unit Test on Cert I/O crypto - Run Unit Tests for Software Crypto Functions pbkdf2 - Run pbkdf2 tests $ecc608
Device Selected. $info
revision: 00 00 60 01 $sernum
serial number: 01 23 C4 71 E0 E7 45 37 EE $Note For some devices, e.g. ATECC608 family, some operations will not operate, or will return errors, if the device is not locked or configured suitably. Knowledge of the device, and its features, being used should taken into account when running commands and interpreting the results.
2024-12-10 | Microchip “AS IS” License |