Files

n_signer Teensy 4.1 Firmware

Status: Planned — not yet implemented. See plans/teensy41_signer_port.md.

The Teensy 4.1 (NXP i.MX RT1062, Cortex-M7 @ 600 MHz) is the high-capacity OTP pad target. Its built-in SD slot supports 1 TB SDXC cards (exFAT) via PJRC's SdFat library, making it the ideal hardware signer for large one-time-pad storage.

Why the Teensy 4.1

Concern Teensy 4.1 CYD (ESP32) Feather S3 TFT (ESP32-S3)
MCU 600 MHz Cortex-M7 240 MHz Xtensa LX6 240 MHz Xtensa LX7
SRAM 1 MB + 16 MB PSRAM 512 KB (no PSRAM) 512 KB + quad PSRAM
SD slot 4-bit SDMMC, exFAT, up to 2 TB 1-bit SDSPI, FAT32, up to 32 GB
USB Hi-Speed (480 Mbps) device + host CH340 UART only Full-Speed USB
WiFi None Yes (unused) Yes (unused)
Ethernet 10/100 PHY (optional)
PQ crypto speed ~1-2 s SLH-DSA-128s 5-30 s SLH-DSA-128s 5-30 s SLH-DSA-128s

SD card size support

Card type Size Works?
SDSC ≤ 2 GB Yes (FAT16/32)
SDHC 2 32 GB Yes (FAT32)
SDXC 32 GB 2 TB Yes (exFAT via SdFat)
SDUC 2 128 TB No

1 TB SDXC cards work — SdFat has native exFAT support, and the Teensy's 4-bit SDMMC bus runs at ~20-40 MB/s. No reformatting needed.

Display + touch

4.0" ST7796S 480×320 SPI TFT with XPT2046 resistive touch (Hosyond or equivalent, $12-15). Specs: 4-wire SPI, RGB 65K, 3.3V5V (works at the Teensy's 3.3V logic), XPT2046 resistive touch, includes touch pen + on-module SD slot.

Resistive touch is the right choice for a hardware signer (deliberate physical activation, stylus-compatible, simple driver). The XPT2046 driver ports from the CYD's touch.c with 480×320 resolution constants. The ST7796S display driver is new code (different init sequence than the CYD's ILI9341).

Wiring: TFT SPI on pins 11/12/13, CS=10, DC=9, RESET=8, BL=22; touch shares the SPI bus with T_CS=7, T_IRQ=6. See plans/teensy41_signer_port.md for the full pin table.

Build (planned)

# Arduino CLI / Teensyduino
arduino-cli compile --fqbn teensy:avr:teensy41 firmware/teensy41
arduino-cli upload -p /dev/ttyACM0 --fqbn teensy:avr:teensy41 firmware/teensy41

See the port plan: plans/teensy41_signer_port.md.