Nrfjprog & nRF52840-DK: JLinkARM DLL reported an error: "-1", "An unknown error.".

Hello everyone,

I recently got a nRF52840 DK and have set up nRF Connect + Visual Studio Code (running on Linux/Ubuntu based system).

I went through the Getting Started section from the user guide, but I am also experiencing some hardware inconsistencies. I've made sure to connect the USB cable on the right port (I have also used this same cable to program some other boards and it works fine), turned on the power switch (SW8), however the Power Source switch (SW9) seems to be faulty, since I set it to the VDD (center) position and the board does not turn on. Instead, I need to leave it halfway through between the VDD and USB positions for LED5 to turn on (I noticed that LED1-4 also turn on very slightly).

At this point however, I am able to see the board connected on my computer, showing up on my file manager as JLINK. When running lsusb command in a terminal, I am also able to see the SEGGER J-Link device on the list of bus devices. I also ran the nrfjprog -i command, and the ID of the device shows up (683834403), which also appears under Connected Devices, in the nRF Connect for VS Code.

In VSC I am able to build one of the sample projects, however I get this error when trying to flash it to the board:

> Executing task: nRF Connect: Flash dk1/build (active) <

Flashing build to 683834403
west flash -d /mnt/hdd/Users/javie/Documents/Programming/nRF/dk1/build --skip-rebuild --runner nrfjprog --snr 683834403

-- west flash: using runner nrfjprog
-- runners.nrfjprog: Flashing file: /mnt/hdd/Users/javie/Documents/Programming/nRF/dk1/build/zephyr/zephyr.hex
ERROR: JLinkARM DLL reported an error. Try again. If error condition
ERROR: persists, run the same command again with argument --log, contact Nordic
ERROR: Semiconductor and provide the generated log.log file to them.
NOTE: For additional output, try running again with logging enabled (--log).
NOTE: Any generated log error messages will be displayed.
FATAL ERROR: command exited with status 33: nrfjprog --program /mnt/hdd/Users/javie/Documents/Programming/nRF/dk1/build/zephyr/zephyr.hex --sectoranduicrerase -f NRF52 --snr 683834403
The terminal process terminated with exit code: 33.

I also tried running the following command directly from the terminal:

nrfjprog -f NRF52 -r --log

With the following output:

ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
(...)
ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
ERROR: JLinkARM DLL reported an error. Try again. If error condition
ERROR: persists, run the same command again with argument --log, contact Nordic
ERROR: Semiconductor and provide the generated log.log file to them.

Here is the output log file: log.log.

I also attempted to upload the latest (Interace MCU) Firmware [J-Link-OB-SAM3U128-V2-NordicSemi-170724.bin] to the board, found on the Downloads section of the product page. I think I was successful, I was able to set the board in Bootloader mode by turning it off, holding down the IF BOOT/RESET button while turning the board on again, dragging and dropping the file on the device memory through my file manager, the LED5 on the board started blinking. However when resetting the board, I tried again the above, with the same result.

After some other attempts however, I managed to get another error from the nrfjprog -f NRF52 -r --log command, but after that, the error I get is the same as before.

Attatched output log file: log.log.

I also noticed that, when powering the board for the first time, LED1 does not blink, and my phone does not respond to the supposed NFC signal to open the user guide (as stated in the Getting Started section of the user guide). Instead, as stated before, LED1-4 are all turned on very (very) dimly.

I tried researching more on this problem on the forums but all cases seem to be particular / specific about different things.

Also, if it's of any use, this is the output of nrfjprog --version:

nrfjprog version: 10.14.0 external
JLinkARM.dll version: 7.58a

Thank you in advance, kind regards.

Alex.

  • Hi Alex,

     

    Your system seems to be setup properly, meaning that nrfjprog is able to detect the debugger and all the drivers/etc are installed properly.

    Attatched output log file: log.log.

    The log shows that the debugger is not able to access the device. You will typically see this if the nRF device is not powered for instance.

    I also attempted to upload the latest (Interace MCU) Firmware [J-Link-OB-SAM3U128-V2-NordicSemi-170724.bin] to the board, found on the Downloads section of the product page. I think I was successful, I was able to set the board in Bootloader mode by turning it off, holding down the IF BOOT/RESET button while turning the board on again, dragging and dropping the file on the device memory through my file manager, the LED5 on the board started blinking. However when resetting the board, I tried again the above, with the same result.

    The debugger is detected properly, which is good. Have you ensured that the nRF is powered properly? Have you cut the solderbridge to measure current at some point, and maybe forgot to place a jumper on this pin header (next to the usb connector)

    I also noticed that, when powering the board for the first time, LED1 does not blink, and my phone does not respond to the supposed NFC signal to open the user guide (as stated in the Getting Started section of the user guide). Instead, as stated before, LED1-4 are all turned on very (very) dimly.

    This is because all LEDs are buffered through transistors. If there's noise or similar on those lines, they will flicker.

    since I set it to the VDD (center) position and the board does not turn on. Instead, I need to leave it halfway through between the VDD and USB positions for LED5 to turn on

    It seems that you've already figured this one out, but I'll mention it anyway. This should be placed in the center position, "VDD power".

     

    Kind regards,

    Håkon

  • Hello Håkon,

    Thank you for your quick reply.

    Have you cut the solderbridge to measure current at some point

    SB40 is intact.

    Have you ensured that the nRF is powered properly?

    I have now triple-checked the state of all the switches on the board and I realized I was missing to set the VEXT->nRF switch to the OFF position, although it is not mentioned on the Getting Started section of the user guide.

    The board now turns on when leaving the power source switch on VDD position, and LED1 blinks. I am now able to successfully run nrfjprog -f NRF52 -r and flashed an example directly from VSC.

    Thank you very much for your help.

    Kind regards.

  • Great to hear that it worked now. Hope you have a wonderful day!

    Cheers,

    Håkon

Related