|
| 1 | +.. _programming_custom_board: |
| 2 | + |
| 3 | +Connecting custom boards for programming |
| 4 | +######################################## |
| 5 | + |
| 6 | +.. contents:: |
| 7 | + :local: |
| 8 | + :depth: 2 |
| 9 | + |
| 10 | +After you :ref:`created custom board files <defining_custom_board>`, you need to connect your custom board to a debug probe for programming. |
| 11 | + |
| 12 | +Hardware requirements |
| 13 | +********************* |
| 14 | + |
| 15 | +To connect a custom board for programming, you need the following hardware: |
| 16 | + |
| 17 | +* A debug probe supporting Serial Wire Debug (SWD), such as: |
| 18 | + |
| 19 | + * A Development Kit (DK) from Nordic Semiconductor (all include an onboard debug probe) |
| 20 | + * Dedicated debug adapter (like SEGGER J-Link) |
| 21 | + |
| 22 | +* Connecting wires |
| 23 | +* USB cable for the DK or the debug adapter |
| 24 | + |
| 25 | +Required connections |
| 26 | +******************** |
| 27 | + |
| 28 | +You have to connect the following pins between your custom board and the debug probe: |
| 29 | + |
| 30 | +* Essential connections: |
| 31 | + |
| 32 | + * SWDCLK (Clock) |
| 33 | + * SWDIO (Data) |
| 34 | + * GND (Ground) |
| 35 | + * VTref (Target Reference Voltage) |
| 36 | + |
| 37 | +* Optional connections: |
| 38 | + |
| 39 | + * VDD - For powering the board from debug probe. |
| 40 | + If the custom board is not powered from VDD, it must be powered externally. |
| 41 | + * RESET - For resetting the board. |
| 42 | + If the custom board does not have a reset pin, you can use the reset pin on the debug probe. |
| 43 | + |
| 44 | +Connecting the debug probe |
| 45 | +************************** |
| 46 | + |
| 47 | +The following steps describe how to connect your custom board to a debug probe. |
| 48 | + |
| 49 | +.. tabs:: |
| 50 | + |
| 51 | + .. group-tab:: Using a DK as debug probe |
| 52 | + |
| 53 | + Development Kits from Nordic Semiconductor include an onboard debug probe that supports the J-Link interface. |
| 54 | + |
| 55 | + To connect your custom board to this onboard debug probe, complete the following steps: |
| 56 | + |
| 57 | + 1. Locate the SWD debug output header pins on your DK. |
| 58 | + Check the DK user guide on `Nordic Semiconductor TechDocs`_ for the exact location of these pins. |
| 59 | + For example, for the nRF52840 DK, read the `Debug output <nRF52840 DK Debug output_>`_ page. |
| 60 | + #. Connect the required pins to your custom board. |
| 61 | + #. Connect the DK to your PC using the USB cable. |
| 62 | + #. Install required J-Link drivers if not already present. |
| 63 | + |
| 64 | + .. group-tab:: Using a dedicated debug adapter |
| 65 | + |
| 66 | + If you do not have a Development Kit, use a dedicated debug adapter: |
| 67 | + |
| 68 | + 1. Connect a compatible debug probe (like SEGGER J-Link) to your custom board. |
| 69 | + See the debug probe documentation for the exact pinout. |
| 70 | + #. Install the appropriate debug interface drivers. |
| 71 | + #. Connect the debug probe to your PC using the USB cable. |
| 72 | + |
| 73 | +.. note:: |
| 74 | + The |NCS| supports various debug interfaces like J-Link and CMSIS-DAP, provided you have the proper drivers installed. |
| 75 | + |
| 76 | +Programming custom boards |
| 77 | +************************* |
| 78 | + |
| 79 | +After you connected the custom board, you can program your application to the board using either the :ref:`standard programming instructions <programming>` or the `Programmer app`_ from `nRF Connect for Desktop`_. |
0 commit comments