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
| Component | Evidence / capability | Notes |
|---|---|---|
Cortex-M7 FPv5-D16 | 2.2M diff cases, 0 disagrees | Full double-precision FPU and DSP ISA |
eDMA + periodic timer | Peripheral oracle PASS | Clean-tree peripheral oracle record |
FlexCAN / LPI2C / LPSPI | Attached sensor & multi-node scenes | Test 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.elfSuite & 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.yamlTroubleshooting checklist
| Symptom | Fix |
|---|---|
| Teensy Serial (USB CDC) prints nothing in headless run | Route test telemetry to Serial1 (LPUART6) when running headless CI suites. |
| eDMA channel never fires completion ISR | Confirm DMAMUX channel source ID and enable bit (DMAMUX_CHCFG_ENBL) before starting TCD. |
| HardFault in TCM/FlexRAM init | Inspect stacked PC and CFSR bits in the HardFault Decoder; verify linker script matches FlexRAM bank split. |
| LPSPI transfer drops trailing bytes | Wait for TDF/RDF and module busy status before de-asserting PCS. |