This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Problem flashing custom nrf52 board using openocd, and unable to connect using JLink

Good day, I am new to this forum so I am having some problems posting my question. Sorry for any inconveniences. I am having serious problems flashing my custom NRF5282 board. I started with Openocd, using the st-link v2 debugger and I was able to connect to the device and view memory as well as read registers, but I am unable to program the chip using openocd. 

I get these errors when I try to flash using openocd after successful connection

I have seen a lot of suggestions on this site about disabling app_protect using:
But this does not work for me. I have also posted a question on stack overflow but I couldn't get much help. 

https://stackoverflow.com/questions/52308978/problem-flashing-nrf52-chip-using-openocd


But now I got an original jlink. But with the jlink, I am not even able to connect to the board. I get this error:

I have also tried the nrfjprog command line tools but I get this error:

I think my connection is good because I am able to connect to the device via openocd and stlink-v2, But I am not using the reset pin.
My device voltage is also 4.8v. Please, can anyone help me with any suggestions? Thanks for your anticipated cooperation.

Parents Reply Children
  • Schematic looks good as far as I can see.

    I strongly suggest to get a nRF52-DK for comparison, you can also use the nRF52-DK to program your own board in this case. Then you can compare for instance voltages with your own board for comparison, and verify the tools works as expected.

    I notice pin 21 should be pulled high in case pin reset have been enabled (I was thinking of nRF52840 that use pin 18). You do not need to connect SWO and RESET on debugger J3 header.

    Kenneth

  • Oh, Kenneth, it seems pulling pin 21 did the trick. I can now flash the chip. Thanks a lot, I am very grateful. Please, can you explain to me what is the function of pin 21?