Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

Error "failed to connect to target"

Error: "Failed to connect to target" nRF52832 

Hello

I have a problem. I was making a program for a counter. I managed to upload it to the card and communicate with PUTTY through COM3. Then I tried to load another program and it didn't work.

Currently it throws me this error. I tried changing the cable, turning off the device, trying to restart it but nothing worked. Also, it happened to me that I tried to do a reboot by holding down the RESET button to load the boot loader but it didn't work either.

I would greatly appreciate your help to recover the device

This is the program:

#include <stdbool.h>
#include <stdint.h>

#include "nrf.h"
#include "nordic_common.h"
#include "boards.h"
#include "nrf_delay.h"

#include "nrf_log.h"
#include "nrf_log_ctrl.h"
#include "nrf_log_default_backends.h"

/**
* @brief Function for application main entry.
*/
int main(void)
{

APP_ERROR_CHECK(NRF_LOG_INIT(NULL));
NRF_LOG_DEFAULT_BACKENDS_INIT();

NRF_LOG_INFO("This is log data from nordic device..");

uint32_t count = 0; //creacion de un contador

while (true)

{
NRF_LOG_INFO("Counter Value: %d", count); //funcion similar al printf
nrf_delay_ms(500);
count++; //incrementa el valor del contador
}
}
/** @} */

  • Hello everyone

    I was reading possible solutions but none have worked. I tried to connect the device, by J-link but it didn't work. It shows me the following list of errors(I am connecting the board via a USB cable):


    On the other hand, I also checked that the SB9 solder bridge was fine and it is.

  • Hi. 

    Have you tried using nrfjprog to --recover the device. Or connecting to the device using the nRF Connect Programmer app?

    ________

    What happens when you power the device? Can you see any LEDs lighting up?

    Br, 
    Joakim

  • Thank you very much for answering :)

    When I connect the device the LED5 starts blinking. I have nrf connect and command line tools, but I don't really know how to use them to recover my device. I also don't know how to use the command nrfjprog to --recover

    Do I need to type it in a cmd or in the J-Link commander?

    How can I use nrf connect programmer for this problem?


  •  I just opened the nrf programmer, selected the device and tapped eraseall, but got the following error. Also, I tried to load the blinking example but it didn't work either.

  • Thanks.

    I'll look at your ticket again and get back to you by the end of day tomorrow!

    Br,
    Joakim

1 2 3 4 5 »