nRF5 SDK v17.1.0

The nRF5 SDK documentation includes descriptions and other reference material to help you understand the various components of the SDK. Examples are provided for development purposes only and should always be tested with your design.

See Getting Started for instructions on how to run the provided examples.

This version of the SDK supports the following SoftDevices:

This SDK supports developing for nRF52810 on the nRF52 DK. See Developing for nRF52810 for details.

This SDK supports developing for nRF52811 on the nRF52840 DK. See Developing for nRF52811 for details.

This SDK supports developing for nRF52820 on the nRF52833 DK. See Developing for nRF52820 for details.

To download a copy of the SDK documentation for offline use, go to

SDK Release Notes:

nRF5 SDK v17.1.0
Release Date: August, 2021
- Added support for the new versions of the nRF52 devices:
   - nRF52820 revision 3
   - nRF52832 revision 3
   - nRF52833 revision 2
   - nRF52840 revision 3
   (Note: Programming these requires nrfjprog v10.13 or newer.)
- Updated nrf_oberon to v3.0.8.
- Updated Mbed TLS to v2.16.10.

The following toolchains/devices have been used for testing and verification:
 - ARM: MDK-ARM version 5.25   
 - GCC: GCC ARM Embedded 9.2020-q2.major
 - IAR: IAR Workbench 7.80.4
 - SES: SES 5.42a

Note for SEGGER Embedded Studio (SES) users:

Compatibility of SES projects:

Updates and fixes in the MDK used by SES break backwards compatibility
with old SES project files.
To use old projects in combination with this version of the SDK (MDK),
make the following updates:

1. In the flash_placement.xml file:
   MemorySegment name must be changed from "RAM" to "RAM1":
   <MemorySegment name="RAM1" start="$(RAM_PH_START)" size="$(RAM_PH_SIZE)">

2. In the .emProject file:
   In "linker_section_placements_segments" you must refer to "RAM1", replacing "RAM":
   linker_section_placements_segments="FLASH RX 0x0 0x100000;RAM1 RWX 0x20000000 0x40000"


Observation of unaligned memory layout:
Certain SES projects that use section variables have been observed
to create memory sections that do not end on a word-aligned address.
This has caused issues when the hex file has been processed by a hex file utility tool
like mergehex.exe, which can produce a corrupted hex file.
The issue has been fixed in the SES section-placement file (flash_placement.xml)
by setting the memory section size attribute to 4.

Note for IAR 8 users:

When using IAR 8, you must apply the following workaround in the MDK:

- Apply a patch to modules/nrfx/mdk/compiler_abstraction.h at line 140
 (fix the '__ALIGN()' macro definition): use the argument 'n' in the macro expansion instead of 'x'.


Libraries for IAR 8 require wchar_t to be of size 32 bits while IAR 7 requires 16 bits.
To run a project using IAR 8, follow these instructions:
 1. Open the IAR project in IAR 8. The IAR workbench will automatically generate an IAR 8 compatible project file.
 2. If the project contains one of the precompiled libraries listed below, replace it
    with the IAR 8 compatible alternative (there are no projects targeting nRF51 in this SDK).
 3. Save the project.
 4. When building the project, you might get the warning: "The header file 'cmsis_iar.h' is obsolete and should not be used. [...]".
    - The problem is described in DevZone post:
      The solution is to remove all occurrences of #include <cmsis_iar.h>.
The affected libraries are:
 - micro-ecc crypto:
    - IAR7: Includes library located in the folder named “…_iar\…”.
    - IAR8: Switch to using the library from the folder named “…_armgcc\…”.
 - nrf_cc310, nrf_cc310_bl, and nrf_oberon:
    - IAR7: Link to a library where “short_wchar” is part of the folder name.
    - IAR8: Link to a library without “short_wchar” in the folder name.
 - Gazell, NFC Tag, and 802.15.4:
    - IAR7: Includes the library where the file name ends with “_iar”.
    - IAR8: Switch to using the library with similar file name that ends with “_gcc”.
Supported SoftDevices:
 - S112 v7.2.x
 - S113 v7.2.x
 - S122 v8.x.x
 - S132 v7.2.x
 - S140 v7.2.x
 - S212 v6.1.x
 - S312 v6.1.x
 - S332 v6.1.x
 - S340 v6.1.x
