Nordic Semiconductor nRF51822 User manual

Copyright © 2013 Nordic Semiconductor ASA. All rights reserved.
Reproduction in whole or in part is prohibited without the prior written permission of the copyright holder.
nRF51822 Development Kit
nRF51822
User Guide v1.4

Page 2 of 62
nRF51822 Development Kit User Guide v1.4
Contents
1 Introduction............................................................................................................................................... 3
1.1 Minimum requirements................................................................................................................................. 3
1.2 External resources ............................................................................................................................................ 3
1.3 Writing conventions........................................................................................................................................ 3
1.4 Development Kit release notes ................................................................................................................... 3
2 Kit content.................................................................................................................................................. 4
2.1 nRF51422 Development Kit hardware content..................................................................................... 4
2.2 Downloadable content .................................................................................................................................. 5
3 Quick start.................................................................................................................................................. 6
3.1 Install the nRF51422 connector module.................................................................................................. 7
3.2 ANT Link demo................................................................................................................................................12
4 Development kit configuration ........................................................................................................... 14
4.1 Development environment........................................................................................................................14
4.2 Kit setup .............................................................................................................................................................17
5 Hardware description ............................................................................................................................ 20
5.1 nRFgo nRF51422 DK modules ...................................................................................................................20
5.2 nRFready ANT USB dongle (nRF2779) ....................................................................................................29
6 Flash programming and application development......................................................................... 31
6.1 Programming and erasing flash using nRFgo Studio .......................................................................31
6.2 Application development ...........................................................................................................................34
7 Debugging the nRF51422..................................................................................................................... 43
7.1 nRF51422 debug features and precautions .........................................................................................44
8 Software Development Kit ................................................................................................................... 47
8.1 Installing the nRF51 SDK..............................................................................................................................47
9 Troubleshooting ..................................................................................................................................... 48
Appendix A: Installing drivers and configuring KEIL projects for the
SEGGER debugger .................................................................................................................................. 50

Page 3 of 62
nRF51822 Development Kit User Guide v1.4
1 Introduction
The nRF51822 Development Kit (DK) for Bluetooth® low energy/2.4 GHz proprietary provides a complete
solution for developing, testing, and evaluating the nRF51822 device.
nRF51822 is part of the nRF51 series which offers a range of ultra-low power System on Chip (SoC) solutions
for your 2.4 GHz wireless products.
1.1 Minimum requirements
•nRFgoStarterKit
• nRFgo Studio v1.14 or later
• Computer with a minimum of 2 USB ports
• Windows XP 32 bit (SP3) or Windows 7
1.2 External resources
• Keil MDK-ARM Lite v4.54 or later https://www.keil.com/demo/eval/arm.htm
• J-Link Software v4.56 or later http://www.segger.com/jlink-software.html
1.3 Writing conventions
This User Guide follows a set of typographic rules that makes the document consistent and easy to read.
The following writing conventions are used:
• Commands are written in Lucida Console.
• Pin names are written in Consolas.
• File names and user interface components are written in bold.
• Internal cross references are italicized and written in semi-bold.
1.4 Development Kit release notes
Date Kit version Description
July 2013 2.1.0 Upgraded the nRF51822 chip to build code FA/F0. Removed R1 on PCA10000 and
R20 on PCA10004 and PCA10005.
January 2013 2.0 Fixed known issue in kit v1.0.
New features on PCA10000 v2.0:
• Multicolor LED
• Updated UART configuration.
September2012 1.0 Known issues
PCA10000 v1.0, PCA10004 v1.0, and PCA10005 v1.0:
• The antenna matching network and layout on these boards is suitable for
applications using TX output power 0 dBm or less. These boards are not
suitable for applications using +4 dBm TX output power.

Page 4 of 62
nRF51822 Development Kit User Guide v1.4
2 Kit content
The nRF51822 DK consists of hardware and access to software components, documentation, and design
files from www.nordicsemi.com.
2.1 nRF51822 Development Kit hardware content
Figure 1 nRF51822 DK hardware content
1 x nRF51822 DK
PCB antenna module
(PCA10004)
1 x nRF51822 DK
SMA connector module
(PCA10005)
1 x nRF51822
Development Dongle
(PCA10000)
1 x J-Link Lite CortexM-9
JTAG/SWD Emulator
1 x Helical monopole SMA antenna
1 x USB cable
5 x nRF51822 chip samples
1 x 10 pin connector

