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