1.. _circuitdojo_feather_nrf9160:
2
3nRF9160 Feather
4###############
5
6.. figure:: img/circuitdojo_feather_nrf9160.jpg
7     :align: center
8     :alt: Circuit Dojo nRF9160 Feather
9
10     nRF9160 Feather (Credit: Circuit Dojo)
11
12Overview
13********
14
15The nRF9160 Feather by Circuit Dojo is a single-board development
16for bringing your LTE-M and NB-IoT applications to life. The circuitdojo_feather_nrf9160
17board configuration leverages the pre-existing support for the Nordic Semiconductor
18nRF9160. Supported nRF9160 peripherals include:
19
20* :abbr:`ADC (Analog to Digital Converter)`
21* CLOCK
22* FLASH
23* :abbr:`GPIO (General Purpose Input Output)`
24* :abbr:`I2C (Inter-Integrated Circuit)`
25* :abbr:`MPU (Memory Protection Unit)`
26* :abbr:`NVIC (Nested Vectored Interrupt Controller)`
27* :abbr:`PWM (Pulse Width Modulation)`
28* :abbr:`RTC (nRF RTC System Clock)`
29* Segger RTT (RTT Console)
30* :abbr:`SPI (Serial Peripheral Interface)`
31* :abbr:`UARTE (Universal asynchronous receiver-transmitter with EasyDMA)`
32* :abbr:`WDT (Watchdog Timer)`
33* :abbr:`IDAU (Implementation Defined Attribution Unit)`
34
35More information about the board can be found at the
36`nRF9160 Feather Documentation`_.
37
38
39Hardware
40********
41
42.. figure:: img/nrf9160-feather-v31-features.jpg
43   :align: center
44   :alt: nRF9160 Feather Features
45
46Connections and IOs
47===================
48
49The nRF9160 Feather has everything you know and love about
50the Feather platform. Here are some of the highlights:
51
52LED
53---
54
55* D7 (blue) = P0.03
56
57Push buttons and Switches
58-------------------------
59
60* MODE = P0.12
61* RESET
62
63USB
64---
65
66Contains a USB/UART connection for both debugging and loading new
67code using a UART Enabled MCUBoot.
68
69Standard Battery Connection
70----------------------------
71
72The nRF9160 Feather has a 2 pin battery connector on board. Lithium Polymer batteries >
73300mA required.
74
75Nano SIM Holder
76---------------
77
78The nRF9160 Feather has a built-in nano SIM (4FF) holder located
79on the bottom side.
80
81
82Programming and Debugging
83*************************
84
85circuitdojo_feather_nrf9160 has a Tag Connect TC2030-CTX-NL. It can be used
86by most programmers like:
87
88* J-Link (the nRF53-DK is recommended)
89* CMSIS-DAP based programmers
90
91Check out `Getting Started`_ for more info.
92
93Building an application
94=======================
95
96In most cases you'll want to use the ``ns`` target with any of the Zephyr
97or Nordic based examples.
98
99.. note::
100   Trusted Firmware-M (TF-M) and building the ``ns`` target is not supported for this board.
101
102Some of the examples do not use secure mode, so they do not require the
103``ns`` suffix. A great example of this is the ``hello_world`` below.
104
105Flashing
106========
107
108Follow the instructions in the :ref:`nordic_segger` page to install
109and configure all the necessary software. Further information can be
110found in :ref:`nordic_segger_flashing`. Then build and flash
111applications as usual (see :ref:`build_an_application` and
112:ref:`application_run` for more details).
113
114Here is an example for the :zephyr:code-sample:`hello_world` application.
115
116First, run your favorite terminal program to listen for output.
117
118.. code-block:: console
119
120   $ screen /dev/<tty_device> 115200
121
122Replace :code:`<tty_device>` with the port where the nRF9160 Feather
123can be found. In most cases (On Linux/Mac) it will be: :code:`/dev/tty.SLAB_USBtoUART`.
124
125Then build and flash the application in the usual way.
126
127.. zephyr-app-commands::
128   :zephyr-app: samples/hello_world
129   :board: circuitdojo_feather_nrf9160
130   :goals: build flash
131
132Debugging
133=========
134
135Refer to the :ref:`nordic_segger` page to learn about debugging Nordic boards with a
136Segger IC.
137
138
139Testing the LEDs and buttons on the nRF9160 Feather
140***************************************************
141
142There are 2 samples that allow you to test that the buttons (switches) and LEDs on
143the board are working properly with Zephyr:
144
145* :zephyr:code-sample:`blinky`
146* :zephyr:code-sample:`button`
147
148You can build and flash the examples to make sure Zephyr is running correctly on
149your board. The button and LED definitions can be found in
150:zephyr_file:`boards/circuitdojo/feather/circuitdojo_feather_nrf9160_common.dtsi`.
151
152References
153**********
154
155.. target-notes::
156
157**Side note** This page was based on the documentation for the nRF9160 DK. Thanks to Nordic for
158developing a great platform!
159
160.. _nRF9160 Feather Documentation: https://docs.jaredwolff.com/nrf9160-introduction.html
161.. _Getting Started: https://docs.jaredwolff.com/nrf9160-getting-started.html
162