Application Interface
Overview
When building for the application core, this application uses the ‘’CONFIG_ANT_NP’’ and ‘’CONFIG_ANT_INCLUDE_NP_CHILD_IMAGE’’ Kconfig options to automatically configure a child image for multicore platforms.
When building for the network core, this application uses the ‘’CONFIG_NCS_SAMPLE_EMPTY_APP_CORE_CHILD_IMAGE’’ Kconfig option to automatically configure a child image for multicore platforms.
This application is used to test the ANT interface APIs.
Requirements
Hardware platforms |
PCA |
Board name |
Board target |
nRF5340 DK |
PCA10095 |
nrf5340dk |
nrf5340dk/nrf5340/cpuapp or nrf5340dk/nrf5340/cpunet |
nRF52840 DK |
PCA10056 |
nrf52840dk |
nrf52840dk/nrf52840 |
nRF52 DK |
PCA10040 |
nrf52dk |
nrf52dk/nrf52832 |
Configuration
nRF5340 configuration files
Application Core
This application configuration is split into the following two files:
generic configuration (cpuapp) is available in the prj.conf file.
configuration for the ant_rpc child image (cpunet) is stored in the child_image subdirectory.
Network Core
This application configuration is in one file:
generic configuration (cpunet) is available in the prj_cpunet.conf file.
Building and Running
This application can be found in the technology/wireless/ant-test-apps/nrf-connect-platform repository on branch master.
Application Core
Certain tests are disabled on the application core due to the fact that some specific APIs are not implemented in ANT RPC. To run all tests please see Network Core below.
To build for the application core, select the build target as nrf5340dk/nrf5340/cpuapp and select the prj.conf as the configuration file.
Program the application to your development kit.
Check the application core virtual COM port of the nRF DK for logging output.
Network Core
To build for the network core, select the build target as nrf5340dk/nrf5340/cpunet and select the prj_cpunet.conf as the configuration file.
Program the application to your development kit.
Check the network core virtual COM port of the nRF DK for logging output.
Output
[00:00:00.436,981] <inf> application_interface: ANT Version BNQ0.01.01 [00:00:01.437,103] <inf> unitTestFramework: ***************************************************************** [00:00:01.437,164] <inf> unitTestFramework: Ch Start Offset [00:00:01.437,164] <inf> unitTestFramework: ***************************************************************** [00:00:01.437,194] <inf> unitTestFramework: [00:00:03.437,347] <inf> unitTestFramework: ********************************************** [00:00:03.437,377] <inf> unitTestFramework: Start test - Ch Start Offset : Capabilities [00:00:04.437,805] <inf> interfaceChStartOffset: SUCCESS - Line:0071 File:../src/tests/interfaceChStartOffset.c -- ASSERT: 0x0 = 0x0 [00:00:04.437,835] <inf> interfaceChStartOffset: SUCCESS - Line:0073 File:../src/tests/interfaceChStartOffset.c -- ASSERT: 0x1 = 0x1 [00:00:05.437,927] <inf> unitTestFramework: End test - Ch Start Offset : Capabilities [00:00:05.437,957] <inf> unitTestFramework: **********************************************
Available Tests
These are the currently available tests:
All
ch start offset test
Network Core Only
scalable chennels test
dynamic scalable channels test
Internal Library Headers
To run some tests we require access to internal ANT library APIs which are obfuscated and not available to the general public in NCS. These internal functions are defined in the internal headers in inc_lib_internal.
Internal APIs currently used:
get_ant_struct
ant_crypto_key_set
These internal functions are defined in the internal version of ant_interface.h. The current strategy is to copy the public ant_interface.h in NCS into inc_lib_internal, then copy any needed internal functions from the internal version of ant_interface.h into the copied over public version. This is to reduce the overhead which comes with the internal ant_interface.h.
The internal headers can be found in technology/wireless/ant-protocol-stack/nrf-connect.
Public ant_interface.h:
From ANT release 0.2.0.
Internal APIs and headers:
From technology/wireless/ant-protocol-stack/nrf-connect master, revision 88fa1a14d401ceea38f025a04864bb8f285c4473.