This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Writing issue on board nRF52840

Hi,

I am trying to use nRF52840 boards but I am not able to write on them using JLinkExe nor nrfjprog. However, when drag-and-drop-ing a built example application, it works perfectly on the board. Running nrfjprog -i works fine as well, I just have issues when it comes to writing on the board.

I work on Ubuntu 16.04.

Here are the logs from JLinkExe and nrfjprog:


Fullscreen
1
2
3
4
5
6
7
$ JLinkExe
SEGGER J-Link Commander V6.32a (Compiled Apr 30 2018 15:46:56)
DLL version V6.32a, compiled Apr 30 2018 15:46:51
Connecting to J-Link via USB...Updating firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Jan 12 2018 16:05:20
Replacing firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Mar 2 2017 12:22:13
FAILED: Communication timed out - Can not execute firmware update
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


Fullscreen
1
2
3
4
$ nrfjprog --family nRF52 -e --log
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.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


The log.log file:
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--------------------------------------------------------------------------------
nrfjprog --family nRF52 -e --log
nrfjprog verion 9.7.2
--------------------------------------------------------------------------------
FUNCTION: open_dll.
FUNCTION: open_dll.
FUNCTION: enum_emu_snr.
FUNCTION: enum_emu_snr.
FUNCTION: enum_emu_snr.
FUNCTION: enum_emu_snr.
FUNCTION: connect_to_emu_with_snr.
FUNCTION: connect_to_emu_with_snr.
FUNCTION: connect_to_emu_without_snr.
FUNCTION: enum_emu_snr.
JLinkARM.dll OpenEx returned error 'Cannot connect to J-Link via USB.'.
FUNCTION: close_dll.
FUNCTION: close_dll.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX



Does anyone have any advice to resolve that issue?

Thanks

Parents
  • : Are you trying to program a nRF52840 DK or a custom nRF52840 board using the nRF52840 DK as a programmer?

  • I am trying to program a nRF52840 DK

  • And when I plug another new nRF52840 DK in and start J-Link Commander, I get this error message:

     

    This happens using Windows 10 and I downloaded  and installed the JLink drivers today.

  • Can you post the markings on the JLink MCU on the nRF52840 DK? Should be a sticker with something like

    PCA10056
    0.12.0
    2018.9
    <Segger Serial number>

    Just want to make sure that we're flashing the correct JLink FW.

  • Sure here it is:

    PCA10056
    0.12.0
    2018.10
    <Segger Serial number>

  • I've tested this on both Win 7 and Win 10 with Segger J-Link v6.32a and I am not having any issues with updating the firmware of the JLink MCU. Could you try to switch to another USB cable? Also verify that the switches on the DK are set correctly 

    SW6: Set Default

    SW7: Set to Def

    SW9: nRF Power Source set to VDD

    SW10: VEXT->nRF should be set to OFF

     

  • I updated the JLink firmware with the previous version (J-Link OB-SAM3U128-V2-NordicSemi 170213.bin) and I am now able to flash programs on the nrf52840 DK on Windows.

    However on Ubuntu 16.04 I still get the same 'Cannot connect to J-Link via USB' errors.

    I tried 'sudo JLinkExe' and to switch to another USB cable but the issue remains.
    I have Ubuntu 16.04 and Windows 10 in dual boot on my machine and even with the same device/laptop/cable, it works on Windows but not on linux.

    I verified the switches SW6, SW7, SW9 and SW10 and they are set as in your comment above.

Reply
  • I updated the JLink firmware with the previous version (J-Link OB-SAM3U128-V2-NordicSemi 170213.bin) and I am now able to flash programs on the nrf52840 DK on Windows.

    However on Ubuntu 16.04 I still get the same 'Cannot connect to J-Link via USB' errors.

    I tried 'sudo JLinkExe' and to switch to another USB cable but the issue remains.
    I have Ubuntu 16.04 and Windows 10 in dual boot on my machine and even with the same device/laptop/cable, it works on Windows but not on linux.

    I verified the switches SW6, SW7, SW9 and SW10 and they are set as in your comment above.

Children