🛠 Utiliser le DK comme sonde J-Link pour une cible externe

nRF52833-DK (boards.json id: nrf52833-dk) · intermediaire · Le kit double d'emploi : sa sortie Debug (P19/P20) programme et déboque vos propres cartes nRF51/nRF52 — avec autodétection de tension.

The idea

The nRF52833-DK's interface MCU is a SEGGER J-Link OB — and the User Guide specifies that it unlocks/programs not only the onboard SoC, but also external targets via the Debug output on connector P19, as well as via the shield connector P20, with target voltage auto-detection. For ~$49 USD, the kit also acts as a J-Link probe: valuable when designing your own nRF52 board and not yet having an official J-Link.

Step 1 — Wiring the target

On P19 (and the SWD pins of the shield connector P20), connect to your board: SWDIO, SWCLK, GND, and whatever is needed to power/probe the target. The kit detects the target voltage; power your board with its own source or via the kit depending on its current requirements. Keep the SWD traces short, and provide a RESET line on the target (on nRF52s, P0.18 is a simple GPIO pin out of the factory — see below).

Step 2 — Programming the target

nrfjprog --ids                      # la sonde voit-elle la cible ?
nrfjprog --program firmware.hex --chiperase -f
nrfjprog --reboot

On the SEGGER side: JLinkExe -if SWD -device nrf52 -speed 4000 (J-Link software v6.52+ is the minimum required by the kit's User Guide). On the Zephyr side: west flash --runner jlink with the target connected to the probe. On the GDB side: JLinkGDBServer exposes a standard GDB server.

Step 3 — The three pin traps that waste hours

The DK's User Guide documents them for the kit's SoC; they are exactly the same for your target board:

  1. Reset = GPIO by default. As long as the reset pin is not configured, the RST line does nothing. On the kit: Kconfig CONFIG_GPIO_AS_PINRESET or, via tool, nrfjprog --pinresetenable. Do this on the target during the first flash, otherwise reliable hardware reset is lost.
  2. NFC consumes P0.09/P0.10. These pins remain dedicated to NFC unless CONFIG_NFCT_PINS_AS_GPIOS is enabled — it is impossible to use them as GPIO or UART without this setting.
  3. P0.00/P0.01 are taken by the 32.768 kHz crystal (reserved by default for X2 on the kit) — do not plan them as application GPIO, especially if your design targets ANT/ANT+ which requires this crystal.

Step 4 — Added comfort

Limitations

The J-Link OB is an entry-level probe: reduced SWD throughput and features compared to a J-Link Plus, and the interface firmware is updated via SEGGER/Nordic utilities. For validating a first nRF52 prototype, it is more than sufficient.

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials