MCU Testing & CI

Teensy 4.1 (NXP i.MX RT1062) simulation & CI

Test Teensy 4.1 robotics and flight-control firmware in CI—backed by passing eDMA + timer peripheral oracle and ARMv7E-M differential runs.

PJRC Teensy 4.1 packs a 600 MHz NXP MIMXRT1062 Cortex-M7 with 1 MB TCM/OCRAM, FlexCAN FD and eDMA. High-rate robotics loops running on Teensy 4.1 often fail only under sensor dropouts or DMA buffer wrap bugs that are hard to trigger on a desk.

The teensy-4-1 board twin passes the ARMv7E-M FPv5-D16 CPU differential suite and the Teensy 4.1 eDMA + periodic-timer peripheral oracle.

Teensy 4.1 twin checkpoints

ComponentEvidence / capabilityNotes
Cortex-M7 FPv5-D162.2M diff cases, 0 disagreesFull double-precision FPU and DSP ISA
eDMA + periodic timerPeripheral oracle PASSClean-tree peripheral oracle record
FlexCAN / LPI2C / LPSPIAttached sensor & multi-node scenesTest BMI088, BMP388, PCA9685, CAN nodes

Local CLI workflow

Shell — run Teensy 4.1 ELF
pio run -e teensy41
ct run --json --board teensy-4-1 .pio/build/teensy41/firmware.elf

Suite & fault configuration

tests/teensy41.suite.yaml
version: 1
board: teensy-4-1
firmware: .pio/build/teensy41/firmware.elf
tests:
  - name: imu-control-loop-nominal
    timeout_ms: 2500
    expect:
      console_contains: "LOOP_1KHZ_OK"
      exit_code: 0
  - name: bmi088-frozen-gyro
    faults:
      - at_ms: 100
        part: bmi088
        kind: frozen_reading
    expect:
      console_contains: "FAILSAFE_ENGAGED"

CI pipeline integration

.github/workflows/teensy41-ci.yml
name: Teensy 4.1 Twin CI
on: [push, pull_request]
jobs:
  teensy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: pio run -e teensy41
      - uses: circuittwin/action@v1
        with:
          suite: tests/teensy41.suite.yaml

Troubleshooting checklist

SymptomFix
Teensy Serial (USB CDC) prints nothing in headless runRoute test telemetry to Serial1 (LPUART6) when running headless CI suites.
eDMA channel never fires completion ISRConfirm DMAMUX channel source ID and enable bit (DMAMUX_CHCFG_ENBL) before starting TCD.
HardFault in TCM/FlexRAM initInspect stacked PC and CFSR bits in the HardFault Decoder; verify linker script matches FlexRAM bank split.
LPSPI transfer drops trailing bytesWait for TDF/RDF and module busy status before de-asserting PCS.

Related boards & component twins

More in MCU Testing & CI