nRF52_DK blink Jlink error

Hello everybody !

I am struggling to make a blink program on the board nordic nRF52 DK
I am new to platformio and nrf52 DK. I followed this tutorial : Arduino and Nordic nRF52-DK: debugging and unit testing — PlatformIO latest documentation

I just want to get familliar with nRF52_DK to later use nRF52840 on a custom baord.

My error is : Connecting to J-Link via USB…FAILED when I try to upload on the board.

Full upload message below :

Complete Upload log
>	Processing nrf52_dk (platform: nordicnrf52; board: nrf52_dk; framework: arduino)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------CONFIGURATION: https://docs.platformio.org/page/boards/nordicnrf52/nrf52_dk.html
PLATFORM: Nordic nRF52 (7.1.0) > Nordic nRF52-DK
HARDWARE: NRF52832 64MHz, 64KB RAM, 512KB Flash
DEBUG: Current (jlink) On-board (cmsis-dap, jlink) External (blackmagic, stlink)
PACKAGES:
 - framework-arduinonordicnrf5 1.700.201209 (7.0)
 - tool-bossac-nordicnrf52 1.10901.201022 (1.9.1)
 - tool-jlink 1.68801.0 (6.88.1)
 - tool-openocd 2.1000.200630 (10.0)
 - tool-sreccat 1.164.0 (1.64)
 - toolchain-gccarmnoneeabi 1.70201.0 (7.2.1)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 12 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
MethodWrapper(["checkprogsize"], [".pio\build\nrf52_dk\firmware.elf"])
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [          ]   0.2% (used 140 bytes from 65536 bytes)
Flash: [          ]   0.4% (used 2224 bytes from 524288 bytes)
.pio\build\nrf52_dk\firmware.elf  :

section            size        addr

.text              2108           0

.ARM.exidx            8        2108

.data               108   536870912

.bss                 32   536871020

.heap              4096   536871056

.stack_dummy       4096   536871056

.ARM.attributes      46           0

.comment            126           0

.debug_frame        148           0

Total             10768
<lambda>(["upload"], [".pio\build\nrf52_dk\firmware.hex"])
AVAILABLE: blackmagic, cmsis-dap, jlink, mbed, nrfjprog, stlink
CURRENT: upload_protocol = jlink
JLink.exe -device nRF52832_xxAA -speed 4000 -if swd -autoconnect 1 -NoGui 1 -CommanderScript "C:\Users\clement.deligeon\Documents\PlatformIO\Projects\arduino-tutorial\.pio\build\nrf52_dk\upload.jlink"
SEGGER J-Link Commander V6.88b (Compiled Nov 27 2020 15:45:43)
DLL version V6.88b, compiled Nov 27 2020 15:44:11


J-Link Command File read successfully.
Processing script file...

J-Link connection not established yet but required for command.
Connecting to J-Link via USB...FAILED: Cannot connect to J-Link.

J-Link connection not established yet but required for command.
Connecting to J-Link via USB...FAILED: Failed to open DLL

J-Link connection not established yet but required for command.
Connecting to J-Link via USB...FAILED: Failed to open DLL

Script processing completed.

My config platformio is below and I am on platformio IDE through Vscode :

platformio.ini
; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[env:nrf52_dk]
platform = nordicnrf52
board = nrf52_dk
framework = arduino

Jlink
I download the software for Jlink.
One cause of the issue could be that I have GDB v7.0 with segger embedded studio and GDB v6.88 with platformio.
I checked on nordic documentation and from my understanding Jlink is directly embbedded in the board.

I already executed : Instdrivers.exe Not sure of what the result should be because I still can’t see Jlink in the device manager of windows.

Hardware

I also check power on my board which is alimented via usb and everything is fine.
However nothing is detected when I plug it in my my usb port via cable.
I also try with both usb port of my laptop.

I try my cable and it can transfer data.

What should I check try next ? i don’t understand the failed to open DLL is a windows issue ?
I am stuck since several days on this issue.

Thank you for your help. I think solution to my problem is obvious but I can’t find it currently.

  • Do you see a JLink USB device in the Windows device manager?
  • Have you installed the driver as per our documentation?

I will check that again.

No usb JLink
usb_device_manager

I already executed Instdrivers yesterday but I will try again and restart my computer just to be sure.

o_O Can you post the link where you bought your development board from? Just to make sure there’s really a JLink on there…

I would have expected something like JLink cannot connect with nRF52 DK / nRF51 DK / nRF51 sniffer in Windows - Nordic Q&A - Nordic DevZone - Nordic DevZone in the device manager.

I am not the one who bought the card but it should have been bought on an official distributer like RS : https://fr.rs-online.com/web/p/modules-de-developpement-de-communication-et-sans-fil/1463538/

Is the microUSB cable you’re using maybe a charge-only cable and doesn’t have the data lines? Do you hear a “ba-ding” beep sound from Windows when you plug the device into your computer?

No sound like I would expect but I used the same for an Atmega328P card.
Nevermind I don’t use it for data only for power supply with my other board;

I will invistigate the cable.

I also found the topic you share from devzone when I was looking for answer and I was surprised.

Yeah, try with a different USB cable and maybe USB port.

Also try and follow the “Connect and Test” procedure at https://www.nordicsemi.com/Software-and-tools/Development-Kits/nRF52-DK/Getting-Started. At step 6 you should get a removable USB device it says. Maybe the power button is just not in the “On” position?

1 Like

Power button is ON. Thanks for the link I will check their instructions.

Also just to be sure we are speaking of the same board mine is NRF52832 with PCA10040 code : nRF52 DK - Development kit for Bluetooth Low Energy and Bluetooth mesh - nordicsemi.com

I try the cable and it is working I am able to retrieve data from my phone with it.
However with my phone I got a sound notification whereas connectying the board trigger nothing.
Alimentation on the board is good. I checked it with my multimeter.

When you go to the linked get-started guide and click on step 4, is that LED blinking? Is any other LED on the board on?

You might have a defective board…

I am downloading everything and checking it.

It fail at step 4. no led blinking.
But I realized I didn’t use the flex antenna before.

I try another dev board. It was my board. Thank you a lot for the help ! I found so many guide that I miss the basic nordic guide. I jumped on their documentation before finding it !

1 Like

I found what happen to the board. It has been set to be used with BT flashing.
The person who gave me the board didn’t told me that at first.

I will use another nRF52_DK to put a new bootloader on the nRF52_DK which is currently set for NFC flash.

1 Like