1.. zephyr:board:: adafruit_itsybitsy
2
3Overview
4********
5
6The Adafruit ItsyBitsy nRF52840 Express is a small (36 mm x 18 mm) ARM
7development board with an onboard RGB LED, USB port, 2 MB of QSPI flash,
8and range of I/O broken out onto 21 GPIO pins.
9
10This development kit has the following features:
11
12* :abbr:`ADC (Analog to Digital Converter)`
13* CLOCK
14* FLASH
15* :abbr:`GPIO (General Purpose Input Output)`
16* :abbr:`I2C (Inter-Integrated Circuit)`
17* :abbr:`I2S (Inter-Integrated Sound)`
18* :abbr:`MPU (Memory Protection Unit)`
19* :abbr:`NVIC (Nested Vectored Interrupt Controller)`
20* :abbr:`PWM (Pulse Width Modulation)`
21* :abbr:`QSPI (Quad Serial Peripheral Interface)`
22* RADIO (Bluetooth Low Energy and 802.15.4)
23* :abbr:`RTC (nRF RTC System Clock)`
24* :abbr:`SPI (Serial Peripheral Interface)`
25* :abbr:`UARTE (Universal asynchronous receiver-transmitter)`
26* :abbr:`USB (Universal Serial Bus)`
27* :abbr:`WDT (Watchdog Timer)`
28
29Hardware
30********
31- nRF52840 ARM Cortex-M4F CPU at 64MHz
32- 1 MB of flash memory and 256 KB of SRAM
33- 2 MB of QSPI flash
34- A user LED
35- A user switch
36- An RGB DotStar LED
37- Native USB port
38- One reset button
39
40Supported Features
41==================
42
43The Adafruit ItsyBitsy nRF52840 board configuration supports the
44following hardware features:
45
46+-----------+------------+----------------------+
47| Interface | Controller | Driver/Component     |
48+===========+============+======================+
49| ADC       | on-chip    | adc                  |
50+-----------+------------+----------------------+
51| CLOCK     | on-chip    | clock_control        |
52+-----------+------------+----------------------+
53| FLASH     | on-chip    | flash                |
54+-----------+------------+----------------------+
55| GPIO      | on-chip    | gpio                 |
56+-----------+------------+----------------------+
57| I2C       | on-chip    | i2c                  |
58+-----------+------------+----------------------+
59| MPU       | on-chip    | arch/arm             |
60+-----------+------------+----------------------+
61| NVIC      | on-chip    | arch/arm             |
62+-----------+------------+----------------------+
63| PWM       | on-chip    | pwm                  |
64+-----------+------------+----------------------+
65| QSPI(M)   | on-chip    | nor                  |
66+-----------+------------+----------------------+
67| RADIO     | on-chip    | Bluetooth,           |
68|           |            | ieee802154           |
69+-----------+------------+----------------------+
70| RTC       | on-chip    | system clock         |
71+-----------+------------+----------------------+
72| SPI       | on-chip    | spi                  |
73+-----------+------------+----------------------+
74| UARTE     | on-chip    | serial               |
75+-----------+------------+----------------------+
76| USB       | on-chip    | usb                  |
77+-----------+------------+----------------------+
78| WDT       | on-chip    | watchdog             |
79+-----------+------------+----------------------+
80
81Other hardware features have not been enabled yet for this board.
82
83Connections and IOs
84===================
85
86The `Adafruit ItsyBitsy nRF52840 Express Learn site`_ has detailed
87information about the board including `pinouts`_ and the `schematic`_.
88
89LED
90---
91
92* LED0 (red) = P0.06
93
94* LED1 (Adafruit DotStar)
95
96    * DATA = P0.08
97
98    * CLK = P1.09
99
100Push buttons
101------------
102
103* SWITCH = P0.29
104
105* RESET = P0.18
106
107Logging
108-------
109
110Logging is done using the USB-CDC port. See the :zephyr:code-sample:`logging` sample
111or the :zephyr:code-sample:`usb-cdc-acm-console` sample applications to see how this works.
112
113Testing LEDs and buttons on the Adafruit ItsyBitsy nRF52840 Express
114*******************************************************************
115The :zephyr:code-sample:`button` sample lets you test the buttons (switches) and the red LED.
116The :zephyr:code-sample:`blinky` sample lets you test the red LED.
117
118The DotStar LED has been implemented as a SPI device and can be tested
119with the :zephyr:code-sample:`led-strip` sample application.
120
121You can build and flash the examples to make sure Zephyr is running correctly on
122your board. The button and LED definitions can be found in
123:zephyr_file:`boards/adafruit/itsybitsy/adafruit_itsybitsy_nrf52840.dts`.
124
125Programming and Debugging
126*************************
127The ItsyBitsy ships with the BOSSA compatible UF2 bootloader.  The
128bootloader can be entered by quickly tapping the reset button twice.
129
130First time setup
131================
132Some versions of this board were shipped with a buggy bootloader.
133Ensure that the bootloader is up to date by following the
134`Adafruit UF2 Bootloader update`_ tutorial. Note that this tutorial
135was made for the Adafruit Feather nRF52840, but the steps to update
136the bootloader are the same for the ItsyBitsy. The files for the
137ItsyBitsy bootloader can be found in the `Adafruit nRF52 Bootloader repo`_.
138
139The building and flashing of Zephyr applications have been tested with
140release 0.7.0 of the UF2 bootloader.
141
142Flashing
143========
144Flashing is done by dragging and dropping the built Zephyr UF2-file
145into the :code:`ITSY840BOOT` drive.
146
147#. Build the Zephyr kernel and the :zephyr:code-sample:`blinky`
148   sample application:
149
150   .. zephyr-app-commands::
151      :zephyr-app: samples/basic/blinky
152      :board: adafruit_itsybitsy/nrf52840
153      :goals: build
154      :compact:
155
156#. Connect the ItsyBitsy to your host computer using USB
157
158#. Tap the reset button twice quickly to enter bootloader mode
159
160#. Flash the image:
161
162   Drag and drop the file :code:`samples/basic/blinky/build/zephyr/zephyr.uf2`
163   into :code:`ITSY840BOOT`
164
165The device will disconnect and you should see the red LED blink.
166
167References
168**********
169
170.. target-notes::
171
172.. _Adafruit ItsyBitsy nRF52840 Express Learn site:
173    https://learn.adafruit.com/adafruit-itsybitsy-nrf52840-express
174
175.. _pinouts:
176    https://learn.adafruit.com/adafruit-itsybitsy-nrf52840-express/pinouts
177
178.. _schematic:
179    https://learn.adafruit.com/adafruit-itsybitsy-nrf52840-express/downloads
180
181.. _Adafruit UF2 Bootloader update:
182    https://learn.adafruit.com/introducing-the-adafruit-nrf52840-feather/update-bootloader
183
184.. _Adafruit nRF52 Bootloader repo:
185    https://github.com/adafruit/Adafruit_nRF52_Bootloader/releases
186