Page 5 of 62
nRF51822 Development Kit User Guide v1.4
2.2 Downloadable content
The nRF51822 Development Kit includes firmware source code, documentation, hardware schematics, and
layout files. To access these files, log in to your My Page account, enter your product key, and download the
files. Instructions can be found in Chapter 3 “Quick start” on page 6.
2.2.1 nRF51822 DK software content
•nRFgoStudio
• nRF51 Software Development Kit (SDK)
• Precompiled HEX files
•Sourcecode
•KeilARMprojectfiles
• S110 nRF51822 SoftDevice
•MasterControlPanel
2.2.2 nRF51822 DK documentation
• nRF51822 Development Kit User Guide
• nRF51 Series Reference Manual
• nRF51822 PS
• S110 nRF51822 SoftDevice Specification
• nRF51 SDK
• nRF51822 PAN
2.2.3 Schematics, Bill of Materials, PCB layout files, and production files
The ZIP file and its subdirectories contain the hardware design files for the nRF51822 DK.
• Altium Designer files
•Schematics
• PCB layout files
• Production files
• Assembly drawings
• Drill files
•Gerberfiles
• Pick and Place files
•BillofMaterials

Page 6 of 62
nRF51822 Development Kit User Guide v1.4
3 Quick start
This section shows you how to set up the nRF51822 Development Kit and provides example applications to
help you start programming your device.
Register, download, and install
1. If you have Keil MDK-ARM Lite already installed, go to step 2. Otherwise, download and install Keil
MDK-ARM Lite from https://www.keil.com/demo/eval/arm.htm to your hard drive. Keil downloads
to c:\Keil\ unless you change the location when installing.
2. Download and run the J-Link Software and documentation pack for Windows from
http://www.segger.com/jlink-software.html. The serial number from your SEGGER J-Link hardware
is needed to identify your device and can be found printed on the chip on the J-Link Lite emulator
board.
3. During installation you will be prompted to select the IDE that should be updated with the latest
SEGGER DLLs. Check the box for Keil MDK and any other IDEs you want to use with SEGGER.
4. If you are using Keil MDK v4.54, go to:
http://www.segger.com/IDE_Integration_Keil.html#knownproblems. Download JL2CM3 and copy
it to <keil>/ARM/Segger. This patch is necessary for the SEGGER debugger to work.
5. Go to www.nordicsemi.com and log in to your Nordic My Page account.
6. Select MY KEYS from the left menu. This takes you to the My Keys page.
7. Enter the product key (included with this kit) into the Product Key field and click Add.
8. Click MY PRODUCTS in the left menu.
9. From the Add product dropdown, select the product name and click Add. The chosen product is
now listed in the below Overview, My Products table.
10. In the Overview, My Products table click the Downloads link next to the product name to go
directly to the relevant product page download section.
11. Download and run the nRF51 SDK installer. Make sure to choose the Keil MDK-ARM installer
option.

Page 7 of 62
nRF51822 Development Kit User Guide v1.4
3.1 Install the nRF51822 connector module
Connect the hardware
1. Screw the antenna into the SMA connector on the nRF51822 DK SMA (PCA10005) connector
module.
2. Ensure that header K1 has a jumper connecting pin 2 and 3. The two upper rows of P4 should
have two jumpers placed vertically matching the 32 kHz marking.
SMA
connector
K1 header
P4

Page 8 of 62
nRF51822 Development Kit User Guide v1.4
3. Plug the nRF51822 DK SMA connector module into the nRFgo Starter Kit Motherboard (nRF6310).
4. Connect a USB cable from the Motherboard to your computer.
5. Using two 10 pin flat cables (2.54 mm, included in the nRFgo Starter Kit), connect one cable
between P8 (PORT0) and P1 (BUTTONS) and one between P10 (PORT1) and P2 (LEDS) on the
nRFGo Motherboard. Make sure the red marking on the cable is always connected to pin 1, as
shown in the figure below.
6. Connect the SEGGER J-Link board to the nRF51822 module with the 10 pin flat cable (1.27 mm,
provided in the Development Kit).
7. Connect a USB cable from the J-Link board to your computer.
P8 P10 P1 P2

