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