Multicore idle test
The test benchmarks the idle behavior of an application that runs on multiple cores. It uses a system timer as a wake-up source.
Requirements
The test supports the following development kits:
Hardware platforms |
PCA |
Board name |
|
|---|---|---|---|
PCA10095 |
|
||
PCA10175 |
|
Overview
The test demonstrates how to build a multicore idle application with Sysbuild.
When building with sysbuild, the build system adds images based on the options selected in the project’s additional configuration and build files. This test shows how to inform the build system about dedicated sources for additional images. The test comes with the following additional files:
Kconfig.sysbuild- This file is used to add sysbuild Kconfig options that are passed to all the images.sysbuild.cmake- The CMake file adds additional images using theExternalZephyrProject_Addmacro. You can also add the dependencies for the images if required.
Both the application and remote cores use the same main.c that prints the name of the DK on which the application is programmed.
Building and running
This test can be found under tests/benchmarks/multicore/idle in the nRF Connect SDK folder structure.
See Programming an application for information about how to build and program the tests.
To build the test, use configuration setups from testcase.yaml using the -T option.
See the following examples:
- nRF5340 DK
You can build the test for application and network cores as follows:
west build -p -b nrf5340dk/nrf5340/cpuapp -T benchmarks.multicore.idle.nrf5340dk_cpuapp_cpunet .- nRF54H20 DK
You can build the test for application and radio cores as follows:
west build -p -b nrf54h20dk/nrf54h20/cpuapp -T benchmarks.multicore.idle.nrf54h20dk_cpuapp_cpurad .To achieve the lowest power consumption, use the
benchmarks.multicore.idle.nrf54h20dk_cpuapp_cpurad.s2ramconfiguration. This configuration does not provide console output. Use the following build command:west build -p -b nrf54h20dk/nrf54h20/cpuapp -T benchmarks.multicore.idle.nrf54h20dk_cpuapp_cpurad.s2ram .You can build the test for application and PPR cores as follows:
west build -p -b nrf54h20dk/nrf54h20/cpuapp -T benchmarks.multicore.idle.nrf54h20dk_cpuapp_cpuppr .Note
Nordic PPR snippet (nordic-ppr) is used in the configuration above to automatically launch PPR core from the application core.
An additional configuration setup is provided to execute code directly from the non-volatile memory (MRAM) on the PPR core. This configuration uses Nordic boot PPR snippet with execution in place (nordic-ppr-xip) and enables
CONFIG_XIPon the PPR core. You can build the sample as follows:west build -p -b nrf54h20dk/nrf54h20/cpuapp -T benchmarks.multicore.idle.nrf54h20dk_cpuapp_cpuppr_xip .
Testing
After programming the test to your development kit, complete the following steps to test it:
Connect to the kit with a terminal emulator (for example, the Serial Terminal app). See Testing and optimization for the required settings and steps.
Reset the kit.
Observe the console output for both cores:
For the application core, the output should be as follows:
*** Booting nRF Connect SDK zephyr-v3.5.0-3517-g9458a1aaf744 *** Multi-core idle test on nrf5340dk/nrf5340/cpuapp Multi-core idle test iteration 0 Multi-core idle test iteration 1 ...
For the remote core, the output should be as follows:
*** Booting nRF Connect SDK zephyr-v3.5.0-3517-g9458a1aaf744 *** Multi-core idle test on nrf5340dk/nrf5340/cpunet Multi-core idle test iteration 0 Multi-core idle test iteration 1 ...