Failed to Connect Target

I procurred two NRF52DK boards and in both the boards I am facing the similar issue of "Failed to Connect the Target".  When I am running the nrfutil device recover command, it showing follwing error:
x Failed to recover 1050389761, Emulator error: Failed to open connection
Error: One or more recover tasks failed:
* 1050389761: Emulator error: Failed to open connection (Generic)

also when running nrfjprog --recover -f nrf52 command
it is shwoing the following error:
"Recovering device. This operation might take 30s.
[error] [ Worker] - Encountered error while performing post-recover cleanup. -90: Access protection is enabled, can't read device version.
[error] [ Client] - Encountered error -21: Command recover executed for 30178 milliseconds with result -21
ERROR: Recover failed. Please make sure that the correct device family is given
ERROR: and try again."


I am not able to use these boards at all and sort of struck at this and have been wasting my time for the last one week trying every bit of commands provided to recover the device but have no success at all so far.

Parents Reply Children
  • Hi,

    Sahil Anchal said:
    I was just running example code(twi_sensor_pca10040) using Segger Embedded Studio, it was getting flashed on the device succesfully for few times, but all of sudden it started throwing error "Failed to Connect to Target".

    Did both nrf52-DKs get into the same problem after flashing the same example code in Segger Embedded Studio? Are there any differences in the actions you took on both boards before observing the error?

    Best regards,
    Dejan

  • Yes, in my nrf52-DK (1050389761), I was able to run the blinky code few times, and then I try to run the twi_sensor_pca10040 example code after the first successfull flash, it started showing the "Failed to Connect to Target" error in every flash attempts.
    Then i thought to try it with the another nrf52-DK(1050379504), the same  twi_sensor_pca10040 example code, it flashed successfully first time and when I try to flash it again it started showing the same error.
    After this, I could not use both nrf52DKs.


    Thanks

Related