Teensy 4.0

PJRCMCU 8-32 bitarduino

⚡ The essentials in 60 seconds

The Teensy 4.0 represents a significant leap in performance for hobbyist and professional electronics developers, serving as the first member of the i.MX RT "crossover MCU" generation. Originally designed by PJRC and Paul Stoffregen, this board was released in 2019 and has since transitioned to manufacturing and sales by SparkFun Electronics as of March 2025. Despite this change in production, the core design remains active and in production, with PJRC explicitly recommending it as the migration path for users of the discontinued Teensy 3.2. The board is built around the NXP MIMXRT1062 microcontroller, featuring a single-core ARM Cortex-M7 processor. While rated at 600 MHz, this processor is officially overclockable to 912 MHz, offering dual-issue superscalar architecture and branch prediction, features rarely found in microcontrollers at this price point. This architecture allows the chip to execute two instructions per clock cycle, significantly boosting performance for numerically intensive tasks. The processor includes hardware floating-point units for both 32-bit and 64-bit calculations, along with DSP extensions, making it exceptionally capable for audio processing and complex mathematical operations.

Memory management is a standout feature of the Teensy 4.0. It includes 2 MB of external SPI flash, of which 1984 KB is usable for user code and data, with the remaining space reserved for system functions like EEPROM emulation. The board also boasts 1024 KB of RAM, split into two distinct regions: Tightly Coupled Memory (TCM) and DMA-optimized RAM. TCM provides single-cycle access speeds, which is crucial for high-speed code execution, while the second RAM region is optimized for Direct Memory Access (DMA), allowing peripherals to transfer data without burdening the CPU. This distinction is important for developers, as placing code in TCM using the FASTRUN keyword can significantly improve performance. Additionally, the board features 1080 bytes of emulated EEPROM, though developers should note that writing to this memory temporarily stalls code execution, so it should be avoided in real-time critical loops.

In terms of connectivity and input/output, the Teensy 4.0 offers 40 digital I/O pins, though only 24 are accessible on a standard solderless breadboard. It is critical to note that, unlike its predecessor the Teensy 3.2, the Teensy 4.0 is not 5V tolerant on any pin except VIN and VUSB. Connecting 5V signals to these pins can damage the board, so level shifting is required for 5V logic compatibility. The board supports 31 PWM pins grouped into 19 independently clocked groups, providing flexible control for motors and LEDs. For analog sensing, there are 14 inputs with two ADC converters. However, the analog performance is a known limitation; the effective resolution is approximately 10 bits due to noise, and the reference voltage is fixed at 3.3V with no option for external reference via analogReference. For projects requiring high-precision analog data, external ADCs are recommended.

Communication capabilities are extensive, featuring seven UARTs, three SPI interfaces, three I2C buses, and three CAN controllers, one of which supports CAN FD. The board also includes two I2S/TDM ports for high-quality audio, capable of handling up to 16 channels, along with independent S/PDIF input and output. A unique feature is the dual USB capability: a standard device port at 480 Mbit/s for connecting to a computer, and a second USB host port on bottom SMD pads. This host port allows the Teensy to act as a host for keyboards, mice, and other USB devices, though it lacks power management circuitry, meaning hot-plugging devices can cause voltage drops and potential resets. Users must exercise caution or add external power switching components when using the host port.

The Teensy 4.0 is particularly renowned in the audio and LED lighting communities. Its processing power and DSP instructions allow it to stream 44.1 kHz audio using the Teensy Audio Library, which includes a graphical design tool for creating signal flow graphs. For LED projects, libraries like OctoWS2811 and WS2812Serial enable the control of massive numbers of addressable LEDs using DMA, ensuring smooth animations without blocking the main program. The board also supports HUB75 RGB LED panels via the SmartMatrix library. Security features include a Cryptographic Acceleration Unit, a True Random Number Generator, and a Bus Encryption Engine for code protection. A "Lockable" variant is available, which allows for permanent secure mode and JTAG disabling to protect intellectual property.

