NRF52840 Custom Board - program only runs when debugging

Hi,

I am working with a nRF52840 on a custom board, and I am running into an issue where the firmware will only run on the custom board if I use the "debug" option in VS Code, but not when using the "flash" or "erase and flash" options in VS Code or nRF Connect Programmer. The code also will not run upon powering on the custom board. I've seen the same behavior with a few different firmware projects (including some of the example projects) so I don't think the issue is related to the firmware code. When using the "debug" option in VS Code, the code automatically hits a breakpoint (which I haven't set), then I click continue, then the code runs like normal. I have no issue running any of these projects on my nRF52840-DK with the "flash" option.

I have the custom board connected to a nRF52840-DK using the setup detailed here: Nordic Semiconductor Infocenter

I am using nRF Connect for Desktop (PC) v4.2.0, nRF Connect SDK v2.4.2, nRF Connect for VS Code v2023.11.301. My nRF52840 DK is V3.0.1.

Please let me know if I am hitting any common pitfalls!

Parents Reply
  • Thanks Simonr. I had actually tried that fix initially upon seeing your previous message with no luck. I had the nrf52840dk_nrf52840 board selected for my build configuration (apologies for not mentioning this initially), and I imagine this was locking me into some sort of DCDC or LF crystal configuration that did not match my board. Once switched to a custom board configuration my project is running without the debugger. Thanks!

Children
No Data
Related