LED 5 Blinking continuously and the i cannot see the board anymore in nrfconnect in vscode

Hi ,

I am using the NRF5340DK board and i just plugged the board into my computer and the led 5 on the board is blinking fast and continuously and i cannot see the board anymore in the VSCODE. I have tried changing 3 cables and yes they are data cables not power cables but still does not work , any solutions to this problem ? 

  • Hello,

    Please go through this old thread and check all the steps mentioned.

    Kind Regards,

    Abhijith 

  • Hello Abhijit, based on the forum i checked the voltages on Figure 1 of this power supply info page of the board, below is what i am reading using a multimeter: 

    USB IF MCU = 5.11 V , VIN = 3.43 , USB NR5340 =5.12 V

    All of the positions of switches are in correct places: Flow Control = ON , nrf Power Source = VDD, nrf = Default and Vext --> nrf = Off

    The board was working before and was programmable and no changes were made to the hardware , below are pics of my board below:

  • Hello,

    Which program did you flash inside the DK finally? And is your DK visible in your PC(check the device manager) and nRF connect Desktop App.
    If your board is visible in the pc, try to download the nrf command line tool and try to erase the board using nrfjprog --eraseall command.

    Kind Regards,

    Abhijith 

  • I have tried that , the board is not visible in nrfconnect desktop app. The program that i last flashed was the modified adc driver example found in ncs\v2.2.0\zephyr\samples\drivers\adc : 

    /*
     * Copyright (c) 2020 Libre Solar Technologies GmbH
     *
     * SPDX-License-Identifier: Apache-2.0
     */
    
    #include <inttypes.h>
    #include <stddef.h>
    #include <stdint.h>
    
    #include <zephyr/device.h>
    #include <zephyr/devicetree.h>
    #include <zephyr/drivers/adc.h>
    #include <zephyr/kernel.h>
    #include <zephyr/sys/printk.h>
    #include <zephyr/sys/util.h>
    #include <zephyr/drivers/gpio.h>
    #define LED_PIN 15 //LED at Pin 1.15
    
    //-------------Check if overlay file exists----------------
    #if !DT_NODE_EXISTS(DT_PATH(zephyr_user)) || \
    	!DT_NODE_HAS_PROP(DT_PATH(zephyr_user), io_channels)
    #error "No suitable devicetree overlay specified"
    #endif
    
    //-------------ADC Channels Setup--------------------------
    #define DT_SPEC_AND_COMMA(node_id, prop, idx) \
    	ADC_DT_SPEC_GET_BY_IDX(node_id, idx),
    
    /* Data of ADC io-channels specified in devicetree. */
    static const struct adc_dt_spec adc_channels[] = {
    	DT_FOREACH_PROP_ELEM(DT_PATH(zephyr_user), io_channels,
    			     DT_SPEC_AND_COMMA)
    };
    
    //-----------GPIO PORT 1 setup--------------------------
    //mux_gpio_dev = device_get_binding("GPIO_0");
    const struct device *port_1;//This setups up port 1 in datasheet pg 22
    //port_0_pins = DEVICE_DT_GET(DT_NODELABEL(gpio0));
    //int gpio_pin_configure(1, 15, GPIO_OUTPUT);
    
    void main(void)
    {	
    	//-------GPIO Pin 1.15 setup-------------------
    	port_1 = DEVICE_DT_GET(DT_NODELABEL(gpio1));
    	gpio_pin_configure(port_1, LED_PIN , GPIO_OUTPUT);//Configure Pin 1.15
    	gpio_pin_set(port_1, LED_PIN, 0);//Set the led pin low initially 
    
    
    	int err;
    	int16_t buf;
    	struct adc_sequence sequence = {
    		.buffer = &buf,
    		/* buffer size in bytes, not number of samples */
    		.buffer_size = sizeof(buf),
    	};
    
    	/* Configure channels individually prior to sampling. */
    	for (size_t i = 0U; i < ARRAY_SIZE(adc_channels); i++) {
    		if (!device_is_ready(adc_channels[i].dev)) {
    			printk("ADC controller device not ready\n");
    			return;
    		}
    
    		err = adc_channel_setup_dt(&adc_channels[i]);
    		if (err < 0) {
    			printk("Could not setup channel #%d (%d)\n", i, err);
    			return;
    		}
    	}
    
    	while (1) {
    		printk("\n ADC reading:");
    		for (size_t i = 0U; i < ARRAY_SIZE(adc_channels); i++) {
    			int32_t val_mv;
    
    			printk("\n channel %d: ",
    			       //adc_channels[i].dev->name,
    			       adc_channels[i].channel_id);
    
    			(void)adc_sequence_init_dt(&adc_channels[i], &sequence);
    
    			err = adc_read(adc_channels[i].dev, &sequence);
    			//if (err < 0) {
    			//	printk("Could not read (%d)\n", err);
    			//	continue;
    			//} else {
    			//	printk("%"PRId16, buf);
    			//}
    	
    		
    			/* conversion to mV may not be supported, skip if not */
    			//val_mv = buf;
    			//err = adc_raw_to_millivolts_dt(&adc_channels[i],
    			//			       &val_mv);
    			//if (err < 0) {
    			//	printk(" (value in mV not available)\n");
    			//} else {
    			//	printk(" = %"PRId32" mV\n", val_mv);
    			//} 
    			
    		}
    
    		k_sleep(K_MSEC(500));
    	}
    }
    

  • Hello,

    Could you try nRF command line tool for erasing the board? You can try "nrfjprog --eraseall" command for doing this and try recovering the board using "nrfjprog --recover" command. You can find all the commands in here. You can download the command line tool from here. Please share a screenshot of running this command if this doesn't help. Also check whether your DK is visible in PC(device manager). Also try connecting the board to another PC and see whether it detects the board or not (if possible).

    Kind Regards,

    Abhijith

Related