nRF52 - The Complete Help Guide

Fixing Jlink DLL issues with nRFgo Studio

This post serves as a collection of help tutorials that I found useful when getting started with the nRF52.

Related: Jlink not detected in nRFgo Studio, Failed to find JLINK dll. Had a spot of trouble fixing this one. However, uninstalling everything and reinstalling everything made it work again.

How to fix

  1. Uninstall Nordic, Jlink, Segger software
  2. Remove all registry keys of Nordic, Jlink or Segger software using regedit
  3. Install Segger first
  4. Followed by Nordic Command Line
  5. Test that it works nrfjprog -i in the command line. Make sure that the Jlink is detected
  6. Install nRFgo Studio.

Intermittent JlinkARM dll not found when uploading softdevice and code not updating on device even though upload is successful

This was strange because there wasn't this issue previously. However, uploading on the nrf52 DK worked, so I suspect it might be a manufacturing or power issue, as I was powering my board from a battery pack. I noticed that the light from the battery pack did not come on (although my debugger was able apparently upload code and verify it) when I connected my custom PCB and it came on when I attached the nrf52 DK.

How to fix

The solution is to switch to a more stable power source like a USB output instead of a battery pack that might not supply enough current for programming to take place.

Setting up GCC toolchain for Windows

I wanted to set up an environment that did not require me to use a IDE because all the other options (Keil and IAR) were paid.

How to Fix

  1. Download SDK from Nordic
  2. Download make
  3. Install mingw
  4. Install GCC-ARM-embedded
  5. update Makefile.windows found in nRF52_SDK_INSTALL\components\toolchain\gcc
  6. Under the armgcc folder, execute make nrf52832... in the command line.
  7. In nRFgo Studio, go to the new .hex file and program

Getting SCL and SDA to work on the Sparkfun nRF52832 breakout

  1. Go to C:\Users[Your Username\AppData\Local\Arduino15\packages\Sparkfun\hardware\nRF5\0.2.3\variants\SparkfunnRF52832Breakout
  2. Open the variant.h file and change the line
#define PIN_WIRE_SDA    (20u)
#define PIN_WIRE_SCL    (21u)

to

#define PIN_WIRE_SDA    (24)
#define PIN_WIRE_SCL    (25)

Pinouts in the Arduino Core

The pinouts on the nRF52 DK using the Arduino Core follows the pinout on the Arduino UNO:

P0.15 is defined as 4 in Arduino and P0.04 is 15, as seen in the purple image above.

Antenna Issues

The design document of the nRF52 insists that you follow the exact geometry and components for the antenna to work correctly. That includes the orientation of placement, and the length of the trace. Not following this might result in the antenna not working.

It might be better to purchase a module to avoid this issue.

References

  1. https://devzone.nordicsemi.com/question/4067/nrfjprog-always-fails-to-find-jlinkarmdll-even-in-the-same-folder/
  2. https://alexanderbrevig.github.io/technology/2016/01/25/nRF52-gnu-toolchain/
  3. https://devzone.nordicsemi.com/blogs/870/general-pcb-design-guidelines-for-nrf52/
Show Comments