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

Unable to connect to J-Link from SES - nRF5340D

Device: nRF5340 DK

I installed the SEGGER Embedded Studio and wanted to run a sample application. But it throws an error when I click on Connect J-Link.

But I see that the J-Link driver is already installed and shows up in the Device Manager

When I try to connect it using nRF Connect it shows another error saying "Failed to Setup Device: Error Occured when close open device. Error Code: CouldNotReset Device (0x5) Low Level Error: NOT_AVAILABLE_BECAUSE_PROTECTION (ffffffa6)

How to resolve this?

  • Hi,

    The error NOT_AVAILABLE_BECAUSE_PROTECTION indicates that the readback protection is enabled. You must disable the readback protection by recovering the device in order to be able to connect to and program it. You can use west or nrfjprog to recover the device.

    With west you can recover both cores with the following command:

    west flash --recover

    With nrfjprog you must recover the cores separately. Make sure you recover the network core before the application core.

    nrfjprog --recover --coprocessor CP_NETWORK
    nrfjprog --recover

    Best regards,

    Marte 

  • Thanks a lot, it worked. 

    Apparently, I had to install nrfjprog manually using pip. Even west can be installed the same way. 

    infocenter.nordicsemi.com/index.jsp

    Then to get started with a BLE example for the very first time, 

    File->"Open nRF Connect SDK Project...", select hci_rpmsg, and board with _cpunet suffix.

  • Hi,

    I am happy to hear that you got it to work, and thank you for sharing this to help others!

    I recommend looking at Working with nRF53 Series in our documentation for more information about working with this SoC. This page also explains how to build and program samples for the DK.

    Best regards,

    Marte

Related