README.md 1.66 KB
Newer Older
Sam Calisch's avatar
Sam Calisch committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# NRF52

* talk about chip features
* show ring speed for packets, compared to NRF24

# Programming the NRF52

Programming involves two steps: 1) compiling code, and 2) flashing the code to the chip.

Thanks to the folks at Adafruit, you can use the Arduino IDE to perform both steps.  Instruction on installing the appropriate libraries can be found <a href='https://learn.adafruit.com/bluefruit-nrf52-feather-learning-guide'>here</a>.

To build the toolchain for compilation manually, you can follow the instructions on <a href='https://pcbreflux.blogspot.com/2016/09/nrf52832-first-steps-with-st-link-v2.html'>this page</a> (starting at heading "GNU ARM Compiler").

The steps for flashing your code depends on what board and programmer you have.

# Adafruit Feather NRF52 Board

This is a great board; I would highly recommend it for NRF52 projects.

This board comes flashed with a Serial DFU bootloader and it has an onboard USB-to-Serial converter.  This allows you to program it simply with a USB cable.

# Custom board with Segger J-Link

Sam Calisch's avatar
Sam Calisch committed
24
25
<img src='jlink/flashing-bootloader.png' width=50%>

Sam Calisch's avatar
Sam Calisch committed
26
27
28
29
# Custom board with OpenOCD and Raspberry Pi

You don't have to spend hundreds on a J-Link (even though it is very nice).  Using <a href='openocd.org'>OpenOCD</a>, we can make a Raspberry Pi bit-bang the programming protocols.

Sam Calisch's avatar
Sam Calisch committed
30
31
32
33
34
35
<img src='openocd/bootloader-raspberrypi.jpg' width=53%>
<img src='openocd/flashing-bootloader.png' width=30%>

Support for the NRF52 is not in the stable release of OpenOCD as of V 0.10, but you can patch it following the instructions on <a href='https://primalcortex.wordpress.com/2017/06/10/setting-up-openocd-for-programming-the-nordic-nrf52832-chip/'>this page</a>.