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
- Uninstall Nordic, Jlink, Segger software
- Remove all registry keys of Nordic, Jlink or Segger software using
- Install Segger first
- Followed by Nordic Command Line
- Test that it works
nrfjprog -iin the command line. Make sure that the Jlink is detected
- 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
- Download SDK from Nordic
- Download make
- Install mingw
- Install GCC-ARM-embedded
- Under the
make nrf52832...in the command line.
- In nRFgo Studio, go to the new .hex file and program
Getting SCL and SDA to work on the Sparkfun nRF52832 breakout
- Go to C:\Users[Your Username\AppData\Local\Arduino15\packages\Sparkfun\hardware\nRF5\0.2.3\variants\SparkfunnRF52832Breakout
- Open the variant.h file and change the line
#define PIN_WIRE_SDA (20u) #define PIN_WIRE_SCL (21u)
#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.
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.