Nordic 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 Evaluation Kit
nRF51822
User Guide v1.2

Page 2 of 51
nRF51822 Evaluation Kit User Guide v1.2
Contents
1 Introduction............................................................................................................................................... 3
1.1 Minimum requirements................................................................................................................................. 3
1.2 External resources ............................................................................................................................................ 3
1.3 Writing conventions........................................................................................................................................ 3
1.4 Evaluation kit release notes.......................................................................................................................... 3
2 Kit content.................................................................................................................................................. 4
2.1 nRF51822 Evaluation Kit hardware content........................................................................................... 4
2.2 Downloadable content .................................................................................................................................. 5
3 Quick start.................................................................................................................................................. 6
3.1 Install the nRF51822 Evaluation board (PCA10001) ............................................................................ 7
3.2 Bluetooth low energy heart rate monitor demo .................................................................................. 8
4 Evaluation kit configuration................................................................................................................. 11
4.1 Development environment........................................................................................................................11
5 Hardware description ............................................................................................................................ 14
5.1 nRF51822 Evaluation Kit board (PCA10001).........................................................................................14
5.2 Development Dongle(PCA10000)............................................................................................................22
6 Flash programming and application development......................................................................... 25
6.1 Programming and erasing flash using nRFgo Studio .......................................................................25
6.2 Application development ...........................................................................................................................29
7 Debugging the nRF51822 chip ............................................................................................................ 37
7.1 nRF51822 debug features and precautions .........................................................................................38
8 Software Development Kit ................................................................................................................... 42
8.1 Installing the nRF51 SDK..............................................................................................................................42
9 Troubleshooting ..................................................................................................................................... 43
Appendix A: Installing drivers and configuring KEIL projects for the
SEGGER debugger .................................................................................................................................. 45

Page 3 of 51
nRF51822 Evaluation Kit User Guide v1.2
1 Introduction
The nRF51822 Bluetooth® low energy/2.4 GHz proprietary Evaluation Kit (EK) provides a complete solution
for testing and evaluating the nRF51822 device. The 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
• nRFgo Studio v1.14 or later
• Computer with a minimum of 2 USB ports
• Windows XP 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 Evaluation kit release notes
Date Kit version Description
August 2013 2.1 Upgraded the nRF51822 chip to build code FA/F0.
Removed R1 on PCA10000 and PCA10001.
February 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 and PCA10001 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 51
nRF51822 Evaluation Kit User Guide v1.2
2 Kit content
The nRF51822 Evaluation Kit consists of hardware and access to software components, documentation, and
design files from www.nordicsemi.com.
2.1 nRF51822 Evaluation Kit hardware content
Figure 1 nRF51822 Evaluation Kit hardware content
nRF51822 Evaluation Kit board
(PCA10001)
1 x nRF51822 Development
Dongle (PCA10000)
1 x
1 x Lithium 3 V battery

Page 5 of 51
nRF51822 Evaluation Kit User Guide v1.2
2.2 Downloadable content
The nRF51822 Evaluation Kit includes firmware source code, documentation, hardware schematics, and
layout files. To access this information, 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 software
•nRFgoStudio
• nRF51 Software Development Kit (SDK)
• Precompiled HEX files
•Sourcecode
•KeilARMprojectfiles
• S110 nRF51822 SoftDevice
• S110 SoftDevice programming tools
•MasterControlPanel
2.2.2 nRF51822 documentation
• nRF51822 Evaluation Kit User Guide
• nRF51 Series Reference Manual
• nRF51822 PS
• S110 nRF51822 SoftDevice Specification
• 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 Evaluation Kit.
• Altium Designer files
•Schematics
• PCB layout files
• Production files
• Assembly drawings
• Drill files
•Gerberfiles
• Pick and Place files
•BillofMaterials

