1.. _teensy40: 2 3PJRC TEENSY 4 4############# 5 6Overview 7******** 8The Teensy is a complete USB-based microcontroller development system, in a 9very small footprint, capable of implementing many types of projects. All 10programming is done via the USB port. 11 12 13.. figure:: teensy40.jpg 14 :width: 459px 15 :align: center 16 :alt: TEENSY40 17 18 TEENSY40 (Credit: https://www.pjrc.com) 19 20.. figure:: teensy41.jpg 21 :width: 758px 22 :align: center 23 :alt: TEENSY41 24 25 TEENSY41 (Credit: https://www.pjrc.com) 26 27Hardware 28******** 29 30Teensy 4.0: 31 32- MIMXRT1062DVL6A MCU (600 MHz, 1024 KB on-chip memory) 33- 16 Mbit QSPI Flash 34- LED 35- USB 2.0 host connector 36 37Teensy 4.1: 38 39- MIMXRT1062DVJ6A MCU (600 MHz, 1024 KB on-chip memory) 40- 64 Mbit QSPI Flash 41- LED 42- USB 2.0 host connector 43- USB 2.0 OTG connector 44- 10/100 Mbit/s Ethernet PHY 45- TF socket for SD card 46 47See the `Teensy 4.0 Website`_ for a complete hardware description. 48 49Supported Features 50================== 51 52The teensy40 board configuration supports the following hardware 53features: 54 55+-----------+------------+-------------------------------------+ 56| Interface | Controller | Driver/Component | 57+===========+============+=====================================+ 58| NVIC | on-chip | nested vector interrupt controller | 59+-----------+------------+-------------------------------------+ 60| SYSTICK | on-chip | systick | 61+-----------+------------+-------------------------------------+ 62| GPIO | on-chip | gpio | 63+-----------+------------+-------------------------------------+ 64| I2C | on-chip | i2c | 65+-----------+------------+-------------------------------------+ 66| UART | on-chip | serial port-polling; | 67| | | serial port-interrupt | 68+-----------+------------+-------------------------------------+ 69| USB | on-chip | USB device | 70+-----------+------------+-------------------------------------+ 71 72 73The default configuration can be found in the defconfig file: 74``boards/arm/teensy4/teensy40_defconfig`` 75 76 77The teensy41 board configuration supports additional hardware 78features: 79 80+-----------+------------+-------------------------------------+ 81| Interface | Controller | Driver/Component | 82+===========+============+=====================================+ 83| SDHC | on-chip | disk access | 84+-----------+------------+-------------------------------------+ 85| ENET | on-chip | ethernet | 86+-----------+------------+-------------------------------------+ 87 88 89The default configuration can be found in the defconfig file: 90``boards/arm/teensy4/teensy41_defconfig`` 91 92Other hardware features are not currently supported by the port. 93 94Connections and IOs 95=================== 96 97Pin mappings from Teensy to MIMXRT1062 SoC. 98 99+-----+------------+-------------------------------------+ 100| Pin | Pad ID | Usage | 101+=====+============+=====================================+ 102| 0 | AD_B0_03 | GPIO1_3 / UART6_RX / CAN2_RX | 103+-----+------------+-------------------------------------+ 104| 1 | AD_B0_02 | GPIO1_2 / UART6_TX / CAN2_TX | 105+-----+------------+-------------------------------------+ 106| 2 | EMC_04 | GPIO4_4 | 107+-----+------------+-------------------------------------+ 108| 3 | EMC_05 | GPIO4_5 | 109+-----+------------+-------------------------------------+ 110| 4 | EMC_06 | GPIO4_6 | 111+-----+------------+-------------------------------------+ 112| 5 | EMC_08 | GPIO4_8 | 113+-----+------------+-------------------------------------+ 114| 6 | B0_10 | GPIO2_10 | 115+-----+------------+-------------------------------------+ 116| 7 | B1_01 | GPIO2_17 / UART4_RX | 117+-----+------------+-------------------------------------+ 118| 8 | B1_00 | GPIO2_16 / UART4_TX | 119+-----+------------+-------------------------------------+ 120| 9 | B0_11 | GPIO2_11 | 121+-----+------------+-------------------------------------+ 122| 10 | B0_00 | GPIO2_0 | 123+-----+------------+-------------------------------------+ 124| 11 | B0_02 | GPIO2_2 | 125+-----+------------+-------------------------------------+ 126| 12 | B0_01 | GPIO2_1 | 127+-----+------------+-------------------------------------+ 128| 13 | B0_03 | GPIO2_3 / LED | 129+-----+------------+-------------------------------------+ 130| 14 | AD_B1_02 | GPIO1_18 / UART2_TX | 131+-----+------------+-------------------------------------+ 132| 15 | AD_B1_03 | GPIO1_19 / UART2_RX | 133+-----+------------+-------------------------------------+ 134| 16 | AD_B1_07 | GPIO1_23 / UART3_RX / I2C3_SCL | 135+-----+------------+-------------------------------------+ 136| 17 | AD_B1_06 | GPIO1_22 / UART3_TX / I2C3_SDA | 137+-----+------------+-------------------------------------+ 138| 18 | AD_B1_01 | GPIO1_17 / I2C1_SDA | 139+-----+------------+-------------------------------------+ 140| 19 | AD_B1_00 | GPIO1_16 / I2C1_SCL | 141+-----+------------+-------------------------------------+ 142| 20 | AD_B1_10 | GPIO1_26 / UART8_TX | 143+-----+------------+-------------------------------------+ 144| 21 | AD_B1_11 | GPIO1_27 / UART8_RX | 145+-----+------------+-------------------------------------+ 146| 22 | AD_B1_08 | GPIO1_24 / CAN1_TX | 147+-----+------------+-------------------------------------+ 148| 23 | AD_B1_09 | GPIO1_25 / CAN1_RX | 149+-----+------------+-------------------------------------+ 150| 24 | AD_B0_12 | GPIO1_12 / UART1_TX / I2C4_SCL | 151+-----+------------+-------------------------------------+ 152| 25 | AD_B0_13 | GPIO1_13 / UART1_RX / I2C4_SDA | 153+-----+------------+-------------------------------------+ 154| 26 | AD_B1_14 | GPIO1_30 | 155+-----+------------+-------------------------------------+ 156| 27 | AD_B1_15 | GPIO1_31 | 157+-----+------------+-------------------------------------+ 158| 28 | EMC_32 | GPIO3_18 / UART7_RX | 159+-----+------------+-------------------------------------+ 160| 29 | EMC_31 | GPIO4_31 / UART7_TX | 161+-----+------------+-------------------------------------+ 162| 30 | EMC_37 | GPIO3_23 / CAN3_RX | 163+-----+------------+-------------------------------------+ 164| 31 | EMC_36 | GPIO3_22 / CAN3_TX | 165+-----+------------+-------------------------------------+ 166| 32 | B0_12 | GPIO2_12 | 167+-----+------------+-------------------------------------+ 168| 33 | EMC_07 | GPIO4_7 | 169+-----+------------+-------------------------------------+ 170 171Only Teensy 4.0: 172 173+-----+------------+-------------------------------------+ 174| 34 | SD_B0_03 | GPIO3_15 | 175+-----+------------+-------------------------------------+ 176| 35 | SD_B0_02 | GPIO3_14 | 177+-----+------------+-------------------------------------+ 178| 36 | SD_B0_01 | GPIO3_13 | 179+-----+------------+-------------------------------------+ 180| 37 | SD_B0_00 | GPIO3_12 | 181+-----+------------+-------------------------------------+ 182| 38 | SD_B0_05 | GPIO3_17 | 183+-----+------------+-------------------------------------+ 184| 39 | SD_B0_04 | GPIO3_16 | 185+-----+------------+-------------------------------------+ 186 187Only Teensy 4.1: 188 189+-----+------------+-------------------------------------+ 190| 34 | B1_13 | GPIO2_29 / UART5_RX | 191+-----+------------+-------------------------------------+ 192| 35 | B1_12 | GPIO2_28 / UART5_TX | 193+-----+------------+-------------------------------------+ 194| 36 | B1_02 | GPIO2_18 | 195+-----+------------+-------------------------------------+ 196| 37 | B1_03 | GPIO2_19 | 197+-----+------------+-------------------------------------+ 198| 38 | AD_B1_12 | GPIO1_28 | 199+-----+------------+-------------------------------------+ 200| 39 | AD_B1_13 | GPIO1_29 | 201+-----+------------+-------------------------------------+ 202| 40 | AD_B1_04 | GPIO1_20 | 203+-----+------------+-------------------------------------+ 204| 41 | AD_B1_05 | GPIO1_21 | 205+-----+------------+-------------------------------------+ 206 207Programming and Debugging 208************************* 209 210Flashing 211======== 212Build applications as usual (see :ref:`build_an_application` for more details). 213 214Flash hex-file with the documented tools: 215 216.. _Teensy flash tools: 217 https://www.pjrc.com/teensy/loader.html 218 219Debugging 220========= 221Console output is mapped to teensy pins 0 (RX1) and 1 (TX1). Connect a usb-to-serial adapter 222to use this serial console. Use the following settings with your serial terminal of choice (minicom, putty, 223etc.): 224 225- Speed: 115200 226- Data: 8 bits 227- Parity: None 228- Stop bits: 1 229 230References 231********** 232 233.. _Teensy 4.0 Website: 234 https://www.pjrc.com/store/teensy40.html 235 236.. _Teensy Schematics: 237 https://www.pjrc.com/teensy/schematic.html 238 239.. _i.MX RT1060 Website: 240 https://www.nxp.com/products/processors-and-microcontrollers/arm-based-processors-and-mcus/i.mx-applications-processors/i.mx-rt-series/i.mx-rt1060-crossover-processor-with-arm-cortex-m7-core:i.MX-RT1060 241 242.. _i.MX RT1060 Datasheet: 243 https://www.nxp.com/docs/en/nxp/data-sheets/IMXRT1060CEC.pdf 244 245.. _i.MX RT1060 Reference Manual: 246 https://www.nxp.com/webapp/Download?colCode=IMXRT1060RM 247