This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Cant program custom board

I have a custom board like a breakout of NRF52820 with the QFN48 package. The design is according with the reference circuitry without changing a thing. The IO pins and SWD were breaked out to be acessible with jumpers. Needless to say the wiring of the JLink are VTref to VDD_NRF, SWDIO to SWDIO_NRF, SWDCLK to SWDCLC_NRF, GND to GND_NRF. I also tryied to wire the RESET to nRESET_NRF. NRF board is powered by a bench PSU.

I'm trying to program the processor on a Ubuntu machine with a JLink and didnt have any sucess. I Tryied with nrfconnect, nrfjprog, pyprog, the platformio extension and the Segger JLink_V758e app.

Just to mention I also have a ninab4 board with nrf52833 that is programmed through serial with DFU and it works fine.

Any help for programming the NRF52820?

The output for the JLink_V758e: Device "NRF52820_XXAA" selected.
Connecting to target via SWD
InitTarget() start
InitTarget() end
RESET (pin 15) high, but should be low. Please check target hardware.
RESET (pin 15) high, but should be low. Please check target hardware.
InitTarget() start
InitTarget() end
RESET (pin 15) high, but should be low. Please check target hardware.
InitTarget() start
InitTarget() end
RESET (pin 15) high, but should be low. Please check target hardware.
RESET (pin 15) high, but should be low. Please check target hardware.
InitTarget() start
InitTarget() end
RESET (pin 15) high, but should be low. Please check target hardware.
Cannot connect to target.

The output from nrfconnect is:

2021-12-08T17:21:01.918Z INFO Application data folder: /home/franklin/.config/nrfconnect/pc-nrfconnect-programmer
2021-12-08T17:21:02.400Z DEBUG iface: enp0s31f6
2021-12-08T17:21:02.400Z DEBUG IP4: 192.168.0.83
2021-12-08T17:21:02.400Z DEBUG IP6: 2804:14c:8783:85fd::1006
2021-12-08T17:21:02.400Z DEBUG MAC: e0:d5:5e:f0:ed:22
2021-12-08T17:21:02.401Z DEBUG Client Id: 865f42fb7bdae701c8d8b13ea064b525fb7b2bdd
2021-12-08T17:21:02.403Z DEBUG Google Analytics for category pc-nrfconnect-programmer has initialized
2021-12-08T17:21:02.463Z DEBUG App pc-nrfconnect-programmer v2.0.1 official
2021-12-08T17:21:02.463Z DEBUG App path: /home/franklin/.nrfconnect-apps/node_modules/pc-nrfconnect-programmer
2021-12-08T17:21:02.463Z DEBUG nRFConnect 3.9.1, required by the app is (^3.8.0)
2021-12-08T17:21:02.463Z DEBUG nRFConnect path: /tmp/.mount_nrfcon9sn8pe/resources/app.asar
2021-12-08T17:21:02.463Z DEBUG HomeDir: /home/franklin
2021-12-08T17:21:02.463Z DEBUG TmpDir: /tmp
2021-12-08T17:21:04.346Z ERROR Error while probing devices, more details in the debug log: JLINKARM_DLL_ERROR (Origin: "Error when running nrfdl_enumerate")

  • Hi

    Are you sure the reset pin is not shorted to anything on your board, as the "RESET pin high" message points to. Have you tried using an oscilloscope, logic analyzer, or similar to check the state of the actual reset pin, P0.21 to see if it is high or not when your app is running? If that's the case, you can try adding a pulldown resistor to the reset pin to avoid it from staying high.

    Best regards,

    Simon

  • Accidentally I tryied to program with only JLink wire to PC and nothing in it and the same pin 15 RESET error appeared. Does it means that the program is in my JLink programmer/debugger ?

  • I don't think that should be the a problem, but it's likely what the device reports when the connected board is not connected properly. To make sure the J-Link device works you can try programming a DK if you have one with this J-Link device.

    Also, how do you connect the J-Link device to your custom board?

    Best regards,

    Simon

  • I had sucess flashing the ninab4 board with the JLink programmer. After it I tryied soldering another of my custom board to verify it that was the problem and also had sucess programming it with the JLink. The problem now is that nothing seems to happen after programming.
    I'm using the west to build and flash the board with the --runner JLink and it worked as expected with the ninab4. When programming the nrf52820 custom board I changed the --board to nrf52833dk_nrf52820 and used the correct configurations.

    Do I need to make any other configuration for bootloader or something like this?

    Here is the test code. I only check the P0.8 voltage to see if the code is running:

    #include <zephyr.h>
    #include <sys/printk.h>
    #include <device.h>

    #include <nrf52820.h>
    #include <nrf52820_peripherals.h>
    #include <hal/nrf_gpio.h>
    const int pin_led = 8;

    void main(void){
    nrf_gpio_cfg_output(pin_led);
    while(1) {
    nrf_gpio_pin_toggle(pin_led);
    k_msleep(500);
    }
    }
  • Hi

    Glad you were able to get the project to build and flash.

    Can you specify what you mean by "nothing seems to happen after programming". Does the P0.08 not behave as expected, if so, what does it do? Does the application work as intended on the NINAb4 board?

    There shouldn't be any further changes necessary as long as you have a custom board file for your custom board.

    Best regards,

    Simon

Related