nRF5340: Multiprotocol RPMsg

This sample exposes the SoftDevice Controller and the IEEE 802.15.4 radio driver support to the nRF5340 application CPU, using RPMsg transport as part of OpenAMP.

Overview

The sample is compatible with the HCI RPMsg driver provided by the nRF Connect SDK Bluetooth HCI Drivers core and with the nRF 802.15.4 Serialization Host module.

See the following configuration options for more information:

You might need to adjust the Kconfig configuration of this sample to make it compatible with the peer application. For example, CONFIG_BT_MAX_CONN must be equal to the maximum number of connections supported by the peer application.

The following components have been disabled to make this sample energy-efficient:

  • Serial console (in prj.conf)

  • Logger (in prj.conf)

Requirements

The sample supports the following development kits:

Hardware platforms

PCA

Board name

Build target

nRF5340 DK

PCA10095

nrf5340dk_nrf5340

nrf5340dk_nrf5340_cpunet

The testing procedure of the sample also requires a second development kit that supports IEEE 802.15.4.

Building and Running

You must program this sample to the nRF5340 network core.

The recommended way of building the sample is to use the multi-image feature of the build system. In this way, the sample is built automatically as a child image when both CONFIG_BT_RPMSG_NRF53 and CONFIG_NRF_802154_SER_HOST are enabled.

However, it is also possible to build the sample as a stand-alone image.

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

See Building and programming a sample application for information about how to build and program the application.

Testing

After programming the sample to your development kit, test it by performing the following steps:

  1. Go to the samples/net/sockets/echo_server path in the Zephyr’s sample directory

  2. Run the following command:

    west build -b nrf5340dk_nrf5340_cpuapp -p -- -DOVERLAY_CONFIG="overlay-802154.conf;overlay-bt.conf"
    

    During the build, the nRF5340: Multiprotocol RPMsg image will be automatically included.

  3. Run this command to program both the application and network core firmwares to the nRF5340 SoC:

    west flash
    
  4. Run the IEEE 802.15.4 variant of the Socket Echo Client on a second development kit that supports IEEE 802.15.4.

  5. Connect to the kit with a terminal emulator (for example, PuTTY). See How to connect with PuTTY for the required settings. As the nRF5340 DK has multiple UART instances, the correct port must be identified.

  6. Observe that IPv6 packets are exchanged between the echo client and server over the IEEE 802.15.4 interface. You can use a smartphone to see that the nRF5340 device advertises over Bluetooth LE in parallel to the echo exchanges.

Dependencies

This sample uses the following nRF Connect SDK libraries: