1.. _arduino_nano_33_iot:
2
3Arduino Nano 33 IOT
4###################
5
6Overview
7********
8
9The Arduino Nano 33 IOT is a small form factor development board with USB,
10Wifi, Bluetooth, a 6 axis IMU, and secure element.
11
12.. image:: img/nano_33_iot.jpg
13     :align: center
14     :alt: Arduino Nano 33 IOT
15
16Hardware
17********
18
19- ATSAMD21G18A ARM Cortex-M0+ processor at 48 MHz
20- 256 KiB flash memory and 32 KiB of RAM
21- One user LED
22- One reset button
23- Native USB port
24- Wifi and Bluetooth via a u-blox NINA-W102
25- ATECC608A secure element
26- LSM6DS3 six axis accelerometer and gyro
27
28Supported Features
29==================
30
31The arduino_nano_33_iot board configuration supports the following hardware
32features:
33
34+-----------+------------+------------------------------------------+
35| Interface | Controller | Driver/Component                         |
36+===========+============+==========================================+
37| ADC       | on-chip    | Analog to digital converter              |
38+-----------+------------+------------------------------------------+
39| COUNTER   | on-chip    | Pulse counter                            |
40+-----------+------------+------------------------------------------+
41| DMA       | on-chip    | Direct memory access unit                |
42+-----------+------------+------------------------------------------+
43| Flash     | on-chip    | Can be used with LittleFS to store files |
44+-----------+------------+------------------------------------------+
45| GPIO      | on-chip    | I/O ports                                |
46+-----------+------------+------------------------------------------+
47| HWINFO    | on-chip    | Hardware info and serial number          |
48+-----------+------------+------------------------------------------+
49| NVIC      | on-chip    | nested vector interrupt controller       |
50+-----------+------------+------------------------------------------+
51| PWM       | on-chip    | Pulse Width Modulation                   |
52+-----------+------------+------------------------------------------+
53| SPI       | on-chip    | Serial Peripheral Interface ports        |
54+-----------+------------+------------------------------------------+
55| SYSTICK   | on-chip    | systick                                  |
56+-----------+------------+------------------------------------------+
57| USART     | on-chip    | Serial ports                             |
58+-----------+------------+------------------------------------------+
59| USB       | on-chip    | USB device                               |
60+-----------+------------+------------------------------------------+
61| WDT       | on-chip    | Watchdog                                 |
62+-----------+------------+------------------------------------------+
63
64Other hardware features are not currently supported by Zephyr.
65
66The default configuration can be found in the Kconfig
67:zephyr_file:`boards/arduino/nano_33_iot/arduino_nano_33_iot_defconfig`.
68
69Connections and IOs
70===================
71
72The `Arduino store`_ has detailed information about board
73connections. Download the `schematic`_ for more detail.
74
75System Clock
76============
77
78The SAMD21 MCU is configured to use the 8 MHz internal oscillator
79with the on-chip PLL generating the 48 MHz system clock.  The internal
80APB and GCLK unit are set up in the same way as the upstream Arduino
81libraries.
82
83Serial Port
84===========
85
86The SAMD21 MCU has 6 SERCOM based USARTs. SERCOM5 is available on pins 1 and 2.
87
88PWM
89===
90
91The SAMD21 MCU has 3 TCC based PWM units with up to 4 outputs each and a period
92of 24 bits or 16 bits.  If :code:`CONFIG_PWM_SAM0_TCC` is enabled then LED0 is
93driven by TCC2 instead of by GPIO.
94
95SPI Port
96========
97
98The SAMD21 MCU has 6 SERCOM based SPIs.  SERCOM1 is available on pins 1, 14,
99and 15.
100
101USB Device Port
102===============
103
104The SAMD21 MCU has a USB device port that can be used to communicate
105with a host PC.  See the :zephyr:code-sample-category:`usb` sample applications for
106more, such as the :zephyr:code-sample:`usb-cdc-acm` sample which sets up a virtual
107serial port that echos characters back to the host PC.
108
109Programming and Debugging
110*************************
111
112The Nano 33 IOT ships the BOSSA compatible UF2 bootloader.  The
113bootloader can be entered by quickly tapping the reset button twice.
114
115Additionally, if :code:`CONFIG_USB_CDC_ACM` is enabled then the bootloader
116will be entered automatically when you run :code:`west flash`.
117
118Flashing
119========
120
121#. Build the Zephyr kernel and the :zephyr:code-sample:`hello_world` sample application:
122
123   .. zephyr-app-commands::
124      :zephyr-app: samples/hello_world
125      :board: arduino_nano_33_iot
126      :goals: build
127      :compact:
128
129#. Connect the Nano 33 IOT to your host computer using USB
130
131#. Connect a 3.3 V USB to serial adapter to the board and to the
132   host.  See the `Serial Port`_ section above for the board's pin
133   connections.
134
135#. Run your favorite terminal program to listen for output. Under Linux the
136   terminal should be :code:`/dev/ttyACM0`. For example:
137
138   .. code-block:: console
139
140      $ minicom -D /dev/ttyACM0 -o
141
142   The -o option tells minicom not to send the modem initialization
143   string. Connection should be configured as follows:
144
145   - Speed: 115200
146   - Data: 8 bits
147   - Parity: None
148   - Stop bits: 1
149
150#. Tap the reset button twice quickly to enter bootloader mode
151
152#. Flash the image:
153
154   .. zephyr-app-commands::
155      :zephyr-app: samples/hello_world
156      :board: arduino_nano_33_iot
157      :goals: flash
158      :compact:
159
160   You should see "Hello World! arduino_nano_33_iot" in your terminal.
161
162References
163**********
164
165.. target-notes::
166
167.. _Arduino Store:
168    https://store.arduino.cc/arduino-nano-33-iot
169
170.. _schematic:
171    https://content.arduino.cc/assets/NANO33IoTV2.0_sch.pdf
172