Page 9 of 62
nRF51822 Development Kit User Guide v1.4
Turn on and set the supply voltage
1. Slide the S8 switch on the Motherboard to VBUS.
2. Slide the On/Off switch on the Motherboard to ON.
3. The VCC and VTG LEDs will light up.
4. Start nRFgo Studio. The Motherboard firmware may require an update, and if needed, you will be
prompted to begin the update. If this occurs, click OK and wait for the update to complete.
Note: While updating the firmware, you will see nRFgo Studio look similar to the image on the left
below.On completion of the update, the “Updating…” message will change to “Upgrade” as
seen in the figure on the right; however, this option is not immediately available after the
latest update and will be greyed out.
On/Off switchS8 switch
VCC and VTG LED
Board ID

Page 10 of 62
nRF51822 Development Kit User Guide v1.4
5. Select the desired motherboard from the Device Manager pane in nRFgo Studio. To find the board
ID, look on the 7-segment display on the Motherboard.
6. In nRFgo Studio, you can control the supply voltage (VTG) to the connected nRF51822 module.
Make sure the voltage is set to 3.3 V.
Note: • Please refer to nRFgo Studio's help file for further information. While in nRFgo Studio, press
F1 to open the help file.
•The nRF51822 device is capable of operating at voltages higher and lower than
3.3 V. This can be tested when the debugger is not required for programming or debugging
the application. However, for the J-Link Lite Cortex-M (that is included in the kit) to function
correctly, the supply voltage must be set to 3.3 V on the Motherboard. At all voltages other
than 3.3 V, the J-Link Lite CortexM-9 debugger should be disconnected from the nRF51822
module (SEGGER has debuggers that are capable of debugging in the entire voltage range).
The supply voltage operating range of the nRF51822 device is stated in the Product
Specification.

Page 11 of 62
nRF51822 Development Kit User Guide v1.4
Start the Blinky project
Before you start, make sure the device is empty by doing the following:
1. Open nRFgo Studio.
2. In the Device Manager select the motherboard your module is connected to.
3. Select the module.
4. If you have more than one SEGGER debugger connected, you need to select which one you want
to use.
5. Click the Erase all button.
Load and run the Blinky project:
1. Locate the Blinky project found under <keil path>
\ARM\Device\Nordic\nRF51822\Board\nrf6310\blinky_example\arm.
2. Open the Blinky project in Keil Vision by double clicking the blinky.uvproj file.
3. Select nRF51822 from the Select Target list and click Build or press F7 to compile the Blinky
project.
4. Click the Load icon to download and run the Blinky example firmware. LED0 to LED7 on the
nRFgo Starter Kit Motherboard should now blink sequentially.

Page 12 of 62
nRF51822 Development Kit User Guide v1.4
3.2 Bluetooth low energy heart rate monitor demo
This section shows you how to program a heart rate monitor demo on top of a SoftDevice that will send data
on a Bluetooth link from the heart rate monitor to the Master Control Panel.
Download and program the SoftDevice
Type the product key (included with the Development Kit) into the Product Key field in My Page to
download the S110 nRF51822 SoftDevice.
Follow these steps to program your device:
1. Open nRFgo Studio.
2. In the Device Manager select the motherboard your module is connected to.
3. Select the module.
4. If you have more than one SEGGER debugger connected, you need to select which one you want
to use.
5. Select the Program SoftDevice tab.
6. Click Browse and navigate to the SoftDevice file you downloaded.
7. Click Program.

