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

NRF51 DK: Failed to connect to target, no Idcode detected

I did a chip-erase on the NRF51 DK. However, when I tried to reconnect and program the DK I get the error: Failed to connect to target, no Idcode detected

I tried doing nrfjprog --recover and the log did not report any error. But I still get the same error above when I try to program the DK board. I also tried:

nrfjprog -f NRF51 -e
nrfjprog -f NRF51 --program softdevice.hex
nrfjprog -f NRF51 --program application.hex

which all executed without error. But again it did not solve the error above.

I checked Jlink Commander and it shows no voltage issue.

Does anyone have any suggestions? I also tried restarting the DK board, connecting it to different computer but that does not solve the issue. Thanks.

Here are the contents of the JLink drive when I open it on my PC. 

  • Hi,

    Have you done any current measurements on the DK recently ? If yes, make sure that you short / set a jumper on P22.

    Could you add --verify to the nrfjprog program command, i.e.

    nrfjprog -f NRF51 --program application.hex --verify

    Do you then get "Verified OK." returned ?

    Could you try to install the latest nRF-Command-Line-Tools ? Note that "SEGGER J-Link software and documentation pack" is included in the Windows installer.

  • When we check the DK board we see that SB9 has never been cut, there's a short across P22. 

    We also tried to do nrfjprog -f NRF51 --program application.hex --verify. But here is the error message that was returned. 

    Do you have any suggestions? Thank you.

  • Try this:

    nrfjprog -f NRF51 -e
    nrfjprog -f NRF51 --program softdevice.hex --verify
    nrfjprog -f NRF51 --program application.hex --sectorerase --verify

    If nrfjprog -f NRF51 --e fails, then try this instead:

    nrfjprog -f NRF51 --recover

  • Hi we thought this solved the issue, but today when we tried flashing the uart example from the peripheral examples of SDK v12.1, we got the following error message in Keil.

    We also tried flashing the sample example through nrfconnect but got this error message:

    We tried doing the erase and recover commands through nrfjprog as you suggested before, but these error messages still appear. We searched through other Devzone posts where other users had similar "Flash Download failed - "Cortex-M0" " issues due to not having the correct SoftDevice on their boards. But the UART peripheral example we are flashing should not be using SoftDevice.

    Do you have any suggestions? Thank you

  • thoric_fish said:
    We tried doing the erase and recover commands through nrfjprog as you suggested before, but these error messages still appear.

     What did nrfjprog -f NRF51 --recover return ?

    Have you measured the supply voltage on the kit? It should be somewhere between 2.8V-3.3V.

    Have you tried to press the IF BOOT/RESET button while power cycling the kit? It should then show up as a Removable Storage Device named "BOOTLOADER". Then you can drag-and-drop the J-LINK interface MCU firmware found here(v170724) onto the storage device to reprogram the JLINK firmware.

    Could you upload the log that is generated, when you run

    nrfjprog -f NRF51 --recover --log

Related