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")

  • I mean that the P0.08 does not change level as it should according to the program, it only stays low like the program didnt start. Yes the application works in the ninab4 as expected.

    So it is not necessary to pre flash the bootloader in orther for the custom board to work with west flash?

  • Hi

    On your custom board you say you're using the nRF52833dk_nrf52820 board file. Please note that p0.08 is defined as the UART RX pin in the nrf52833_nrf52820.dts file, so there might be some conflicts with your application from there.

    If you have a J-Link device and the SWDIO pins available on your custom board you can use the J-Link to program your custom device with west.

    Best regards,

    Simon

  • I changed the pin of the uart with overlay file. The LED still didnt light, but that could be another problem. I'm using a JLink to program the custom board and after lots of tries and errors it worked. Apparently the bootloader really is not necessary.

    I guess the issue can be closed now since the initial problem was that I wasnt able to program the custom board.

    In conclusion the things that helped me were to use better jumpers to connect programming pins to JLink, connect the nReset pin of nrf to RESET pin of JLink and use the west tool to build and flash and sometimes use the JLinkExe tool to erase and flash the board. Also another thing that helped was to use the debugger in vscode to see that the application was running in the mcu

Related