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

nRF52840 DK permanent hang during flashing

Hi,

We have a stability issue with nRF52840 DK after it has been upgraded to JLink DLL version V6.60e and firmware OB-SAM3U128-V2-NordicSemi compiled Jan 7 2019 14:07:15.
Please see the below scenario which typically reproduces this problem:


1) Start JLinkExe

16:36 $ sudo JLinkExe -if swd -speed 9600 -device NRF52840_XXAA -autoconnect 1
SEGGER J-Link Commander V6.60e (Compiled Jan 17 2020 17:28:37)
DLL version V6.60e, compiled Jan 17 2020 17:28:19

Connecting to J-Link via USB...O.K.
Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Jan 7 2019 14:07:15
Hardware version: V1.00
S/N: 683122431
License(s): RDI, FlashBP, FlashDL, JFlash, GDB
VTref=3.300V
Device "NRF52840_XXAA" selected.


Connecting to target via SWD
InitTarget() start
InitTarget() end
Found SW-DP with ID 0x2BA01477
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011)
AP[1]: JTAG-AP (IDR: 0x02880000)
Iterating through AP map to find AHB-AP to use
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0xE00FF000
CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
Found Cortex-M4 r0p1, Little endian.
FPUnit: 6 code (BP) slots and 2 literal slots
CoreSight components:
ROMTbl[0] @ E00FF000
ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7
ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT
ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM
ROMTbl[0][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU
ROMTbl[0][5]: E0041000, CID: B105900D, PID: 000BB925 ETM
Cortex-M4 identified.
J-Link>r
Reset delay: 0 ms
Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.
J-Link>g
J-Link>
****** Error: Communication timed out: Requested 12 bytes, received 0 bytes !

2) Start JLinkRTTClient to see logs from device

3) Start flash programming

sudo nrfjprog -f nrf52 -r --program nrf52840_xxaa.hex --sectorerase
ERROR: nrfjprog failed for an unknown reason. Run the same command again with
ERROR: argument --log, contact Nordic Semiconductor and provide the generated
ERROR: log.log file to them.

In step 3) the programming does not start and below error appears in JLinkExe:
****** Error: Communication timed out: Requested 12 bytes, received 0 bytes !


nrfjprog -i does not show any connected SWD device when this problem appears.

Rebooting PC with Linux with nRF52840 DK in such state causes that PC hangs on bootup. It's very problematic for us, since we are working remotely with this setup.
The only way to recover the nRF52840 DK is to physically disconnect it from USB and then reconnect.

Please let me know if there is some solution to this issue, because it's very problematic in our development.

Parents Reply Children
  • Hi,

    Thank you for the information.

    I've already updated to the newest JLin DLL version V6.64b.

    Firmware on DK has been automatically updated to  Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Mar 17 2020 14:43:00, please see logs:

    10:08 $ sudo JLinkExe -if swd -speed 9600 -device NRF52840_XXAA -autoconnect 1
    SEGGER J-Link Commander V6.64b (Compiled Mar 20 2020 10:08:41)
    DLL version V6.64b, compiled Mar 20 2020 10:08:28
    Connecting to J-Link via USB...Updating firmware:  J-Link OB-SAM3U128-V2-NordicSemi compiled Mar 17 2020 14:43:00
    Replacing firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Jan  7 2019 14:07:15
    Waiting for new firmware to boot
    New firmware booted successfully
    O.K.
    Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Mar 17 2020 14:43:00
    Hardware version: V1.00
    S/N: 683122431
    License(s): RDI, FlashBP, FlashDL, JFlash, GDB
    VTref=3.300V
    Device "NRF52840_XXAA" selected.
    

    in general it looks more stable but unfortunately the problem appeared again while attempting to program firmware:

    J-Link>
    ****** Error: Communication timed out: Requested 12 bytes, received 0 bytes !

    I will call MSDDisable and hope this will help.

  • I've just reproduced this problem again with MSDDisable previously called as you suggested and my laptop is still hanging on bootup, when such broken DK is attached to USB.

  • Just to try to narrow it down:

    - Is it just one DK, or all of them?
    - Have you by any chance cut the solder bridges to measure current at any time?
    - Do you have such problems if you use another PC (e.g. with windows)?
    - What version is it of the nRF52840-DK?

    Best regards,
    Kenneth

  • - Is it just one DK, or all of them?
    We have several DKs, please see details below.

    - Have you by any chance cut the solder bridges to measure current at any time?
    No.

    - Do you have such problems if you use another PC (e.g. with windows)?
    We have such problem on several PCs, Ubuntu 18.04. We do not use it with Windows.

    - What version is it of the nRF52840-DK?
    These have problems described in this issue, running on Ubuntu 18.04:
    * PCA10056 0.9.3 2017.44
    * PCA10056 1.0.0 2018.49

    On this one I cannot reprocuce this prolem so far, on Ubuntu 18.04:
    * PCA10056 2.0.0. 2020.2

    This one is running on Mac, had the same problems, but now it's working after upgrade to JLink V6.64b.
    * PCA10056 1.1.0 2019.26

    I also found out, that the issue does not appear when I close JLink connection and quit using "qc" command before flash programming.

  • So if I understand it correctly this worked on previous version of nrfjprog/jlink (do you know which one?), but the latest 10.7.0/6.64b this does not work anymore? Or is it only 6.60e that fails?

    kristofbo said:
    I also found out, that the issue does not appear when I close JLink connection and quit using "qc" command before flash programming.

    It seems like conflict between jlink and nrfjprog, I can report it internally. Can you type nrfjprog --version just so I have that.

    Best regards,
    Kenneth

Related