Think Create | Deqing Sun

nRF51822 with Arduino development

by on Nov.20, 2016, under My gadgets

This is my experiment of burn bootloader on nRF51822 and upload code with serial cable and Arduino IDE.


Tool package:

Tools come from RedBearLab/nRF51822-Arduino. However, their focus is now on S130 softdevice which does not support serial bootloader. So we will keep using the old branch at

Burn bootloader.

I used a J-link programmer to burn bootloader on nrf51822. You can get j-link software on

Once it is installed, go to bootloader folder in terminal and type:

jlinkexe -device NRF51822_XXAC -if SWD -speed 4000 -autoconnect 1

w4 4001e504 2

w4 4001e50c 1

w4 4001e514 1


w4 4001e504 1

loadfile bootloader_Avrdude_OTA_HCI_20150714.hex

If you don’t see any error. You can proceed to upload firmware.

if you see error like: “Old firmware which does not support pausing periodic actions during flash download”. You may want to try lower version of J-Link Software. My J-link worked on V5.12 but not on V6.10.

Config Arduino environment

You need to copy RBL folder from hardware folder in repo zip to the hardware folder in Arduino app. Then you can restart Arduino and see the RBL nRF51822 board.


Upload code

Since regular serial cable won’t be able to reset nRF51822. You need to manually press reset button when compile about to end. So nRF51822 will stay in bootloader for a few seconds (LED on P19 will blink). Then avrdude can upload successfully.

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!


A few highly recommended websites...