Page 6 of 51
nRF51822 Evaluation Kit User Guide v1.2
3 Quick start
This section shows you how to set up the nRF51822 Evaluation 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.
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 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 (found on the label on the plastic package) 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 51
nRF51822 Evaluation Kit User Guide v1.2
3.1 Install the nRF51822 Evaluation board (PCA10001)
Connect the hardware
1. Connect a USB cable from the PCA10001 board to your computer.
Start the Blinky project
1. Locate the Blinky project found under <keil path>
\ARM\Device\Nordic\nRF51822\Board\PCA10001\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. LED 0 and LED 1 on the
PCA10001 should now blink sequentially.
nRF_Reset
LED 1 LED 0 Button 0 Button 1

Page 8 of 51
nRF51822 Evaluation Kit User Guide v1.2
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, giving you a simple application
to get your device up and running.
Download and program the SoftDevice
Type the product key (included with the Evaluation 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 nRF51 Evaluation Board (identified by the SEGGER serial
number).
3. Select the Program SoftDevice tab.
4. Click Browse and navigate to the SoftDevice file you downloaded.
5. Click Program.

Page 9 of 51
nRF51822 Evaluation Kit User Guide v1.2
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 under <keil path>
\ARM\Device\Nordic\nrf51822\board\PCA10001\ble\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. Ensure that Evaluation board PCA10001 is the only module connected to your computer (that is,
keep the Development Dongle unplugged). This is to ensure that you are downloading the heart
rate application to the correct device.
5. Go to the Flash menu and click Download to load the program (or click the Load icon).
6. Press Button 0 to start the Heart Rate demo. LED 0 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 to System Off.
8. To start advertising again press Button 0.
Install the Master Control Panel and the 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.

Page 10 of 51
nRF51822 Evaluation Kit User Guide v1.2
Scan for available Bluetooth low energy devices
1. Start the Master Control Panel from the Windows 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 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 mef-
w_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:
<keil path>\ARM\Device\Nordic\nrf51822\board\pca10000\ble\master_emulator
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. Ensure that the Heart Rate Demo running on PCA10001 is advertising, indicated by LED 0
blinking.
5. Click Start discovery. The Development Dongle will scan for available Bluetooth low energy
devices within range and list them.
6. Select the device CompleteLocalName ‘Nordic_HRM’ in the Discovered Devices list.
7. Click Select device.
8. Click Service Discovery. The Development Dongle will connect to the device and search for
services and characteristics. In the Service discovery pane you will see the services and
characteristics of the device. On PCA10001 LED0 will turn off.
9. 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).
10. Pressing BUTTON 0 or BUTTON 1 will make the Heart Rate Measurement value increase or
decrease by two.

Page 11 of 51
nRF51822 Evaluation Kit User Guide v1.2
4 Evaluation 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 OB driver (not included in this kit)
For installing drivers for the integrated SEGGER chip, visit http://www.segger.com/jlink-software.html. You
will be asked to enter your SEGGER serial number before the download will begin. You must correctly install
the drivers for the device to use the J-Link debugger with Keil MDK. Select option "Install USB Driver for J-
Link-OB with CDC" when installing. See Appendix A on page 45.
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 EK can be configured to develop proprietary 2.4 GHz protocol-
based applications and Bluetooth 4.0 single-mode applications.
Figure 2 on page 12 and Figure 3 on page 13 show the relationship between the hardware and software
components for 2.4 GHz based and Bluetooth 4.0 single mode development.
Note: The Keil µVision IDE is not included in the kit content.

Page 12 of 51
nRF51822 Evaluation Kit User Guide v1.2
Figure 2 nRF51822 Evaluation Kit configuration for 2.4 GHz based development
USB
Keil µVision IDE
Examples and Applications
written for Keil
Evaluation Board PCA10001
Examples and Applications
written for Keil
USB
SAMSUNG
Application Programming and Erase
(through J-Link)
nRF51 SDK
PCA10000
Keil µVision IDE
Application Programming and Erase
(through J-Link)

