1.. _serpente:
2
3Arturo182 Serpente
4##################
5
6Overview
7********
8
9The Serpente is a very small low-cost development and prototyping
10board equipped with 4MiB flash storage, a PWM enabled RGB led and 6 I/O pins.
11The board comes with 3 different USB connector options: USB Type-C plug,
12USB Type-C socket and USB Type-A plug.
13
14.. image:: img/serpente.jpg
15     :align: center
16     :alt: Serpente Boards
17
18Hardware
19********
20
21- ATSAMD21E18A ARM Cortex-M0+ processor at 48 MHz
22- 256 KiB flash memory and 32 KiB of RAM
23- Extra 4MiB SPI flash memory
24- RGB User LED
25- Reset button
26- Native USB port
27
28Supported Features
29==================
30
31The Serpente board configuration supports the
32following hardware features:
33
34+-----------+------------+------------------------------------------+
35| Interface | Controller | Driver/Component                         |
36+===========+============+==========================================+
37| NVIC      | on-chip    | nested vector interrupt controller       |
38+-----------+------------+------------------------------------------+
39| Flash     | on-chip    | Can be used with LittleFS to store files |
40+-----------+------------+------------------------------------------+
41| SYSTICK   | on-chip    | systick                                  |
42+-----------+------------+------------------------------------------+
43| WDT       | on-chip    | Watchdog                                 |
44+-----------+------------+------------------------------------------+
45| GPIO      | on-chip    | I/O ports                                |
46+-----------+------------+------------------------------------------+
47| PWM       | on-chip    | Pulse Width Modulation                   |
48+-----------+------------+------------------------------------------+
49| USART     | on-chip    | Serial ports                             |
50+-----------+------------+------------------------------------------+
51| SPI       | on-chip    | Serial Peripheral Interface ports        |
52+-----------+------------+------------------------------------------+
53| USB       | on-chip    | USB device                               |
54+-----------+------------+------------------------------------------+
55
56Other hardware features are not currently supported by Zephyr.
57
58The default configuration can be found in the Kconfig file
59:zephyr_file:`boards/arm/serpente/serpente_defconfig`.
60
61Connections and IOs
62===================
63
64The `Serpente documentation`_ has detailed information about the board
65including `pinouts`_ and the `schematic`_.
66
67System Clock
68============
69
70The SAMD21 MCU is configured to use the 8MHz internal oscillator
71with the on-chip PLL generating the 48 MHz system clock.
72
73USB Device Port
74===============
75
76The SAMD21 MCU has a USB device port that can be used to communicate
77with a host PC.  See the :ref:`usb-samples` sample applications for
78more, such as the :zephyr:code-sample:`usb-cdc-acm` sample which prints "Hello World!"
79to the host PC.
80
81Programming and Debugging
82=========================
83
84The Serpente ships the BOSSA compatible UF2 bootloader. The bootloader
85can be entered by quickly tapping the reset button twice.
86
87Flashing
88========
89
90#. Build the Zephyr kernel and the :zephyr:code-sample:`blinky` sample application:
91
92   .. zephyr-app-commands::
93      :zephyr-app: samples/basic/blinky
94      :board: serpente
95      :goals: build
96      :compact:
97
98#. Connect the Serpente to your host computer using USB
99
100
101#. Tap the reset button twice quickly to enter bootloader mode
102
103#. Flash the image:
104
105   .. zephyr-app-commands::
106      :zephyr-app: samples/basic/blinky
107      :board: serpente
108      :goals: flash
109      :compact:
110
111   You should see the User LED blink.
112
113References
114**********
115
116.. target-notes::
117
118.. _Serpente documentation:
119    https://www.solder.party/docs/serpente/r2/
120
121.. _pinouts:
122    https://www.solder.party/docs/serpente/r2/pinout/
123
124.. _schematic:
125    https://www.solder.party/docs/serpente/r2/downloads/
126