|
| 1 | +.. _nrf52840_pca10056: |
| 2 | + |
| 3 | +nRF52840-PCA10056 |
| 4 | +################# |
| 5 | + |
| 6 | +Overview |
| 7 | +******** |
| 8 | + |
| 9 | +Zephyr applications use the nrf52840_pca10056 board configuration |
| 10 | +to run on the nRF52840 Preview Development Kit (PCA10056) hardware. It provides |
| 11 | +support for the Nordic Semiconductor nRF52840 ARM Cortex-M4F CPU and |
| 12 | +the following devices: |
| 13 | + |
| 14 | +* :abbr:`NVIC (Nested Vectored Interrupt Controller)` |
| 15 | +* :abbr:`RTC (nRF RTC System Clock)` |
| 16 | +* UART |
| 17 | +* GPIO |
| 18 | +* FLASH |
| 19 | +* RADIO (Bluetooth Low Energy) |
| 20 | +* Segger RTT (RTT Console) |
| 21 | + |
| 22 | +.. figure:: img/nrf52840_pca10056.jpg |
| 23 | + :width: 442px |
| 24 | + :align: center |
| 25 | + :alt: nRF52840 PCA10056 Preview DK |
| 26 | + |
| 27 | + nRF52840 PCA10056 Preview DK (Credit: Nordic Semi) |
| 28 | + |
| 29 | +More information about the board can be found at the |
| 30 | +`nRF52840 PDK website`_. The `Nordic Semiconductor Infocenter`_ |
| 31 | +contains the processor's information and the datasheet. |
| 32 | + |
| 33 | +Hardware |
| 34 | +******** |
| 35 | + |
| 36 | +nRF52840 PDK has two external oscillators. The frequency of |
| 37 | +the slow clock is 32.768 kHz. The frequency of the main clock |
| 38 | +is 32 MHz. |
| 39 | + |
| 40 | +Supported Features |
| 41 | +================== |
| 42 | + |
| 43 | +The nrf52840_pca10056 board configuration supports the following |
| 44 | +hardware features: |
| 45 | + |
| 46 | ++-----------+------------+----------------------+ |
| 47 | +| Interface | Controller | Driver/Component | |
| 48 | ++===========+============+======================+ |
| 49 | +| NVIC | on-chip | nested vectored | |
| 50 | +| | | interrupt controller | |
| 51 | ++-----------+------------+----------------------+ |
| 52 | +| RTC | on-chip | system clock | |
| 53 | ++-----------+------------+----------------------+ |
| 54 | +| UART | on-chip | serial port | |
| 55 | ++-----------+------------+----------------------+ |
| 56 | +| GPIO | on-chip | gpio | |
| 57 | ++-----------+------------+----------------------+ |
| 58 | +| FLASH | on-chip | flash | |
| 59 | ++-----------+------------+----------------------+ |
| 60 | +| RADIO | on-chip | bluetooth | |
| 61 | ++-----------+------------+----------------------+ |
| 62 | +| RTT | on-chip | console | |
| 63 | ++-----------+------------+----------------------+ |
| 64 | + |
| 65 | +Other hardware features are not supported by the Zephyr kernel. |
| 66 | +See `nRF52840 PDK website`_ and `Nordic Semiconductor Infocenter`_ |
| 67 | +for a complete list of nRF52840 Development Kit board hardware features. |
| 68 | + |
| 69 | +Connections and IOs |
| 70 | +=================== |
| 71 | + |
| 72 | +LED |
| 73 | +--- |
| 74 | + |
| 75 | +* LED1 (green) = P0.13 |
| 76 | +* LED2 (green) = P0.14 |
| 77 | +* LED3 (green) = P0.15 |
| 78 | +* LED4 (green) = P0.16 |
| 79 | + |
| 80 | +Push buttons |
| 81 | +------------ |
| 82 | + |
| 83 | +* BUTTON1 = SW1 = P0.11 |
| 84 | +* BUTTON2 = SW2 = P0.12 |
| 85 | +* BUTTON3 = SW3 = P0.24 |
| 86 | +* BUTTON4 = SW4 = P0.25 |
| 87 | +* BOOT = SW5 = boot/reset |
| 88 | + |
| 89 | +Programming and Debugging |
| 90 | +************************* |
| 91 | + |
| 92 | +Flashing |
| 93 | +======== |
| 94 | + |
| 95 | +Follow the instructions in the :ref:`nordic_segger` page to install and configure |
| 96 | +all the necessary software. |
| 97 | + |
| 98 | +This tutorial uses the sample application |
| 99 | +shell :file:`$ZEPHYR_BASE/samples/shell`, and uses the information that can be found in |
| 100 | +:ref:`nordic_segger_flashing`. |
| 101 | + |
| 102 | +#. To build the Zephyr kernel, enter: |
| 103 | + |
| 104 | + .. code-block:: console |
| 105 | +
|
| 106 | + $ cd $ZEPHYR_BASE |
| 107 | + $ make -C samples/shell BOARD=nrf52840_pca10056 |
| 108 | +
|
| 109 | +#. Connect the micro-USB cable to the nRF52840 PDK and to your computer. |
| 110 | + |
| 111 | +#. Erase the flash memory in the nRF52840: |
| 112 | + |
| 113 | + .. code-block:: console |
| 114 | +
|
| 115 | + $ nrfjprog --eraseall -f nrf52 |
| 116 | +
|
| 117 | +#. Flash the application using the nrfjprog tool: |
| 118 | + |
| 119 | + .. code-block:: console |
| 120 | +
|
| 121 | + $ nrfjprog --program outdir/zephyr.hex -f nrf52 |
| 122 | +
|
| 123 | +#. Run your favorite terminal program to listen for output. |
| 124 | + |
| 125 | + .. code-block:: console |
| 126 | +
|
| 127 | + $ minicom -D <tty_device> -b 115200 |
| 128 | +
|
| 129 | + Replace :code:`<tty_device>` with the port where the board |
| 130 | + nRF52840 PDK can be found. For example, under Linux, |
| 131 | + :code:`/dev/ttyACM0`. |
| 132 | + |
| 133 | + The ``-b`` option sets baudrate ignoring the value |
| 134 | + from config. |
| 135 | + |
| 136 | +#. Press the Reset button and you should see the output of |
| 137 | + shell application in your terminal. |
| 138 | + |
| 139 | +Debugging |
| 140 | +========= |
| 141 | + |
| 142 | +Refer to the :ref:`nordic_segger` page to learn about debugging Nordic boards with a |
| 143 | +Segger IC. |
| 144 | + |
| 145 | + |
| 146 | +Testing the LEDs and buttons in the nRF52840 PDK |
| 147 | +************************************************ |
| 148 | + |
| 149 | +There are 2 samples that allow you to test that the buttons (switches) and LEDs on |
| 150 | +the board are working properly with Zephyr: |
| 151 | + |
| 152 | +.. code-block:: console |
| 153 | +
|
| 154 | + samples/basic/blinky |
| 155 | + samples/basic/button |
| 156 | +
|
| 157 | +You can build and flash the examples to make sure Zephyr is running correctly on |
| 158 | +your board. The button and LED definitions can be found in :file:`boards/arm/nrf52840_pca10056/board.h`. |
| 159 | + |
| 160 | + |
| 161 | +References |
| 162 | +********** |
| 163 | + |
| 164 | +.. target-notes:: |
| 165 | + |
| 166 | +.. _nRF52840 PDK website: http://www.nordicsemi.com/eng/Products/nRF52840-Preview-DK |
| 167 | +.. _Nordic Semiconductor Infocenter: http://infocenter.nordicsemi.com/ |
| 168 | +.. _J-Link Software and documentation pack: https://www.segger.com/jlink-software.html |
| 169 | + |
0 commit comments