nRF5 SDK for Thread and Zigbee v1.0.0
OpenThread libraries

nRF5 SDK for Thread contains the pre-built OpenThread stack in the form of binary libraries. If you want to build your own project, you must include all of the mandatory libraries and can add some of the optional libraries.

The binaries can be found in the following folder: <InstallFolder>\external\openthread\lib. Currently, libraries for GCC, IAR, and Keil 5 are provided.

Refer to the release notes for the ID of the OpenThread commit that has been used to generate pre-built Thread stack libraries and for testing and verification.

Refer to API for detailed API reference for the libraries.

Mandatory libraries:

Optional libraries:

Limitations:

The pre-built OpenThread libraries located in <InstallFolder>\external\openthread\lib do not support DHCPv6 Client/Server.

Certification

This SDK provides a precompiled version of the hardware-accelerated mbed TLS libary (libmbedcrypto.a), utilizing the ARM CryptoCell technology, which can be used with OpenThread. For more information, see CryptoCell library.

The CryptoCell library is used by OpenThread to accelerate cryptographic operations (AES-EBC, ECJ-PAKE, and SHA256) in mbed TLS library. The application can still use it when called from the same context as OpenThread (main context in bare-metal applications, or the same thread in RTOS apllications). Keep in mind that the current version of the CryptoCell library is not thread-safe and thus it should not be used from multiple threads or interrupt service routines.

You can also use a library without hardware acceleration (libmbedcrypto-software.a), but the commissioning procedure takes more time in such case (see the table for comparison). For the best performance, use the library utilizing ARM CryptoCell.

Version Commissioning (with Network Discovery) DTLS Handshake
Without CryptoCell 37,76 s 32,88 s
With CryptoCell 6,31 s 1,51 s

USB pseudo reset

The USB variant of the nRF52840 platform library uses a feature called pseudo reset. When a reset from OpenThread stack is requested, instead of triggering a hardware reset, a pseudo reset is invoked, which causes reinitialization of the OpenThread stack and certain peripherals. The reason for such behavior is that when native USB CDC connectivity is used, performing a hardware reset would cause the device to reenumerate in the host system, which as a result would impair the ongoing communication through CLI or Spinel. A custom application that is supposed to use USB CDC for serial communication should implement pseudo reset as well. Refer to Thread CLI Example or Thread NCP Example for an example implementation of this feature.

Certification

The OpenThread stack has been officially certified on nRF52840 as a Thread Group Certified Component.

The included stack was internally tested using Thread V1.1 Test Harness 1.3.0 R48 and the complete Thread Test Bed.

The DUT device has been tested in the following combinations:

All 150 out of 150 tests passed.

The test Router_9_2_10 occasionally fails due to the incorrect test case definition in Thread V1.1 Test Harness 1.3.0 software. In step 7, the test case checks if unicast MLE Data Response sent to SED includes non-stable data.

Due to Thread Harness issue and non-compliant implementation of Golden Devices in the Thread Test Bed, several certification tests fail with the default topology configuration file. For seven test cases, 5.6.4, 5.6.6, 5.6.9, 7.1.3, 7.1.5, 9.2.6, 9.2.18, an OpenThread device is used as a SED Golden Device. The modified topology configuration is available in the directory <InstallFolder>\external\openthread\thread_harness\config. This modification is acceptable by Thread Certification Laboratories until Thread Harness and Golden Device vendors fix the non-compliance issue.

Internal testing has been done on the CLI application and OpenThread libraries compiled with GCC and IAR. The libraries can be found in the following folders:

How to run certification tests on nRF52840 dev-kits:

In order to certify a Thread product, all certification test cases must be run on the Thread Test Harness software.

A detailed description on how to assemble and configure Thread Test Bed and run Thread Test Harness can be found here: Thread Group's Confluence wiki page.

The first step is to use a proper OpenThread THCI file that works with the Thread stack, which is included in nRF5 SDK for Thread and Zigbee v1.0.0. The proper file (nRF52840.py) is located in the directory <InstallFolder>\external\openthread\thread_harness\THCI and it must be copied to C:\GRL\Thread1.1\Thread_Harness\THCI. Next copy the nRF52840.jpg file to the folder C:\GRL\Thread1.1\Web\images. Append the following section in the DEVICE_FIELDS section inside the C:\GRL\Thread1.1\Web\data\deviceInputFields.xml.

<DEVICE name="nRF52840" thumbnail="nRF52840.jpg" description = "Nordic Semiconductor: nRF52840 (OpenThread)" THCI="nRF52840">
    <ITEM label="Serial Line"
          type="text"
          forParam="SerialPort"
          validation="COM"
          hint="eg: COM1">COM
    </ITEM>
    <ITEM label="Speed"
          type="text"
          forParam="SerialBaudRate"
          validation="baud-rate"
          hint="eg: 115200">115200
    </ITEM>
