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 Reply Children
  • Hi,

     

    Could you try to upgrade nrfjprog to the latest version (it's a part of the nRF5x command line tools), then use the recover function?

    nrfjprog --recover -f nrf52

     

    Kind regards,

    Håkon

  • I am already using nrfjprog version 9.7.1

    Should I upgrade? 

  • As I wrote above - this is the log I got:

    I ran the command nrfjprog --eraseall --log and got the following result.

    --------------------------------------------------------------------------------
    C:\Users\avipa\Dropbox\Projects\Mesh\Controller\BLE5\nrfjprog.exe --eraseall --log
    nrfjprog verion 9.7.1
    --------------------------------------------------------------------------------
    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.
    Device "NRF52832_XXAA" selected.
    FUNCTION: read_device_version.
    FUNCTION: read_device_version.
    JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -1.
    JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -102.
    FUNCTION: close_dll.
    FUNCTION: close_dll.

  • 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()

Related