Page 13 of 51
nRF51822 Evaluation Kit User Guide v1.2
Figure 3 nRF51822 Evaluation Kit configuration for Bluetooth 4.0 single-mode
USB
Keil µVision IDE
Examples and Applications
written for Keil
Examples and Applications
written for Keil
USB
SAMSUNG
Control
Master Control Panel
nRF51 SDK
PCA10000

Page 14 of 51
nRF51822 Evaluation Kit User Guide v1.2
5 Hardware description
This chapter describes the nRF51822 Evaluation Kit hardware.
5.1 nRF51822 Evaluation Kit board (PCA10001)
The nRF51822 Evaluation Kit board (PCA10001) is a standalone nRF51822 evaluation board with an
integrated debugger from SEGGER. The board is delivered with an unprogrammed nRF51822 chip.
5.1.1 Key features
The nRF51822 EK board (PCA10001) has the following key features:
• nRF51822 flash based SoC solution
•Bluetooth low energy compatible
• 2.4 GHz compatible with nRF24L devices
• Buttons and LEDs for user interaction
• I/O interface for plug-in modules
• SEGGER J-Link OB programming and debugging capabilities
• USB to UART bridge
5.1.2 Hardware pictures
Figure 4 PCA10001 top

Page 15 of 51
nRF51822 Evaluation Kit User Guide v1.2
Figure 5 PCA10001 bottom
5.1.3 Block diagram
Figure 6 PCA10001 block diagram
5.1.4 Reset button
The EK board (PCA10001) is equipped with a reset button (SW3) for the nRF51822. When debugging the
nRF51822 using the J-Link OB, you should use the reset functionality built into the computer software.
External supply Current
measurement
USB
Battery Buttons
Voltage regulator
LEDsGPIO
Matching networknRF51822
Antenna
Segger OBVBUS
Data
Osc
32.768 kHz
RESET
UART
SWD
VCC_nRF
Osc
16 MHz

Page 16 of 51
nRF51822 Evaluation Kit User Guide v1.2
5.1.5 Power supply
The EK board (PCA10001) has several power options:
•USB(seeFigure 7)
• External power supply through P1 (1.8 V to 3.6 V)
• CR2032 coin cell battery (see Figure 8)
Figure 7 USB and external power supply
Figure 8 Coin cell battery supply
USB
P1
+ -
Coin cell
battery holder

Page 17 of 51
nRF51822 Evaluation Kit User Guide v1.2
The 5 V from the USB is regulated down to 3.3 V through an on-board voltage regulator. The battery and
external power supply are not regulated. The power sources are routed through a set of diodes (D1A, D1B,
and D1C), where the circuit is supplied from the source with the highest voltage.
Figure 9 Power supply circuitry
5.1.6 SEGGER SWD disconnect
The SEGGER J-Link OB circuit on the EK board (PCA10001) only works when the board is powered through
the USB connector. To ensure that the J-Link OB will not hold any of the SWD lines while powered down, the
SWD lines will be disconnected automatically when the USB cable is unplugged. However, to disconnect the
SWD lines manually, the board is equipped with a switch (SW4) that disconnects the lines even if the board
is powered through the USB, see Figure 10.
Figure 10 SWD disconnect logic
Note: To program or debug the nRF51822 using the SEGGER J-Link OB, the SW4 must be switched to
ON.
!
"#$"$
%
#
# & '(%
"
")*$$
")*$$
")*$$
+,-
+ %
. /
+
SWDIO
SWCLK
T_TMS
T_TCK
VCC3
R2
100k
SW4
Switch
GND
SW_EN
SW_EN
SW_EN
VCC_IO
C19
100nF
GND
GND
NC1
1
IN1 9
NO2
7COM2
5NC2
6
GND 8
IN2 4
VCC 3
NO1
2COM1
10
U4
STG3684A

