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 Children
  • Hey, thank you for the reply. Is the debug configuration the same as the build configuration?

    Also, I may be misunderstanding your comment, but I am not sure that I have any debug configuration issues since I can debug the project on my custom board, in fact this is the only way I can get the project to run on the custom board. Flashing the binary to the custom board seems to work fine during debugging, but the program won't start when I choose the "flash" options instead of the "debug" option.

Related