Powering the board requires attention to detail. It operates on 5V via USB or the VIN pin, with an onboard regulator providing 3.3V. The board is not designed to be powered through the 3.3V pin, and the VIN and VUSB pins are internally connected, which can cause back-powering issues if not managed correctly. The CPU core voltage is dynamically adjusted by an onboard DC-DC buck converter, ranging from 0.95V to 1.25V depending on the clock speed. Typical current consumption at 600 MHz is around 100 mA. The board includes an on-die temperature sensor and a real-time clock with an onboard 32.768 kHz crystal, eliminating the need for external components. Programming is primarily done through the Arduino IDE with the Teensyduino add-on, though support exists for PlatformIO, Visual Micro, and CircuitPython. The bootloader resides in a separate chip, ensuring that the main flash memory is entirely available to the user and that the board cannot be bricked by software errors. Despite its power, the Teensy 4.0 maintains the same compact 1.4 x 0.7 inch form factor as previous Teensy models, making it a drop-in upgrade for many existing projects, provided the 5V tolerance limitations are respected.

Forum (1 topic) →

AttrSpecsverified
mcuNXP MIMXRT1062DVL6 (boards after Dec 2021: MIMXRT1062DVL6B, "the 'B' version fixes obscure hardware bugs with CAN bus and USB device isochronous mode") — techspecs, store page Design Changes. SparkFun confirms the DVL6B and the 144-pin package (SparkFun overview).✔
cpusingle-core ARM Cortex-M7, 600 MHz rated, officially overclockable to 912 MHz (techspecs table). Dual-issue superscalar (2 instructions/clock achievable; 40–50 % of the time on numerically intensive Arduino C++ per PJRC benchmarks), first ARM MCU with branch prediction, hardware FPU for both 32-bit float and 64-bit double, DSP extensions, two 32 KB caches (instruction + data) (store page, Processor). - Community overclocking: the forum "Overclocking the Teensy 4.x — Ultimate Thread" tests 720/816/912/960/1008 MHz, with ≥912 MHz gated behind a YES_COOLING flag ("Overclocking where COOLING IS REQUIRED") — forum thread 77689.✔
memory- Flash: 2 MB external SPI flash (Winbond W25Q16JV, datasheet); 1984 KB usable — the top 64 KB is reserved for EEPROM emulation data and the LED-blink restore program (store page, Memory; techspecs lists 1984 KB, 66 Mbytes/sec bandwidth, 65536-byte cache). Portion of flash usable for files via LittleFS. - RAM: 1024 KB total; half (RAM1) is tightly coupled memory (TCM) with single-cycle access via 64-bit ITCM/DTCM buses, half (RAM2) is optimized for DMA access (store page, Memory, forum memory-region thread). Placement keywords: FASTRUN (default, code in RAM1), FLASHMEM, PROGMEM/F, DMAMEM (RAM2) (store page). - EEPROM: 1080 bytes emulated (techspecs); writes temporarily stall code execution from flash (store page). - RTC RAM: 16 bytes (registers LPGPR0–LPGPR3), battery-backed via VBAT.✔
digital_i_o40 pins (24 accessible on a solderless breadboard), output HIGH = 3.3 V; inputs are NOT 5 V tolerant ("Except the VIN and VUSB pins, nothing is 5V tolerant on these new parts" — Paul Stoffregen, release thread). All 40 pins interrupt-capable. Output current: store page recommends max 4 mA per pin; the comparison table lists 10 mA — use the conservative figure. All pins: pull-up/pull-down/keeper, slew-rate limiting, 7-step variable drive strength (≈150 Ω to ≈21 Ω), 4-step output bandwidth (50/100/150/200 MHz). Pin 13 has the orange status LED.✔
pwm31 PWM pins in 19 independently-clocked groups (analogWriteFrequency) per the store page; the techspecs table lists 3× 32-bit FlexPWM + 32× 16-bit FlexPWM/QuadTimer channels but "27 total PWM outputs" for the 4.0 — a documented inconsistency between the two official pages.✔
analog14 analog inputs, 2 ADC converters, default 10-bit (up to 12-bit in hardware, "in practice only up to 10 bits are normally usable due to noise"; Paul: "effective number of bits is about 10", release thread). Input range fixed 0–3.3 V; no AREF pin — analogReference has no effect (store page, Analog Pins). 4 analog comparators. No PGA, no capacitive touch, no DAC (unlike Teensy 3.5/3.6) (techspecs).✔
timers49 total (3× 32-bit FlexPWM modules, 32× 16-bit, 4 quadrature decoders, 4 IntervalTimers, 3 watchdogs, 2 GPTs), 32-bit cycle counter ARM_DWT_CYCCNT incrementing at CPU clock (store page, Timing, techspecs).✔
comms7 UARTs (all with FIFOs), 3 SPI (first with FIFO), 3 I2C (100/400/1000 kbit/s), 3 CAN (one with CAN FD; transceiver chip required), 2 I2S/TDM ports (up to 8 channels I2S / 16 TDM) + independent S/PDIF in/out, MQS "Medium Quality Sound" speaker output, programmable FlexIO peripheral (store page, Communication).✔
usbdevice port 480 Mbit/s (Serial, MIDI/MIDIx4/MIDIx16, Audio, Keyboard, Mouse, Joystick, Touchscreen, MTP, Flight Sim, RawHID, …) + second USB host port at 480/12/1.5 Mbit/s on two bottom SMD pads, fully independent of the device port (USBHost_t36 library). The 4.0's host port has no power-management circuitry (data pins only) (store page).✔
sd_cardno socket — 8 bottom pads for connector HFW8R-1STE1H1LF give the same 4-bit native SDIO signals as the Teensy 4.1 socket (SD.begin(BUILTIN_SDCARD)) (store page, Memory/SD Card).✔
dma32 general-purpose channels, plus dedicated DMA engines in USB device/host and SDIO (store page, Special Features).✔
security_hardwareCryptographic Acceleration Unit (symmetric ciphers + hashes — "currently no library support exists"), true Random Number Generator (Entropy library), Bus Encryption Engine for on-the-fly code decryption, optional permanent secure mode on Lockable units, JTAG disable (store page, Code Security / Special Features, td_code_security).✔
sensors_miscon-die temperature sensor (InternalTemperature library), RTC with onboard 32.768 kHz crystal (unlike Teensy 3.2 — no crystal to solder), On/Off power-control pin (store page).✔
power5 V at VUSB/VIN (connected; cut the bottom pads to separate them before feeding VIN alongside USB). Onboard 3.3 V regulator, recommended max 250 mA external 3.3 V load; the board is not meant to be powered through the 3.3V pin (forum mod thread 64468). VBAT takes a 3 V coin cell (CR2032) for RTC + 16-byte RTC RAM. CPU core voltage generated by onboard DC-DC buck: 1.25 V at 600 MHz, 1.15 V at ≤528 MHz, 0.95 V at 24 MHz, software-adjustable in 50 mV steps.✔
typical_consumption"When running at 600 MHz, Teensy 4.0 consumes approximately 100 mA" (5 V supply); lower at ≤528 MHz (store page, Power Consumption).✔
size_form_factor1.4 × 0.7 inch, identical footprint and breadboard layout to Teensy 3.0/3.1/3.2 (Wikipedia, SparkFun); 34 finished holes of 0.965 mm; bottom pad sizes USB-host 3.048×1.016, SD 2.000×0.600, pins 24–33 2.794×0.889 mm (store page, Dimensions).✔
  • Manufacturer: PJRC (Custom Electronic Design & Development, Paul Stoffregen), USA. Since March 2025 the boards are manufactured and sold by SparkFun Electronics ("SparkFun is now manufacturing Teensy products", PJRC store page banner; the FCC/ISED and CE/UKCA declarations are titled "For Teensy 4.0 manufactured and sold by SparkFun Electronics, after March 2025") — PJRC store page, SparkFun product page.
  • Product line: Teensy 4.x, first member of the i.MX RT "crossover MCU" generation; successor to the Teensy 3.x line. PJRC launch page: pjrc.com/teensy-4-0/ ("Teensy 4.0 features a 600 MHz Cortex-M7 processor, dramatically faster than prior Teensy models").
  • Release year: 2019. The launch was announced on the PJRC forum in the "Teensy 4.0 Release" thread, where Paul Stoffregen describes shipping "almost all the orders placed in the first ~4 hours after the announcement" (forum thread 57112).
  • Launch price:
  • Status: Active / in production (SparkFun-manufactured since March 2025; PJRC ran design revisions as late as August 2022 — see Problems §design changes). PJRC explicitly recommends the Teensy 4.0 as the migration path for the discontinued Teensy 3.2 (store page).
  • Variants: - Teensy 4.0 (standard, fuse-protected against bricking) and Lockable Teensy 4.0 — identical hardware, different fuse configuration, enables secure mode / code security (store page, Code Security; SparkFun sells it as "Teensy 4.0, Lockable", product 28368). - With or without pre-soldered pins (separate FCC/CE filings "Teensy 4.0" vs "Teensy 4.0 with pins", store page compliance section). - Sibling board Teensy 4.1 (same IMXRT1062 silicon, DVJ6 package, more pins, onboard Ethernet PHY + SD socket + PSRAM pads) — techspecs comparison.

