nRF52 — Project Setup with Segger Embedded System

Gowtham TS
Nov 9, 2020 · 3 min read

What is nRF52?

nRF52 is a series of ARM Cortex M4 based microcontrollers with short range wireless capabilities. They support a wide range of protocols like ANT, Thread, 802.15.4, Zigbee, the widely used Bluetooth Low Energy (BLE) and BLE mesh.

The nRF52 is widely used for BLE projects as it has an a well documented SDK with a large number of libraries and drivers. It is one of the go to MCUs for anything BLE related and has been widely adopted.

The nRF5 SDK supports a wide range of workflows. You can use it with a text editor to edit and a terminal to build the project. Or you can use an Integrated Development Environment (IDE) like ARM Keil, Segger Embedded Studio (SES), Eclipse etc. Nordic and Segger have a partnership where they provide SES for free to anyone using a Nordic product.

This post will show you how to setup SES and run your first program on the nRF52 DK.

Hardware requirements:

  • 1 nRF52 Development Kit
  • 1 Micro USB to USB Type A cable

IDE and SDK Setup:

  • Download Segger Embedded studio for ARM for your respective OS
  • Run the SES installer
  • Once the installation is done, start SES.
  • A window will open up saying that “Nor commercial-use license detected”.
  • Click on “Obtain a license”
  • Segger’s website should open up on your browser. Scroll down to the section titled “Free commercial use license”
  • This section has a link from which you can request a license which can only be used with Nordic’s products.
  • Enter your details in this page. To get your computer’s MAC address:
  • You should receive the license in the email ID you have submitted in the license request form.
  • In SES, navigate to “Tools > License Manager > Activate Embedded Studio”.
  • Copy the license key from the mail, paste it and then click on “Install License”.
  • Download the nRF5 SDK 17.0.2
  • Extract the SDK to a location of your choosing

The first project:

The blinky project is the “Hello world” project for embedded engineers. This objective of this project is to check if the hardware and the installed software are working properly. This program will toggle the state of all the 4 LEDs on the nRF52 DK.

Navigate to where you have extracted the nRF5 SDK. Navigate to “examples/peripheral/blinky/pca10040/s132/ses/”. In this folder, you will notice a file called “blinky_pca10040_s132.emproject”. Double click this file and SES should load the project.

blinky -> Name of the project

pca10040 -> Codename for the nRF52 DK

s132 -> Softdevice version

Softdevice is a library provided by Nordic which handles all of the BLE/any wireless protocol related operations.

To build the project, you ca use the shortcut “F7” or click on “Build > Build blinky_pca10040_s132”.

The status of the build can be seen in the output section which is situated in bottom center of the window. A successful build will look like this:

If there are any errors, it will be listed in the output section.

Connect the nRF52 DK to your computer using a micro USB to USB Type A cable. The program can be downloaded by going to “Target > Download blinky_pca10040_s132”.

You will observe that the LEDs from LED1 to LED4 will first turn on and then will turn off in the same order continuously.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store