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

My nrf52840dk stopped working after programming

I am trying to operate a BLE5 sniffer with nrf52840dk

After connecting the dk to nrf connect desktop and programming it with a wrong code (by mistake), it is not able to read the memory content again.

I put the file J-Link OB-SAM3U128-V2-NordicSemi 170724.bin in the BOOTLOADER folder after I pressed the reset button.

Then connected again - but in nrf connect I cannot get any feedback after this line:

"Using nrfjprog to communicate with target"

When I try to use nrfjprog on CMD line, I get this error:

nrfjprog --eraseall
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.

my dk is pca10056 2018.49

my jlink is JLink_V640

My usb cable is connected to J2

I am using USB power source (VDD option is not working)

The second switch is at default sate

and the VEXT-NRF is "On"

How to resolve this problem?

Parents
  • If this will help to analyze what happened and how to fix The last thing that I did while the 52840dk worked was to follow the guidelines in https://github.com/NordicSemiconductor/nRF-Sniffer-for-802.15.4/blob/master/README.md

    I probably did something wrong (maybe programmed something into J3).

    How can I fix it and bring back my 52840dk functionality? I cannot see the memory content any more and not able to program it.

  • Could you take a picture of the whole DK, and share it with me? So I can check all the switches etc.

    Cheers,

    Håkon

  • Please upgrade to the latest, and use "nrfjprog --recover -f nrf52".

    Kind regards,

    Håkon

  • Here is what I got:

    2019-May-03 11:57:06 --------------------------------------------------------------------------------
    2019-May-03 11:57:06 nrfjprog --recover -f nrf52 --log
    2019-May-03 11:57:06 nrfjprog version 9.8.1
    2019-May-03 11:57:06 --------------------------------------------------------------------------------
    2019-May-03 11:57:06 nRF_open_dll
    2019-May-03 11:57:06 . nRF52_open_dll
    2019-May-03 11:57:06 . . nRF52_dll_version
    2019-May-03 11:57:06 nRF_enum_emu_snr
    2019-May-03 11:57:06 . nRF52_enum_emu_snr
    2019-May-03 11:57:06 . . nRF52_enum_emu_snr
    2019-May-03 11:57:06 nRF_enum_emu_snr
    2019-May-03 11:57:06 . nRF52_enum_emu_snr
    2019-May-03 11:57:06 . . nRF52_enum_emu_snr
    2019-May-03 11:57:06 nRF_connect_to_emu_with_snr
    2019-May-03 11:57:06 . nRF52_connect_to_emu_with_snr
    2019-May-03 11:57:06 . . nRF52_is_connected_to_emu
    2019-May-03 11:57:06 . . nRF52_enum_emu_snr
    2019-May-03 11:57:06 . . nRF52_connect_to_emu_with_snr
    2019-May-03 11:57:06 . . . nRF52_connect_to_emu_without_snr
    2019-May-03 11:57:06 . . . nRF52_connect_to_emu_without_snr: JLink: Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Jul 12 2018 11:44:41
    2019-May-03 11:57:06 . . . nRF52_connect_to_emu_without_snr: JLink: Hardware: V1.00
    2019-May-03 11:57:06 . . . nRF52_connect_to_emu_without_snr: JLink: S/N: 683927383
    2019-May-03 11:57:06 . . . nRF52_connect_to_emu_without_snr: JLink: TELNET listener socket opened on port 19021
    2019-May-03 11:57:06 . . . nRF52_connect_to_emu_without_snr: JLink: WEBSRV Starting webserver
    2019-May-03 11:57:06 . . . nRF52_connect_to_emu_without_snr: JLink: (0065ms, 0072ms total)
    2019-May-03 11:57:07 . . . nRF52_connect_to_emu_without_snr: JLink: WEBSRV Webserver running on local port 19080
    2019-May-03 11:57:07 . . . nRF52_connect_to_emu_without_snr: JLink: (0089ms, 0096ms total)
    2019-May-03 11:57:07 . . . nRF52_connect_to_emu_without_snr: JLink: returns O.K.
    2019-May-03 11:57:07 . . . nRF52_connect_to_emu_without_snr: JLink: (0107ms, 0114ms total)
    2019-May-03 11:57:07 . . . nRF52_connect_to_emu_without_snr: JLink: JLINK_GetHWStatus(...)
    2019-May-03 11:57:07 . . . nRF52_connect_to_emu_without_snr: JLink: returns 0x00
    2019-May-03 11:57:07 . . . nRF52_connect_to_emu_without_snr: JLink: (0017ms, 0142ms total)
    2019-May-03 11:57:07 . . . nRF52_connect_to_emu_without_snr: There is no generic nRF52 device in J-Link, so we select NRF52832_xxAA.

    2019-May-03 11:57:07 . . . nRF52_connect_to_emu_without_snr: JLink: JLINK_ExecCommand("Device = NRF52832_xxAA", ...).
    2019-May-03 11:57:07 . . . nRF52_connect_to_emu_without_snr: JLink: XML file found at: C:\Program Files (x86)\SEGGER\JLink_V640\JLinkDevices.xml
    2019-May-03 11:57:07 . . . nRF52_connect_to_emu_without_snr: JLink: (0008ms, 0166ms total)
    2019-May-03 11:57:07 . . . nRF52_connect_to_emu_without_snr: JLink: C:\Program Files (x86)\SEGGER\JLink_V640\JLinkDevices.xml evaluated successfully.
    2019-May-03 11:57:07 . . . nRF52_connect_to_emu_without_snr: JLink: Device "NRF52832_XXAA" selected.
    2019-May-03 11:57:07 . . . nRF52_connect_to_emu_without_snr: JLink: Device "NRF52832_XXAA" selected.
    2019-May-03 11:57:07 . . . nRF52_connect_to_emu_without_snr: JLink: returns 0x00
    2019-May-03 11:57:07 . . . nRF52_connect_to_emu_without_snr: JLink: (0122ms, 0280ms total)
    2019-May-03 11:57:07 . . . nRF52_connect_to_emu_without_snr: JLink: JLINK_ExecCommand("SetRestartOnClose = 0", ...).
    2019-May-03 11:57:07 . . . nRF52_connect_to_emu_without_snr: JLink: returns 0x01
    2019-May-03 11:57:07 . . . nRF52_connect_to_emu_without_snr: JLink: (0008ms, 0304ms total)
    2019-May-03 11:57:07 . . . nRF52_connect_to_emu_without_snr: JLink: JLINK_ExecCommand("DisableFlashDL", ...).
    2019-May-03 11:57:07 . . . nRF52_connect_to_emu_without_snr: JLink: returns 0x00
    2019-May-03 11:57:07 . . . nRF52_connect_to_emu_without_snr: JLink: (0007ms, 0327ms total)
    2019-May-03 11:57:07 . . . nRF52_connect_to_emu_without_snr: JLink: JLINK_ExecCommand("SetDbgPowerDownOnClose = 1", ...).
    2019-May-03 11:57:07 . . . nRF52_connect_to_emu_without_snr: JLink: returns 0x01
    2019-May-03 11:57:07 . . . nRF52_connect_to_emu_without_snr: JLink: (0007ms, 0349ms total)
    2019-May-03 11:57:07 . . . nRF52_connect_to_emu_without_snr: JLink: JLINK_ExecCommand("ExcludeFlashCacheRange 0x0-0xFFFFFFFF", ...).
    2019-May-03 11:57:07 . . . nRF52_connect_to_emu_without_snr: JLink: returns 0x00
    2019-May-03 11:57:07 . . . nRF52_connect_to_emu_without_snr: JLink: (0008ms, 0372ms total)
    2019-May-03 11:57:07 . . . nRF52_connect_to_emu_without_snr: JLink: JLINK_TIF_Select(JLINKARM_TIF_SWD)
    2019-May-03 11:57:07 . . . nRF52_connect_to_emu_without_snr: JLink: returns 0x00
    2019-May-03 11:57:07 . . . nRF52_connect_to_emu_without_snr: JLink: (0019ms, 0400ms total)
    2019-May-03 11:57:07 . . . nRF52_connect_to_emu_without_snr: JLink: JLINK_SetSpeed(2000)
    2019-May-03 11:57:07 . . . nRF52_connect_to_emu_without_snr: JLink: (0026ms, 0434ms total)
    2019-May-03 11:57:07 nRF_recover
    2019-May-03 11:57:07 . nRF52_recover
    2019-May-03 11:57:07 . . nRF52_is_connected_to_emu
    2019-May-03 11:57:07 . . nRF52_is_connected_to_emu: JLink: JLINK_IsOpen()
    2019-May-03 11:57:07 . . nRF52_is_connected_to_emu: JLink: returns 0x01
    2019-May-03 11:57:07 . . nRF52_is_connected_to_emu: JLink: (0022ms, 0468ms total)
    2019-May-03 11:57:07 . . nRF52_is_connected_to_device
    2019-May-03 11:57:07 . . nRF52_is_connected_to_device: JLink: JLINK_IsConnected()
    2019-May-03 11:57:07 . . nRF52_is_connected_to_device: JLink: returns FALSE
    2019-May-03 11:57:07 . . nRF52_is_connected_to_device: JLink: (0017ms, 0493ms total)
    2019-May-03 11:57:07 . . nRF52_readback_status
    2019-May-03 11:57:07 . . . nRF52_is_ctrl_ap_available
    2019-May-03 11:57:07 . . . . nRF52_read_access_port_register
    2019-May-03 11:57:07 . . . . . nRF52_coresight_configure
    2019-May-03 11:57:07 . . . . . nRF52_coresight_configure: JLink: JLINK_CORESIGHT_Configure()
    2019-May-03 11:57:07 . . . . . nRF52_coresight_configure: JLink: returns 0
    2019-May-03 11:57:07 . . . . . nRF52_coresight_configure: JLink: (0115ms, 0616ms total)
    2019-May-03 11:57:07 . . . . . nRF52_power_debug_and_system_regions
    2019-May-03 11:57:07 . . . . . . nRF52_write_debug_port_register
    2019-May-03 11:57:07 . . . . . . nRF52_write_debug_port_register: JLink: JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)
    2019-May-03 11:57:07 . . . . . . nRF52_write_debug_port_register: JLink: returns -1
    2019-May-03 11:57:07 . . . . . . nRF52_write_debug_port_register: JLink: (0016ms, 0640ms total)
    2019-May-03 11:57:07 . . . . . . nRF52_write_debug_port_register: JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -1.

    2019-May-03 11:57:07 . . . . . nRF52_power_debug_and_system_regions: JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -102.

    2019-May-03 11:57:07 nRF_close_dll
    2019-May-03 11:57:07 . nRF52_close_dll
    2019-May-03 11:57:07 . . nRF52_is_connected_to_emu
    2019-May-03 11:57:07 . . nRF52_is_connected_to_emu: JLink: JLINK_IsOpen()
    2019-May-03 11:57:07 . . nRF52_is_connected_to_emu: JLink: returns 0x01
    2019-May-03 11:57:07 . . nRF52_is_connected_to_emu: JLink: (0014ms, 0662ms total)
    2019-May-03 11:57:07 . . nRF52_disconnect_from_emu
    2019-May-03 11:57:07 . . . nRF52_is_connected_to_device
    2019-May-03 11:57:07 . . . nRF52_is_connected_to_device: JLink: JLINK_IsConnected()
    2019-May-03 11:57:07 . . . nRF52_is_connected_to_device: JLink: returns FALSE
    2019-May-03 11:57:07 . . . nRF52_is_connected_to_device: JLink: (0014ms, 0683ms total)
    2019-May-03 11:57:07 . . . nRF52_unpower_debug_and_system_regions
    2019-May-03 11:57:07 . . nRF52_disconnect_from_emu: JLink: JLINK_Close()

  • Hi,

     

    Most of my "normal tricks" does not seem to recover your board. Since you originally programmed in the 802.15.4 sniffer (USB variant), are you also connecting a usb to "nRF USB" (J3) when trying to recover the board?

    Have you also tried to recover the board using another computer?

     

    Kind regards,

    Håkon

  • I am not connecting a USB to J3. I did it once when I tried to program the 802.15.4 sniffer. 

    I tried in another computer with new installation of NRF tools 

    Not working there as well

    Is there another way to program the board besides the Programmer via USB?

Reply Children
Related