|
| 1 | +To program a custom board using Nordic Semiconductor chips, you'll need to follow these general steps: |
| 2 | + |
| 3 | +1. Create a custom board definition in the nRF Connect SDK. This involves creating the necessary board files and configurations. |
| 4 | + |
| 5 | +2. Set up the hardware connections for programming. You'll need to connect the custom board to a debug probe that supports SWD (Serial Wire Debug) interface. |
| 6 | + |
| 7 | +3. Use the nRF Connect Programmer app or other compatible programming tools to flash your application to the custom board. |
| 8 | + |
| 9 | +Here's a more detailed breakdown: |
| 10 | + |
| 11 | +1. Creating a custom board definition: |
| 12 | + - Create a new directory for your custom board files |
| 13 | + - Define the board in the necessary files (devicetree, Kconfig, etc.) |
| 14 | + - Point the build system to your custom board root directory |
| 15 | + |
| 16 | + You can find detailed instructions on creating custom board files in the [nRF Connect SDK Intermediate course](https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-3-adding-custom-board-support/). |
| 17 | + |
| 18 | +2. Hardware connections: |
| 19 | + Connect your custom board to a debug probe (like a Development Kit or a dedicated debug adapter) using the SWD interface. The typical connections needed are: |
| 20 | + - SWDCLK |
| 21 | + - SWDIO |
| 22 | + - GND |
| 23 | + - VDD (optional, for powering the board) |
| 24 | + - RESET (optional) |
| 25 | + |
| 26 | + Programming and debugging the nRF5x on our Developments kits is straight forward. Doing the same when you are using other boards might not be so easy. In this blog post we will explain which components are needed in order to program and debug a nRF5x chip. |
| 27 | + |
| 28 | + The nRF chip is connected to a Debug unit through an interface called "Serial Wire Debug", or "SWD" for short. The debug unit acts as a bridge between the chip and your PC. It communicates with the programming and debugging software on your PC through a “Debug interface”. Your PC must have a driver for the debug unit and debug interface you are using. The driver allows your PC to recognize the debug unit, and allows communication between them over USB. |
| 29 | + |
| 30 | + When developing applications on a nRF5x Development Kit, you can program it by simply connecting it to your PC with a USB cable. This is possible because the Development Kit has an on-board debug unit supporting the JLINK debug interface. |
| 31 | + |
| 32 | + Since the on-board debug unit is able to program and debug the on-board chip, it is also able to program any other nRF5x chip. The Development Kit has headers where you can access the Serial Wire Debug pins. The video below describes how connect these headers to a custom board. You can also see section 5.1 of the nRF51 User Guide for more information about the debug out headers. |
| 33 | + |
| 34 | + If you do not have a nRF5x Development Kit, you can always use a dedicated debug adapter. There exist several manufacturers and debug interfaces. With the nRF5x series, it is common to use JLINK debug adapters from Segger. You can also use debug units using other debug interfaces like the CMSIS-DAP interface, as long as you have the proper drivers and software on your PC. If you are having any problems, stop by our Developer Zone forum or support portal, where my colleagues and I will do our best to help you out. |
| 35 | + |
| 36 | +3. Programming: |
| 37 | + Use the nRF Connect Programmer app to flash your application. The general steps are: |
| 38 | + - Open nRF Connect for Desktop and launch the Programmer app |
| 39 | + - Connect your board and select it from the device list |
| 40 | + - Add your application's HEX file |
| 41 | + - Click "Write" to program the board |
| 42 | + |
| 43 | + Detailed instructions can be found in the [Programming devices documentation](https://docs.nordicsemi.com/bundle/nrf-connect-programmer/page/programming_dk.html#programming-devices). |
| 44 | + |
| 45 | +Remember to ensure that your custom board is properly powered and that all connections are secure before attempting to program it. |
| 46 | + |
| 47 | +If you encounter any issues during programming, try restarting the Programmer app (Ctrl+R or Command+R on macOS) and attempt the programming process again. |
0 commit comments