Skip to content

Commit 4e32710

Browse files
committed
boards: Support Teensy Micromod
The Sparkfun Teensy Micromod was designed by Paul of PJRC and manufactured and sold by Sparkfun.com The functionality of this board is very similar to the Teensy 4. It has the same basic pin definitions of the Teensy 4 but added 6 additional IO pins. Which added a lot of possibilities to use the flexio system in new ways, such as for camera input. It was unclear if the board should be added here or all of this duplicated under Sparkfun, but now Sparkfun is also now responsible for the manufacturing and sales of the Teensy 4 and Teensy 4.1, here feels like a good place. Note: I am mainly doing this as a learning experience on how to use zephyr directly, as most of my experiences with Zephyr is done through the current WIP Arduino Wrappers for some of their boards. So far I duplicated the Teensy 4.1 files, then modified, like removed the Ethernet and added the I2C2 object. I updated the flash information as these come with a 128mbit version versus the 64 on T4.1 or 16 on T4. So far I have only test blink. plus: cdc-acm example, plus adding gpio to it, plus logging, plus blinking. Signed-off-by: Kurt Eckhardt <[email protected]>
1 parent 651ecab commit 4e32710

File tree

11 files changed

+286
-5
lines changed

11 files changed

+286
-5
lines changed

boards/pjrc/teensy4/Kconfig.defconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# SPDX-License-Identifier: Apache-2.0
55
#
66

7-
if BOARD_TEENSY40 || BOARD_TEENSY41
7+
if BOARD_TEENSY40 || BOARD_TEENSY41 || BOARD_TEENSYMM
88

99
config BUILD_OUTPUT_HEX
1010
bool

boards/pjrc/teensy4/Kconfig.teensymm

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#
2+
# Copyright (c) 2020, Bernhard Kraemer
3+
# Copyright 2024 NXP
4+
#
5+
# SPDX-License-Identifier: Apache-2.0
6+
#
7+
8+
config BOARD_TEENSYMM
9+
select SOC_PART_NUMBER_MIMXRT1062DVL6A

boards/pjrc/teensy4/board.cmake

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ board_set_flasher_ifnset(teensy)
44

55
if(CONFIG_BOARD_TEENSY40)
66
board_runner_args(teensy "--mcu=TEENSY40")
7+
elseif(CONFIG_BOARD_TEENSYMM)
8+
board_runner_args(teensy "--mcu=TEENSY_MICROMOD")
79
else()
810
board_runner_args(teensy "--mcu=TEENSY41")
911
endif()

boards/pjrc/teensy4/board.yml

+5
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,8 @@ boards:
99
vendor: pjrc
1010
socs:
1111
- name: mimxrt1062
12+
- name: teensymm
13+
full_name: Teensy MicroMod
14+
vendor: pjrc
15+
socs:
16+
- name: mimxrt1062
37.5 KB
Loading

boards/pjrc/teensy4/doc/index.rst

+159-3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ programming is done via the USB port.
2828