+ Strengths

  • Fastest widely-available MCU board of its class: 600 MHz Cortex-M7 with dual-issue, branch prediction, TCM and 64-bit dual FPU at a hobbyist price (pjrc.com/teensy-4-0/, SparkFun).
  • Same tiny form factor as Teensy 3.1/3.2 (1.4×0.7 in, drop-in size/layout compatibility with most pin functions retained) — SparkFun, Wikipedia.
  • Audio-first ecosystem: the Teensy Audio Library + graphical Audio System Design Tool stream 44.1 kHz audio using the M7 DSP instructions; 2 I2S/TDM ports (8/16 channels), independent S/PDIF in/out, MQS speaker output, cheap PT8211 DAC kit; works with the Audio Shield (Rev D+ routes the T4 correctly — see Problems).
  • LED-strip monster: OctoWS2811 drives WS2812 strips via DMA at 30 Hz video refresh — on Teensy 4.0 it is no longer limited to 8 pins ("supports use of any number of digital pins"); WS2812Serial gives up to 8 non-blocking DMA instances; SmartMatrix + SmartLED Shield v5 drives HUB75 RGB panels from 32x16 up to 128x64 (store page, Lights & LEDs).
  • MIDI: class-compliant USB MIDI with MIDIx4/MIDIx16 virtual cables — a staple of DIY MIDI controllers (td_midi).
  • Dual USB at 480 Mbit/s (device + independent host on bottom pads) — rare at this size/price (store page).
  • Hardware security: bus encryption + EHEX encrypted firmware updates + Lockable variant with permanent secure mode and JTAG kill-switch (td_code_security).
  • Bootloader in a separate chip — zero flash cost, unbrickable by flash programming (store page).
  • FlexIO + Pixel Processing Pipeline + peripheral cross-triggering (PPP software "still very experimental") (store page, PPP forum thread).
  • On/Off pin: hold 4 s to cut the 3.3 V rail, 0.5 s to reboot; power state retained by VBAT coin cell (store page, Power).
  • Pinout reference card included (front/back PDFs card10a / card10b); community mega-pinout chart by KurtE (forum).

