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
}
}
/** @} */

Parents
  • 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

  •  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.

    Information forwarded to our developers. Will update when I have more information.

    Br,
    Joakim

  • Hello Joakim I hope you are well.

    I want to ask you, what if you had good news regarding the board?

    greetings

  • Hi. 

    I'm afraid I don't have any solution to this yet. I've pushed for an update from our developers. 

    If you are unable to use your DK, you can contact the Nordic RSM for your area and they might be able to replace your faulty DK. If you don't know who that is, please send me a PM with your location and I'll provide the contact information you need. 

    Br, 
    Joakim

  •  Hello Joakim, last week I received the new board. Thank you very much for the help.

    However, I wanted to ask you something, since, I'm curious, did you try to recreate the error that happened to my board with the code that I put at the beginning of the thread?

  • Hi,

    Andres Molina said:
    However, I wanted to ask you something, since, I'm curious, did you try to recreate the error that happened to my board with the code that I put at the beginning of the thread?

    Joakim is out of office, but looking at the code, I can't see why and how that could have caused the issue.

Reply
  • Hi,

    Andres Molina said:
    However, I wanted to ask you something, since, I'm curious, did you try to recreate the error that happened to my board with the code that I put at the beginning of the thread?

    Joakim is out of office, but looking at the code, I can't see why and how that could have caused the issue.

Children