Sometimes, when I want to use the nrfjprog tool, I get the following error:
nrfjprog --log -f nrf52 --reset
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.
The content of the log.log:
--------------------------------------------------------------------------------
nrfjprog --log -f nrf52 --reset
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.
I can reproduce this bug, if I connect two NRF52840 PDK boards on the pc and apply the following steps:
nrfjprog --log -f nrf52 --reset -s $SN1
nrfjprog --log -f nrf52 --reset -s $SN2
JLinkExe -device NRF52832_XXAA -if SWD -speed 4000 -autoconnect 1 -SelectEmuBySN $SN1 -RTTTelnetPort 9101
JLinkExe -device NRF52832_XXAA -if SWD -speed 4000 -autoconnect 1 -SelectEmuBySN $SN2 -RTTTelnetPort 9102
and if I then do the following:
nrfjprog --log -f nrf52 --reset -s $SN1
I get the error above.
Are there any Fixes for this issue?
UPDATE: I found out, that one of the devices can be programmed(resetted), while it is connected via JLinkExe, but the other one can't. I am using the latest Segger Tools v630g.
UPDATE 2: I am using Linux (Ubuntu 16.04)