This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Is it possible to select the debug port used on the nRF52 DK?

If I understand the nRF52 DK, there's 3 physical debug-out ports on the board. One if for the nRF52 on the DK, which is also brought out through P5. The second one is brought out through P20, and the last one is brought out through P19.

Is there a way to programatically select which one is used during programming? I'm looking for a way to program the nRF52 that's on the DK or an external device connected via P19 with a PPK attached. We're trying to setup a nightly power consumption test, and having everything running through 1 nRF52 DK is enticing.

  • Hi Curtis,

    P5 isn't connected to any debugging interface (unless you map some debugging in nRF52 chip through the FW loaded to it). DK board itself has 3 JTAG/SWD interface connected to SEGGER J-Link OB FW (residing on the "big" Atmel MCU in the center of the board):

    1. Internal wiring on PCB which goes to nRF52 chip on the Dev Kit.
    2. P20 for external flashing.
    3. P19 for external flashing.

    Plus there is P18 for debugging of on-board nRF52 chip (in case that you want to use external debugger not SEGGER J-Link on the DK). Now each time you connect SEGGER tools (or something else which uses SEGGER J-Link DLLs and drivers) to this SEGGER J-Link OB over USB it does check of JTAG/SWD interfaces according to chapter 5.10 of nRF52 DK User Guide:

    • If target power (3V3) is detected on P19 (= some board is attached and powered) it uses that as target, nothing is sent to P20 or internal nRF52 chip.
    • If nothing detected on P19 but target power is visible on P20 then it targets this interface (not the internal nRF52 chip).
    • If P19 and P20 seems to be unpowered then SEGGER J-Link OB target's built-in nRF52 chip on the board.

    So you can set up your debugging/automated build system as you need, just make sure that proper interfaces are powered and connected. If you have any problem with P19 or P20 just look to the User Guide or search on this forum, multiple questions were answered on this topic.

    Cheers Jan

Related