Page 13 of 62
nRF51822 Development Kit User Guide v1.4
Compile, program, and run the heart rate monitor demo
Note: The Development Dongle must be unplugged during these steps.
1. Locate the Heart Rate demo project found in the folder <keil path>
\ARM\Device\Nordic\nrf51822\Board\nrf6310\s110\ble_app_hrs\arm.
2. Open the Heart Rate demo project in Keil Vision by double clicking the ble_app_hrs.uvproj file.
3. Click the Build icon or press F7 to build the project.
4. Only one SEGGER device should be connected to your computer. Make sure it is also connected to
the nRF51822 development module to ensure the program is downloaded to the correct target.
5. Go to the Flash menu and click Download to load the program (or click the Load icon).
6. The Heart Rate demo example will start executing. LED0 should be lit indicating it is advertising.
7. The application advertises for 3 minutes. If a connection isn’t made within this period, the
application sets nRF51822 in System Off.
8. To start advertising again press Button 0.
Install the Master Control Panel and nRF51822 Development Dongle (PCA10000)
1. Download and install the Master Control Panel from our website. Make sure to select the version
that corresponds to your hardware.
2. Plug the Development Dongle into a USB port on your computer.
3. An icon will appear in the lower right corner of your monitor showing that the drivers are being
installed. Wait until it is ready.
Scan for available Bluetooth low energy devices
1. Open the Master Control Panel from the Start menu (Start > All Programs > Nordic
Semiconductor > Master Control Panel).
2. Make sure the Development Dongle is detected. The Master Emulator item list should show
COMnn-xxxxxxxxx (nn gives the COM port number; xxxxxxxxx is the SEGGER serial number printed
on the dongle). Restart the application if it doesn’t appear in the item list. Before continuing, make
sure you have selected the correct device by verifying the serial number in the item list with the
serial number printed on the Development Dongle.
3. When you use the Development Dongle for the first time, you must first program it with the
Master Emulator Firmware.
a. In the Master Control Panel menu click File and select Flash Programming.
b. Click Browse. This opens a browser that automatically points to the location of the
mefw_nrf51822_<version>_firmware.hex (<version> will be replaced by a number
giving the version of the actual firmware).
The Master Control Panel Firmware file is located in:
C:\Program Files (x86)\Nordic Semiconductor\Master Control Panel\<version>\firm-
ware\pca10000\MEFW_nRF51822_<version>_firmware.hex.
c. Select the Master Emulator Firmware file and click Open.
d. Click Program to start programming the selected device.
e. When the programming is finished click Exit to go back to the main window.
4. Click Start discovery. The Development Dongle will scan for available Bluetooth low energy
devices within range and list them.
5. Select the device CompleteLocalName ‘Nordic_HRM’ in the Discovered Devices list.
6. Click Select device.
7. Click Service Discovery. In the Service discovery pane you will see the services and
characteristics of the device. On the Motherboard LED0 will turn off and LED1 will light up
indicating that is has gone from advertising to connected.

Page 14 of 62
nRF51822 Development Kit User Guide v1.4
8. Click Enable services. You should see the Heart Rate Measurement characteristic and Battery
Level being notified every few seconds with a different value (the Heart Rate Measurement/
Battery Level value line will blink green for each notification).

Page 15 of 62
nRF51822 Development Kit User Guide v1.4
4 Development kit configuration
This chapter includes downloadable third party content and information about how the development
environment is set up.
4.1 Development environment
ARM compiler/IDE (not included in this kit)
All the source code projects and examples can be compiled and used with the Keil Microcontroller
Development Kit (MDK). For full use of the Development Kit source code projects, and to upgrade firmware,
download and install the free KEIL MDK-ARM Lite from https://www.keil.com/demo/eval/arm.htm.
J-Link Lite CortexM-9 driver (not included in this kit)
For installing drivers for the SEGGER J-Link Lite CortexM-9, visit www.segger.com and go to the Downloads
section. Select the J-Link Lite and download the software and documentation. You must correctly install the
drivers for the device to use the J-Link debugger with Keil MDK. See Appendix A on page 56.
4.1.1 Development environment setup
The nRF51822 device can be programmed from several environments. This section shows the development
setup using Keil MDK-ARM. The nRF51822 DK can be configured to develop proprietary 2.4 GHz protocol-
based applications and Bluetooth 4.0 single-mode applications.
For development of proprietary 2.4 GHz protocol-based applications, you need:
•2 x Motherboards (from the nRFgo Starter Kit - not included)
•2 x nRF51822 modules

Page 16 of 62
nRF51822 Development Kit User Guide v1.4
Figure 2 nRF51822 DK configuration for 2.4 GHz based development
USB
USB
USB
Keil µVision IDE
J-Link Lite
Application
Programming &
Erase (Via J-Link)
Examples and Applications
written for Keil
Configure
Voltage
nRFgo Studio
nRFgo Starter Kit
10 pin Flat
Cable
SAMSUNG
nRF51822
module
nRF51822 DK
nRF51 SDK

