Changes in nRF Connect SDK v1.4.99-dev1

The most relevant changes that are present on the master branch of the nRF Connect SDK, as compared to the latest release, are tracked in this file.

Note

This file is a work in progress and might not cover all relevant changes.

Changelog

The following sections provide detailed lists of changes by component.

nRF5

The following changes are relevant for the nRF52 and nRF53 Series.

nRF5340 SoC

  • Updated:

    • bl_boot library - Disabled clock interrupts before booting the application. This change fixes an issue where the Immutable bootloader sample would not be able to boot a Zephyr application on the nRF5340 SoC.

Thread

Zigbee

Bluetooth Mesh

Common

The following changes are relevant for all device families.

sdk-nrfxlib

See the changelog for each library in the nrfxlib documentation for the most current information.

Crypto
  • Added:

    • nrf_cc3xx_platform v0.9.5, with the following highlights:

      • Added correct TRNG characterization values for nRF5340 devices.

      See the Changelog - nrf_cc3xx_platform for detailed information.

    • nrf_cc3xx_mbedcrypto version v0.9.5, with the following highlights:

      • Built to match the nrf_cc3xx_platform v0.9.5 including correct TRNG characterization values for nRF5340 devices.

      See the Changelog - nrf_cc3xx_mbedcrypto for detailed information.

  • Updated:

    • Rewrote the Nordic Security Module’s library stripping mechanism to not use the POST_BUILD option in a custom build rule. The library stripping mechanism was non-functional in certain versions of SEGGER Embedded Studio Nordic Edition.

BSD library
  • Added information about low accuracy mode to the GNSS socket documentation.

Trusted Firmware-M:

  • Added a simple sample that demonstrates how to integrate TF-M in an application.

MCUboot

The MCUboot fork in nRF Connect SDK (sdk-mcuboot) contains all commits from the upstream MCUboot repository up to and including c74c551ed6, plus some nRF Connect SDK specific additions.

The following list summarizes the most important changes inherited from upstream MCUboot:

  • Bootloader:

    • Added hardening against hardware level fault injection and timing attacks. See CONFIG_BOOT_FIH_PROFILE_HIGH and similar Kconfig options.

    • Introduced abstract crypto primitives to simplify porting.

    • Added ram-load upgrade mode (not enabled for Zephyr yet).

    • Renamed single-image mode to single-slot mode. See the CONFIG_SINGLE_APPLICATION_SLOT option.

    • Added a patch for turning off cache for Cortex-M7 before chain-loading.

    • Fixed an issue that caused HW stack protection to catch the chain-loaded application during its early initialization.

    • Added reset of Cortex SPLIM registers before boot.

    • Fixed a build issue that occurred if the CONF_FILE contained multiple file paths instead of a single file path.

    • Added watchdog feed on nRF devices. See the CONFIG_BOOT_WATCHDOG_FEED option.

    • Removed the flash_area_read_is_empty() port implementation function.

    • Updated the ARM core configuration to only be initialized when selected by the user. See the CONFIG_MCUBOOT_CLEANUP_ARM_CORE option.

    • Allowed the final data chunk in the image to be unaligned in the serial-recovery protocol.

  • Image tool:

    • Updated the tool to print an image digest during verification.

    • Added a possibility to set a confirm flag for HEX files as well.

    • Updated the usage of --confirm to imply --pad.

    • Fixed the argument handling of custom_tlvs.

Mcumgr

The mcumgr library fork in nRF Connect SDK (sdk-mcumgr) contains all commits from the upstream mcumgr repository up to and including snapshot a3d5117b08.

The following list summarizes the most important changes inherited from upstream mcumgr:

  • Fixed an issue with devices running MCUboot v1.6.0 or earlier where a power outage during erase of a corrupted image in slot 1 could result in the device not being able to boot. In this case, it was not possible to update the device and mcumgr would return error code 6 (MGMT_ERR_EBADSTATE).

  • Added support for invoking shell commands (shell management) from the mcumgr command line.

Zephyr

The Zephyr fork in nRF Connect SDK (sdk-zephyr) contains all commits from the upstream Zephyr repository up to and including 35264cc214fd, plus some nRF Connect SDK specific additions.

For a complete list of upstream Zephyr commits incorporated into nRF Connect SDK since the most recent release, run the following command from the ncs/zephyr repository (after running west update):

git log --oneline 35264cc214fd ^v2.4.0-ncs1

