Working with nRF52 Series
The nRF Connect SDK provides support for developing on all nRF52 Series devices and contains board definitions for all development kits and reference design hardware.
See Getting started with nRF Connect SDK (nRF52 Series) for step-by-step instructions on how to test and develop with an nRF52 Series development kit.
The nRF52 Series of System-on-Chip (SoC) devices embed a powerful yet low-power Arm Cortex-M4 processor with our industry leading 2.4 GHz RF transceivers. All of the nRF52 Series SoCs have support for Bluetooth® 5 features, in addition to multiprotocol capabilities.
See nRF52 Series for the technical documentation on the nRF52 Series chips and associated kits.
Devices in the nRF52 Series are supported by these boards in the Zephyr open source project and in nRF Connect SDK.
See nRF21540 EK to learn how to use this RF front-end module (FEM) with the nRF52 Series devices.
The nRF Desktop application is a complete project that integrates Bluetooth Low Energy, see the nRF Desktop application. It can be built for the nRF Desktop reference hardware or an nRF52840 DK.
The nRF Desktop is a reference design of a HID device that is connected to a host through Bluetooth Low Energy or USB, or both. This application supports configurations for simple mouse, gaming mouse, keyboard, and USB dongle.
nRF52 Series devices support a secure bootloader solution based on the chain of trust concept.
See Secure bootloader chain for more information and instructions on how to enable one or more bootloaders in your application.
The nRF52 Series multiprotocol radio supports Bluetooth Low Energy, proprietary (including Enhanced ShockBurst and Gazell), ANT, Thread, Zigbee, and 802.15.4. Standard interface protocols like NFC and USB are supported on a range of the devices in the series and with supporting software.
nRF Connect SDK currently has no support for ANT.
The following sections give pointers on where to start when working with these protocols.
To test the general capabilities of the 2.4 GHz radio transceiver, use the Radio test sample.
When you develop a Bluetooth Low Energy (LE) application, you must use the Bluetooth software stack. This stack is split into two core components: the Bluetooth Host and the Bluetooth LE Controller.
The nRF Connect SDK Bluetooth stack is fully supported by Nordic Semiconductor for nRF52 Series devices. The Bluetooth LE Controller user guide contains more information about the two available Bluetooth LE Controllers and instructions for switching between them.
See Bluetooth for documentation on the Bluetooth Host and open source LE Controller. For documentation about the SoftDevice Controller and information on what variants of the controller support which chips, see SoftDevice Controller.
Bluetooth mesh is a mesh networking solution based on Bluetooth Low Energy, developed by the Bluetooth® Special Interest Group (SIG). It is optimized for creating large-scale device networks, and implemented according to Bluetooth Mesh Profile Specification v1.0.1 and Bluetooth Mesh Model Specification v1.0.1.
Bluetooth mesh networking allows one-to-one, one-to-many, and many-to-many communication, using the Bluetooth Low Energy protocol to exchange messages between the mesh nodes in the network.
For available libraries, see Bluetooth mesh profile (nRF Connect SDK) and Bluetooth Mesh Profile (Zephyr). See the Bluetooth mesh user guide for information about how to utilize the supplied libraries and work with Bluetooth mesh.
Enhanced ShockBurst (ESB) is a basic protocol supporting two-way data packet communication including packet buffering, packet acknowledgment, and automatic retransmission of lost packets. ESB provides radio communication with low power consumption, and the implementation is small in code size and easy to use.
Gazell is a protocol that consists of two protocol modules: Gazell Link Layer and Gazell Pairing, where Gazell Pairing is optional and lies on top of Gazell Link Layer. The Gazell protocols are used for setting up a robust wireless link between a single Host and up to eight Devices in a star network topology. It is designed to minimize power consumption in power-sensitive wireless desktop products and is also suitable for a range of other wireless applications.
Matter (formerly Project Connected Home over IP or Project CHIP) is an open-source application layer that aims at creating a unified communication standard across smart home devices, mobile applications, and cloud services. It supports a wide range of existing technologies, including Wi-Fi, Thread, and Bluetooth® LE, and uses IPv6-based transport protocols like TCP and UDP to ensure connectivity between different kinds of networks.
Near Field Communication (NFC) is a technology for wireless transfer of small amounts of data between two devices that are in close proximity. It makes transferring data fast and easy when devices are in close proximity. The range of NFC is typically <10 cm.
nRF Connect SDK provides two protocol stacks for developing NFC applications: Type 2 Tag and Type 4 Tag. These stacks are provided in binary format in the sdk-nrfxlib repository. See Near Field Communication (NFC) for documentation about the NFC stacks, and Near Field Communication (NFC) for general information.
The NFC stack requires the NFCT driver for nRF52 devices, which is available as part of nrfx. The nrfx repository is included in the nRF Connect SDK as a module of the Zephyr repository.
The nRF Connect SDK contains a USB device stack for the USB 2.0 Full Speed peripheral that is available on a number of the nRF52 devices. You can find the implementation in the Zephyr repository. See USB device support for documentation and USB device support samples for a list of available samples.
The USB stack requires the USBD driver for nRF52 devices, which is available as part of nrfx. The nrfx repository is included in the nRF Connect SDK as a module of the Zephyr repository.
Thread is a low-power mesh networking technology, designed specifically for home automation applications. It is an IPv6-based standard that uses 6LoWPAN technology over the IEEE 802.15.4 protocol. You can connect a Thread mesh network to the Internet with a Thread Border Router.
The nRF Connect SDK provides support for developing Thread applications based on the OpenThread stack. The OpenThread stack is integrated into Zephyr.
Zigbee is a portable, low-power software networking protocol that provides connectivity over a mesh network based on the IEEE 802.15.4 radio protocol. It also defines an application layer that provides interoperability among all Zigbee devices.
The nRF Connect SDK provides support for developing Zigbee applications based on the third-party precompiled ZBOSS stack. This stack is included as the ZBOSS Zigbee stack library in nrfxlib (version 22.214.171.124). In combination with the integrated Zephyr RTOS, Zigbee in nRF Connect SDK allows for development of low-power connected solutions.
The nRF52 Series devices support running another protocol in parallel with the SoftDevice Controller. See the Multiprotocol support user guide for instructions on how to enable multiprotocol support for Thread or Zigbee in combination with Bluetooth.
The Multiprotocol Service Layer library provides services for multiprotocol applications.
You can upgrade the firmware of the device over the air, thus without a wired connection. Such an upgrade is called a FOTA (firmware over-the-air) upgrade. FOTA upgrades can be used to replace the application.
For the possibility of introducing upgradable bootloader, please refer to Adding a bootloader chain.
To perform a FOTA upgrade, complete the following steps:
- Make sure that your application supports FOTA upgrades.
To download and apply FOTA upgrades, the following requirements apply:
You must enable the mcumgr module, which handles the transport protocol over Bluetooth Low Energy. To enable this module in your application, complete the following steps:
img_mgmt_register_group()in your application.
smp_bt_register()in your application to initialize the mcumgr Bluetooth Low Energy transport.
After completing these steps, your application should advertise the SMP Service with UUID 8D53DC1D-1DB7-4CD3-868B-8A527460AA84.
- Create a binary file that contains the new image.
To create a binary file for an application upgrade, make sure that
CONFIG_BOOTLOADER_MCUBOOTis enabled and build the application as usual. The build will create several binary files (see Using MCUboot in nRF Connect SDK). The
app_update.binfile is the file that must be downloaded to the device.
Download the new image to a device.
When performing FOTA upgrade on a Bluetooth mesh device and if the device’s composition data is going to change after the firmware upgrade, unprovision the device before downloading the new image.
To do so, make sure that you can access the
app_update.binfile from your phone or tablet. Then connect to the device with the mobile app and initiate the DFU process to transfer
app_update.binto the device.
There is currently no support for the FOTA process in nRF Connect for Desktop.
The SMP Server Sample demonstrates how to set up your project to support FOTA upgrades.
The sample documentation is from the Zephyr project and is incompatible with the Multi-image builds. When working in the nRF Connect SDK environment, you can ignore the part of the sample documentation that describes the building and programming steps. In nRF Connect SDK you can build and program the SMP Server Sample as any other sample using the following commands:
west build -b build_target -- -DOVERLAY_CONFIG=overlay-bt.conf west flash
Make sure to indicate the
overlay-bt.conf overlay configuration for the Bluetooth transport like in the command example.
This configuration was carefully selected to achieve the maximum possible throughput of the FOTA upgrade transport over Bluetooth with the help of the following features:
Bluetooth MTU - To increase the packet size of a single Bluetooth packet transmitted over the air (
Bluetooth connection parameters - To adaptively change the connection interval and latency on the detection of the SMP service activity (
Consider using these features in your project to speed up the FOTA upgrade process.
To perform a FOTA upgrade when working with the Matter protocol, use one of the following methods:
DFU over Bluetooth LE using either smartphone or PC command line tool. Both options are similar to FOTA over Bluetooth LE.
This protocol is not part of the Matter specification.
DFU over Matter using Matter-compliant BDX protocol and Matter OTA Provider device. This option requires an OpenThread Border Router (OTBR) set up either in Docker or on a Raspberry Pi.
For more information about both methods, read the Performing Device Firmware Upgrade in the nRF Connect examples page in the Matter documentation.
Thread does not offer a proprietary FOTA method.
You can enable support for FOTA over the Zigbee network using the Zigbee FOTA library. For detailed information about how to configure the Zigbee FOTA library for your application, see Configuring Zigbee FOTA.
To build your application, follow the instructions in Building and programming an application.