Supported boards:
- PCA10040
- PCA10040E (nRF52810 emulation on PCA10040)
- PCA10056
- PCA10056E (nRF52811 emulation on PCA10056)
- PCA10100 (support in selected examples)
- PCA10100E (nRF52820 emulation on PCA10100)
- PCA10059 (support in selected examples)
- D52DK1 from Garmin Canada (only for ANT examples)
- PCA10112 (nRF52840 with the nRF2140 front-end chip)
For other devices and boards, see the SDK documentation, section "Using
the SDK with other boards".
*** New features
** Drivers and libraries **
- nrfx has been updated to version 1.9.0.
  For details, see .\modules\nrfx\

** Crypto **

- Updated nrf_oberon from v3.0.6 to v3.0.8 with the following new features:
   - Added support for SHA-224 and SHA-384.
   - Added support for the p224 curve for ECDH and ECDSA.
   - Added support for HMAC-SHA256 with AAD.
   - Added support for ChaChaPoly.
   - See Mbed TLS release notes for details.

*** Changes
** Drivers and libraries **

- NRFFOETT-1832: Reduced radio noise in the Radio Test example
  by moving CPU to idle state in the main loop.

** Bluetooth Low Energy **

- NRFFOSDK-13484: Added an option in the Peer Manager to decide
  that a connection will not be processed by this module.
- NRFFOSDK-13611: GATT Module: automatic MTU negotiation is now optional.

** Bluetooth Low Energy examples **

- NRFFOSDK-13616: Updated handling of bonding events to be more sceptical of failed bonding/encryption
  attempts, since they can be the sign of an attack.

** Direct Test Mode **

- NRFFOSDK-13580: Redesigned the Direct Test Mode library to run in the interrupt context.

** NFC **

- Added support for encoding empty NDEF records.
- NRFFOSDK-13614: Added Frame Waiting Time (FWT) management logic to the NFC T4T library.
  FWT is now changed according to the ISO-DEP timing requirements (e.g. WTX frame).
- NRFFOSDK-13627: Changed the behavior of the nfc_t4t_done() function so that
  it uninitializes the NFCT driver to achieve symmetry with the nfc_t4t_setup() function,
  where the driver is initialized.

*** Bug fixes

** Drivers and libraries **

- NRFFOSDK-13607: Reduced the Radio IRQ priority in the Radio Test example
  when nRF21540 support is enabled, to avoid potential deadlock.
- NRFFOETT-2532: nrf_ringbuf - prevented data from being overwritten.
- NRFFOETT-2608: BSP - fixed port mapping for nRF52866 / PCA-10100.
- NRFFOETT-2557: app_timer2 - fixed the library to allow it to be started and stopped from higher interrupt priority.

** DFU / Bootloader **

- NRFFOETT-2068: Updated to allow GPREGET to be used outside of the bootloader.
- NRFFOETT-2510: Fixed a misinterpretation of bit field in GPREGET.

** Bluetooth Low Energy **

- NRFFOETT-2521: Removed the Address Type checking in the Scanning Module.
- NRFFOSDK-13616: Fixed bond deletion mechanism in the Bond Management Service
  in a scenario with multiple connections.  

** Peer Manager **

- NRFFOETT-2519: The local db data will not be written to flash if it is already up to date.
  This means that if a client updates a CCCD to the same value as before,
  no flash operation will happen.
- NRFFOSDK-13591: Added a mitigation mechanism to address a security vulnerability
  in the Bluetooth Core spec: CVE-2020-26558

** FDS **

- Fixed a bug that would prevent re-initialization when fds_init() returned
- Fixed a bug in FDS that could occur if the device lost power during garbage collection,
  that would result in the swap page being incorrectly tagged, and fds_init() returning
  FDS_ERR_NO_SWAP on initialization (NRFFOETT-2506).
** DTM **

- NRFFOSDK-13481: Added missing support of 256kByte for nRF52832.
- NRFFOETT-2537: Added missing +8dBm output power.
- NRFFOETT-2573: Fixed a bug with payload length > 63 bytes.

** ANT **

- NRFFOSDK-13460: Fixed ANT File Sharing Client module to allow using channel numbers other than 0.
  Previously, using such channel numbers would cause misbehavior of this module.
** NFC **

- NRFFOSDK-13691: Fixed a potential race condition in the Type 4 Tag library
 in case of coexistence with other communication protocols
 (i.e. when there is high CPU load and ISR takes long time to execute).

