How to use nrf52840DK and vscode extention to flash external board?

Hi

I am attempting to flash firmware onto a custom board with an nRF52832 chip using an nRF52840 DK (v3.0.1) as the debugger and the "nRF Connect" extension on VS Code. However, I am unable to detect the custom board under "connected devices" in VS Code, and the flashing process does not work.

Here is the P19 debug connector on my DK:

nRF52840DK_P19

Here is the SWD connector of my target board I want to flash firmware to:
target_board_SWD connector

Setup Details

Here is the setup I used to connect the P19 Debug Out connector on the nRF52840 DK to the SWD connector on the custom board:

Pin Num

nRF52840 DK

P19 Connector

Custom Board

SWD connector

Comments

1

SB19,

SB47

3V3

Custom board has its own power supply(3.3V) and doesn't need DK to provide VDD, so SB47 is not connected

Custom board need to provide the debugger with its voltage reference, so SB19 is connected

2

SWDIO

SWDIO

3

SWD0_SEL

GND

SWD0_SEL need to be set to logic HIGH to enable SWD0 to be used for flashing the custom board, so we cut the cable and connect P19 pin3 to VDD_nRF (P20 pin1)

4

SWDCLK

SEDCLK

5

GND

GND

6

SWO

Not Connected

7

Not Connected

Not Connected

8

Not Connected

Not Connected

9

Not Connected

GND

10

RESET

RESET

Power Sequence

With everything disconnected, I followed this sequence:

  1. Set SW6 to "nRF ONLY" to isolate the debugger from the onboard nRF52840 MCU.
  2. Set SW8 to OFF and SW9 to VDD.
  3. Connect the cable between the DK and the custom board. (SWD0_SEL is connected to VDD_nRF which is 3V)
  4. Supply power to the custom board (3.3V).
  5. connect DK IMCU_USB to a PC running Windows 11 
  6. Turn on the DK by setting SW8 to ON.

Observations

At this point, I expected the custom board serial number to show up under "connected devices" in the VS Code extension, but it did not.

To verify the VS Code setup and the cable connection, I disconnected the cable between the DK and the custom board and switched SW6 to "DEFAULT". In this configuration, the "nRF52840 DK" showed up under "connected devices."

What I've Tried

  • Verified all connections between the DK and the custom board multiple times.
  • Read the nRF52840 DK documentation, forum posts, and related materials.
  • Confirmed the custom board is powered and provides a stable 3.3V reference to the DK.
  • Verified the SWD0_SEL logic level is high to enable SWD0 for debugging the external board.

Questions

  1. Why is my custom board not showing up under "connected devices" in VS Code?
  2. Is my configuration for the P19 Debug Out connector correct for this use case?
  3. Are there additional steps or configurations I need to follow to enable flashing an external board?

This issue has become a significant hurdle for our project. Any guidance or suggestions would be greatly appreciated!

Related