2929
(Credit: https://www.pjrc.com)
3030

31+
.. group-tab:: Sparkfun Teensy Micromod
32+
33+
.. figure:: img/teensymm.jpg
34+
:align: center
35+
:alt: TEENSYMM
36+
37+
(Credit: https://www.sparkfun.com)
38+
3139
Hardware
3240
********
3341

@@ -56,6 +64,17 @@ Hardware
5664

5765
See the `Teensy 4.1 Website`_ for a complete hardware description.
5866

67+
.. group-tab:: Teensy Micromod
68+
69+
- MIMXRT1062DVJ6A MCU (600 MHz, 1024 KB on-chip memory)
70+
- 128 Mbit QSPI Flash
71+
- User LED
72+
- USB 2.0 host connector
73+
- USB 2.0 OTG connector
74+
- TF socket for SD card
75+
76+
See the `Teensy Micromod Website`_ for a complete hardware description.
77+
5978
For more information, check the `i.MX RT1060 Datasheet`_.
6079

6180
Supported Features
@@ -188,7 +207,7 @@ Pin mappings from Teensy to MIMXRT1062 SoC.
188207
| 33 | EMC_07 | GPIO4_7 |
189208
+-----+------------+-------------------------------------+
190209

191-
Only Teensy 4.0:
210+
Only Teensy 4.0 and Teensy Micromod:
192211

193212
+-----+------------+-------------------------------------+
194213
| 34 | SD_B0_03 | GPIO3_15 |
@@ -204,6 +223,22 @@ Only Teensy 4.0:
204223
| 39 | SD_B0_04 | GPIO3_16 |
205224
+-----+------------+-------------------------------------+
206225

226+
Only Teensy Micromod
227+
228+
+-----+------------+-------------------------------------+
229+
| 40 | B0_04 | GPIO2_4 / I2C2 SCL |
230+
+-----+------------+-------------------------------------+
231+
| 41 | B0_05 | GPIO2_5 / I2C2 SDA |
232+
+-----+------------+-------------------------------------+
233+
| 42 | B0_06 | GPIO2_6 |
234+
+-----+------------+-------------------------------------+
235+
| 43 | B0_07 | GPIO2_7 |
236+
+-----+------------+-------------------------------------+
237+
| 44 | B0_08 | GPIO2_8 / UART3 TX |
238+
+-----+------------+-------------------------------------+
239+
| 45 | B0_09 | GPIO2_9 / UART3 RX |
240+
+-----+------------+-------------------------------------+
241+
207242
Only Teensy 4.1:
208243

209244
+-----+------------+-------------------------------------+
@@ -221,8 +256,109 @@ Only Teensy 4.1:
221256
+-----+------------+-------------------------------------+
222257
| 40 | AD_B1_04 | GPIO1_20 |
223258
+-----+------------+-------------------------------------+
224-
| 41 | AD_B1_05 | GPIO1_21 |
225-
+-----+------------+-------------------------------------+
259+
| 41 | AD_B1_05 | GPIO1_21 / UART3_RX |
260+
+-----+------------+-------------------------------------+
261+
262+
Pin Mapping from Teensy pins Micromod Pins and MIMXRT1062 SoC.
263+
264+
Teensy Micromod only:
265+
266+
+-----+------+------------+-------------------------------------+
267+
| Pin | MMOD | Pad ID | Usage |
268+
+=====+======+============+=====================================+
269+
| 0 | 19 | AD_B0_03 | GPIO1_3 / UART6_RX / CAN2_RX |
270+
+-----+------+------------+-------------------------------------+
271+
| 1 | 17 | AD_B0_02 | GPIO1_2 / UART6_TX / CAN2_TX |
272+
+-----+------+------------+-------------------------------------+
273+
| 2 | 47 | EMC_04 | GPIO4_4 |
274+
+-----+------+------------+-------------------------------------+
275+
| 3 | 32 | EMC_05 | GPIO4_5 |
276+
+-----+------+------------+-------------------------------------+
277+
| 4 | 10 | EMC_06 | GPIO4_6 |
278+
+-----+------+------------+-------------------------------------+
279+
| 5 | 18 | EMC_08 | GPIO4_8 |
280+
+-----+------+------------+-------------------------------------+
281+
| 6 | 71 | B0_10 | GPIO2_10 |
282+
+-----+------+------------+-------------------------------------+
283+
| 7 | 56 | B1_01 | GPIO2_17 / UART4_RX |
284+
+-----+------+------------+-------------------------------------+
285+
| 8 | 54 | B1_00 | GPIO2_16 / UART4_TX |
286+
+-----+------+------------+-------------------------------------+
287+
| 9 | 69 | B0_11 | GPIO2_11 |
288+
+-----+------+------------+-------------------------------------+
289+
| 10 | 55 | B0_00 | GPIO2_0 |
290+
+-----+------+------------+-------------------------------------+
291+
| 11 | 59 | B0_02 | GPIO2_2 |
292+
+-----+------+------------+-------------------------------------+
293+
| 12 | 61 | B0_01 | GPIO2_1 |
294+
+-----+------+------------+-------------------------------------+
295+
| 13 | 57 | B0_03 | GPIO2_3 / LED |
296+
+-----+------+------------+-------------------------------------+
297+
| 14 | 34 | AD_B1_02 | GPIO1_18 / UART2_TX |
298+
+-----+------+------------+-------------------------------------+
299+
| 15 | 38 | AD_B1_03 | GPIO1_19 / UART2_RX |
300+
+-----+------+------------+-------------------------------------+
301+
| 16 | 20 | AD_B1_07 | GPIO1_23 / UART3_RX / I2C3_SCL |
302+
+-----+------+------------+-------------------------------------+
303+
| 17 | 22 | AD_B1_06 | GPIO1_22 / UART3_TX / I2C3_SDA |
304+
+-----+------+------------+-------------------------------------+
305+
| 18 | 12 | AD_B1_01 | GPIO1_17 / I2C1_SDA |
306+
+-----+------+------------+-------------------------------------+
307+
| 19 | 14 | AD_B1_00 | GPIO1_16 / I2C1_SCL |
308+
+-----+------+------------+-------------------------------------+
309+
| 20 | 52 | AD_B1_10 | GPIO1_26 / UART8_TX |
310+
+-----+------+------------+-------------------------------------+
311+
| 21 | 50 | AD_B1_11 | GPIO1_27 / UART8_RX |
312+
+-----+------+------------+-------------------------------------+
313+
| 22 | 49 | AD_B1_08 | GPIO1_24 / CAN1_TX |
314+
+-----+------+------------+-------------------------------------+
315+
| 23 | 58 | AD_B1_09 | GPIO1_25 / CAN1_RX |
316+
+-----+------+------------+-------------------------------------+
317+
| 24 | 53 | AD_B0_12 | GPIO1_12 / UART1_TX / I2C4_SCL |
318+
+-----+------+------------+-------------------------------------+
319+
| 25 | 51 | AD_B0_13 | GPIO1_13 / UART1_RX / I2C4_SDA |
320+
+-----+------+------------+-------------------------------------+
321+
| 26 | 67 | AD_B1_14 | GPIO1_30 / SPI3_MOSI |
322+
+-----+------+------------+-------------------------------------+
323+
| 27 | 8 | AD_B1_15 | GPIO1_31 / SPI3_SCK |
324+
+-----+------+------------+-------------------------------------+
325+
| 28 | 4 | EMC_32 | GPIO3_18 / UART7_RX |
326+
+-----+------+------------+-------------------------------------+
327+
| 29 | 16 | EMC_31 | GPIO4_31 / UART7_TX |
328+
+-----+------+------------+-------------------------------------+
329+
| 30 | 41 | EMC_37 | GPIO3_23 / CAN3_RX |
330+
+-----+------+------------+-------------------------------------+
331+
| 31 | 43 | EMC_36 | GPIO3_22 / CAN3_TX |
332+
+-----+------+------------+-------------------------------------+
333+
| 32 | 65 | B0_12 | GPIO2_12 |
334+
+-----+------+------------+-------------------------------------+
335+
| 33 | 63 | EMC_07 | GPIO4_7 |
336+
+-----+------+------------+-------------------------------------+
337+
| 34 | 66 | SD_B0_03 | GPIO3_15 |
338+
+-----+------+------------+-------------------------------------+
339+
| 35 | 64 | SD_B0_02 | GPIO3_14 |
340+
+-----+------+------------+-------------------------------------+
341+
| 36 | 60 | SD_B0_01 | GPIO3_13 |
342+
+-----+------+------------+-------------------------------------+
343+
| 37 | 62 | SD_B0_00 | GPIO3_12 |
344+
+-----+------+------------+-------------------------------------+
345+
| 38 | 68 | SD_B0_05 | GPIO3_17 |
346+
+-----+------+------------+-------------------------------------+
347+
| 39 | 70 | SD_B0_04 | GPIO3_16 |
348+
+-----+------+------------+-------------------------------------+
349+
| 40 | 40 | B0_04 | GPIO2_4 / I2C2 SCL |
350+
+-----+------+------------+-------------------------------------+
351+
| 41 | 42 | B0_05 | GPIO2_5 / I2C2 SDA |
352+
+-----+------+------------+-------------------------------------+
353+
| 42 | 44 | B0_06 | GPIO2_6 |
354+
+-----+------+------------+-------------------------------------+
355+
| 43 | 46 | B0_07 | GPIO2_7 |
356+
+-----+------+------------+-------------------------------------+
357+
| 44 | 48 | B0_08 | GPIO2_8 / UART3 TX |
358+
+-----+------+------------+-------------------------------------+
359+
| 45 | 73 | B0_09 | GPIO2_9 / UART3 RX |
360+
+-----+------+------------+-------------------------------------+
361+
226362

227363
Programming and Debugging
228364
*************************
@@ -254,6 +390,14 @@ but does not support debugging the device.
254390
:goals: build
255391
:compact:
256392

393+
.. group-tab:: Teensy Micromod
394+
395+
.. zephyr-app-commands::
396+
:zephyr-app: samples/basic/blinky
397+
:board: teensymm
398+
:goals: build
399+
:compact:
400+
257401
#. Connect the board to your host computer using USB.
258402

259403
#. Tap the reset button to enter bootloader mode.
@@ -279,6 +423,15 @@ but does not support debugging the device.
279423
:goals: flash
280424
:compact:
281425

426+
.. group-tab:: Teensy Micromod
427+
428+
.. zephyr-app-commands::
429+
:zephyr-app: samples/basic/blinky
430+
:board: teensymm
431+
:goals: flash
432+
:compact:
433+
434+
282435
#. You should see the orange LED blink.
283436

284437
Configuring a Console
@@ -335,5 +488,8 @@ References
335488
.. _Teensy 4.1 Ethernet Kit:
336489
https://www.pjrc.com/store/ethernet_kit.html
337490

491+
.. _Teensy Micromod Website:
492+
https://www.sparkfun.com/sparkfun-micromod-teensy-processor.html
493+
338494
.. _i.MX RT1060 Datasheet:
339495
https://www.nxp.com/docs/en/nxp/data-sheets/IMXRT1060CEC.pdf

boards/pjrc/teensy4/teensy4-pinctrl.dtsi

+13
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,19 @@
9999
};
100100
};
101101

