vscode jlink programming hang on new board

Hi,

I am using NCS v2 with VSCode on Windows 11.

I am using the jlink programmer inside a nRF52840-DK to program a custom board.  Actually, two different custom boards.

My question is about a seeming change in behavior of jlink between the two custom boards with no difference in code or jlink commands.

The jlink is hooked up via SWD.

Boards

Board 1 Board 2
What an nRF52840-based module (a BT840) an nRF52840 directly (replacing the BT840 module)
Chip label N52840
QIAAD0
2202ZR
N52840
QIAAD0
2122DX
nrfjprog --deviceversion NRF52840_xxAA_REV2 NRF52840_xxAA_REV2

Programming

From VSCode, I can use the flash action in nRFConnect extension to flash an example program (eg mass) to Board 1 over and over again with no problems.

* Executing task: nRF Connect: Flash: mass/build (active) 

Flashing build to undefined
west flash -d /home/doug/git/mass/build --skip-rebuild -r jlink --dev-id 683684592

-- west flash: using runner jlink
-- runners.jlink: JLink version: 7.66b
-- runners.jlink: Flashing file: /home/doug/git/mass/build/zephyr/zephyr.hex
 *  Terminal will be reused by tasks, press any key to close it. 

If I do this same action with Board 2, the first works, but then I get an error.

I am able to program it again if I disconnect/re-connect power to the board.

*  Executing task: nRF Connect: Flash: mass/build (active) 

Flashing build to undefined
west flash -d /home/doug/git/mass/build --skip-rebuild -r jlink --dev-id 683684592

-- west flash: using runner jlink
-- runners.jlink: JLink version: 7.66b
-- runners.jlink: Flashing file: /home/doug/git/mass/build/zephyr/zephyr.hex
FATAL ERROR: command exited with status 1: /opt/SEGGER/JLink_V766b/JLinkExe -USB 683684592 -nogui 1 -if swd -speed 4000 -device nRF52840_xxAA -CommanderScript /tmp/tmp3yijixf5jlink/runner.jlink -nogui 1

 *  The terminal process terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

Notably, I tweaked the nRFConnect extension to use the jlink runner because it is WAY faster (you guys should update this to be a configurable option).

Can you help me figure out what is going on?

Thanks.

  • Hi,

    What you describe are symptoms that may be seen if DC/DC is enabled without the proper inductor on the board. The module most likely has the components in place for using DCDC, and CONFIG_BOARD_ENABLE_DCDC is on by default in the SDK. See the reference circuitry for the nRF52840 QIAA for the reference circuitry, and in particular inductor L4 and related circuitry. Either you need this circuitry on the board (for using DCDC) or you must disable DCDC for the project through the aforementioned setting.

    Regarding the jlink runner, thanks for the suggestion! I will forward your observations to the extension development team.

    Regards,
    Terje

Related