nRF5340DK: Application Only Runs Once After Flashing on New PC

I am developing using the nRF5340DK with Segger v5.68 and SDK within toolchain v1.9.1. My project works perfectly on my old PC, but after moving to a new PC with the exact same project configuration, I encountered the following issue:

  • After flashing and running the application via Segger, the program only executes once.
  • Subsequent resets (either via power cycling or pressing the reset button) do not restart the application.
  • When I copy the project back to my old PC, it works normally.

I have verified that the tools, project files, and dependencies are identical on both machines. Could this be related to driver configuration, toolchain setup, or hardware-specific behavior on the new PC? Any suggestions for troubleshooting would be greatly appreciated.

Environment Details:

  • Old PC (Working): Windows 10, Segger v5.68, SDK & toolchain v1.9.1.
  • New PC (Issue): Windows 11, Segger v5.68, SDK & toolchain v1.9.1.
  • Hardware: nRF5340DK (same board used on both PCs).

Steps Taken:

  1. Re-flashed the application multiple times via Segger.
  2. Verified J-Link drivers are installed and functioning on the new PC.
  3. Tried manual power resets and board reset buttons.
  4. Cross-checked project settings (build configurations, linker scripts).

Observations:

  • The application runs flawlessly on the first boot after flashing.
  • No errors are reported during flashing or compilation.

Could this be a firmware/hardware lock or a configuration conflict specific to the new environment?

Thank you for your help!

  • Follow up: 
    When I manually cleared the flash of the nRF5340DK and confirmed the memory was erased using Programmer, I then flashed a new program on the new PC and encountered the following issue in Segger debug mode:

    As supplementary information, hoping to serve as clues for troubleshooting the issue.

  • Hello,

    Can you please post a screenshot of your entire SES window after you have built your application project? I am particularly interested in the "Memory Usage" tab:

    But include it all, in case there is something else that I didn't think of.

    Best regards,

    Edvin

  • Thank you for your reply!

    This is the screenshot:

    Regards,
    Lingfeng

  • Hello Lingfeng,

    Thank you. Ok, it looks fine. Wanted to check the address ranges, but they look correct. 

    I realized now that you are using NCS, and not the nRF5 SDK (it was obvious, but I didn't notice that you were using the nRF5340). 

    The support for Segger Embedded Studio was pulled a long time ago. I really recommend that you check out VS Code. 

    That being said. Do you have the same version of JLink installed on both computers?

    Can you please try to use nrfjprog (nRF Command Line Tools) and the commands:

    nrfjprog --program <path to application core .hex file>.hex --verify --sectorerase

    What does that return?

    I believe you can see the path to the .hex file the first time you flash, if you expand the flash log in your screenshot.

    Best regards,

    Edvin

  • Thank you. I apologize for my late reply.

    This is the return:

    C:\nrf53_project\nfr5340_sdk_1.9.1_workbench>nrfjprog --program build_nrf5340dk_nrf5340_cpuapp\zephyr\zephyr.hex --verify --sectorerase
    [ #################### ]   3.879s | Erase file - Done erasing
    [ #################### ]   0.807s | Program file - Done programming
    [ #################### ]   0.808s | Verify file - Done verifying


    I checked the version of JLink, which is different. The old PC was using V7.58b while the new PC is using V7.94i. But after I reinstalled the JLink V7.58b on my new PC, the problem still remains.

    By the way, I tried to CLEAN THE SOLUTION and got an error report:

    I wonder if this could be a clue.

    Thanks for your advice and I will try to use VS Code.

    Best regards,

    Lingfeng

Related