For a complete list of nRF Connect SDK specific commits, run:

git log --oneline manifest-rev ^35264cc214fd

The current nRF Connect SDK release is based on Zephyr v2.4.99.

The following list summarizes the most important changes inherited from upstream Zephyr:

  • Architectures:

    • Enabled interrupts before main() in single-thread kernel mode for Cortex-M architecture.

    • Introduced functionality for forcing core architecture HW initialization during system boot, for chain-loadable images.

  • Boards:

    • Fixed arguments for the J-Link runners for nRF5340 DK and added the DAP Link (CMSIS-DAP) interface to the OpenOCD runner for nRF5340.

    • Marked the nRF5340 PDK as deprecated and updated the nRF5340 documentation to point to the nRF5340 DK.

    • Added enabling of LFXO pins (XL1 and XL2) for nRF5340.

    • Removed non-existing documentation links from partition definitions in the board devicetree files.

    • Updated documentation related to QSPI use.

  • Kernel:

    • Restricted thread-local storage, which is now available only when the toolchain supports it. Toolchain support is initially limited to the toolchains bundled with the Zephyr SDK.

    • Added support for gathering basic thread runtime statistics.

    • Fixed a race condition between k_queue_append() and k_queue_alloc_append().

    • Updated the kernel to no longer try to resume threads that are not suspended.

    • Updated the kernel to no longer attempt to queue threads that are already in the run queue.

    • Updated k_busy_wait() to return immediately on a zero time-out, and improved accuracy on nonzero time-outs.

    • Removed the following deprecated kernel APIs:

      • k_enable_sys_clock_always_on()

      • k_disable_sys_clock_always_on()

      • k_uptime_delta_32()

      • K_FIFO_INITIALIZER

      • K_LIFO_INITIALIZER

      • K_MBOX_INITIALIZER

      • K_MEM_SLAB_INITIALIZER

      • K_MSGQ_INITIALIZER

      • K_MUTEX_INITIALIZER

      • K_PIPE_INITIALIZER

      • K_SEM_INITIALIZER

      • K_STACK_INITIALIZER

      • K_TIMER_INITIALIZER

      • K_WORK_INITIALIZER

      • K_QUEUE_INITIALIZER

    • Removed the following deprecated system clock APIs:

      • __ticks_to_ms()

      • __ticks_to_us()

      • sys_clock_hw_cycles_per_tick()

      • z_us_to_ticks()

      • SYS_CLOCK_HW_CYCLES_TO_NS64()

      • SYS_CLOCK_HW_CYCLES_TO_NS()

    • Updated k_timer_user_data_get() to take a const struct k_timer *timer instead of a non-const pointer.

  • Devicetree:

    • Removed the legacy DT macros.

    • Started exposing dependency ordinals for walking the dependency hierarchy.

    • Added documentation for the DTS bindings.

  • Drivers:

    • Deprecated the DEVICE_INIT() macro. Use DEVICE_DEFINE instead.

    • ADC:

      • Improved the default routine that provides sampling intervals, to allow intervals shorter than 1 millisecond.

    • Bluetooth Controller:

      • Fixed and improved an issue where a connection event closed too early when more data could have been sent in the same connection event.

      • Fixed missing slave latency cancellation when initiating control procedures. Connection terminations are faster now.

      • Added experimental support for non-connectable non-scannable Extended Advertising with 255 byte PDU (without chaining).

      • Added experimental support for non-connectable scannable Extended Advertising with 255 byte PDU (without chaining).

      • Added experimental support for Extended Scanning with duration and period parameters (without active scanning for scan response or chained PDU).

      • Added experimental support for Periodic Advertising and Periodic Advertising Synchronization Establishment.

    • Bluetooth Host:

      • Updated the BT_LE_ADV_OPT_DIR_ADDR_RPA option. It must now be set when advertising towards a privacy-enabled peer, independent of whether privacy has been enabled or disabled.

      • Updated the signature of the bt_gatt_indicate_func_t callback type by replacing the attr pointer with a pointer to the bt_gatt_indicate_params struct that was used to start the indication.

      • Added a destroy callback to the bt_gatt_indicate_params struct, which is called when the struct is no longer referenced by the stack.

      • Added advertising options to disable individual advertising channels.

      • Added experimental support for Periodic Advertising Sync Transfer.

      • Added experimental support for Periodic Advertising List.

      • Changed the permission bits in the discovery callback to always be set to zero since this is not valid information.

      • Fixed a regression in lazy loading of the Client Configuration Characteristics.

      • Fixed an issue where a security procedure failure could terminate the current GATT transaction when the transaction did not require security.

    • Display:

      • Added support for the ILI9488 display.

      • Refactored the ILI9340 driver to support multiple instances, rotation, and pixel format changing at runtime. Configuration of the driver instances is now done in devicetree.

      • Enhanced the SSD1306 driver to support communication via both SPI and I2C.

    • Flash:

      • Modified the nRF QSPI NOR driver so that it supports also nRF53 Series SoCs.

    • IEEE 802.15.4:

      • Updated the nRF5 IEEE 802.15.4 driver to version 1.9.

    • LED PWM:

      • Added a driver interface and implementation for PWM-driven LEDs.

    • Modem:

      • Reworked the command handler reading routine, to prevent data loss and reduce RAM usage.

      • Added the possibility of locking TX in the command handler.

      • Improved handling of HW flow control on the RX side of the UART interface.

    • Power:

      • Added multiple nrfx_power-related fixes to reduce power consumption.

    • Regulator:

      • Introduced a new regulator driver infrastructure.

    • Sensor:

      • Added support for the IIS2ICLX 2-axis digital inclinometer.

      • Enhanced the BMI160 driver to support communication via both SPI and I2C.

      • Added device power management in the LIS2MDL magnetometer driver.

    • Serial:

      • Replaced the usage of k_delayed_work with k_timer in the nRF UART driver.

      • Fixed an issue in the nRF UARTE driver where spurious data could be received when the asynchronous API with hardware byte counting was used and the UART was switched back from the low power to the active state.

      • Removed the following deprecated definitions:

        • UART_ERROR_BREAK

        • LINE_CTRL_BAUD_RATE

        • LINE_CTRL_RTS

        • LINE_CTRL_DTR

        • LINE_CTRL_DCD

        • LINE_CTRL_DSR

    • SPI:

      • Added support for SPI emulators.

    • USB:

      • Fixed handling of zero-length packets (ZLP) in the Nordic Semiconductor USB Device Controller driver (usb_dc_nrfx).

      • Fixed initialization of the workqueue in the usb_dc_nrfx driver, to prevent fatal errors when the driver is reattached.

      • Fixed handling of the SUSPEND and RESUME events in the Bluetooth classes.

      • Made the USB DFU class compatible with the target configuration that does not have a secondary image slot.

      • Added support for using USB DFU within MCUboot with single application slot mode.

  • Networking:

  • Bluetooth Mesh:

    • Replaced the Configuration Server structure with Kconfig entries and a standalone Heartbeat API.

    • Added a separate API for adding keys and configuring features locally.

    • Fixed a potential infinite loop in model extension tree walk.

    • Added LPN and Friendship event handler callbacks.

    • Created separate internal submodules for keys, labels, Heartbeat, replay protection, and feature management.

    • Configuration Client:

  • Libraries/subsystems:

    • Settings:

      • Removed SETTINGS_USE_BASE64 support, which has been deprecated for more than two releases.

    • Storage:

    • File systems:

  • Build system:

    • Ensured that shields can be placed in other BOARD_ROOT folders.

    • Added basic support for Clang 10 with x86.

  • System:

    • Added an API that provides a printf family of functions (for example, cbprintf()) with a callback on character output, to perform in-place streaming of the formatted string.

    • Updated minimal libc to print stderr just like stdout.

    • Added an abort() function to minimal libc.

    • Updated the ring buffer to allow using the full buffer capacity instead of forcing an empty slot.

    • Added a CLAMP macro.

    • Added a feature for post-mortem analysis to the tracing library.

  • Samples:

  • Logging:

    • Added STP transport and raw data output support for systrace.

  • Modules:

    • Introduced a CONFIG_MBEDTLS_MEMORY_DEBUG option for mbedtls.

    • Updated LVGL to v7.6.1.

    • Updated libmetal and openamp to v2020.10.

    • Updated nrfx in hal-nordic to version 2.4.0.

    • Updated the Trusted Firmware-M (TF-M) module to include support for the nRF5340 and nRF9160 platforms.

  • Other:

    • Added initial LoRaWAN support.

    • Updated west flash support for nrfjprog to fail if a HEX file has UICR data and --erase was not specified.