Page 17 of 62
nRF51822 Development Kit User Guide v1.4
For development or demonstration of Bluetooth 4.0 single-mode applications, you need:
•1 x Motherboard with attached nRF51822 module
•1 x nRF51822 Development Dongle (PCA10000)
• Master Control Panel software
Figure 2 on page 16 and Figure 3 below show the relationship between the hardware and software
components, and the Motherboard(s).
Note: The Keil µVision IDE is not included in the kit content.
Figure 3 nRF51822 DK configuration for Bluetooth 4.0 single-mode
USB
USB
Keil µVision IDE
J-Link Lite
Application
Programming &
Erase (Via J-Link)
Examples and Applications
written for Keil
Configure
Voltage
nRFgo Studio
nRFgo Starter Kit
10 pin Flat
Cable
USB
nRF51822
module
SAMSUNG
Control
nRF51822 DK
Master Control Panel
nRF51 SDK
PCA10000

Page 18 of 62
nRF51822 Development Kit User Guide v1.4
4.2 Kit setup
Figure 4 Kit setup
P8 P10 P1 P2
USB connected to computer
USB connected to computer
10 pin 2.54 mm
flat cable
10 pin 1.27 mm
flat cable
J-Link Lite CortexM
nRF51 module

Page 19 of 62
nRF51822 Development Kit User Guide v1.4
4.2.1 nRFgo nRF51822 DK modules
The nRF51822 modules contain the nRF51822 device and its interfaces (see Section 5.1 “nRFgo nRF51822
DK modules” on page 21 for a complete description). The modules are plugged into the Motherboard which
provides the power supply. Make sure the jumper on header K1 is placed in the default position as
described in Section 5.1.8 “Current measurements” on page 29. The Motherboard is connected to your
computer with a USB cable and turned on as described in “Turn on and set the supply voltage“ on page 9.
On the Motherboard, the two 10 pin flat cables connecting P8 (PORT0) and P1 (BUTTONS), and P10 (PORT1)
and P2 (LEDS) are required to connect the correct I/Os to the LEDs for the example projects in Chapter 3
“Quick start” on page 6 and for projects in the SDK.
Note: With the nRFgo Studio application you can control the supply voltage (VTG) to the connected
nRF51822 DK module as described in “Turn on and set the supply voltage“ on page 9.
4.2.2 nRF51822 Development Dongle (PCA10000)
The nRF51822 Development Dongle (PCA10000) enables you to see the data sent between the dongle and
a single nRF51822 device. The nRF51822 Development Dongle is plugged into a USB port on your computer
as described in “Compile, program, and run the heart rate monitor demo“ on page 13.
4.2.3 J-Link Lite CortexM-9 JTAG/SWD Emulator
The programming and debugging (SWD) interface of the nRF51822 device is accessed through a 10 pin
connector (P3) on the nRF51822 DK module.
Figure 5 Pin 1 position on the SEGGER J-Link Lite CortexM-9
Pin 1

Page 20 of 62
nRF51822 Development Kit User Guide v1.4
Connect the JTAG/SWD emulator using the 10 pin 1.27 mm flat cable supplied with the kit to the nRF51822
DK module at P3 and to your computer with a USB cable, as shown in Figure 6.
Figure 6 nRF51822 DK module connected to the SEGGER J-Link Lite CortexM-9
Table of contents
Other Nordic Semiconductor Microcontroller manuals

Nordic Semiconductor
Nordic Semiconductor nRF52 DK User manual

Nordic Semiconductor
Nordic Semiconductor nRF8002 User manual

Nordic Semiconductor
Nordic Semiconductor nRFgo Series User manual

Nordic Semiconductor
Nordic Semiconductor nRF9160 Quick setup guide

Nordic Semiconductor
Nordic Semiconductor Power Profiler Kit User manual

Nordic Semiconductor
Nordic Semiconductor nRF52 Preview Development Kit User manual

Nordic Semiconductor
Nordic Semiconductor nRF9160 User manual

Nordic Semiconductor
Nordic Semiconductor nRF52 Preview Development Kit User manual

Nordic Semiconductor
Nordic Semiconductor nRF53 Series User manual

Nordic Semiconductor
Nordic Semiconductor nRF9160 User manual