*** Known Issues
** General **
- The workaround for Anomaly 198 for nRF52840 SPIM3 peripheral
  that has been implemented in nrfx_spim cannot be used with a SoftDevice.
  Flag NRFX_SPIM3_NRF52840_ANOMALY_198_WORKAROUND_ENABLED must be set to zero.
  The workaround based on a dedicated RAM block for SPIM3 must be used instead.
- usbd_msc example has a limitation. With setting "APP_USBD_CONFIG_EVENT_QUEUE_ENABLE = 0", when USB
  cable is unplugged and re-plugged, the application goes into an endless loop.
  This is due to an issue in the unsupported block device library.
** Bluetooth Low Energy **

- GATTC: the ble_gattc_service_t::uuid field is incorrectly populated
  in the BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP event if the
  sd_ble_gattc_primary_services_discover() or sd_ble_gattc_read()
  are called when a Primary Service Discovery by Service UUID is already ongoing.
  When the application has called sd_ble_gattc_primary_services_discover(),
  it should wait for the BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP event before calling
  sd_ble_gattc_primary_services_discover() or sd_ble_gattc_read().
- The TFTP Background DFU example has known instabilities.
- BLE Interactive CLI example: the command to set a custom ATT MTU only takes
  effect on the subsequent connection and the updated MTU parameter is not
  maintained in further connections with the same peer, even when bonded.
- ANT Shared Channels example: when testing BLE connection with an Android device,
  the link might be terminated by Android due to unhandled LL requests.
- Bluetooth ANCS example: when connected from iPhone and pressing DK buttons,
  the example may assert before the BLE link is authenticated.

** Bluetooth Low Energy examples **

- NRFFOSDK-13653: Using the Bluetooth LE privacy feature is recommended in the following ways:
    - In the Scanner role:
      In active scanning do not use accept list (whitelist) or only use passive scanning.
    - In the Advertiser role:
      Only use non-scannable advertising or limit to minimum the duration 
	  of connectable and scannable advertising (e.g. just for establishing the connection).
- NRFFOSDK-13685: The examples do not check the security requirements on notifications
  received before encryption is established, as is mandated in the
  Bluetooth Core Spec 5.3 3.C.
- NRFFOSDK-13686: When reconnecting to a bonded peer, the examples do not check whether
  encryption is enabled before sending notifications/indications on a protected characteristic,
  as is mandated in the Bluetooth Core Spec 5.3 3.C.
- NRFFOSDK-13697: Example ble_app_buttonless_dfu fails when booting up when built targeting
  PCA10040E running on nRF52832 Revision 3.
  Workaround: Run the example on a DK with nRF52832 Revision 2.
- NRFFOSDK-13713: The serialized target of the Heart Rate example for the S112 SoftDevice
  and the HCI transport (ble_app_hrs/pca10040/ser_s112_hci) asserts when trying to
  establish a Bluetooth Low Energy connection with it.

** ANT **

- NRFFOSDK-13710: The Heart Rate Monitor Relay Application might disconnect the BLE link
  if long connection interval is used and an ANT channel reopens after a search timeout.

** DFU **

- NRFFOETT-2579: If the transfer is aborted when transferring a SoftDevice to a device
  with no SoftDevice present (using sd-req = 0), the device can erroneously think that the SoftDevice
  was transferred correctly. On smaller devices there could be no room
  to transfer the SoftDevice again.
  Workaround: Transfer any application with sd-req set to 0.
  The application must be at least 3 pages (0x3000 bytes) long.
  The application will overwrite the SoftDevice, allowing it to be retransferred.

** Crypto **
- The nrf_crypto CLI example may fail when using ecc private key converted
  from raw function for specific curve types.
** Drivers and libraries **
- The SAADC driver does not handle detection limits 'high' and 'low' correctly
  if SAADC resolution is greater than 10 bits.
  - The library may handle Remote Wakeup incorrectly.
  - Issuing a SET_ADDRESS(0) request does not cause the device to change
    its state to default.
  - The device does not STALL when a DATA transaction is received outside of SETUP.
    It ACKs instead.
- LEDS_OFF, LEDS_ON, LED_IS_ON, LEDS_INVERT, LEDS_CONFIGURE macros defined in boards.h
  work only with pins on port 0

Documentation feedback | Developer Zone | Subscribe | Updated