This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
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

Programming custom board with nrf52 dk works for some examples but not all examples?

Hi,

I've recently built my own custom board (with an onboard nrf52840) and have been trying to program it with an nrf52 dev kit. To program it I've used the following forum thread: https://devzone.nordicsemi.com/f/nordic-q-a/14058/external-programming-using-nrf52-dk and it works! well it works-ish.

I can program my board with 'blinky' 30% of the time (meaning for every 3 tries of building and debugging, I will manage to program it once - while it's weird it's VERY repeatable). If I try programming anything like the ble_blinky example or ble_uart it doesn't work at all. Also is the debugging terminal (with debug print statements and all) supported over the swdio and swclk pins?

Most/all errors say "check J-Link" hardware. Is there any reason I have to program blinky 3 times to get it to work? Would it be related to not being able to program more complicated examples? I can provide board gerbers, photos, etc. if they would be helpful. I'm quite stumped so any help would be much appreciated!

Kindest regards,

Ryan

Parents
  • If the target board is an nRF52832 you can use pca10040, if it's an nRF52840 you can use pca10056.

    The electrical pin-out in the case you link to seems correct, so I don't understand why you have such problems programming the external board containing nRF52840. Maybe you can just double check that VDD on the external board is 3-3.3V? I suspect some sort of electrical problem, but what version is your command line tool? E.g. type 'nrfjprog --version' in a command window. Make sure "pin reset" pin P0.18 is logic high, in case it's enabled.

    Kenneth

  • Kenneth, you genius. 

    It was ultimately that the external board was not getting enough power. VDD on the external board at first was 2.7V because the battery I was using had lost its charge during testing. Though when I replaced the battery it still wasn't programming properly! Turns out the battery was just too small to begin with. Once I hooked up a DC supply I realized our board needed more than 400 mA and we had a 300 mA battery! I will be testing this with larger batteries to see if they work.

    Thank you for your help, Kenneth!

Reply
  • Kenneth, you genius. 

    It was ultimately that the external board was not getting enough power. VDD on the external board at first was 2.7V because the battery I was using had lost its charge during testing. Though when I replaced the battery it still wasn't programming properly! Turns out the battery was just too small to begin with. Once I hooked up a DC supply I realized our board needed more than 400 mA and we had a 300 mA battery! I will be testing this with larger batteries to see if they work.

    Thank you for your help, Kenneth!

Children
No Data
Related