OIEIEIO
Member
I wanted to share a small Teensy 4.0 test rig I’ve been working on using Rust instead of the usual Arduino / Teensyduino environment.
The setup is a Teensy 4.0 running Rust firmware, with CAN1 transmitting through one external CAN transceiver, across a short CANH/CANL twisted pair, into a second transceiver, and back into CAN2 receive. The firmware is currently sending a 64-frame drone-style CAN catalog once per cycle, and the host-side Rust dashboard is parsing the live serial/log stream.
I know most Teensy work here is naturally centered around Arduino and Teensyduino, but Rust on Teensy 4.x may be useful for people who want a more bare-metal/register-level workflow while still keeping a clean modern build system.
The dashboard shows:
CAN1 TX -> external transceiver -> CAN bus -> external transceiver -> CAN2 RX
64 frames per cycle
500 kbit/s
100% pass rateTX/RX frame matchinglive decoded frame grid
CAN error/status counters
Attached are screenshots of the physical test rig and the live dashboard.
At the moment I’ve tested the rig at 500 kbit/s, which is half of the SN65HVD230’s rated 1 Mbit/s CAN data rate.
This has been a useful bring-up test for learning the Teensy 4.x CAN hardware from Rust. The workflow has been fluid: normal Rust project structure, cargo build, cargo run, flashing through the Teensy runner, and a separate Rust terminal dashboard for monitoring.
I’ve also done a Teensy 4.1 SD card bring-up directly on bare metal Rust, so this is becoming a useful environment for experimenting with Teensy hardware outside the usual Teensyduino path.
Thanks to Paul and the PJRC crew. The Teensy 4.x boards have been solid, approachable hardware to work with, and they’ve been fun to explore from Rust.
The setup is a Teensy 4.0 running Rust firmware, with CAN1 transmitting through one external CAN transceiver, across a short CANH/CANL twisted pair, into a second transceiver, and back into CAN2 receive. The firmware is currently sending a 64-frame drone-style CAN catalog once per cycle, and the host-side Rust dashboard is parsing the live serial/log stream.
I know most Teensy work here is naturally centered around Arduino and Teensyduino, but Rust on Teensy 4.x may be useful for people who want a more bare-metal/register-level workflow while still keeping a clean modern build system.
The dashboard shows:
CAN1 TX -> external transceiver -> CAN bus -> external transceiver -> CAN2 RX
64 frames per cycle
500 kbit/s
100% pass rateTX/RX frame matchinglive decoded frame grid
CAN error/status counters
Attached are screenshots of the physical test rig and the live dashboard.
At the moment I’ve tested the rig at 500 kbit/s, which is half of the SN65HVD230’s rated 1 Mbit/s CAN data rate.
This has been a useful bring-up test for learning the Teensy 4.x CAN hardware from Rust. The workflow has been fluid: normal Rust project structure, cargo build, cargo run, flashing through the Teensy runner, and a separate Rust terminal dashboard for monitoring.
I’ve also done a Teensy 4.1 SD card bring-up directly on bare metal Rust, so this is becoming a useful environment for experimenting with Teensy hardware outside the usual Teensyduino path.
Thanks to Paul and the PJRC crew. The Teensy 4.x boards have been solid, approachable hardware to work with, and they’ve been fun to explore from Rust.