</DEVICE>

The procedure of running the Thread Test Harness software on Nordic Semiconductor's nRF52840 SoC (on the PCA10056 Development Kit) must be adjusted in the following way. Thread Test Harness does not correctly identify the PCA10056 Development Kit out-of-the-box. Due to a collision of USB PID:VID with another vendor (this is valid only for Nordic Semiconductor development kits with J-Link virtual COM port), Nordic devices are not automatically added to the devices list. To add an nRF52840 device, drag the nRF52840 device and drop it on the configuration page. After that, the devices are configured and proper baud rate (115200) and COM port is set.

Useful links: OpenThread THCI Openthread acting as a new reference platform

Flash/RAM requirements

The following tables present flash memory and RAM requirements for the applications compiled with the chosen options using the GCC compiler with size optimization. Note that RAM memory requirements may be adjusted, for example to support different number of children, buffers, or registered addresses. The default configuration for nRF52840 platform is defined in two files:

Note
The presented memory requirements do not include 16 KB of flash memory used for settings storage.

CLI application memory requirements

Additional options: None

Application type Flash KB RAM KB
multiprotocol/cli_cc310_ftd 195 35
multiprotocol/cli_cc310_mtd 141 30
multiprotocol/cli_swcrypto_ftd 201 35
multiprotocol/cli_swcrypto_mtd 147 30
singleprotocol/cli_cc310_ftd 169 34
singleprotocol/cli_cc310_mtd 116 29
singleprotocol/cli_swcrypto_ftd 175 34
singleprotocol/cli_swcrypto_mtd 122 29

Additional options: "COMMISSIONER=1 JOINER=1 DHCP6_SERVER=1 DHCP6_CLIENT=1 CERT_LOG=1 DEFAULT_LOGGING=1 COAP=1 DNS_CLIENT=1 TMF_PROXY=1 BORDER_ROUTER=1 MAC_FILTER=1 MTD_NETDIAG=1"

Application type Flash KB RAM KB
multiprotocol/cli_cc310_ftd 295 58
multiprotocol/cli_cc310_mtd 237 53
multiprotocol/cli_swcrypto_ftd 280 52
multiprotocol/cli_swcrypto_mtd 222 47
singleprotocol/cli_cc310_ftd 269 57
singleprotocol/cli_cc310_mtd 211 52
singleprotocol/cli_swcrypto_ftd 255 50
singleprotocol/cli_swcrypto_mtd 196 45

Additional options: "COMMISSIONER=1 JOINER=1 COAP=1 DNS_CLIENT=1 MTD_NETDIAG=1 BORDER_ROUTER=1 DHCP6_SERVER=1 DHCP6_CLIENT=1 CERT_LOG=1"

Application type Flash KB RAM KB
multiprotocol/cli_cc310_ftd 292 58
multiprotocol/cli_cc310_mtd 235 53
multiprotocol/cli_swcrypto_ftd 278 52
multiprotocol/cli_swcrypto_mtd 220 47
singleprotocol/cli_cc310_ftd 267 56
singleprotocol/cli_cc310_mtd 209 51
singleprotocol/cli_swcrypto_ftd 252 50
singleprotocol/cli_swcrypto_mtd 194 45

Additional options: "JOINER=1 DHCP_CLIENT=1 DNS_CLIENT=1 COAP=1"

Application type Flash KB RAM KB
multiprotocol/cli_cc310_ftd 277 57
multiprotocol/cli_cc310_mtd 223 52
multiprotocol/cli_swcrypto_ftd 262 51
multiprotocol/cli_swcrypto_mtd 209 46
singleprotocol/cli_cc310_ftd 251 56
singleprotocol/cli_cc310_mtd 198 51
singleprotocol/cli_swcrypto_ftd 237 50
singleprotocol/cli_swcrypto_mtd 183 45

Additional options: "JOINER=1 DHCP_SERVER=1 DHCP_CLIENT=1 COAP=1 DNS_CLIENT=1 BORDER_ROUTER=1 MTD_NETDIAG=1"

Application type Flash KB RAM KB
multiprotocol/cli_cc310_ftd 280 58
multiprotocol/cli_cc310_mtd 229 53
multiprotocol/cli_swcrypto_ftd 265 51
multiprotocol/cli_swcrypto_mtd 215 46
singleprotocol/cli_cc310_ftd 255 56
singleprotocol/cli_cc310_mtd 204 52
singleprotocol/cli_swcrypto_ftd 240 50
singleprotocol/cli_swcrypto_mtd 189 45

Documentation feedback | Developer Zone | Subscribe | Updated