Home
nRF51822_422_Eval_Kit User Guide.fm
Contents
1. ARERR P ES SEGGER sB9 b gt WA sB10 SB11 SB12 gt SB3 Q dD SB5 SB2 ell QD SB4 P0 16 P0 23 24 P0 31 VCC n n 9 VOC Button 0 Button 1 ao OLD U ol U U Venn OY U U U Uenp m o obp Figure 7 USB and external power supply Old9 uonouny Coin cell battery holder yous MH Figure 8 Coin cell battery supply Page 16 of 51 NORDIC SEMICONDUCTOR 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 VCC IO VCC nRF e P1 for 4 OR N C 2 V3 DIA VCC nRF 3 gt 2 SD103ATW 7 F Solderbridge Pin List 1x4 GND DIB SV gt VCCS5 1 Bat SD103ATW 7 F T Bat Holder CR2032 ie GND VCC3 DIC Vin Vout D L AP7333 33SAG 7 ad ae GND GND GND GND 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 h
2. 6 1 4 Programming a SoftDevice This function lets you program the SoftDevice onto the chip File View nRF8001 Setup Help Features a 24 GHz SEGGER to use 4 Front End Tests TX carrier wave output RX constant carrier LO leakage TX RX channel sweep RX sensitivity Program Application 4 Bluetooth nRF8001 Configuration Programing of application on nRF51 device Dispatcher Trace Translator File to program Direct Test Mode nRF8002 F Lock entire chip from read back Addr 0x20000 Region 0 Size 128 kB Fw 110_nRF51822_1 0 0 alpha6 Device Manager 4 Motherboards 4 Board Module nRF51822 nRF ISP Motherboard connector nRF51 evaluation boards Segger HELJEN nRF51 development dongles Segger os al nRF51 Programming Bootloaders c Nordic Semiconductor ASA 2008 2011 1 Follow the steps in Section 6 1 1 Selecting a board to program on page 26 and then select the Program SoftDevice tab 2 Click Browse and select the HEX file to program Select whether to enable or disable readback protection of Region 0 4 Set the SoftDevice size This sets the size of the flash region 0 and will not be available if the size is defined by the HEX file Note The 110 nRF51822 SoftDevice can be downloaded from www nordicsemi com by logging into your MyPage account and entering the product key printed in the Development Kit Page 27 of 51 NORDIC SEMICONDUCTOR nRF51822 Evalu
3. www keil com uvision db_view_sysview asp C Keil ARM Device Nordic nrf51 Board nrf6310 blinky_example arm blinky uvproj uVision4 ee GESS File Edit View Projet Flash Debug Peripherals Tools SVCS Window Help O d s 8 Je PRB EEE min EEMI ORERE EDE Sl o aoe o gt ea a a a E H Registers q Disassembly POWER 51 nrf gpio port write LED POR CLOCK t state LED OFFSET MPU 0x0000016E FFFFFFFF OxFFFFFFF OxFFFFFFFF RADIO OxFFFFFFFF 0x00000172 FFFFFFFF OxFFFFFFF OxFFFFFFFF 0x00000176 FFFFFFFF OxFFFFFFF UARTO OxFFFFFFFF ean FFFFFFFF OxFFFFFFF d OxFFFFFFFF a _ __ OxFFFFFFFF aad FFFFFFFF 7 OXFFFFFFF TWh gt OxFFFFFFFF 52 output state output state GPIOTE OE E apc i OxFFFFFFFF OxF FFFFFFF TIMER Q FFFFFFFF i OxFFFFFFFF 38 E OxFFFFFFFF 39 main function OxFFFFFFDS 40 return 0 int return type requi TSO standard Q FFFFFFFS 41 Ox00000000 42 int main void 43 uint amp t output state 0 Configure LED pins as outputs Handler nrf_gpio range cfg _output LED STi MSP while true Project Registers 1 l Command q Call Si oe speed 2000 kHz a Nami Location Value JLink Info J Link Flash download Flash programming perf JLink Info J Link Flash download Total time needed 0 2 _ Load C Keil ARM Device Nordic nrf51 Board nrf 6310 _ Verify failed on VerifyBlock JLink Warning T bit of XPSF v 4 1 j gt
4. PCA10000 can be used as a development platform for nRF51822 It features an on board programming and debugging solution from SEGGER In addition to radio communication the nRF51822 device can communicate with a computer through a virtual COM port provided by the SEGGER chip The PCA10000 can be loaded with Master Emulator firmware that when combined with the Master Control Panel gives you a peer device for nNRF51822 that you can use to test the wireless connection Note PCA10000 can be reprogrammed if overwritten 5 2 1 Key features The PCA10000 has the following key features e NRF51822 IC Bluetooth low energy compatible e 2 4 GHz compatible with nRF24L devices e USB to UART bridge e SEGGER J Link OB programming and debugging capabilities 5 2 2 Hardware pictures SS YOLINGNODIINGS LD1 LD2 Figure 16 PCA10000 top side Ys99RS Q J X Figure 17 PCA10000 bottom side Page 22 of 51 NORDIC SEMICONDUCTOR nRF51822 Evaluation Kit User Guide v1 2 5 2 3 Block diagram RGB VCC_nRF LED A Antenna SWD Voltage regulator lt lt gt gt A VBUS Segger OB nRF51822 lt Matching network Data UART USB A A Osc Osc 32 768 kHz 16 MHz Figure 18 PCA10000 blo
5. 6 2 4 Limitation when debugging on a chip with a SoftDevice When a SoftDevice is installed in a device there are certain limitations when debugging See Section 7 1 2 on page 40 for more information 6 2 5 Programming the device To guarantee the correct functionality of the SoftDevice the microcontroller includes a Memory Protection Unit that prevents access to certain resources The debugger will read this area as 0x0000 no operation instruction The code memory area occupied by the SoftDevice is write and erase protected When the SoftDevice is enabled the Memory Protection Unit implements a write protection to certain peripherals used by the protocol stack Protected peripherals are described in the 770 nRF51822 SoftDevice Specification Configure the debugger and compile and link the application code Download the application using the Keil IDE download button To configure and start the download Select Options for Target in the Project menu Select the Utilities tab in the Options for Target dialog box Click Settings Select the Program check box Choose Erase Full Chip Click Add and select the nRF51xxx algorithm from the list to select the programming algorithm used by Keil IDE 7 Click Download PRAYS Note The nRF51xxx algorithm is installed automatically during the SDK installation This algorithm is a generic nRF51 series algorithm which provides download capabilities to all series devices up to 2 MB of code memo
6. Chapter 3 Quick start on page 6 2 2 1 nRF51822 software e NRFgo Studio e NRF51 Software Development Kit SDK e Precompiled HEX files e Source code e Keil ARM project files e 110 nRF51822 SoftDevice e 110 SoftDevice programming tools e Master Control Panel 2 2 2 nRF51822 documentation e NRF51822 Evaluation Kit User Guide e NRF51 Series Reference Manual e NRF51822 PS e S110 nNRF51822 SoftDevice Specification e 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 e Altium Designer files e Schematics e PCB layout files e Production files e Assembly drawings e Drill files e Gerber files e Pick and Place files e Bill of Materials Page 5 of 51 NORDIC SEMICONDUCTOR 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 se
7. PCA10001 February 2013 2 0 Fixed known issue in kit v1 0 New features on PCA10000 v2 0 e Multicolor LED e Updated UART configuration September2012 1 0 Known issues PCA10000 v1 0 and PCA10001 v1 0 e 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 3 of 51 NORDIC SEMICONDUCTOR nNRF51822 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 1 x Lithium 3 V battery SEMICONDUCTOR a Thank you for purchasing a Nordic Semiconductor product e Energizer Please download and read the User Guide before you begin The instructions are on the back of this card n arrora By d 03 2020 1x nRF51822 Evaluation Kit board 1x nNRF51822 Development PCA10001 Dongle PCA10000 Figure 1 nRF51822 Evaluation Kit hardware content Page 4 of 51 NORDIC SEMICONDUCTOR 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
8. Please see Section 5 1 9 32 768 kHz crystal on page 20 for more information e 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 e 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 18 of 51 NORDIC SEMICONDUCTOR 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 nNRF51822chip The connections are shown in Table 1 Button 0 P0 16 Button 1 P0 17 LED O P0 18 SB6 LED 1 P0 19 SB7 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 LED 1 Button ui a 585 LEDO 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 A z S z jm SB6 SB7 5 z Solderbridge Solderbridge m m R5 R6 220R 220R SW1 SW2 LD1 LD2 i SW i SW L080
9. W454 DLL V4 53b in CO AReIWAM SS egger Select All Select None Select the ones you would like to replace by this version The previous version will be renamed and kept in the same folder allowing manual undo ln case of doubt do not replace existing DLLs You can always perform this operation at a later time via start menu caret Figure 33 IDEs selected for updating to the latest SEGGER DLLs Page 45 of 51 NORDIC SEMICONDUCTOR nRF51822 Evaluation Kit User Guide v1 2 4 Go to http www segger com IDE_Integration_Keil html knownproblems for MDK v4 54 Download JL2CM3 and copy it to lt keil gt ARM Segger This patch is necessary for the SEGGER debugger to work 5 Plug the Evaluation Board PCA10001 into your computer with a USB cable The LD3 LED will blink while the driver installation occurs Wait until the LED is continuously lit LD3 o o ld Ao Torr Cc LD J Link tae Th Gk o j ON q D nRF RESET nRF current measurement sas fAAAAAAAAAAAAAAAAAARAAAAA Ye o TSEGGER ele E JHON P0 16 P0 23 P 24 P0 31 na no n n nYee nA A a VEG BERRA E QO OU U U U Ug OU U U U Uenp GN OOo OOo OO Button 1 ae q om O0 IOLO Serial number
10. ble_app_hrs uvproj wVisiond lll File Edit View Project Flash Debug Peripherals Tools SVCS Window Help Og da l s B c H e earl E E gow svc Harao o o eE a S O ee o gt meaa s a m x j 0x0000EA56 0000 0x0000EA58 0000 OxOO000EASA 0000 OxOO000EASC 0000 OxO000EASE 0000 OxO000EA60 0000 Ox0000EA62 0000 Ox0000EA64 0000 OxO000EA66 0000 OxFFEFEFEF OxO000EA68 0000 OxFEFEFEFE OxO000EA6A 0000 00002294C OxO000EA6C 0000 00002294C Ox0000EA6E 0000 OxFFEFEFEF 0x0000EA70 0000 0x0000EA72 0000 Ox0000EA74 0000 Ox0000EA76 0000 AWYVNNNAARFATA ANNAN 0x200032D0 OxFFFFFFFS Ox0000EA54 0x0100000B AT Ait gee es ee Ip ble stack handies c anf DP Sain fiat Piet s_ble stack_evt_handler ble stack_evt_handler Handler MSP Initialise SoftDevice err_code nrf_softdevice_enable clock source softdevice assertion handler if err_code NRF_SUCCESS return err code Enable BLE event interrupt return nrf nvic EnableIRQ SWI2_IRQn E Project amp Registers i u i Command a Call Stack Locals 00000000 RS 20000300 R6 00000100 R7 4001E504 Name Location Value Type 0x0000EA54 E ble_stack_han 0x00022100 unsigned int f unsign JLink Info J Link Flash download Total time needed 1116708 351is Prepare o 9 clock_sour 0x00000008 param unsigned int Load C Keil ARM Device Nordic nrf51822 Board nrf6310 ble ble_app_hrs a r ble sta
11. v4 53 or earlier that is fixed in later versions Upgrade to version 4 54 or later have a problem sending receiving data using the USB to UART bridge In order to use the USB to UART bridge the software on nRF51822 has to enable flow control When reconnecting the PCA10001 using the USB cable the terminal program running on your computer has to be restarted you should wait for it to end before disconnecting Otherwise it locks up the serial port and the terminal The debugger seems to freeze while debugging If running a SoftDevice that has been programmed with the Lock SoftDevice from Readback enabled see section Section 6 1 Programming and erasing flash using nRFgo Studio on page 25 the debugger will halt while stepping to an SVC instruction You should set the breakpoint after the SVC instruction and run the application to the breakpoint or step over any SVC instructions See Section 7 1 2 Debugging an application when a readback protected SoftDevice is present on page 40 for more details The debugger does not halt on breakpoints Some Keil projects in the SDK have Optimization level 3 03 and Optimize for time checked If you are debugging an application with these settings your breakpoint set might have no effect Press AIt F7 to open the Target options dialog Select C C Select Optimization level 0 from the scroll down list Uncheck Optimize for time eS Software gets out of sync while debuggin
12. 5G L0805G GND GND GND GND Figure 13 Button and LED configuration Page 19 of 51 NORDIC SEMICONDUCTOR 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 SBS5 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 WLX SB3 Cut X SB2 Solder SB4 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 P0 08 RTS SB9 CTS P0 09 TXD SB11 RXD P0 10 CTS SB10 RTS PO 11 RXD SB12 TXD 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 SB9 SB10 su SB11 SB12 Figure 15 Disconnecting UART lines Note In ord
13. 6 1 1 Selecting a board to program on page 26 and then select the Program Application tab 2 Click Browse and select the HEX file to program 3 Select whether to enable or disable readback protection of the entire chip If you enable readback protection you will have to do an Erase All to reprogram the chip again A chip that is programmed with Lock entire chip from read back enabled will not work with a development toolchain To make it work you must perform Erase all Lock entire chip from read back can be used to prevent an accidental overwrite of the chip content Page 28 of 51 NORDIC SEMICONDUCTOR nRF51822 Evaluation Kit User Guide v1 2 6 2 Application development The user application is compiled linked and downloaded independently from the SoftDevice This means that developing and debugging on a chip pre programmed with a SoftDevice is similar to that of a blank chip The main differences are memory layout and the call stack size 6 2 1 Configuring memory layout Specific SoftDevice versions and stacks can have different requirements Please review these before proceeding The applications vector table must be set up differently depending on whether it will run on a chip that is blank or pre programmed with a SoftDevice The SoftDevice program area starts at address 0x0 and has a predefined size The application start vector must be placed right after the SoftDevice The available size has to be set so that i
14. ASSIGN BreakDisable BreakEnable BreakKill BreakList BreakSet ga Call Stack Locals EE Memory 1 J LINK J Trace Cortex Figure 29 System Viewer Windows Page 38 of 51 NORDIC SEMICONDUCTOR nRF51822 Evaluation Kit User Guide v1 2 Og m s B c s eR AR Fee a main Harao o e eama CLOE eee E E uint8_t output_state 0 Configure LED pins as outputs TASKS_START 0x0000014C FFFFFFFF DCD OxFFFFFFFF TASKS STOP 79 NRF_GPIO gt PIN_CNF pin_range_start GPIO_PIN CNF sacle VAL 80 GPIO_PIN_CNF_DR 81 GPIO_PIN_CNF_PU amp SHORTS 82 GPIO_PIN_CNF_IN VALRDY_STOP 0 Disabled Shortcut disabled 83 GPIO_PIN_CNF_DI 4 INTENSET 0 hi VALRDY 0 Disabled Interrupt disabled 3 INTENCLR 0 Be CONFIG 0 p R12 main function DERCEN 0 Disabled Digital error correction disabled R13 SP return 0 int return type required by ANSI ISO standard VALUE 0 H R14 LR VALUE 0x00 int main void uint8_y output_state 0 Configure LED pins as outputs nrf_gpio range cfg output LED START LED STOP MSP SHORTS Bits 31 0 RW 0x4000D200 Shortcut for the RNG while true Project S Registers z JTAG speed 2000 kHz Location Value JLink Info J Link Flash download Flash programming performed for JLink Info J Link Flash download Total time needed 0 216s Prepa Load C Keil ARM Device Nordic nrf f51 Board
15. CCESS Handle event Switch event case EVENT TX Project S Registers Command JTAG speed 1000 kHz Name Location Value main 000008218 event_message_buffer static unsigned c Restricted Version with 32768 Byte Code Size Limit event auto unsigned ck Currently used 948 Bytes 2 Load C Keil ARM Device Nordic nRF51422 5210 _1 0 Board nrf6310_nrf275 ant_channel auto unsigned cF BS ant_broadcast_tx main_broadcast_tx c 165 i FROEN Cape auto unsigned in BS ant_broadcast_tx main broadcast_tx c 88 lt return_value snot in scope gt auto unsigned in 4 Ti pin_8_to_15_bits lt not in scope gt auto unsigned in gt Ki gt ASSIGN BreakDisable BreakEnable BreakKill BreakList BreakSet BreakAccess 1 Call Stack Locals El Memory 1 o J LINK J Trace Cortex t1 0 00000000 sec CAP NUM SCRL OVR R i Figure 32 Setup with a breakpoint after an SVC call Page 41 of 51 NORDIC SEMICONDUCTOR nRF51822 Evaluation Kit User Guide v1 2 8 Software Development Kit The nRF51 Software Development Kit SDK enables you to develop applications for the following protocol stacks e Bluetooth low energy using the S110_nRF51822 SoftDevice e Proprietary 2 4 GHz including Nordic s Gazell protocol e Non concurrent combinations of Bluetooth low energy and proprietary 2 4 GHz 8 1 Installing the nRF51 SDK The nRF51 SDK is a par
16. Figure 34 J Link Lite CortexM 9 serial number location Page 46 of 51 NORDIC SEMICONDUCTOR nRF51822 Evaluation Kit User Guide v1 2 Configuring KEIL projects for the SEGGER debugger for first time use 1 Double click an example project file to open the Keil uVision IDE 2 Click Target Options on the toolbar or click Project menu and select Options for Target Debug Peripherals Tools SVC5 Window Help cjus esan arem Harjali amp Target Options Configure target options Figure 35 Keil Target configuration 3 Under the Debug tab in the Use list select J LINK J Trace Cortex option as shown in Figure 36 4 Click Settings as shown in Figure 36 Both the SEGGER Control Panel and the Keil Target Driver Setup will open Device Target Output Listing User C C Asm Linker Debug Uti Use Simulator ings Use J LINK J Trace Cortex Settings Limit Speed to Real Time I Load Application at Startup J Run to maini Initialization File Figure 36 Selecting JLink debugger in Keil Page 47 of 51 NORDIC SEMICONDUCTOR nRF51822 Evaluation Kit User Guide v1 2 Note If the SEGGER J Link Lite firmware requires an update you will be prompted with the message A new firmware version is available for the connected emulator In this case click OK General Settings Breakpoints Log CPU Regs Target Power SWV RAW Trace Device Emulator MemMap Flash Jv Start m
17. K 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 uVision IDE is not included in the kit content Page 11 of 51 NORDIC SEMICONDUCTOR nRF51822 Evaluation Kit User Guide v1 2 Examples and Applications Examples and Applications written for Keil written for Keil nRF51 SDK Sth RR u wale Beles while true while true amp app NRF_SPIO gt OUT 1UL lt lt output_ste ree NRF_GPIG gt 0UT 1UL lt lt output_stz output_state output_state 1 6 tate 1 enc O ked_arm_uv int output_stace output_s ss core ine 3 keil_arm_uv4 int inline_delay_ms 1C0 inline_delay ms 100 Keil uVision IDE Keil uVision IDE Application Programming and Erase through J Link Application Programming and Erase through J Link PCA10000 Figure 2 nRF51822 Evaluation Kit configuration for 2 4 GHz based development Page 12 of 51 NORDIC SEMICONDUCTO
18. NORDIC SEMICONDUCTOR NRF51822 Evaluation Kit NRF51822 User Guide v1 2 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 NORDIC SEMICONDUCTOR nRF51822 Evaluation Kit User Guide v1 2 Contents 1 faiaga elI ona p PPN EAE AEE E AEE E 3 1 1 Minimum FS CUTTINGS sessspsssrassecaorseser isase dsesctecssvsscaseaaeanaesataconenrasncssiGusauessuecasensacsecansecssueneiacacceules 3 1 2 External SO CS ena evs ehcadestes oh ecstatles an acta xs Sedaste vosea hese aaa sceneries 3 1 3 Writing OIA EDU OUMS sesrscirsisseiseisiroeisanniinen ter ssecenacesavsesoessecaesuesscesectstncsss auctensqinsae Roei aai eeN AEn ekina aiina 3 1 4 Evaluation kit release notes seseeseeseseseeseseeseeseseesesesseseeseusesoesesreresosseseesesosseseesosseseesesseseseeseseesosseseesosesseseeses 3 2 FUE COA a E 4 2 1 nRF51822 Evaluation Kit hardware CONTEN sseseesesessesesseseseesessesessessesesessessesesseseesesreseseesesresesseseseeses 4 2 2 Downloadable content n nursanseana a aG 5 3 OUK SCAG aa AE EEEE E Ei 6 3 1 Install the nRF51822 Evaluation board PCA10001 ssesessesessesesessessesesessessesesseseesesresesessesresesseseeseses 7 3 2 Bluetooth low energy heart rate monitor demo ssesssesssesssesssesseesseessesseeesseossesseesseosseosseessesseesseesseesss 8 4 Evaluation kit CONFIQUIATION ccssccsssssss
19. R nRF51822 Evaluation Kit User Guide v1 2 NRF g Examples and Applications written for Keil SERIES nRF51 SDK NRF_GPIC gt OUT 1UL lt lt output_sta output_state output_state 1 inline_delay ms 100 PCA10000 Keil uVision IDE USB Control ee eee ee eee Master Control Panel Figure 3 nRF51822 Evaluation Kit configuration for Bluetooth 4 0 single mode Page 13 of 51 NORDIC SEMICONDUCTOR nRF51822 Evaluation Kit User Guide v1 2 5 Hardware description This chapter describes the nRF51822 Evaluation Kit hardware 5 1 nNRF51822 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 e NRF51822 flash based SoC solution e Bluetooth low energy compatible e 2 4 GHz compatible with nRF24L devices e Buttons and LEDs for user interaction e I O interface for plug in modules e SEGGER J Link OB programming and debugging capabilities e USB to UART bridge 5 1 2 Hardware pictures gr GND n n na nO Mh n n a noO ad orr e OHP ololool o olfollollalfa J Link H C aa v v OB U U A ee l ON ollofllololo offoflaoffafla qo ODD eins ST UU Uw nRF_RESET RF current oA U U UU GL 0d 80 0d Z0 0d 00 0d measuremen
20. RAM1 Start Specify start address for the application data Size Specify available RAM size for the application data Table 7 Memory layout Page 31 of 51 NORDIC SEMICONDUCTOR nRF51822 Evaluation Kit User Guide v1 2 6 2 2 Shared call stack The user application shares the call stack with the SoftDevice if the SoftDevice is loaded on the chip The application must reserve enough memory for both itself and the SoftDevice in the call stack The call stack size required by the SoftDevice varies between devices and protocol stack versions and is supplied in the S110 SoftDevice Specification The user application sets its call stack size plus the amount needed by the SoftDevice It then writes the stack pointer at the first address of the application Reset Vector Note Using Keil with the ARMCC toolchain the call stack size can be set using the Stack_S1ze definitions in your projects startup file typically arm_startup_nrf51 5s Stack_Size EQU 0x400 The application call stack size protocol call stack size AREA STACK NOINIT READWRITE ALIGN 3 Stack_Mem SPACE Stack_Si1ze __initial_sp Page 32 of 51 NORDIC SEMICONDUCTOR nRF51822 Evaluation Kit User Guide v1 2 6 2 3 Debugger configuration Project files delivered in the SDK are configured and ready for download and debugging If a new application project is used the debugger must be properly configured To configure the debugger 1 In Keil select Options for
21. Target ALT F7 from the Project menu The Options for Target dialog box appears Select the Debug tab Apply the Use option and select the J Link J Trace debugger from the list Set Driver DLL to SARMCM3 DLL Set Dialog DLL to TARMCM1 DLL io MN Other options can be selected as needed To take full advantage of the debugger and its features the following are advised e Breakpoints e Load Application at Startup e Memory Display e Toolbox e Watch Windows Options for Target nRF51822 5110 Device Target Output Listing User CCa Asm Linker Debug Uiities Use Simulator Settings i Use J LINK J Trace Cortex Settings Limit Speed to Real Time I Load Application at Startup J Run to maini I Load Application at Startup Initialization File Initialization File PO i Edit P B Edit Restore Debug Session Settings Restore Debug Session Settings I Breakpoints I Toolbox V Breakpoints M Toolbox Iv Watch Windows amp Performance Analyzer I Watch Windows W Memory Display I Memory Display Driver DLL Parameter SARMCM3 DLL Dialog DLL Farameter TARMCM1 DLL pemo Figure 23 Debugger options 6 Click Settings next to the Use field in the top right of the window 7 Inthe Target driver setup provide information about debugging protocol and maximum speed Select SW in the Port drop down 8 In Max Clock the maximum speed for the debugging port cannot be exceeded 1 MH
22. ation Kit User Guide v1 2 6 1 5 Programming an application This function lets you program an application onto the chip Before nRFgo Studio starts programming it verifies that the HEX file matches the actual memory configuration If it matches nRFgo Studio continues with the programming if not it stops the programming and returns an error message For example if an application requires the SoftDevice on the chip it will check the memory configuration for the SoftDevice before programming the chip Note This programming will not set up any memory Regions nRFgo Studio j File View nRF8001 Setup Help Features 4 2 4 GHz 4 Front End Tests TX carrier wave output RX constant carrier LO leakage TX RX channel sweep RX sensitivity 4 Bluetooth nRF8001 Configuration Dispatcher Trace Translator Direct Test Mode nRF8002 Device Manager 4 Motherboards 4 Boardi Module nRF51822 nRF ISP Motherboard connector 4 nRF51 evaluation boards Segger Hii Samii 4 nRF51 development dongles Segger os all nRF51 Programming Bootloaders SEGGER to use SEn v Refresh Region 1 Program SoftDevice Program Application Programing of application on nRF51 device Fe to progran Lock entire chip from read back Addr 0x20000 Region 0 Size 128 kB FW 5110_nRF51822_1 0 0 alpha6 Log c Nordic Semiconductor ASA 2008 2011 1 Follow the steps in Section
23. ault settings can be accepted by clicking OK closing both the SEGGER Control Panel and Keil target Driver Setup Page 49 of 51 NORDIC SEMICONDUCTOR nRF51822 Evaluation Kit User Guide v1 2 Liability disclaimer Nordic Semiconductor ASA reserves the right to make changes without further notice to the product to improve reliability function or design Nordic Semiconductor ASA does not assume any liability arising out of the application or use of any product or circuits described herein Life support applications Nordic Semiconductor s products are not designed for use in life support appliances devices or systems where malfunction of these products can reasonably be expected to result in personal injury Nordic Semiconductor ASA customers using or selling these products for use in such applications do so at their own risk and agree to fully indemnify Nordic Semiconductor ASA for any damages resulting from such improper use or sale Contact details For your nearest distributor please visit http www nordicsemi com Information regarding product updates downloads and technical support can be accessed through your My Page account on our homepage Main office Otto Nielsens veg 12 Mailing address Nordic Semiconductor 7052 Trondheim P O Box 2336 Norway 7004 Trondheim Phone 47 72 89 89 00 Norway Fax 4772 8989 89 a Q TAVA NORWEGIA ACCREDITATION No 03 NS EN ISO 9001 CERTIFICATED IRM Pa
24. avius ier E e ee OSESE ESEE S EET EEEE NEEE ESUAT TEREE 43 Appendix A Installing drivers and configuring KEIL projects for the SEGGER QeDUJgEr sisrranisrscreerercenrnsi tecsuiescensesecsuicactnsesesestovsestisesteuduecs LEED E NENEN Nasii 45 Page 2 of 51 NORDIC SEMICONDUCTOR 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 e NRFgo Studio v1 14 or later e Computer with a minimum of 2 USB ports e Windows XP or Windows 7 1 2 External resources e Keil MDK ARM Lite v4 54 or later https www keil com demo eval arm htm e 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 e Commands are written in Lucida Console e Pin names are written in Consolas e File names and user interface components are written in bold e Internal cross references are italicized and written in semi bold 1 4 Evaluation kit release notes August 2013 2 1 Upgraded the nRF51822 chip to build code FA FO Removed R1 on PCA10000 and
25. ber 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_ lt version gt _firmware hex lt version gt will be replaced by a number giving the version of the actual firmware The Master Control Panel Firmware file is located in lt keil path gt 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 devi
26. ccssccssesssccsscesssecessccssscssscesssccssscessesesscesssecssscesassessecenseees 11 4 1 Development environMent ssessessessessessessessreseeseeseeseeseeseensensensenseseeneeseessevstoseuseeeoseestoseostostoseeseeseeseeseeseess 11 5 Hardware description scat caccssetisessecciuvscsesaddcescvacsuncacsncoudscessvascaueaces ceudesus vdeicessvusccucectuctesbsteuitateccsstviclsicaede 14 5 1 nRF51822 Evaluation Kit board PCA10001 sessessssseeseessseesseseseesessecnsoessscnsensnsnecaseesnseassenssasassesssee 14 5 2 Development Dongle PCA10000 s ssesssessesseessesseessessesseessesseesscssesseeseesscossesseoseessesseoseesseeseesseessesseosees 22 6 Flash programming and application development sseesseeesocesscesocessecescessocssocesscessoessocssocesoeesseess 25 6 1 Programming and erasing flash USING NRFGO Studio ou eessssesessesesesesscscsesecscscsesessesescseseesesessess 25 6 2 Application development cease dace ernan tana EEEE ENRIO ie EREE EEEE NEE EER 29 7 Debugging the NRF51822 Chip sssssisessssisiircerisesicsssossiriseosviservissrosisrirsreridosrenerscisroncsrbesissvresiieseesereiiivi 37 7 1 nRF51822 debug features and precautions se sseesseesseesseessesssesseesssesseesseesseeseeosecescoseesseesseesseosseessees 38 8 Software Development Kit ccccccsssscsssscesssccssssccsssecessccesscecesscecsssecessccesssceesssecesscecsccessscccessccesssers 42 8 1 erain e NRS DK aaran e E EEA 42 9 Troupe NOONG sass esssaccosesevc
27. ce and search for services and characteristics In the Service discovery pane you will see the services and characteristics of the device On PCA10001 LEDO 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 10 of 51 NORDIC SEMICONDUCTOR 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 MD
28. ck 0x00020913 param void f struct m err_code lt not in scope gt auto unsigned int l m hla ctarl init unid EN ASSIGN BreakDisable BreakEnable BreakKill BreakList BreakSet BreakAccess COVERAGE iCall Stack Locals ii N gt J LINK J Trace Cortex ti 0 00000000 sec CAP NUM SCRL OVR R W Figure 31 Debugger information for a setup with a SoftDevice enabled in the protected area Page 40 of 51 NORDIC SEMICONDUCTOR nRF51822 Evaluation Kit User Guide v1 2 DEU omj E E E a 7a a oe os eE a WBO LtrEO gt ea ea aM aa M q Disassembly return value ant event get ant channel amp event event message buffer Ox00008222 4669 MOV ri sp 0x00008224 A801 ADD r0 sp 0x04 i M0x00008226 DF51 SVC 0x51 303 if return _ value NRF_ SUCCESS 050000500 ree 20000800 305 Handle event E 20000801 0x00008228 2800 CMP ro 0x00 fee AF 000000200 0x0000822A D1F1 0x00008210 R8 OxFFFFFFFF awitch event R9 OxFFFFFFFF R10 000008344 R11 000008344 R12 OxFFFFFFFF R13 SP 020001880 R14 LR 000008157 Error handle error Turn off LED on GPIO 9 to indicate that CPU is going out of sleep nrf_gpio pin clear 9 Extract and process all pending ANT events as long as there are any left do Fetch the event return value ant_event _get ant_channel event event_message buffer if return value NRF_ SU
29. ck diagram 5 2 4 Multicolor LED The Development Dongle PCA10000 is equipped with a multicolor RGB LED The LED is connected to dedicated I Os on the nRF51822 chip The connections are shown in Table 3 Red P0 21 Green P0 22 Blue P0 23 Table 3 LED connection The LEDs are active low meaning that writing a logical zero 0 to the output pin will illuminate the LED VCC3 Figure 19 LED configuration Page 23 of 51 NORDIC SEMICONDUCTOR nRF51822 Evaluation Kit User Guide v1 2 5 2 5 UART configuration The Development Dongle v1 0 UART lines are connected to pins P0 00 to P0 03 as shown in Table 4 P0 00 RTS CTS P0 01 TXD RXD P0 02 CTS RTS P0 03 RXD TXD Table 4 Development Dongle v1 0 UART configuration The Development Dongle v2 0 UART lines are connected to pins P0 08 to P0 11 as shown in Table 5 P0 08 RTS CTS P0 09 TXD RXD P0 10 CTS RTS P0 11 RXD TXD Table 5 Development Dongle v2 0 UART configuration Note The UART signals are routed directly to the SEGGER chip The pins should only be used for UART In order to use the USB to UART bridge the software on the nRF51822 has to enable flow control For details on how to set up the UART with flow control see the nRF51 Series Reference Manual Page 24 of 51 NORDIC SEMICONDUCTOR nRF51822 Evaluation Kit User Guide v1 2 6 Flash programming and application development The nRF51822 chip is shipped without pre programmed software This giv
30. ct used to work but after trying out another project using the SoftDevice it fails Ensure that the memory layout in your project matches the memory layout on the chip See Section 6 2 1 Configuring memory layout on page 29 on how to set up memory configuration Page 44 of 51 NORDIC SEMICONDUCTOR nRF51822 Evaluation Kit User Guide v1 2 Appendix A Installing drivers and configuring KEIL projects for the SEGGER debugger This appendix describes the steps for installing the software and using the SEGGER J Link Lite debugger with Keil uVision for nRF51 series devices based on J Link software version 4 52b or later Prerequisite You need Keil Vision with ARM MDK that you have tested to be working with MDK version 4 54 Note All projects in the nRF51SDK are preset to work with the SEGGER debugger Only the following step Download and install SEGGER drivers is needed Download and install SEGGER drivers 1 Download the latest SEGGER J Link software and documentation pack from http www segger com jlink software html 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 see Figure 34 on page 46 3 During installation you will be prompted to select the IDE that you want updated with the latest SEGGER DLLs Check the box for Keil MDK and any other IDEs you want to use with SEGGER Rell MOK
31. d Ensure that you have the SEGGER connected correctly to the board and that the board is powered and configured for debugging Code memory Shows how the code memory is divided whether into one or two regions and the size of each region For devices containing a SoftDevice the code memory is divided in two regions with the SoftDevice in Region 0 The tool shows you how much memory is used by the SoftDevice and how much is left for the application e Memory readback protection Shows how the readback protection is set The two possible options are readback protection on Region 0 or readback protection of the whole code memory If there is only one region the option is readback protection on All or off e SoftDevice identification nRFgo Studio tries to identify the firmware located in the chip at Region 0 Recognized firmware is displayed as its ID unrecognized firmware is displayed as its FWID number 6 1 3 Erase all You should use the Erase all function in the following situations e You have a chip that is programmed with a SoftDevice but you want to remove it and have a blank chip e You have programmed an application on a clean chip using nRFgo Studio with the option Lock entire chip from readback To use the Erase All function follow the steps in Section 6 1 1 Selecting a board to program on page 26 Then click Erase all Page 26 of 51 NORDIC SEMICONDUCTOR nRF51822 Evaluation Kit User Guide v1 2
32. dr 0x20000 Region 0 Size 128 kB FW 5110_nRF51822_1 0 0 alpha6 4 Motherboards 4 Boardi Module nRF51822 nRF ISP Motherboard connector 4 nRF51 evaluation boards Segger MELEE 4 nRF51 development dongles Segger nRF51 Programming Bootloaders c Nordic Semiconductor ASA 2008 2011 Figure 20 nRFgo Studio dashboard Page 25 of 51 NORDIC SEMICONDUCTOR nRF51822 Evaluation Kit User Guide v1 2 6 1 1 Selecting a board to program 1 Open nRFgo Studio 2 Inthe Device Manager pane select which board to program or erase 3 The nRF51822 Evaluation Board PCA10001 and Development Dongle PCA10000 hardware will show up under the respective sections nRF51 evaluation boards and nRF51 development dongles The SEGGER serial number identifies the devices 4 Select the board directly by clicking on the SEGGER module listed The selected board is identified with board type SEGGER serial number and the nRF51 chip 6 1 2 Identifying the nRF51822 chip and chip content When you select a board nRFgo Studio identifies the nRF51822 chip and how its memory is organized The following chip and memory information is displayed e nNRF51 chip identification Identifies the chip by name and build code for example nNRF51822 QFAACA If the debugger is not connected to the chip or the debugger has a problem communicating with the chip it will show the following message No device detecte
33. ect Flash Debug Peripherals Tools SVCS Window Help O maa s oajel JPRS EEL svc Harao o s alfa Saens men HAAS d Start Stop Debug Session Ctri F5 m kA Enter or leave a debug session main function return 0 int return type required by ANSI ISO standard fl main c i a Keil_arm_uv4 Int int main void core ies lib uint8 t output state 0 Hg li Configure LED pins as outputs nrf_gpio range cfg output LED START LED STOP while true nrf gpio port write LED PORT 1 lt lt output_state LED OFFSET m Build Output ROMTableAddr OxF0000003 Target info mW Enter or leave a debug session J LINK J Trace Cortex Figure 28 Start debugging mode Page 37 of 51 NORDIC SEMICONDUCTOR nRF51822 Evaluation Kit User Guide v1 2 7 1 nRF51822 debug features and precautions This section contains information about the System Viewer Windows debugging an application when a readback protected SoftDevice is present and setting a breakpoint using a SEGGER J Link debugger 7 1 1 System Viewer windows The System Viewer enables you to select device peripherals and see their contents in separate windows see Figure 29 In the View menu point to System Viewer and select the peripheral you want to see The peripheral register values are displayed in their respective pane in Keil as seen in Figure 30 on page 39 More information on System Viewer can be found at http
34. er 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 Page 20 of 51 NORDIC SEMICONDUCTOR nRF51822 Evaluation Kit User Guide v1 2 5 1 11 Measuring current The current drawn by the nRF51822 device can be monitored on the PCA10001 To measure the current you must first prepare the board by cutting the shorting of solder bridge SB8 There are two ways of measuring the current consumption 1 Connect an ampere meter between pin 1 and pin 2 of connector P1 This will monitor the current directly Connect an ampere meter D nRF_RESET measurement 1 rca ULI Cut ep ee anes 2 Mount a resistor on the footprint for R4 The resistor should not be larger than 10 Q Connect an oscilloscope or similar with two probes on pin 1 and pin 2 on the P1 connector and measure the voltage drop The voltage drop will be proportional with the current consumption For example if a 1 Q resistor is chosen 1 mV equals 1 mA Connect an oscilloscope D nRF_RESET measurement M1 KT Cut Mount a resistor N to Fo panes Note When measuring ultra low power uA level SW4 should be switch off to have accurate current measurement Page 21 of 51 NORDIC SEMICONDUCTOR nRF51822 Evaluation Kit User Guide v1 2 5 2 Development Dongle PCA10000 The nRF51822 Development Dongle
35. es you the option of developing your application directly onto the chip or alternatively by using our 110 nRF51822 SoftDevice which is a Bluetooth low energy peripheral protocol stack solution For more information see the 110 SoftDevice Specification In this chapter we describe how to program and erase the 110 nRF51822 SoftDevice or another application HEX file on the nRF51822 chip If you want to start developing on the nRF51822 chip without using the 110 SoftDevice see Section 6 1 5 Programming an application on page 28 6 1 Programming and erasing flash using nRFgo Studio Use nRFgo Studio to program or erase a SoftDevice or application HEX file onto the nRF51822 chip Note For details on memory organization and protection see the nRF51 Series Reference Manual List of SEGGER debuggers Code memory Programming tools Memory readback protection Device Manager nRF51 chip identification SoftDevice identification a ca SEGGER to use SFE v e View nRF8001 Setup Help atures 2 4 GHz 4 Front End Tests TX carrier wave output RX constant carrier LO leakage TX RX channel sweep RX sensitivity Program SoftDevice Program Application Bluetooth nRF8001 Configuration Programing of SoftDevice on nRF51 device Dispatcher Trace Translator File to program _1 0 0 alpha6_softdevice hex Direct Test Mode nRF8002 Lock SoftDevice from readbi SoftDevice size kB 128 Ad
36. g Setting modifying breakpoints on a running system using the SEGGER debugger halts the CPU which may result in software that is out of sync You should avoid setting breakpoints while the system is running The debugger is not able to detect my nRF51 device after have downloaded my firmware If the nRF51 device goes to SystemOFf Ff too soon after reset it will have a problem communicating with the J Link debugger You can recover using the Recover button in nRFgo Studio 1 Cycle the power to the nRF51 chip before you start the Recover application Note The Recover function will erase all application firmware on the chip Page 43 of 51 NORDIC SEMICONDUCTOR nRF51822 Evaluation Kit User Guide v1 2 The drop down menu in the Master Control Panel doesn t display any serial numbers What has happened Verify that the Master Control Panel software and the drivers for SEGGER OB JLinkCDClInstaller have been installed and that the nRF51 Development Dongle PCA10000 has been plugged into a USB port on your computer The Master Control Panel connects to the nRF51 Development Dongle PCA10000 but reports No response from master emulator in the Log You haven t programmed the nRF51 Development Dongle with the Master Emulator Firmware before starting to use it See Scan for available Bluetooth low energy devices in Chapter 2 Kit content on page 4 for details on how to program the Master Emulator Firmware My proje
37. ge 50 of 51 NORDIC SEMICONDUCTOR nRF51822 Evaluation Kit User Guide v1 2 Revision history August 2013 1 2 Updated content to match v2 1 of the hardware Updated Section 3 on page 6 February 2013 1 1 Updated content to match v2 0 of the hardware Updated hardware information in Section 5 on page 14 September 2012 1 0 First release ARM statement Keil uVision and Cortex are trademarks of ARM Limited All other brands or product names are the property of their respective holders Page 51 of 51
38. hows 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 Inthe Device Manager select the nRF51 Evaluation Board identified by the SEGGER serial number 4 Motherboards 4 Board0 Module nRF51822 nRF ISP Motherboard connector nRFS1 Evaluation Boards nRFSL USE Dongles nRFS1 Programming 3 Select the Program SoftDevice tab Program SoftDevice Program Application Programing of SoftDevice on nRF51 device E Lock SoftDevice from readback SoftDevice size kB 0 b 4 Click Browse and navigate to the SoftDevice file you downloaded 5 Click Program Page 8 of 51 NORDIC SEMICONDUCTOR nNRF51822 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 lt keil path gt ARM Device Nordic nrf51822 board PCA10001 ble ble_app_hrs arm 2 Open the Heart Rate demo project in Keil uVision by double clicking the ble_app_hrs uvproj file Click the Build
39. ice Target Output Listing User C C Asm Linker Debug Utilties Make RW Sections Position Independent RO Bas 00000000 Make RO Sections Position Independent Ma Sate ae E R W Base 00000000 Dont Search Standard Libraries _build blinky_am sct cpu Cortex M0 0 Aibrary_type microlib feedback _build blinky_am fed stic scatter _build blinky_am sct Figure 21 Keil linker settings Select the Target tab In Read Only Memory Areas define values for Start and Size In Read Write Memory Areas define values for Start and Size as seen in Figure 22 on page 31 Click OK A pe Me Below is an example configuration for an application using a chip with 256 kB of code memory and 16 kB of RAM and a SoftDevice using 128 kB of code memory and 8 kB of RAM SoftDevice B described in Table 6 on page 29 e Base code memory address 0x20000 and available code memory size is 0x20000 128 kB e Base RAM memory address 0x20002000 and available RAM size is 0x2000 8 kB Page 30 of 51 NORDIC SEMICONDUCTOR nRF51822 Evaluation Kit User Guide v1 2 Options for Target nRF51822_ 110 Device Target Output Listing User C C Asm Linker Debug Utiities Nordic nRF51822 Xtal MHz 16 0 Figure 22 Memory layout with example SoftDevice IROM1 Start Specify the start address for the application code Size Specify available code memory size for the application code I
40. 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 Goto 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 9 of 51 NORDIC SEMICONDUCTOR 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 gt All Programs gt Nordic Semiconductor gt 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 num
41. inimiz v Always onto rocess IC Kel UV4 UV4EXE o DLL CAKeih UvA JLinkKARM dll Jik S Target l ndian 4 a E Actual A l Host Doo swt ttsti i i i s SOS S OOOOOOCS License About JLINK_GetFirmwareString Done 169 650 sec in 2 calls Figure 37 Segger control panel 5 Click the Debug tab Set Port to SW and Max Clock to 1 MHz Make sure that SN and IDCODE are populated as seen in Figure 38 and click OK Cortex JLink JTrace Target Driver Setup d i Debug Trace Flash Download J Link J Trace Adapter CE n a SWD 0k0BB11477 ARM CoreSight SW DP Up Down ID CODE f Manual Configuration Device Mame odd Delete Update IR len Cache Options Download Options I Cache Code Verify Code Download I Cache Memory T Download to Flash Figure 38 Debug settings 6 Select the J Link device for target programming and provide the appropriate code memory algorithm Page 48 of 51 NORDIC SEMICONDUCTOR nRF51822 Evaluation Kit User Guide v1 2 Options for Target nRF51822 110 Device Target Output Listing User C C Asm Linker Debug Utilities Configure Aash Menu Command Use Target Driver for Rash Programming V Update Target before Debugging Run Inde pendent Figure 39 Flash settings 7 Ifthe J Link serial number appears in the SN field the device is properly installed The def
42. nrf6310 blinky_exar _ Verify failed on VerifyBlock JLink Warning T bit of XPSR is 0 but r lt 4 t ASSIGN BreakDisable BreakEnable BreakKill BreakList BreakSet BreakAccess lt 1Call Stack Locals Memory 1 J LINK J Trace Cortex t1 0 00000000 sec L 44 C10 Figure 30 System viewer window of the RNG peripheral Page 39 of 51 NORDIC SEMICONDUCTOR nRF51822 Evaluation Kit User Guide v1 2 7 1 2 Debugging an application when a readback protected SoftDevice is present Debugging applications with a SoftDevice present behaves as described in http www keil com uvision debug asp except when the program counter is in Region 0 on a SoftDevice with readback protection enabled Code words from addresses in the protected area will always return zero to the debugger Any values in peripheral registers that are restricted or blocked by the SoftDevice will be invisible to the debugger as well Information on the SoftDevice configuration and memory resource mapping can be found in the 110 nRF51822 SoftDevice Specification Note Avoid single stepping to the protected area Instead set the breakpoint right after SVC calls while debugging and run the application to the actual breakpoint see Figure 32 on page 41 The step over function F10 may also be used instead to step over SVC calls to avoid delays when entering the readback protected area C Keil ARM Device Nordic nrf51822 Board nrf6310 ble ble_app_hrs arm
43. old 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 VCC 10 U4 VCC3 NCI vec owe _ COMI SW EN _ NOL IN WEN ae oe 100k witc NC2 m2 SWLEN COM2 g NO2 GND GND GND STG3684A GND 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 Page 17 of 51 NORDIC SEMICONDUCTOR 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 GND vl 0d cL 0d Ol 0d 80 0d GND 90 0d v0 0d c0 0d 00 0d O NA O NA f NA O N w o N a AS U 3S N 3 ii U U U U S ee lt ODA C G Od L0d G9 GP 600d 4 Z 32DA C 20 0d GO0d G9 GP 00d Gv Ep Ll00d G Z ZV 0d qe tP 610d GG 9P 120d f Gd Gt zD qZ QD 9d GZ 0d GL 8P 20d G6 OP DOA qe tD 170d GG 9P 620d G6 0LP ODA 910d 810d 02 0d cf 0d GND tz Od 92 0d 820d 0 0d GND Figure 11 PCA10001 GPIO pin headers Note Some pins have default settings e P0 26 and P0 27 are by default used for the 32 kHz crystal and are not available on the P6 connector
44. rial 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 Rell MOK W454 DLL Y4 53b in OO RelM4AM SS egger Select All Select None Select the ones you would like to replace by this version The previous version will be renamed and kept in the same folder allowing manual undo In case of doubt do not replace existing DLLs You can always perform this operation at a later time via start menu cancel 4 Ifyou are using Keil v4 54 go to http www segger com IDE_Integration_Keil html knownproblems Download JL2CM3 and copy it to lt keil gt ARM Segger This patch is necessary for the SEGGER debugger to work 5 Goto 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
45. ry Debug Trace Fash Download Download Function m RAM for Algorithm Erase Full Chip Program LOAD Erase Sectors W Verify Start 0x20000000 Size 00800 C DonotEase V Reset and Run Address Range 00000000H 001FFFFFH Figure 26 Selecting J LINK J Trace Cortex Page 35 of 51 NORDIC SEMICONDUCTOR nRF51822 Evaluation Kit User Guide v1 2 8 Inthe Utilities tab select Use Target Driver for Flash Programming 9 Choose the available debugger from the list as shown in Figure 27 Device Target Output Listing User C C Asm Linker Debug tities Configure Aash Menu Command Use Target Driver for lash Programming J Trace Cortex Use Extemal Tool for Pash Programming Command a Arguments T Run Independent Figure 27 Debugger selection Page 36 of 51 NORDIC SEMICONDUCTOR nRF51822 Evaluation Kit User Guide v1 2 7 Debugging the nRF51822 chip For debugging with SEGGER J Link see Appendix A on page 45 For general information on how to debug using the Keil uVision IDE see http www keil com uvision debug asp The following steps tell how to configure the debugger in Keil 1 Inthe Project menu click Options for Target CTRL F7 2 Select the Debug tab 3 To enter debugging mode click Start Stop Debug Session or CTRL F5 Ed CAKeiINARM Device Nordic nrf51822 Board nrf6310 blinky_example arm blinky uvproj uVisiong o File Edit View Proj
46. t M1 rig UU ae RB XXXXXXXX P0 16 P0 23 P0 24 P0 31 a n na n nAVec Ae a A a ahe Button 0 Button 1 o o o o o o o o o o LED 1 q q v J SB7 C O Ba bse Do O OU U U U Uenup OU U U U Uenp C Figure 4 PCA10001 top Page 14 of 51 NORDIC SEMICONDUCTOR nNRF51822 Evaluation Kit User Guide v1 2 Figure 5 PCA10001 bottom 5 1 3 Block diagram GPIO lt gt LEDs Battery RESET Buttons gt VCC_nRF External supply gt oun z gt measurement Antenna Vv y SWD Voltage regulator Do S a gt i VBUS Segger OB nRF51822 lt lt Matching network Data UART USB lt gt lt gt Osc Osc 32 768 kHz 16 MHz 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 Page 15 of 51 NORDIC SEMICONDUCTOR nRF51822 Evaluation Kit User Guide v1 2 5 1 5 Power supply The EK board PCA10001 has several power options e USB see Figure 7 e External power supply through P1 1 8 V to 3 6 V e CR2032 coin cell battery see Figure 8 a fol J Link H OB j ON qo Om ov U U U U NRFRESET Tecan GL 0d 80 0d 20 0d 00 0d
47. t of the downloadable content available from your My Page account see Section 2 2 Downloadable content on page 5 The SDK is downloaded as a MSI file a Windows Installer and is installed by running the application When installing the SDK you can select Keil MDK Support Master Control Panel and or Custom install The following describes each installation option Keil MDK support installs Keil uVision example project files the code memory programming algorithm for the J Link debugger and the Nordic nRF51 series device database file for Keil Custom install installs a software archive to a customized location nrfjprog installs a command line programming interface to be used with SEGGER debuggers e mergehex installs a command line tool to combine two hex files nrfjprog and mergehex are installed by default at C Program Files x86 Nordic Semiconductor nrf51 bin Note The Keil MDK Support option will only be available if you already have the Keil MDK toolchain installed Page 42 of 51 NORDIC SEMICONDUCTOR nRF51822 Evaluation Kit User Guide v1 2 9 Troubleshooting The nRF51822 device on hardware v1 0 of the PCA10001 does not respond when try to contact it What has happened Verify that both jumpers on connector P8 on the PCA10001 are in place When I connect multiple SEGGER J Link debugger boards to my computer Vision does not recognize them correctly This is a known limitation with uVision in MDK
48. t uses the remaining memory for the application Similarly the SoftDevice data area starts at the lowest RAM address The application data area must be placed after the SoftDevice data area Table 6 shows examples for setting up the start address and size depending on the code and data size used by the SoftDevice The example is based on a chip with 256 kB of code memory and 16 kB of RAM Blank chip 0 kB 0 kB 0x0 0x40000 0x20000000 0x4000 SoftDevice A 64 kB 2 kB 0x10000 0x30000 0x20000800 0x3800 SoftDevice B 128 kB 8 kB 0x20000 0x20000 0x20002000 0x2000 Table 6 SoftDevice memory layout Note See the nRF51822 Product Specification for details on the total code memory and RAM available in the device The amount of code memory and RAM used by the SoftDevice is described in the S110 nRF51822 SoftDevice Specification There are two ways to configure the memory layout e Using the Keil IDE e Using a Scatter file Note The example code given by Nordic Semiconductor configures the memory layout in the Keil IDE Scatter file loading is not available when using the evaluation version of the Keil IDE Page 29 of 51 NORDIC SEMICONDUCTOR nRF51822 Evaluation Kit User Guide v1 2 6 2 1 1 Memory layout configuration in Keil IDE To access the Keil IDE memory layout 1 Click the Project menu and select Options for Target 2 Select the Linker tab 3 Check Use memory layout from Target Dialog kd Options for Target nRF51822 Dev
49. the nRF51 SDK installer Make sure to choose the Keil MDK ARM installer option Page 6 of 51 NORDIC SEMICONDUCTOR 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 nRF_Reset GND n n n nO OND facial isa i LIN sveveverey aveveveye Ol Gaps Oo o oOo oOo Oo Oo o Oo Oo oO i L Ya t n curren ON NRF_RESET heasuremen tg UU 2aY i 9 i SL 0d 80 0d 0 0d 00 0d cc GD SB9 TO AEE XXXXXXXX k Z S s3 wn 2 sp2 P0 16 P0 23 P0 24 P0 31 VCC VCC N A A NA A LED 1 o olfolfolfa n 2 Os O O offofofafa GD SB6 D O Gnp OV U U U UGNp LED1 LEDO ButtonO Button 1 Start the Blinky project 1 Locate the Blinky project found under lt keil path gt ARM Device Nordic nRF51822 Board PCA10001 blinky_example arm 2 Open the Blinky project in Keil uVision 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 Page 7 of 51 NORDIC SEMICONDUCTOR nRF51822 Evaluation Kit User Guide v1 2 3 2 Bluetooth low energy heart rate monitor demo This section s
50. z A proper configuration is shown in Figure 24 on page 34 Page 33 of 51 NORDIC nRF51822 Evaluation Kit User Guide v1 2 SEMICONDUCTOR Cortex JLink JTrace Target Driver Setu Debug Trace Flash Download J Link J Trace Adapter SN mp oeue Device J Link Lite Cortex M SWD 00BB11477 ARM CoreSight SW DP Up HW v3 00 dll v4 50 D own FW J Link Lite Cortex M V8 compi Port Max Clock Automatic Detection ID CODE sw Mmi Manual Configuration Device Name Add Delete Update IR len Figure 24 Target driver setup 9 Click Start Stop Debug Session CTRL F5 in the Keil IDE to start debugging ple arm blin cy uvproj uVision4 O OGM J B ele o P RRR SLE a ve Harmo o elas TE EEE PE SatStap Debug seson F 5 32 nRF51822 main function as app return 0 int return type required by ANSI ISO standard 2 main c ow fan Keil_arm_uv4 lnt int main void Ai g core a ya uint8_ t output_state 0 H lib Configure LED pins as outputs nrf_gpio range cfg output LED START LED STOP while true nrf_gpio port _write LED PORT 1 lt lt output state LED OFFSET E Pr Go Fu Op Te ROMTableAddr 0xF0000003 Target info Enter or leave a debug session J LINK J Trace Cortex i Figure 25 Debugger initiation Page 34 of 51 NORDIC SEMICONDUCTOR nRF51822 Evaluation Kit User Guide v1 2
Download Pdf Manuals
Related Search
Related Contents
Avertissement Benutzerhandbuch AJ3400/12 Salamandra Pellets Água EZ Air Dual Air Kit Technical Manual PDFファイル - 上田地域広域連合 3562 F o rd T yp e Samsung AWT18S1WDC User Manual WPU 160 Operating Instructions A5.p65 Copyright © All rights reserved.
Failed to retrieve file