− Weaknesses

  • Silicon revisions / errata: boards before Dec 2021 use the Rev A chip (MIMXRT1062DVL6A), after Dec 2021 Rev B (DVL6B), which "fixes obscure hardware bugs with CAN bus and USB device isochronous mode". Separate official errata documents exist for each: Rev B errata / Rev A errata (store page).
  • Audio shield wiring at launch: original (Rev B) audio shields do not work directly on the T4 — signals moved pins; Rev B shields need added wires plus a 100 Ω resistor in series with MCLK; Rev C added only the resistor; Rev D finally routed the shield for Teensy 4.0 (release thread, Paul Stoffregen).
  • USB host hot-plug brown-out: the 4.0's host port has no current-limit switch; "hot-plugging a USB device can draw too much current and possibly crash (brown-out reset) your Teensy" — add a TPS2055A-class switch or don't hot-plug (release thread, store page, USB Host).
  • No 5 V tolerance anywhere (except VIN/VUSB) — unlike the 5 V-tolerant Teensy 3.2, driving any pin above 3.3 V risks damage (release thread, store page, Digital Pins).
  • VIN/VUSB back-powering: VIN and VUSB are connected; applying 5 V to VIN while USB is plugged can feed power back into the computer — cut the bottom pads to separate (store page, VIN Pin).
  • Weak ADC: no AREF, fixed 3.3 V reference, ~10 effective bits despite 12-bit hardware; noisy analog designs need external ADCs (release thread, store page, Analog Pins).
  • Double-vs-single float migration trap: T4 has hardware double-precision; 3.x code relied on a compiler option forcing single-precision FP constants, "this might cause some subtle errors on T4 where I believe the option is not used" (release thread).
  • Startup brown-out on weak 5 V supplies (pre-Aug-2022 boards): R4 changed to 470 K on boards after August 2022, "which helps with startup with VUSB-VIN is lower than 4.1V" (store page, Design Changes).
  • No hardware reset: "Teensy 4.0 does not have a hardware reset signal available" — plan for software watchdog resets in field code (store page, Programming).
  • EEPROM writes stall execution: writing the 1080-byte emulated EEPROM "temporarily stalls code execution from flash" — avoid in hard real-time loops (store page, Memory).
  • Pin 13 LED trap: when pin 13 is an input, INPUT_PULLUP must not be used (the LED biases the pin) (store page, LED Pin).
  • 3.3 V input not supported without a special modification (forum 64468); 3.3V pin is output-only, 250 mA max external.
  • Overclocking needs cooling: ≥912 MHz is only stable with active cooling per community testing; the official supported overclock is 912 MHz (forum 77689, techspecs).
  • Official-page inconsistencies to be aware of: PWM count (store: 31 pins; table: 27 total), SPI count (store: 3; table row reads 2), per-pin current (store: 4 mA; table: 10 mA) — cite the store page for design, verify against the schematic.
  • Retour d'expérience expert expert — expert-microcontroleur
    • Je viens de migrer un projet audio d'une Teensy 3.6 vers la 4.0. La puissance du Cortex-M7 à 600 MHz est bluffante, surtout pour le routage du shield audio avec la bibliothèque dédiée. Attention toutefois aux pièges documentés : si vous avez un vieux shield Rev B, il ne fonctionnera pas nativement.… — expert-microcontroleur
    • Merci pour le retour sur le shield, je n'avais pas vu l'histoire de la résistance MCLK sur les vieurs révisions. Par contre, je bute sur un souci d'alimentation. J'ai tenté d'alimenter la carte par le vin 5V alors que le cable USB était branché pour le debug, et j'ai eu des coupures bizarres. J'ai … — maker_bricolage
    • Oui, tu as bien fait de vérifier. La fiche technique est claire : VIN et VUSB sont connectés d'usine. Si tu alimentes par VIN avec l'USB branché, tu risques du retour de courant vers ton PC ou des conflits de tension. Il faut impérativement couper les pads sous la carte pour les isoler si tu utilis… — expert-microcontroleur

