nRF5 SDK v17.0.0
Migration guide

Table of Contents

If you built an application based on nRF5 SDK v16.0.0, complete the actions listed in the following sections to migrate your application to nRF5 SDK v17.0.0.

Note that this migration guide does not list all changes, but it covers the most important changes that require you to update your code. See the release notes for further information on changes that were made in this release.

Bluetooth low energy (BLE)

API changes

  1. The req_report member has been removed from the scan_evt_t structure.
  2. The NRF_BLE_SCAN_EVT_SCAN_REQ_REPORT value has been removed from the nrf_ble_scan_evt_t enumeration.

Libraries

Usage of mbed TLS in nrf_oberon

The nrf_oberon library version 3.0.5 provides mbed TLS APIs and library for some of its features.

Usage of mbed TLS is not demonstrated in nRF5 SDK. For an example implementation, see Nordic Security Module .

To interface with the mbed TLS features using nRF5 SDK, do the following:

  1. Create a new mbed TLS configuration with the following defines set:
    #define MBEDTLS_AES_SETKEY_ENC_ALT
    #define MBEDTLS_AES_SETKEY_DEC_ALT
    #define MBEDTLS_AES_ENCRYPT_ALT
    #define MBEDTLS_AES_DECRYPT_ALT
    #define MBEDTLS_ECDH_GEN_PUBLIC_ALT
    #define MBEDTLS_ECDH_COMPUTE_SHARED_ALT
    #define MBEDTLS_ECDSA_GENKEY_ALT
    #define MBEDTLS_ECDSA_SIGN_ALT
    #define MBEDTLS_ECDSA_VERIFY_ALT
    #define MBEDTLS_ECJPAKE_ALT
    #define MBEDTLS_SHA1_ALT
    #define MBEDTLS_SHA256_ALT
    For information on how to configure mbed TLS, see How do I configure Mbed TLS.
    Note
    Elliptic Curve Cryptography is limited to curve secp256r1 for ECDSA and EC J-PAKE, and curve25519 for ECDH. Enabling any other curves might crash the system.
  2. Download mbedcrypto version 3.0.0 or later to compile and link against.
  3. You can also use this method with the latest long-term support of mbed TLS (v2.16.x). To do this, two functions must be made available from subsequent versions:

Drivers

SAADC driver backported from nrfx 2.2.0

The nrfx 1.8.4 comes with two SAADC drivers. The first one is a legacy driver while the second one is backported from nrfx 2.2.0. The new driver fixes several known issues but comes with new API.

The new SAADC driver is added to the existing files. There is no need to add new files to the compilation process. However, to switch to new API, the code must be rewritten and symbol NRFX_SAADC_API_V2 must be defined. Examples on how to use the new API can be found here: SAADC driver migration.

Crypto

Enabling and disabling of CryptoCell and its interrupts

Enabling and disabling of CryptoCell hardware and interrupts is now done internally in the nrf_cc310 library. The following API that allowed to do this manually is now removed:

Any direct references to enable or disable the CryptoCell hardware or CryptoCell IRQ are also removed:

Note
This change does not affect the nrf_cc310_bl library.

Action: If you have maintained the enabling and disabling of Cryptocell hardware and interrupts on your own, remove these calls from your code.


Documentation feedback | Developer Zone | Subscribe | Updated