1.. zephyr:board:: adafruit_feather_nrf52840
2
3Overview
4********
5
6The Adafruit Feather nRF52840 provides support for the Nordic Semiconductor
7nRF52840 ARM Cortex-M4F CPU and the following devices:
8
9* :abbr:`ADC (Analog to Digital Converter)`
10* CLOCK
11* FLASH
12* :abbr:`GPIO (General Purpose Input Output)`
13* :abbr:`I2C (Inter-Integrated Circuit)`
14* :abbr:`MPU (Memory Protection Unit)`
15* :abbr:`NVIC (Nested Vectored Interrupt Controller)`
16* :abbr:`PWM (Pulse Width Modulation)`
17* RADIO (Bluetooth Low Energy and 802.15.4)
18* :abbr:`RTC (nRF RTC System Clock)`
19* Segger RTT (RTT Console)
20* :abbr:`SPI (Serial Peripheral Interface)`
21* :abbr:`UART (Universal asynchronous receiver-transmitter)`
22* :abbr:`USB (Universal Serial Bus)`
23* :abbr:`WDT (Watchdog Timer)`
24
25.. tabs::
26
27   .. group-tab:: Express
28
29      .. figure:: img/adafruit_feather_nrf52840_express.jpg
30           :align: center
31           :alt: Adafruit Feather nRF52840 Express
32
33   .. group-tab:: Sense
34
35      .. figure:: img/adafruit_feather_nrf52840_sense.jpg
36           :align: center
37           :alt: Adafruit Feather nRF52840 Sense
38
39Hardware
40********
41
42- nRF52840 ARM Cortex-M4F processor at 64 MHz
43- 1 MB flash memory and 256 KB of SRAM
44- Battery connector and charger for 3.7 V lithium polymer batteries
45- Charging indicator LED
46- 2 User LEDs
47- 1 NeoPixel LED
48- Reset button
49- SWD connector (Express only)
50- SWD solder pads on bottom of PCB (Sense only)
51- LSM6DS33 Accel/Gyro (Sense only)
52- LIS3MDL magnetometer (Sense only)
53- APDS9960 Proximity, Light, Color, and Gesture Sensor (Sense only)
54- MP34DT01-M PDM Microphone sound sensor (Sense only)
55- SHT3X Humidity sensor (Sense only)
56- BMP280 temperature and barometric pressure/altitude (Sense only)
57
58Supported Features
59==================
60
61The Adafruit Feather nRF52840 board configuration supports the
62following hardware features:
63
64+-----------+------------+----------------------+
65| Interface | Controller | Driver/Component     |
66+===========+============+======================+
67| ADC       | on-chip    | adc                  |
68+-----------+------------+----------------------+
69| CLOCK     | on-chip    | clock_control        |
70+-----------+------------+----------------------+
71| FLASH     | on-chip    | flash                |
72+-----------+------------+----------------------+
73| GPIO      | on-chip    | gpio                 |
74+-----------+------------+----------------------+
75| I2C       | on-chip    | i2c                  |
76+-----------+------------+----------------------+
77| MPU       | on-chip    | arch/arm             |
78+-----------+------------+----------------------+
79| NVIC      | on-chip    | arch/arm             |
80+-----------+------------+----------------------+
81| PWM       | on-chip    | pwm                  |
82+-----------+------------+----------------------+
83| RADIO     | on-chip    | Bluetooth,           |
84|           |            | ieee802154           |
85+-----------+------------+----------------------+
86| RTC       | on-chip    | system clock         |
87+-----------+------------+----------------------+
88| SPI       | on-chip    | spi                  |
89+-----------+------------+----------------------+
90| UART      | on-chip    | serial               |
91+-----------+------------+----------------------+
92| USB       | on-chip    | usb                  |
93+-----------+------------+----------------------+
94| WDT       | on-chip    | watchdog             |
95+-----------+------------+----------------------+
96
97Other hardware features have not been enabled yet for this board.
98
99Connections and IOs
100===================
101
102.. tabs::
103
104   .. group-tab:: Express
105
106      The `Adafruit Feather nRF52840 Express Learn site`_ has
107      detailed information about the board including
108      `pinouts (Express)`_ and the `schematic (Express)`_.
109
110   .. group-tab:: Sense
111
112      The `Adafruit Feather nRF52840 Sense Learn site`_ has
113      detailed information about the board including
114      `pinouts (Sense)`_ and the `schematic (Sense)`_.
115
116LED
117---
118
119* LED0 (red) = P1.15 (Express)
120* LED0 (red) = P1.9 (Sense)
121* LED1 (blue) = P1.10
122
123Push buttons
124------------
125
126* SWITCH = P1.02
127* RESET = P0.18
128
129Programming and Debugging
130*************************
131
132Flashing
133========
134
135Flashing Zephyr onto both the Feather nRF52840 Express and Sense is possible
136using the SWD headers. Only the Express board has an SWD connector however.
137
138Both the Feather nRF52840 Express and Sense ship with the `Adafruit nRF52 Bootloader`_
139which supports flashing using `UF2`_. This allows easy flashing of new images,
140but does not support debugging the device.
141
142#. Build the Zephyr kernel and the :zephyr:code-sample:`blinky` sample application.
143
144.. tabs::
145
146   .. group-tab:: Express
147
148      .. zephyr-app-commands::
149         :zephyr-app: samples/basic/blinky
150         :board: adafruit_feather_nrf52840
151         :goals: build
152         :compact:
153
154   .. group-tab:: Express UF2
155
156      .. zephyr-app-commands::
157         :zephyr-app: samples/basic/blinky
158         :board: adafruit_feather_nrf52840/nrf52840/uf2
159         :goals: build
160         :compact:
161
162   .. group-tab:: Sense
163
164      .. zephyr-app-commands::
165         :zephyr-app: samples/basic/blinky
166         :board: adafruit_feather_nrf52840/nrf52840/sense
167         :goals: build
168         :compact:
169
170   .. group-tab:: Sense UF2
171
172      .. zephyr-app-commands::
173         :zephyr-app: samples/basic/blinky
174         :board: adafruit_feather_nrf52840/nrf52840/sense/uf2
175         :goals: build
176         :compact:
177
178#. If using UF2, connect the board to your host computer using USB.
179
180#. Tap the reset button twice quickly to enter bootloader mode.
181   A mass storage device named ``FTHR840BOOT`` for (Express) or
182   ``FTHRSNSBOOT`` (Sense) should appear on the host. Ensure this is
183   mounted.
184
185#. Flash the image.
186
187.. tabs::
188
189   .. group-tab:: Express
190
191      .. zephyr-app-commands::
192         :zephyr-app: samples/basic/blinky
193         :board: adafruit_feather_nrf52840
194         :goals: flash
195         :compact:
196
197   .. group-tab:: Express UF2
198
199      .. zephyr-app-commands::
200         :zephyr-app: samples/basic/blinky
201         :board: adafruit_feather_nrf52840/nrf52840/uf2
202         :goals: flash
203         :compact:
204
205
206   .. group-tab:: Sense
207
208      .. zephyr-app-commands::
209         :zephyr-app: samples/basic/blinky
210         :board: adafruit_feather_nrf52840/nrf52840/sense
211         :goals: flash
212         :compact:
213
214   .. group-tab:: Sense UF2
215
216      .. zephyr-app-commands::
217         :zephyr-app: samples/basic/blinky
218         :board: adafruit_feather_nrf52840/nrf52840/sense/uf2
219         :goals: flash
220         :compact:
221
222#. You should see the red LED blink.
223
224References
225**********
226
227.. target-notes::
228
229.. _Adafruit Feather nRF52840 Express Learn site:
230    https://learn.adafruit.com/introducing-the-adafruit-nrf52840-feather/
231
232.. _pinouts (Express):
233    https://learn.adafruit.com/introducing-the-adafruit-nrf52840-feather/pinouts
234
235.. _schematic (Express):
236    https://learn.adafruit.com/introducing-the-adafruit-nrf52840-feather/downloads
237
238.. _Adafruit Feather nRF52840 Sense Learn site:
239    https://learn.adafruit.com/adafruit-feather-sense
240
241.. _pinouts (Sense):
242    https://learn.adafruit.com/adafruit-feather-sense/pinouts
243
244.. _schematic (Sense):
245    https://learn.adafruit.com/adafruit-feather-sense/downloads
246
247.. _Adafruit nRF52 Bootloader:
248    https://github.com/adafruit/Adafruit_nRF52_Bootloader
249
250.. _UF2:
251    https://github.com/microsoft/uf2
252