Community feedback and projects

  • HUB75 LED-panel graphics (SmartMatrix + SmartLED Shield v5)

    HUB75 LED-panel graphics (SmartMatrix + SmartLED Shield v5) — drives 32x16–128x64 RGB panels from a Teensy 4.0 with minimal CPU; scrolling text, FastLED patterns, animated GIFs — , . (unverified au 2026-10-13) Circuit Sax — electronic saxophone — (PJRC blog f…

  • Massive WS2812 installations (OctoWS2811)

    Massive WS2812 installations (OctoWS2811) — DMA-driven NeoPixel refresh at 30 Hz video rate, any number of pins on T4 — . (unverified au 2026-10-13) Audio effects/synthesis instruments (Teensy Audio Library + Design Tool) — drag-and-drop signal-flow graphs th…

  • 20 ns pulse counter / browser-based data acquisition

    20 ns pulse counter / browser-based data acquisition — (PJRC blog feature): FreqCount down to 9 ns pulse widths at 50 MHz, Teensy as web server (Teensy 4.1) — . (unverified au 2026-10-13)

  • Silicon revisions / errata: boards before Dec 2021 use the Rev A chip (MIMXRT1062DVL6A), after Dec 2021 Rev B (DVL6B), which "fixes obscure hardware bugs with CAN bus and USB device isochronous mode". Separate official errata documents exist for each: Rev B errata / Rev A errata (store page).
  • Audio shield wiring at launch: original (Rev B) audio shields do not work directly on the T4 — signals moved pins; Rev B shields need added wires plus a 100 Ω resistor in series with MCLK; Rev C added only the resistor; Rev D finally routed the shield for Teensy 4.0 (release thread, Paul Stoffregen).
  • USB host hot-plug brown-out: the 4.0's host port has no current-limit switch; "hot-plugging a USB device can draw too much current and possibly crash (brown-out reset) your Teensy" — add a TPS2055A-class switch or don't hot-plug (release thread, store page, USB Host).
  • No 5 V tolerance anywhere (except VIN/VUSB) — unlike the 5 V-tolerant Teensy 3.2, driving any pin above 3.3 V risks damage (release thread, store page, Digital Pins).
  • VIN/VUSB back-powering: VIN and VUSB are connected; applying 5 V to VIN while USB is plugged can feed power back into the computer — cut the bottom pads to separate (store page, VIN Pin).
  • Weak ADC: no AREF, fixed 3.3 V reference, ~10 effective bits despite 12-bit hardware; noisy analog designs need external ADCs (release thread, store page, Analog Pins).
  • Double-vs-single float migration trap: T4 has hardware double-precision; 3.x code relied on a compiler option forcing single-precision FP constants, "this might cause some subtle errors on T4 where I believe the option is not used" (release thread).
  • Startup brown-out on weak 5 V supplies (pre-Aug-2022 boards): R4 changed to 470 K on boards after August 2022, "which helps with startup with VUSB-VIN is lower than 4.1V" (store page, Design Changes).
  • No hardware reset: "Teensy 4.0 does not have a hardware reset signal available" — plan for software watchdog resets in field code (store page, Programming).
  • EEPROM writes stall execution: writing the 1080-byte emulated EEPROM "temporarily stalls code execution from flash" — avoid in hard real-time loops (store page, Memory).
  • Pin 13 LED trap: when pin 13 is an input, INPUT_PULLUP must not be used (the LED biases the pin) (store page, LED Pin).
  • 3.3 V input not supported without a special modification (forum 64468); 3.3V pin is output-only, 250 mA max external.
  • Overclocking needs cooling: ≥912 MHz is only stable with active cooling per community testing; the official supported overclock is 912 MHz (forum 77689, techspecs).
  • Official-page inconsistencies to be aware of: PWM count (store: 31 pins; table: 27 total), SPI count (store: 3; table row reads 2), per-pin current (store: 4 mA; table: 10 mA) — cite the store page for design, verify against the schematic.
  • Premiers pas sur le Teensy 4.0 : Teensyduino, Loader et premier Blink debutant Schéma : IMG-teensy-40-debutant-1-teensy40-premiers-pas-blink.svg — Teensy 4.0 vue de dessus (format 1,4 × 0,7 pouce, même empreinte que le Teensy 3.2), flèches sur la LED orange (pin 13), le bouton Program, la LED rouge du bootloader et le port micro-USB ; à côté, la fenêtre Teensy Loader.
  • GPIO et PWM sous 3,3 V : les règles d'or du Teensy 4.0 debutant Schéma : IMG-teensy-40-debutant-2-teensy40-gpio-pwm-3v3.svg — Teensy 4.0 sur breadboard (24 broches accessibles sans soudure) : bouton poussoir sur la broche 2 vers GND, LED + 330 Ω sur la broche 6 (broche PWM), broches 24-33 sur les pastilles inférieures ; encart « 3,3 V max — aucune tolérance 5 V ».
  • Entrées analogiques et capteur de température interne : le ADC et ses limites debutant Schéma : IMG-teensy-40-debutant-3-teensy40-analogique-temperature.svg — Teensy 4.0 : potentiomètre 10 kΩ entre 3,3 V et GND, curseur vers A0 ; encart sur la puce MIMXRT1062 avec la mention « capteur de température sur la puce » et retour du Moniteur série affichant volts et degrés.
  • Piloter un ruban WS2812 sans bloquer le CPU : WS2812Serial et OctoWS2811 intermediaire Schéma : IMG-teensy-40-intermediaire-4-teensy40-ruban-ws2812-dma.svg — Teensy 4.0 alimentant un ruban de 60 WS2812B : data sur la broche 1 (TX de Serial1), résistance de données, condensateur 1000 µF sur la ligne 5 V du ruban ; encart « DMA : le CPU continue de tourner pendant l'envoi ».
  • Contrôleur MIDI USB : un potard qui joue du piano (MIDIx4/MIDIx16) intermediaire Schéma : IMG-teensy-40-intermediaire-5-teensy40-controleur-midi-usb.svg — Teensy 4.0 relié par USB à un ordinateur affichant un DAW ; potentiomètre sur A0, encart « Tools > USB Type : MIDI », bulles note ON / note OFF vers la piste logicielle.
  • Comprendre la mémoire : 2 Mo de flash, 1 Mo de RAM TCM/DMA, EEPROM émulée et LittleFS intermediaire Schéma : IMG-teensy-40-intermediaire-6-teensy40-memoire-flash-ram-eeprom.svg — carte mémoire du Teensy 4.0 : puce flash externe W25Q16JV 2 Mo (1984 Ko utilisables, 64 Ko réservés EEPROM+restore), RAM 1024 Ko coupée en RAM1 (TCM, accès 1 cycle) et RAM2 (optimisée DMA), 16 octets de RTC RAM sur pile VBAT, 1080 octets d'EEPROM émulée.
  • Deux ports USB simultanés : périphérique 480 Mbit/s ET hôte USB sur les pastilles avance Schéma : IMG-teensy-40-avance-7-teensy40-double-usb-host-esclave.svg — Teensy 4.0 retourné montrant les pastilles inférieures : deux pastilles du port USB host (3,048 × 1,016 mm), pads de coupure VIN/VUSB, connecteur SD 4 bits ; à gauche le câble micro-USB vers le PC (device), à droite un clavier USB branché sur le port host via un adaptateur avec interrupteur de limitation de courant.
  • Chaîne audio 44,1 kHz : Audio Library, Design Tool, I2S, S/PDIF et sortie MQS avance Schéma : IMG-teensy-40-avance-8-teensy40-audio-44k-design-tool.svg — Teensy 4.0 avec Audio Shield empilé (rappel : broches déplacées sur Rev B, résistance 100 Ω sur MCLK) ; en médaillon la fenêtre du Design Tool PJRC avec un graphe de flux (générateur → filtre → sortie) exporté en code Arduino ; à droite les broches I2S, S/PDIF et la sortie MQS.
  • Pousser la carte : overclocking 912 MHz, gestion d'alimentation, sécurité et récupération avance Schéma : IMG-teensy-40-avance-9-teensy40-overclock-alim-securite-recuperation.svg — Teensy 4.0 avec dissipateur + petit ventilateur sur la puce MIMXRT1062, pile CR2032 sur VBAT, broche On/Off ; encarts : Tools > CPU Speed (600 → 912 MHz), LED rouge du bootloader (puce séparée), bouton Program avec la mention « maintien 13-17 s = effacement total ».

Code library — examples written for this board

  • clignotante.ino Arduino

    The pin 13 LED blinks at 1 Hz, driven from the SysTick interrupt: loop() stays fully free. A typical pattern on Teensy boards, whose ARM Cortex-M core handles real hardware interrupts.

  • touche-capacitive.ino Arduino

    touchRead() is the signature Teensy function: it measures pin capacitance and detects a finger on a plain wire, with no 555 circuit or dedicated capacitive pad. Ideal for improvised touch interfaces.

  • analogique-12-bits.ino Arduino

    Teensy ADCs reach 12 bits (0-4095) versus 10 on classic Arduinos. This sketch combines hardware averaging (analogReadAveraging) and a software sliding window for a very stable voltage from an LDR or …

  • midi-piano.ino Arduino

    The Teensy enumerates as a USB MIDI instrument with no extra circuit: three buttons play a C major chord received straight by a DAW (Ardour, LMMS, GarageBand). The core MIDI library handles the whole…

  • pwm-respiration.ino Arduino

    The LED breathes along a gamma 2.2 curve matched to human brightness perception. On Teensy, analogWriteFrequency() lets you pick the PWM frequency (3 kHz here) so LED drivers never chirp audibly.

  • servo-angle.ino Arduino

    A typical Teensy combo: a capacitive touch controls a hobby servo speed. The core Servo library works exactly like on Arduinos, and touchRead() gives a contact-proportional value for organic variatio…

  • bouton-led.ino Arduino

    The button is read through an external interrupt: no press is lost even when loop() is busy. A 30 ms filter inside the ISR removes bounce, and the noInterrupts section guarantees a coherent counter r…

  • ruban-neopixel.ino Arduino

    A sinusoidal blue-green gradient slides over 24 NeoPixel LEDs. The Teensy fast 32-bit CPU computes floating-point colors at 25 fps with ease, which an AVR cannot afford.

  • oled-i2c.ino Arduino

    A 128x64 I2C OLED shows the voltage read on A0 and the uptime. The framebuffer managed by Adafruit_SSD1306 enables full graphics (text, curves, sprites) over a single two-wire bus.

  • buzzer-melodie.ino Arduino

    A rising then falling scale plays on a passive buzzer through tone(). The melody lives in flash (PROGMEM + pgm_read_near_int), a healthy habit that keeps RAM free for audio or sensor processing.

Examples and repos found online