Skip to content

Programming Nordic MCUs

Published On:
Feb 11, 2025
Last Updated:
Jul 20, 2025

You can program nRF52, nRF54, nRF53, and nRF91 MCUs using the development kits from the same series (or sometimes from a different series). For example, the nRF52-DK can be used to program SoCs from the nRF52 series. I believe the development kits in the nRF91 series can program the nRF91 and nRF52 SoCs (and perhaps the other families too).

To do this, you plug the development kit into the host computer using a USB cable. You then connect the development kit to the target device using the Debug OUT connector, which is a standard 2x5 1.27mm pitch header. It follows the standard ARM SWD pinout. The schematic from the nRF52-DK (it should be either the same or very similar on other development kits) is shown in This is a placeholder for the reference: fig-debug-out-connector-schematic-on-nrf52-dk.

Debug Out connector schematic on the nRF52 DK.

The development kits have a SEGGER J-Link probe built into them (presumably Nordic Semiconductor is licensing the J-Link technology from SEGGER). It’s good marketing for SEGGER too since people become familiar with the J-Link brand and then might buy a dedicated J-Link probe (they are expensive but work well).

Making Sure You Can Only Program External Boards

One annoying issue with using the development kits is that you can easily accidentally start programming the on-board MCU instead of your external board. All it takes is a loose/unplugged programming cable and the J-Link will automatically switch back to programming the on-board MCU. An easy way to prevent this is to short the SELECT pin on the “Debug Out” connector to GND, as shown in This is a placeholder for the reference: fig-shorting-select-to-gnd-on-nrf52-dk-schematics (the red squiggle is the short). This tricks the J-Link into thinking there is always an external MCU connected and making it impossible to program the on-board MCU.

Shorting select to GND on the nRF52 DK.

Luckily, there is a GND pin adjacent to the SELECT pin on the SMD header, at it is easy to short them together with a small solder blob, as shown in This is a placeholder for the reference: fig-shorting-select-to-gnd-on-nrf52-dk-photo.

Shorting select to GND on the nRF52 DK.

While you are doing this, you may also want to bridge SB32 (which can also be seen in This is a placeholder for the reference: fig-shorting-select-to-gnd-on-nrf52-dk-photo). Bridging this connects the on-board +3.3V to the VDD pin, allowing you to power the target device from the development kit. This can be useful for one cable programming in a production environment. This only works if the current draw of the target device is small.

nrfutil

nRF Util (nrfutil) is a Python library and command line tool for programming and debugging Nordic Semiconductor MCUs.

A screenshot of the nRF Util homepage.1

Source Code

It doesn’t appear that the up-to-date source code of nRF Util is available. The older repo (pc-nrfutil) at https://github.com/NordicSemiconductor/pc-nrfutil was deprecated and marked as archived in Jan 2023.2

Installing Sub-Commands

By default, only a basic subset of the total available nRF Util commands are installed. You can install additional commands based on your specific needs via the nrfutil install command. You can use nrfutil search to search for installable commands.

For example:

Terminal window
$ nrfutil search 91
Command Installed Latest Status
91 0.5.0 Not installed

Then to install the 91 command, run:

Terminal window
$ nrfutil install 91

Device Sub-Commands

The nRF Util device sub-command can list, program, recover, erase, and do various operations on Nordic devices. It supports MCUboot and J-Link. Install device with:

Terminal window
$ nrfutil install device

pynrfjprog

pynrfjprog is a Python wrapper around the Nordic Semiconductor nrfjprog DLL (dynamic link library). The code is open source and available on GitHub.

Installation

To install pynrfjprog, into your Python environment, run the following command:

Terminal window
pip install pynrfjprog

As always, it is recommended to use a virtual environment to manage your Python packages.

Usage

Use enum_emu_snr() to enumerate the serial numbers of the connected programmers:

from pynrfjprog import LowLevel
with LowLevel.API('NRF52') as api:
serial_numbers = api.enum_emu_snr()
if serial_numbers is None:
print("No programmers found")
else:
print(f"Found {len(serial_numbers)} programmers with serial numbers: {serial_numbers}")

enum_emu_snr() returns a list of serial numbers (e.g. [960095105, 1051285627]). If no programmers are found, it returns None.

Footnotes

  1. Nordic Semiconductor. nRF Util [website]. Retrieved 2025-05-15, from https://www.nordicsemi.com/Products/Development-tools/nRF-Util.

  2. Nordic Semiconductor. pc-nrfutil [GitHub repository]. Retrieved 2025-05-15, from https://github.com/NordicSemiconductor/pc-nrfutil.