nRF51-DK as Debugger/Programmer
The nRF51 DK board supports programming and debugging of external boards. The idea is to use the built-in JTAG adapter for external programming of the Metawear. Of course, this feature can be generally used with other ARM chips supported by JLink. To debug an external board, use the Debug out (P19 or P20).
In this guide we will use the P19 Debug-Out port, as it allows us to create easier and straight-forward a custom cable to interface with the Metawear RG.
Hardware and part-list
The external board
|Flat Ribbon Cable .050″||ME10G-5-ND||2.64|
|Socket .050″ 10POS||M50-3300542||2.01|
|Socket .050″ 4POS||3M15519-ND||3.59|
|Click for Cart-Share (Digikey EU)|
Well, one can rightfully argue that 8.8€ is not a cheap solution, but at the time I was experimenting with this, I could only find these kind of connectors. I would more than happy if someone can point out a more affordable solution.
Synthesizing the Cable
To figure out how to correctly create the cable see the figure below:
Is obvious that we are only interested in 4 pins from the Debug-out port
However the EXT_GND_DETECT is also important as it is used by the Jlink chip to detect if an external board is connected. More specifically, the EXT_VTG is low and EXT_GND_DETECT is high by default when nothing is connected to P20 and that is how JLink chip senses the presence of the external board. The below figure shows how to map the pins to the cable/connectors.
- MetaWear RG
- Programming the nRF51822 Beacon Kit with the nRF51DK (devzone nordic)
- External nRF51822 SWD Programming using the nRF51-DK (electronut.in)
- MetaWear for Developers (mbientlab)
- How to Use nRF51-DK to Program External ARM SoCs (http://ram.lijun.li/)
- Target Connectors – ARM
- Serial Wire Debug – ARM (.pdf)