Page 18 of 51
nRF51822 Evaluation Kit User Guide v1.2
5.1.7 GPIO interface
Access to the nRF51822 GPIOs is available at connectors P3, P4, P5, and P6 on the EK board PCA10001.
Figure 11 PCA10001 GPIO pin headers
Note: Some pins have default settings.
•P0.26 and P0.27 are by default used for the 32 kHz crystal and are not available on the P6
connector. Please see Section 5.1.9 “32.768 kHz crystal” on page 20 for more information.
•P0.16, P0.17, P0.18, and P0.19 are by default connected to the buttons and LED. Please see
Section 5.1.8 “Buttons and LEDs” on page 19 for more information.
•P0.08, P0.09, P0.10, and P0.11 are by default used by the UART. Please see Section 5.1.10
“UART configuration” on page 20 for more information.

Page 19 of 51
nRF51822 Evaluation Kit User Guide v1.2
5.1.8 Buttons and LEDs
The two buttons and two LEDs on EK board PCA10001 are connected to dedicated I/Os on the
nRF51822chip. The connections are shown in Table 1.
Table 1 Button and LED connection
If GPIO P0.18 and P0.19 are needed elsewhere, the LEDs can be disconnected by cutting the short on SB6
and SB7, see Figure 12.
Figure 12 Disconnecting the LEDs
The buttons are active low meaning the input will be connected to ground when the button is activated.
The buttons have no external pull-up resistor, so to use the buttons the P0.16 and P0.17 pins must be
configured as an input with internal pull-up resistor.
The LEDs are active high, meaning that writing a logical one (‘1’) to the output pin will illuminate the LED.
Figure 13 Button and LED configuration
Part GPIO Short
Button 0 P0.16
Button 1 P0.17
LED 0 P0.18 SB6
LED 1 P0.19 SB7
Cut

Page 20 of 51
nRF51822 Evaluation Kit User Guide v1.2
5.1.9 32.768 kHz crystal
nRF51822 can use an optional 32.768 kHz crystal (X2) for higher accuracy and lower average power
consumption. On the EK board PCA10001 module, P0.26 and P0.27 are by default used for the 32.768 kHz
crystal and are not available as a GPIO on the P6 connector.
If P0.26 and P0.27 are needed as normal I/Os the 32.768 kHz crystal can be disconnected and the GPIO
routed to the P6 connector. Cut the shorting track on SB2 and SB3, and solder SB4 and SB5. See Figure 14
on page 20 for reference.
Note: The 32.768 kHz crystal has to be selected for the Bluetooth examples included in the SDK to
work.
Figure 14 Disconnecting 32.768 kHz crystal and connecting P0.26 and P0.27 to P6
5.1.10 UART configuration
Table 2 shows an overview of the UART connections on nRF51822 and the SEGGER IC.
Table 2 Relationship of UART connections on nRF51822 and SEGGER
The UART signals by default are routed directly to the SEGGER chip. To use pins P0.08 to P0.11 for other
purposes than UART to the SEGGER chip, the shorting of the solder bridges should be removed.
See Figure 15.
Figure 15 Disconnecting UART lines
Note: In order to use the USB to UART bridge, the software on the nRF51822 must enable flow
control. For details on how to set up the UART with flow control see the nRF51 Series Reference
Manual.
nRF51822 SEGGER IC
Default GPIO UART Short UART
P0.08 RTS SB9 CTS
P0.09 TXD SB11 RXD
P0.10 CTS SB10 RTS
P0.11 RXD SB12 TXD
Cut Solder
Cut
Other manuals for nRF51822
2
Table of contents
Other Nordic Microcontroller manuals

Nordic
Nordic nRF5340 User manual

Nordic
Nordic nRF9160 User manual

Nordic
Nordic nRF8001 User manual

Nordic
Nordic 51822 Technical manual

Nordic
Nordic nRFgo nRF8002 User manual

Nordic
Nordic nRF5 Series: nRF52 User manual

Nordic
Nordic nRF51822 User manual

Nordic
Nordic PCA63511 User manual

Nordic
Nordic nRFgo nRF6700 User manual