102+
/* LPI2C2 SCL, SDA on Teensy-Micromod-Pins 40/41 */
103+
pinmux_lpi2c2: pinmux_lpi2c2 {
104+
group0 {
105+
pinmux = <&iomuxc_gpio_b0_04_lpi2c2_scl>,
106+
<&iomuxc_gpio_b0_05_lpi2c2_sda>;
107+
drive-strength = "r0-6";
108+
drive-open-drain;
109+
slew-rate = "slow";
110+
nxp,speed = "100-mhz";
111+
input-enable;
112+
};
113+
};
114+
102115
/* LPI2C3 SCL, SDA on Teensy-Pins 16/17 */
103116
pinmux_lpi2c3: pinmux_lpi2c3 {
104117
group0 {

boards/pjrc/teensy4/teensymm.dts

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
/*
2+
* Copyright (c) 2020, Bernhard Kraemer
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include "teensy40.dts"
8+
9+
/ {
10+
model = "PJRC TEENSY Micromod board";
11+
12+
chosen {
13+
zephyr,flash-controller = &w25q128jvxgim;
14+
zephyr,flash = &w25q128jvxgim;
15+
};
16+
};
17+
18+
/delete-node/ &w25q16jvuxim;
19+
&flexspi {
20+
status = "okay";
21+
22+
reg = <0x402a8000 0x4000>, <0x60000000 DT_SIZE_M(8)>;
23+
/* WINBOND flash memory*/
24+
w25q128jvxgim: w25q128jvxgim@0 {
25+
compatible = "nxp,imx-flexspi-nor";
26+
size = <DT_SIZE_M(16 * 8)>;
27+
reg = <0>;
28+
spi-max-frequency = <DT_FREQ_M(133)>;
29+
status = "okay";
30+
jedec-id = [ef 70 18];
31+
32+
erase-block-size = <4096>;
33+
write-block-size = <1>;
34+
};
35+
};
36+
37+
&lpi2c2 {
38+
pinctrl-0 = <&pinmux_lpi2c2>;
39+
pinctrl-names = "default";
40+
};
41+
42+
&usdhc1 {
43+
status = "okay";
44+
no-1-8-v;
45+
pinctrl-0 = <&pinmux_usdhc1>;
46+
pinctrl-1 = <&pinmux_usdhc1_slow>;
47+
pinctrl-2 = <&pinmux_usdhc1_med>;
48+
pinctrl-3 = <&pinmux_usdhc1_fast>;
49+
pinctrl-names = "default", "slow", "med", "fast";
50+
mmc {
51+
compatible = "zephyr,sdmmc-disk";
52+
disk-name = "SD";
53+
status = "okay";
54+
};
55+
};

boards/pjrc/teensy4/teensymm.yaml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#
2+
# Copyright (c) 2020, Bernhard Kraemer
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
7+
identifier: teensymm
8+
name: PJRC TEENSY_MICROMOD
9+
type: mcu
10+
arch: arm
11+
toolchain:
12+
- zephyr
13+
- gnuarmemb
14+
- xtools
15+
ram: 768
16+
flash: 8192
17+
supported:
18+
- counter
19+
- gpio
20+
- sdhc
21+
- usb_device
22+
- netif:eth
23+
testing:
24+
ignore_tags:
25+
- net
26+
- posix
27+
vendor: nxp
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#
2+
# Copyright (c) 2020, Bernhard Kraemer
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
7+
CONFIG_DEVICE_CONFIGURATION_DATA=n
8+
CONFIG_CONSOLE=y
9+
CONFIG_UART_CONSOLE=y
10+
CONFIG_SERIAL=y
11+
CONFIG_GPIO=y
12+
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=600000000
13+
CONFIG_ARM_MPU=y
14+
CONFIG_HW_STACK_PROTECTION=y

samples/basic/blinky/src/main.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include <zephyr/drivers/gpio.h>
1010

1111
/* 1000 msec = 1 sec */
12-
#define SLEEP_TIME_MS 1000
12+
#define SLEEP_TIME_MS 500
1313

1414
/* The devicetree node identifier for the "led0" alias. */
1515
#define LED0_NODE DT_ALIAS(led0)

0 commit comments

Comments
 (0)