nRF5340: Empty firmware for application core

You can use this sample to run an application on the network core of the nRF5340 when there is no need for the working application core.

Requirements

The sample supports the following development kit:

Hardware platforms

PCA

Board name

Board target

nRF7002 DK

PCA10143

nrf7002dk

nrf7002dk/nrf5340/cpuapp

nRF5340 DK

PCA10095

nrf5340dk

nrf5340dk/nrf5340/cpuapp

Overview

The sample has a minimal Zephyr configuration: no multithreading, no clock, no MPU, no device drivers. It does the following:

  • During system initialization:

    • It allows the network core to access GPIO pins for LEDs and buttons. If more pins are required, you can add them to the network_gpio_allow() function.

    • It starts the network core. This is not done directly in the source code of the sample, but internally by Zephyr.

  • In the main() function of the sample:

    • The application RAM is powered off to reduce power consumption.

    • The application core is suspended indefinitely.

Building and running

This sample can be found under samples/nrf5340/empty_app_core in the nRF Connect SDK folder structure.

To build the sample, follow the instructions in Configuring and building an application for your preferred building environment. See also Programming an application for programming steps and Testing and optimization for general information about testing and debugging in the nRF Connect SDK.

Note

When building repository applications in the SDK repositories, building with sysbuild is enabled by default. If you work with out-of-tree freestanding applications, you need to manually pass the --sysbuild parameter to every build command or configure west to always use it.

Testing

To test the sample, complete the following steps:

  1. Program the sample to the application core.

  2. Program Zephyr’s Blinky sample to the network core.

  3. Observe the LEDs on the kit.

Dependencies

This sample has the following nrfx dependencies:

  • nrfx/nrf.h

  • nrfx/nrfx.h

In addition, it uses the following Zephyr libraries: