1.. zephyr:board:: mm_feather
2
3Overview
4********
5
6The SwiftIO Feather board, designed by MadMachine is
7designed with support for the modern `Swift language
8<https://docs.swift.org/swift-book/>`_.  Zephyr provides basic
9low-level capabilities for the SwiftIO Feather board. Swift application would
10run on top of Zephyr. More information about the board can be found
11at:
12
13- `MadMachine Homepage`_
14- `SwiftIO API Reference`_
15
16Hardware
17********
18
19- MIMXRT1062DVL6B MCU (Cortex-M7 at 600MHz, 2048KB on-chip memory)
20
21- Memory
22
23   - 8MB QSPI Flash
24   - 32MB SDRAM
25   - TF socket for SD card
26
27- USB
28
29   - USB-C 2.0 OTG connector
30
31- Power
32
33   - 5V USB power
34   - 4.2V DC jack
35
36- Debug
37
38   - SWD connector
39
40
41- RGB LED
42
43
44Supported Features
45==================
46
47The mm_feather board configuration supports the following hardware
48features:
49
50+-----------+------------+-------------------------------------+
51| Interface | Controller | Driver/Component                    |
52+===========+============+=====================================+
53| NVIC      | on-chip    | nested vector interrupt controller  |
54+-----------+------------+-------------------------------------+
55| SYSTICK   | on-chip    | systick                             |
56+-----------+------------+-------------------------------------+
57| DISPLAY   | on-chip    | display                             |
58+-----------+------------+-------------------------------------+
59| GPIO      | on-chip    | gpio                                |
60+-----------+------------+-------------------------------------+
61| I2C       | on-chip    | i2c                                 |
62+-----------+------------+-------------------------------------+
63| SPI       | on-chip    | spi                                 |
64+-----------+------------+-------------------------------------+
65| UART      | on-chip    | serial port-polling;                |
66|           |            | serial port-interrupt               |
67+-----------+------------+-------------------------------------+
68| I2S       | on-chip    | I2S                                 |
69+-----------+------------+-------------------------------------+
70| USB       | on-chip    | USB device                          |
71+-----------+------------+-------------------------------------+
72
73
74
75Connections and IOs
76===================
77
78Note:
79The following SwiftIO Feather pinout diagram is used for Swift programming.
80The Swift ID is not the same as the Zephyr driver ID.
81
82+-----------+---------------+----------+---------------+--------------------------+
83| Name                      | GPIO                     | Other peripherals        |
84+===========+===============+==========+===============+==========+===============+
85| Swift ID  | Pin name      | Swift ID | Zephyr driver | Swift ID | Zephyr driver |
86+-----------+---------------+----------+---------------+----------+---------------+
87| P0        | GPIO_AD_B1_04 | D0       | GPIO1_IO20    |          |               |
88+-----------+---------------+----------+---------------+----------+---------------+
89| P1        | GPIO_AD_B1_08 | D1       | GPIO1_IO24    |          |               |
90+-----------+---------------+----------+---------------+----------+---------------+
91| P2        | GPIO_AD_B1_09 | D2       | GPIO1_IO25    |          |               |
92+-----------+---------------+----------+---------------+----------+---------------+
93| P3        | GPIO_AD_B1_10 | D3       | GPIO1_IO26    |          |               |
94+-----------+---------------+----------+---------------+ UART1    | UART_8        |
95| P4        | GPIO_AD_B1_11 | D4       | GPIO1_IO27    |          |               |
96+-----------+---------------+----------+---------------+----------+---------------+
97| P5        | GPIO_AD_B1_12 | D5       | GPIO1_IO28    |          |               |
98+-----------+---------------+----------+---------------+----------+---------------+
99| P6        | GPIO_AD_B1_15 | D6       | GPIO1_IO31    |          |               |
100+-----------+---------------+----------+---------------+          |               |
101| P7        | GPIO_AD_B1_14 | D7       | GPIO1_IO30    | SPI0     | SPI_3         |
102+-----------+---------------+----------+---------------+          |               |
103| P8        | GPIO_AD_B1_13 | D8       | GPIO1_IO29    |          |               |
104+-----------+---------------+----------+---------------+----------+---------------+
105| P9        | GPIO_AD_B1_03 | D9       | GPIO1_IO19    |          |               |
106+-----------+---------------+----------+---------------+ UART0    | UART_2        |
107| P10       | GPIO_AD_B1_02 | D10      | GPIO1_IO18    |          |               |
108+-----------+---------------+----------+---------------+----------+---------------+
109| P11       | GPIO_AD_B1_05 | D11      | GPIO1_IO21    |          |               |
110+-----------+---------------+----------+---------------+----------+---------------+
111| P12       | GPIO_AD_B0_14 | D12      | GPIO1_IO14    |          |               |
112+-----------+---------------+----------+---------------+ CAN0     | CAN_3         |
113| P13       | GPIO_AD_B0_15 | D13      | GPIO1_IO15    |          |               |
114+-----------+---------------+----------+---------------+----------+---------------+
115| P14       | GPIO_B0_00    | D14      | GPIO2_IO00    |          |               |
116+-----------+---------------+----------+---------------+----------+---------------+
117| P15       | GPIO_B1_03    | D15      | GPIO2_IO19    |          |               |
118+-----------+---------------+----------+---------------+----------+---------------+
119| P16       | GPIO_B1_02    | D16      | GPIO2_IO18    |          |               |
120+-----------+---------------+----------+---------------+----------+---------------+
121| P17       | GPIO_B1_01    | D17      | GPIO2_IO17    |          |               |
122+-----------+---------------+----------+---------------+ UART2    | UART_4        |
123| P18       | GPIO_B1_00    | D18      | GPIO2_IO16    |          |               |
124+-----------+---------------+----------+---------------+----------+---------------+
125| P19       | GPIO_B1_15    | D19      | GPIO2_IO31    |          |               |
126+-----------+---------------+----------+---------------+----------+---------------+
127| P20       | GPIO_B1_14    | D20      | GPIO2_IO30    |          |               |
128+-----------+---------------+----------+---------------+----------+---------------+
129| P21       | GPIO_B0_03    | D21      | GPIO2_IO03    |          |               |
130+-----------+---------------+----------+---------------+          |               |
131| P22       | GPIO_B0_02    | D22      | GPIO2_IO02    | SPI1     | SPI_4         |
132+-----------+---------------+----------+---------------+          |               |
133| P23       | GPIO_B0_01    | D23      | GPIO2_IO01    |          |               |
134+-----------+---------------+----------+---------------+----------+---------------+
135| P24       | GPIO_B0_04    | D24      | GPIO2_IO04    |          |               |
136+-----------+---------------+----------+---------------+----------+---------------+
137| P25       | GPIO_B0_05    | D25      | GPIO2_IO05    |          |               |
138+-----------+---------------+----------+---------------+----------+---------------+
139| P26       | GPIO_B0_06    | D26      | GPIO2_IO06    |          |               |
140+-----------+---------------+----------+---------------+----------+---------------+
141| P27       | GPIO_B0_07    | D27      | GPIO2_IO07    |          |               |
142+-----------+---------------+----------+---------------+----------+---------------+
143| P28       | GPIO_B0_08    | D28      | GPIO2_IO08    |          |               |
144+-----------+---------------+----------+---------------+----------+---------------+
145| P29       | GPIO_B0_09    | D29      | GPIO2_IO09    |          |               |
146+-----------+---------------+----------+---------------+----------+---------------+
147| P30       | GPIO_B0_10    | D30      | GPIO2_IO10    |          |               |
148+-----------+---------------+----------+---------------+----------+---------------+
149| P31       | GPIO_B0_11    | D31      | GPIO2_IO11    |          |               |
150+-----------+---------------+----------+---------------+----------+---------------+
151| P32       | GPIO_B0_12    | D32      | GPIO2_IO12    |          |               |
152+-----------+---------------+----------+---------------+----------+---------------+
153| P33       | GPIO_B0_13    | D33      | GPIO2_IO13    |          |               |
154+-----------+---------------+----------+---------------+----------+---------------+
155| P34       | GPIO_B0_14    | D34      | GPIO2_IO14    |          |               |
156+-----------+---------------+----------+---------------+----------+---------------+
157| P35       | GPIO_B0_15    | D35      | GPIO2_IO15    |          |               |
158+-----------+---------------+----------+---------------+----------+---------------+
159|           | GPIO_AD_B1_07 |          | GPIO1_IO23    |          |               |
160+-----------+---------------+----------+---------------+ I2C0     | I2C_3         |
161|           | GPIO_AD_B1_06 |          | GPIO1_IO22    |          |               |
162+-----------+---------------+----------+---------------+----------+---------------+
163|           | GPIO_AD_B1_00 |          | GPIO1_IO16    |          |               |
164+-----------+---------------+----------+---------------+ I2C1     | I2C_1         |
165|           | GPIO_AD_B1_00 |          | GPIO1_IO17    |          |               |
166+-----------+---------------+----------+---------------+----------+---------------+
167
168
169Programming and Flash
170*************************
171
172Build and flash applications as usual (see :ref:`build_an_application` and
173:ref:`application_run` for more details).
174
175Configuring a Console
176=====================
177
178Connect a USB-to-serial adapter from your PC to corresponding UART pins of SwiftIO Feather.
179
180Use the following settings with your serial terminal of choice (minicom, putty,
181etc.):
182
183- Speed: 115200
184- Data: 8 bits
185- Parity: None
186- Stop bits: 1
187
188Flashing
189========
190
191Here is an example for the :zephyr:code-sample:`hello_world` application.
192
193Connect a DAPLink debugger from your PC to corresponding SWD pins of SwiftIO Feather.
194
195.. zephyr-app-commands::
196   :zephyr-app: samples/hello_world
197   :board: mm_feather
198   :goals: flash
199
200Open a serial terminal, reset the board (press the "reset" button), and you should
201see the following message in the terminal:
202
203.. code-block:: console
204
205   *** Booting Zephyr OS build v2.6.0-rc1-301-gd9c666a5abf8  ***
206   Hello World! mm_feather
207
208Debugging
209=========
210
211Here is an example for the :zephyr:code-sample:`hello_world` application.
212
213.. zephyr-app-commands::
214   :zephyr-app: samples/hello_world
215   :board: mm_feather
216   :goals: debug
217
218Open a serial terminal, step through the application in your debugger, and you
219should see the following message in the terminal:
220
221.. code-block:: console
222
223   *** Booting Zephyr OS build v2.6.0-rc1-301-gd9c666a5abf8  ***
224   Hello World! mm_feather
225
226
227.. _MadMachine Homepage:
228   https://madmachine.io
229
230.. _SwiftIO API Reference:
231   https://madmachineio.github.io/SwiftIO/documentation/swiftio/
232